Nodes can carry pointers to media docs (transcripts, sealed orders,
images). Authors upload from the node editor (gated on
npc-dialogues:update); the runtime resolves ids to file URLs server-side
and players open them in a dossier-styled viewer modal with download
and new-tab escape hatches. Deleted media resolve to nothing instead of
dead chips.
The per-browser localStorage tracking reset on every new device and kept
re-badging whole conversations whenever a GM edited the flowchart (hash
change), which players read as "nothing I read is remembered". Read
progress now lives in a npc-dialogue-states collection: one row per
(user, dialogue, node) with a unique index, so a node badges NEW exactly
once per player and GM edits never re-flag content they already saw.
- New collection NpcDialogueStates (own-doc access, staff-visible admin
view) plus migration add_npc_dialogue_states.
- lib/npc-dialogue/states.ts: listSeenNodeIds for the page and an
idempotent markNodeRead; exposed via the markNpcDialogueNodeRead
server action, called fire-and-forget as nodes type in.
- The contacts page seeds initialSeenNodeIds into NpcConversation; the
component keeps an optimistic local set and no longer touches
localStorage. seen.ts and its tests are removed.
Verified live: fresh account shows NEW on all choices, reading the
"Who are you?" branch and reloading drops that badge while unread
branches keep theirs; npc_dialogue_states holds exactly the traversed
nodes. Interpolation int suite green (30/30).
Dialogue-emitted game events default to restricted (npc:dialogue policy) so
narrative branches stay spoilable-free, which also hid announcements authors
intended for everyone. Event nodes can now mark their effect's log entry
public: NpcDialogueEffect gains an optional eventVisibility field, runEffect
threads it into every emitGameEvent call (emit, reward, flag), and the node
editor exposes a "Show this event to everyone" checkbox for those effect
types.
Omitted eventVisibility keeps today's behavior exactly: resolveEventVisibility
falls back to the per-type restricted policy. The separate restricted flag:set
audit written by the PlayerFlags hooks is untouched.
Verified live on dev: two injected event nodes (with and without the flag)
stored visibility "public" and "restricted" respectively; flow and probe rows
cleaned up afterward.
Edges in the dialogue flow editor bent around where cards used to be until
the page was saved and refreshed, because RoutedFlowEdge memoized its
obstacle rectangles on the React Flow store's nodeLookup Map. That Map is
mutated in place during a drag, so the memo key never changed and the cached
rects only refreshed on remount.
Compute the card rectangles in the editor from its own live `nodes` state and
hand them to each edge through `data`, which is how the tech tree already
drives its routed edges. Obstacles stay render-only: serialize() persists
deriveEdges(clean) separately, so nothing new reaches stored flow data.
Verified by dragging a non-endpoint card over an unrelated edge and sampling
that edge's path mid-drag: 4 of 5 held positions re-routed with the fix, 0 of
5 without it (same test, same document).
Cell size was computed from the wrapper width without subtracting the
inventory frame's p-2 padding and borders, so the grid was ~16px wider
than its container and grew a horizontal scrollbar. Subtract the 18px
frame chrome, lower the cell floor 40->24 (legibility guard only), and
switch the wrapper to overflow-hidden so no scrollbar can appear.
Vehicle orientation is meaningful in a bay, so a parked-then-turned
vehicle now shows its silhouette turned too. The rotated image is sized
from the card's pixel dimensions (long edge against the card height) and
anchored to the card centre so the 90deg turn happens around the middle
instead of clipping against the top edge. Name labels stay upright.
dnd-kit pins the DragOverlay container to the activator rect measured
at drag start, so pressing R while dragging left the preview at the
pre-rotation footprint (a square-ish box for elongated items). Pass the
live rotated dimensions through the DragOverlay style prop, which is
spread after the pinned rect, in all three R-to-rotate grids: garage
vehicle bay, locker, and structure storage.
- Reject in-world dates after the current in-game date (now + 47,326 days)
- Default the date picker to the present in-universe date when composing
- Show a subtitle with the formatted date and days since the Awakening
- Reject any journal in-world date before March 19, 2156 in the
create/update validation (server-side) and add min to the date picker.
- Filter the related-mission dropdown to operationType = "main" only.
Wallet, Negotiations, My Tickets, Notifications, Upcoming Missions,
Active Campaigns and Recent Events were still conventional shadcn Item
cards while Service Summary, Mission Briefing and Situation Report already
used the dossier primitives. Wrap them in the shared TacticalFrame so the
whole dashboard reads as one board:
- classification strip naming the domain (Logistics // Banking,
Helpdesk // Tickets, and so on), with a REF code on the wallet
- squared corners, corner brackets and the faint grid texture
- an inner header row of icon + uppercase title + action link, matching
the Service Summary widget
- squared (rounded-sm, bordered) status pills for tickets and campaigns
- a ReadoutFooter on the wallet (account id + status) via the shared
ReadoutFooter primitive
Empty and self-hiding states are preserved, and the wallet's no-account
path still returns the conventional MyWalletCard CTA. Also drops a dead
CLOSING_STATUSES import from MyTickets.
The Operations // Last Mission widget carried a header row whose left side
repeated the mission code name already shown on the card below, and after
that duplication was removed the row held only a lone right-aligned
"View all" link floating in an empty band. Remove the row entirely: the
frame strip names the section and the mission card carries its own
"View details" affordance.
CurrencyAmount returned a div, but callers place it inside p and span
(wallet hero balance, account cards, unit funds), which is invalid nesting:
the browser's parser closes the p early, so server and client markup differ
and React reports a hydration error on the banking pages. An inline-flex
span renders identically in all four call sites and is valid in each.
Session A measured 159 targets under the WCAG 2.5.8 minimum on 42 routes;
this brings that to zero. Mostly one-line spacing changes: small caption
labels and text links were 14-21px tall because shadcn Label/Button use
leading-none and bare text links carry no vertical padding.
- shared Dialog close button: p-1 with right-3/top-3 so the 24px hit box
keeps the icon where it was
- tour card: Skip all tours (13 routes), All boards on standings cards (6)
- detail pages: 27 Back links, journals All journals, wiki category
links, voiceover card titles, factions batch link
- dashboard: 7 View all / View full record links
- account preferences: mute rows min-h-6, radio and tours labels, plus
contacts filter labels and the campaigns show-completed label
- ribbon studio: mirror label and stripe/module remove buttons
- helpdesk ticket titles, radio tick-sound label
Mobile audit (390x844) found overflow on 6 routes; all now clean.
- Tabs: TabsList is inline-flex and widened the page when several tabs
were present (roster doc 639px, helpdesk 510px). It now scrolls
(max-w-full + overflow-x-auto); TabsContent gets min-w-0 and the roster
Tabs min-w-0 so the org tree's own scroller can clip instead of the
page growing
- Item: ItemHeader/ItemFooter had flex-basis 100% with min-width auto, so
a long title forced the card wider instead of shrinking. Shared min-w-0
- ResourceCard: the description rendered twice (once inside ItemContent,
once as ItemDescription) and both fought for one flex line, crushing
the content column to 27px. Single description, full-width rows,
truncating title (min-w-0 + items-stretch so nowrap spans can clip),
shrink-0 badges
- awards/design: stripe row wraps instead of exceeding the viewport
- leaderboards: flappy table and the shared StandingsTable scroll
horizontally rather than widening the page
- blackjack: explicit grid-cols-1 (minmax(0,1fr)) so the arena's implicit
track cannot outgrow the viewport
- campaigns: card readout was revealed only on hover, unreachable on
touch; now always visible on coarse pointers and hover-revealed only
on pointer-fine
- Replace hand-rolled buttons with @payloadcms/ui Button (secondary dry
run, primary apply) since the admin bundle has no Tailwind for shadcn
- Real spacing values throughout: Payload defines no --spacing-* vars,
so gaps used to collapse to zero; use px literals and var(--base)
- Framed panels with theme-elevation borders, uppercase table headers,
stats strip with collapsed line boxes so small caps sit evenly inside
the card padding
- award-rules collection: metric/operator/value threshold rules linked to
awards, with auto-retire-lower-tiers and once-per-series flags, active
toggle, and award-rules:* permissions
- src/lib/awards/metrics.ts: pure metric resolvers (years of service from
dossier.enlistmentDate with account-age fallback, account age, missions
attended, total XP) plus operator comparison, unit tested
- evaluateAwardRules() sweeper: idempotent, dry-run capable; grants land as
profile rows with awardedBy null so the existing afterChange hook sends
award:granted notifications; upgrades replace the lower series tier in
place preserving the original date; emits award:rule-granted events
- award-tick payload bin for daily evaluation + admin Award Automation
view with Evaluate now (dry run) preview and Apply grants
- seedYearsOfServiceRules.ts wires the four years-of-service ribbons into
one advancement series and creates their rules (idempotent, dev seeded)
- migration add_award_rules_automation (table + awards event target enum)
- New Journals collection (Chronicle group): title, Lexical body, status
draft/published, optional in-world date and mission link; authors read,
edit, and delete their own entries at any status while every logged-in
user reads published ones; journals:* staff permissions bypass ownership
and gate the admin page (registered in the permission registry)
- /journals list with compose dialog and /journals/[id] reader reusing the
Chronicle typography; edit/delete controls for authors and staff; drafts
carry the DraftBadge and stay invisible to everyone but their author
- Server actions create/update/delete with ownership checks, publish-time
journal:created and journal:deleted feed events (journals added to the
GameEventLogs target collection enum via migration)
- Sidebar entry under Chronicle, command palette destination, admin panel
icon; excerpt extractor as a pure module (src/lib/journals/excerpt.ts)
- Access-control integration spec covers draft privacy, publish visibility,
non-author write blocking, and staff override (5 tests)
- normalizeSidebarOrder moves pinned sections (Platform) to the front, so
even hand-crafted stored orders cannot displace it; enforced server-side
in updateSidebarOrder via the same helper
- Customize mode renders Platform statically with a pin marker instead of
a drag grip; only the remaining sections are sortable
- Spec updated: user order preserved after the pinned head, new pinning test
- preferences.display.sidebarOrder json field on Users + named migration
add_sidebar_order_preference + regenerated types
- New pure helper src/lib/sidebar/order.ts (section ids, labels, default
order, normalizeSidebarOrder) modeled on lib/dashboard/layout.ts, with
tests/int/sidebar-order.int.spec.ts covering fallback/dupes/missing ids
- AppSidebar renders sections from the normalized order; feature-flagged-off
sections skip their slot and keep stored positions
- Customize mode: dnd-kit sortable grips on group headers, save-on-drop via
new updateSidebarOrder action, Reset clears the preference, Done exits;
hidden while the sidebar is collapsed
- updateSidebarOrder sanitizes server-side and rewrites full preferences
- Fix sibling clobbering: saveDashboardLayout now preserves sidebarOrder,
and updatePreferences now preserves both sidebarOrder and dashboard.layout
- New shared slug-to-icon map (collection-icons.ts) covering all collections,
globals, plugin collections, and the custom tech-tree entry, with fallbacks
- TechTreeNavClient renders a lucide icon before every nav link label
- Custom 'collections' dashboard widget replaces Payload's stock CollectionCards
grid with an icon-bearing variant (same permission filtering, group headers,
create shortcuts, and global lock indicators)
Completes the terminology pass: the "How to place" help block and the
engine's user-facing error strings ("Missing structure", "Structures cannot
overlap", "Placement is closed", "The opponent has not placed their
structures") now match the place/structure/target vocabulary used elsewhere
in the duel. Also splits a comment that had been merged onto the scoreOf
declaration. Strings only; no behavior change.
- Intro, metadata, placement card, error strings, and lobby phase label now
use place/target/structure instead of emplace/bracket
- Leave the "How to emplace" help block unchanged for now
- Refresh the registry blurb and add a data migration to update the seeded
minigames description
- Add 11 destinations that exist in the app but were absent from the palette:
World Map, Event Log, Operations, Ops Ledger, Reservations, Supply Boxes,
Promotions, Leaderboard, Minigame Leaderboards, Chronicle, Surveys
- Show G N / G A shortcut labels for Notifications and Admin (chords were
already wired in KeyboardShortcutsProvider but unlabelled)
- Add a Toggle Mini XP Display action mirroring the sidebar control
- Add an Open Unassigned Tickets queue shortcut and point Create Support
Ticket at the compose deep link
- Teach /helpdesk to open the create dialog via ?compose=1 and to preselect
a filter tab via ?view=unassigned
The L now pivots on its elbow (corner) cell instead of being re-laid-out in
its bounding box, so rotating keeps that one cell in place instead of
shifting the whole piece. Orientation 0 is the L look with the elbow at the
bottom-left and arms up and to the right.
Cells are the anchor plus two arm vectors rotated in quarter-turns, so the
anchor is always occupied. The editor recovers a stored emplacement's
(anchor, rotation) by matching its cells against every candidate, and the
engine test asserts the anchor cell is present in all four orientations.
The Ammo Depot is now a 3-cell L (a 2x2 box minus one corner) instead of a
2-cell line. Emplacement orientation becomes quarter-turns (0-3) so the L
can turn through all four; lines still use 0/1, the square ignores it.
The editor seeds an emplacement's rotation by matching its stored cells
against each orientation, the rotate toggle shows "Rotate 90°" for the L,
and the engine/rotation tests cover the four L orientations.
Sound is synthesized with the Web Audio API (no new assets): a launch
thump on fire, noise-burst impacts (splash for a miss, a bigger double
boom for a destroyed emplacement), a chime when the turn passes to you,
and victory/defeat fanfares. A mute button and volume slider live in the
match header; the setting persists per browser
(polaris:call-for-fire-versus-sound).
Adds a one-shot explosion VFX on hit and destroyed cells on both boards
(larger burst for a destroyed emplacement), suppressed under
prefers-reduced-motion. Only shots that arrive while watching animate, so
loading a match does not replay every past hit.
Ring the selected emplacement's grid cells and document the controls in
the editor help text. Rotate a placed emplacement in place by
double-clicking it or by pressing the Horizontal/Vertical toggle (the
toggle also sets the orientation for a new placement, and is disabled for
the fixed 2x2 Command Post).
Fix: moving an emplacement after rotating it kept the default orientation
instead of the rotated one, so the rotation was lost on the next click.
placeAt now preserves the emplacement's stored orientation when moving it.
Clicking a grid cell always placed the currently selected emplacement
there and silently deleted whatever it overlapped, so clicking an
earlier emplacement (after selection auto-advanced) clobbered it. Now
clicking a placed emplacement selects it so it can be moved, and placing
onto an occupied cell is refused with a message instead of deleting the
other emplacement. Adds the pick-up hint to the editor copy.
The placement and battle grids inherited a 32px line-height, so any cell
holding the emplacement glyph grew taller than its square width (29x34),
making the row gaps look inconsistent once emplacements were placed. Set
leading-none on the grids so cells stay square.
Add a shape to emplacements ("line" | "square") and lay out the Command
Post as a 2x2 block (size 4) instead of a 3-cell line. cellsForFob resolves
cells per definition; the placement editor, preview, and tests use it.
Give each emplacement type its own color (Command Post amber, Ammo Depot
rose, Radar Site sky, FOB violet) so it is obvious what is placed where:
the picker chips carry a matching swatch, placement cells and the
in-battle "your fire bases" board use the type color, and struck enemy
cells use the struck type's color. The shot view now carries the struck
assetId so the enemy sector can be colored too.
Cap the board at a compact width (max-w-sm) instead of stretching to fill
the panel, so the 10x10 grid no longer dominates the screen.
Head-to-head artillery duel in a new "multiplayer" registry category
(out of periods). Each operator hides a fire-base fleet on a 10x10 grid,
then takes turns calling fire: the first mission is a grid designation,
every later shot adjusts from that operator's last impact using the
single-player range/deflection controls. First to reduce every enemy
emplacement wins; a cap decides on emplacements then cells.
Pure engine in src/lib/minigames/call-for-fire-versus (engine, views,
types, constants) is client-safe and unit-tested. The server-only
registry mirrors the blackjack table pattern (globalThis-anchored Map,
lobby, per-turn timeout, expiry sweep, single-instance only); its views
are built per viewer so the opponent's fleet layout never leaves the
server. The client polls the match snapshot (the in-memory SSE bus is
unreliable across dev module copies). Rewards on completion update the
callForFireVersus profile group, pay XP and chips, and emit
minigame:call-for-fire-versus.
Wires the game into the registry (new multiplayer category + enum
migration), the sidebar grouping, the command palette, and the profile
XP aggregation. The registry row seed is split into its own migration
because Postgres forbids using a freshly added enum value in the same
transaction.
Verified: 21 new tests (engine + registry) plus the wider minigame suite
pass; tsc clean; a live two-player award run confirmed XP, chips, and
the event.
- Optional `estimatedReleaseDate` (date and time) on the minigames registry,
with a named migration and regenerated types.
- Sidebar: an `upcoming` game renders greyed out and non-interactive, with a
tooltip carrying the estimate and a live countdown. It is a hoverable row
rather than a disabled menu item, because a disabled Radix item sets
`pointer-events: none` and would swallow the tooltip.
- Page gate: each minigame page checks its registry status and renders
`MinigameComingSoon` instead of the arena while the game is upcoming, so a
typed URL cannot reach unfinished gameplay. The date is display only: the
game goes live when an admin flips `status` to active.
- Leaderboards exclude upcoming games, so they get neither a tab nor a board.
- Pure `countdown.ts` formatter plus a client ticker that computes the
remaining time only after mount, avoiding an SSR hydration mismatch.
Note: `registry.ts`, `payload-types.ts` and `migrations/index.ts` also carry
the Call for Fire registry row and its generated types. That feature was
committed as 6d6a5fb and announced a separate commit for those files; they are
included here because they are entangled with these edits in the same files.
Tests: pure countdown unit tests, registry/gate/leaderboard integration tests,
and an e2e that seeds an upcoming row, hovers the disabled sidebar entry to
assert the tooltip, and checks the coming-soon gate.
Bracket hidden artillery targets across patrol/checkpoint/compound
difficulties. Pure rules in src/lib/minigames/call-for-fire.ts (compass
bearing observer reports, ADD/DROP + RIGHT/LEFT corrections, scoring,
distance-to-target accuracy, injected rng) with a 23-case spec.
Wires the game into the minigame ecosystem: submit action validates the
run, updates the profile callForFire group, pays out XP and chips, emits
minigame:call-for-fire, and records the period ledger entry (accuracy is
distance-to-target on a win, null on a loss). Adds the game page with
period standings and an all-time board, a command palette entry, the
Target icon, and the profiles XP aggregation.
The registry row and regenerated payload types land with the minigame
registry changes in a separate commit.
Phase 7 of the minigame periods feature:
- New admin component `PeriodCloseControl` renders above the minigame-periods
list: it shows the recent periods with their status and a Close now / Reopen
button that drives POST /api/minigame-periods/close (gated on
minigame-periods:close; a 403 is shown inline rather than swallowed).
- Registered via `admin.components.beforeListTable` and the import map
regenerated.
Registry CRUD and the period/entry/achievement review lists already exist as
permission-gated admin collection views, so this was the only missing surface.
Verified end to end in the running admin panel: an open period closed, its
status flipped and closedAt stamped, then reopened.
Phase 5 of the minigame periods feature:
- Read model (lib/minigames/periods/standings.ts) that shapes period boards
from the ledger (rank, placement points, names) and All-Time boards from the
untouched profile aggregates into one row type.
- GET /api/minigames/leaderboards: ?period=current|<id>|all-time, returning
the period, the period list, the boards and the achievements honor roll.
- New /minigames/leaderboards page: period selector (current, every past
period, All-Time), per-game tabs, and the achievements honor roll. Core-only
in period mode; every registered game in All-Time.
- Shared client pieces: useLeaderboards hook, StandingsTable,
PeriodStandingsCard (period by default, All-Time toggle) and
AchievementsHonorRoll.
- Each Core game page gains an "Anchored period standings" card so the period
board is visible on the game itself; its existing all-time board and
mode/difficulty selectors are untouched, and it links to the full page.
(Plan said replace the inline board; keeping it preserves the per-mode
selectors, so the period board is added instead. Easy to swap if you prefer.)
- Ledger fetch helper extracted to lib/minigames/periods/ledger.ts.
- Integration test for the period boards, the All-Time path and the honor roll.