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 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.
Phase 4 of the minigame periods feature:
- Server registry loader (lib/minigames/loadRegistry.ts) reads the
minigames collection and falls back to the built-in seven when it is empty
or unreadable, so the nav and boards never render blank.
- The sidebar minigames dropdown now renders from the registry (Core and
Cardtable groups, retired games hidden, registry order), with lucide icons
resolved from the icon-name string through a client icon map and a
safe fallback.
- Period scoring is registry-driven: the close pipeline uses core games with
countsForPeriods instead of a hardcoded list. A retired game simply stops
accruing entries and drops out of the next period while its history stays.
- Integration tests for the fallback, ordering, retirement filtering and the
non-scoring-game exclusion; the older minigame specs now wipe the registry
too so files stay order-independent.
Phase 1 of the minigame periods feature:
- Shared server-side recorder (lib/minigames/periods/record.ts) writes one
minigame-entries row per completed scored run, lazily creating the
anchored period it belongs to (unique startDate makes it race-safe).
Failures are swallowed so a ledger hiccup can never break a submission.
- Pure anchored-period math (lib/minigames/periods/derive.ts).
- Wire the recorder into all five Core submit actions after their profile
update: flappy (passes > 0), EOD (win), radio (>= 1 correct message),
aim trainer and OPORD (any completed round).
- Server-validated durations for every game: flappy and radio watch now
report durationMs (with bounds), aim trainer reports its run duration
(clamped to the 30s course), EOD derives it from seconds, OPORD from
timeMs.
- Integration test covering derivation, lazy period creation, pre-anchor
null period and the never-throw guarantee.
New Intelligence tab on the Missions collection holds a threatAssessment.likelihoods
array (category + 5-level likelihood select). Renders a color-coded, dossier-styled
table on the mission details page, ordered after Mission Details and above the
briefing. Rows match the free-text category to a lucide glyph (helicopter, plane,
armor, infantry, etc.) so the estimate scans at a glance.
Redesign the World Map picker as 4:3 cards with cover imagery, a classification strip (REF code + campaign), corner brackets, and a readout footer (size/weather/access/faction). Add OverflowTooltip, a hover tooltip that only opens when the value is actually clipped, so truncated readouts stay readable.
Rewrite the wiki index: filters (query/tag/category/sort) sync to the URL for shareable/bookmarkable views; a moderator-curated 'Start here' featured strip; category grouping with per-category portal pages (/wiki/category/*) and CATEGORY_META blurbs; excerpt previews; case-insensitive, alphabetized tag counts; and a compact WikiRow. Updates the wiki controls tour copy.
Reward users for helping build the app: wiki pages, mission planning
markers (queued until the mission completes), surveys, and manual awards.
Contribution XP folds into the existing virtual profile total, so it
flows into the level ladder, sidebar XP display, dashboard, and profile.
- contribution-entries ledger collection + profile progression.contributions.xpEarned bucket
- src/lib/contributions service (record/grant/expire/revoke, caps, idempotency, leaderboard) with a pure rules module
- per-mission planning-map delegation (missions:update grants) and a completed/cancelled map lock
- wiki, survey, and marker action/hook integration
- contribution:* event types, muteable notifications, permissions group, event targets
- profile Contributions section and /contributions leaderboard
- migration, reconcile tool, and integration tests
Move 19 domain sections out of the root guide into per-directory
AGENTS.md files that OpenCode v2 injects lazily when an agent reads
each subtree. The always-loaded root drops from 121KB to ~30KB and
gains a domain index table with never-miss invariants. Original root
and pre-merge sub-guides are preserved under
docs/backups/pre-agents-split-20261009/ for restoration.
Note: also carries the pre-existing uncommitted wiki-section edits to
the root AGENTS.md, preserved verbatim in src/lib/wiki/AGENTS.md.
Staff with read-all oversight (superuser / system:admin-access) see everyone's
notifications in the bell. Add a "Show all users" switch inside the dropdown,
rendered only when the caller can view others, that narrows the feed to the
caller's own notifications. The choice is remembered per browser (localStorage)
and the unread badge follows the selected scope.
The inbox route now reports canViewOthers and honors scope=all|mine; non-staff
callers are always forced to their own regardless of the param.
Drafts were only reachable in the admin panel: /story hard-filtered to
published. Story staff (admin/developer) now see drafts in the
Chronicle, badged and clearly marked, while everyone else stays
published-only. The collection's own read access remains the backstop
(overrideAccess stays false), so a non-staff request can never leak a
draft.
- page: staff fetch all entries, others published-only
- new DraftBadge (amber pill) rendered in the list, immersive reader,
book view, and table of contents
- drafts hide the read marker and reactions
- front-end copy adopts Chronicle wording
The Chronicle collections were auto-labeled from their slugs ("Story
Beats"). Give them explicit Chronicle labels and adopt the word
Chronicle in the surrounding titles, descriptions, and event text.
- StoryBeats: labels Chronicle Entry/Entries, admin group Story ->
Chronicle, descriptions updated
- Voiceovers / StoryBeatStates: Chronicle labels, group, descriptions
(including the "beat" field label)
- GameEventLogs: event-log target labels -> Chronicle Entries / States
- lib/story: event message text -> "chronicle entry" (internal
event-type strings left intact so existing logs stay valid)
- regenerate payload-types.ts
Slugs are unchanged, so no migration is required.
Read state is personal to the recipient. Marking a notification read now
only ever flips the acting user's own rows — never another user's, even
when staff view it via read-all oversight (which would otherwise hide it
from its real owner).
- add /api/notifications/inbox endpoint that enriches each row with
ownerId, ownerName, and isMine so the bell can label "meant for
someone else" rows
- move mark-read logic into per-user lib helpers (markNotificationsReadForUser,
markAllNotificationsReadForUser) and have the actions delegate
- surface ownership in the bell UI and skip marking rows that aren't mine
Default the campaigns list "Show completed" toggle to off, so only
ongoing campaigns show until the user opts in. Renamed the toggle from
"Hide completed" to "Show completed" and flipped the empty-state link to
turn completion visibility on.
Add a Campaign Status dropdown on the campaign detail page, gated by
campaign ownership or the campaigns:update permission (mirroring the
existing requireCampaignOwnership gate). Owners can set On Hold to pause
a campaign they are not actively running, and flip it back; admins act
through the same control. The editor optimistically updates the field,
toasts on success, refreshes the view, and reverts on failure.
- new CampaignStatusEditor client component (optimistic select + save)
- updateCampaignStatus server action (owner OR campaigns:update)
- render the editor on the detail page for authorized users
- add "On Hold" to the create dialog status options
- color + label the new status on cards and campaign rows (missions,
factions, dashboard) so it never renders as raw "onHold"
Root cause of the upload failures: the launcher writes an
<?xml version="1.0"?> prologue, Payload sniffs uploads with
fileTypeFromBuffer, and the collection mimeTypes allowlist lacked
application/xml, so every genuine launcher export was rejected with
'Invalid MIME type: application/xml'.
- Add application/xml to the mod-lists upload mimeTypes (the document is
still stored as text/html; verified end to end).
- New pure parser src/lib/modlistPreset.ts validates the launcher export
structure (arma:Type=preset meta + data-type=ModContainer rows) and is
shared by the server action (authoritative) and CreateSideOpDialog
(instant client-side feedback).
- Plain-text lists are no longer accepted anywhere: dialog accept/hint,
collection mimeTypes, and the action now agree on HTML presets only.
- Upload name defaults to the preset's own arma:PresetName.
- Tests: tests/int/modlist-preset.int.spec.ts (9 cases).
Archived tickets disappear from every front-end surface for all users
(staff included): helpdesk list, detail page 404s, dashboard widget, and
project board/sprints/releases/search views. They remain fully visible in
the Payload admin panel, where un-archiving restores them. The collection
hook stamps archivedAt and appends an activity entry on each toggle; the
archiveTicket server action is tickets:staff gated and emits a
ticket:archive event. Edits and votes on archived tickets are rejected.
- game-event-logs gains visibility (public|restricted) + requiredPermissions
(any-of gate from the permission registry); read access becomes a Where
clause: public OR actor-is-me OR held permission; superusers and
game-event-logs:update staff see all; admin panel gate unchanged
- src/utils/event-log/visibility.ts: per-type policy map consumed by
emitGameEvent, with per-emit overrides; npc:dialogue and flag:set start
restricted, everything else stays public
- PlayerFlags hooks emit restricted flag:set audit events on every flag
write (admin edits and dialogue effects alike)
- fix dashboard RecentEvents leaking events: local API find now runs as
the viewer with overrideAccess false
- SSE broadcast sends an opaque nudge for restricted events instead of
type/actor metadata
- /events table marks restricted rows with a lock badge
- migration 20261007_025942_add_event_log_visibility + regenerated types
- tests/int/event-log-visibility.int.spec.ts (8 cases)
- Converse button no longer floats over the hero text on phones: it sits
in the card's content flow below the status chips and only anchors to
the hero's right edge from md up
- conversation dialog keeps a side margin on small screens instead of
rendering edge-to-edge
- dialog titles truncate with min-w-0 so long NPC names and attachment
urls cannot push the close buttons out
- DialogueText rewritten as a recursive parser so markup accumulates
({green}**bold green**{/} and friends nest freely, colors close inner-first)
- [label](url) dialogue links open in an iframe popup dialog so
conversation progress survives; only http(s)/relative urls render
- NEW badges: Converse button + choice buttons badge unread paths via a
per-browser seen map (ptf:npc-dialogue-seen) keyed by flow hash, so GM
edits re-flag the conversation
- choices gain lockedHint: failing conditions can show the choice disabled
with a rich tooltip instead of hiding it (evaluateNpcDialogueChoices now
returns ChoiceGate pass/showLocked pairs)
- player flags gain activatesAt/expiresAt time windows honored by readFlag,
flag effects gain flagDelayMinutes for slow-burn writes, and
{{countdown:key}} tokens tick live toward activation (done/missing states)
- migration 20261006_add_flag_time_windows; spec extended to 33 tests
- Delete selected nodes with Del/Backspace (guarded against open dialogs,
menus, and focused form fields)
- Double-click the canvas to drop a dialogue node at the cursor; right-click
empty canvas for a New node menu with all six types; toolbar buttons now
place nodes at the viewport center instead of blind grid coordinates
- Choices support optional flag conditions evaluated server-side per player
(player flag first, global fallback); gated choices stay hidden until the
server confirms them, so forbidden options never flash on screen
- Litegraph-style per-output handles: one source handle per choice row plus
dedicated true/false handles on condition nodes, wired through derived
edges and handle-aware connections
- Brighten passive edge lines and edge labels on the dark canvas
- New dialogue nodes default to an empty speaker, rendering the NPC's name
Finish the NPC dialogue flowchart work carried over from the base commit:
- Coloured NPC dialogue text via friendly names ({red}) or hex ({#ff00ff});
invalid names/hex render as literal text. Shared client-safe renderer
(DialogueText.tsx) used by both the admin canvas preview and the runtime.
- Player-flags feature: condition nodes branch on flags (evaluated
server-side), flag effects set/clear/adjust flags, PlayerFlags collection
+ migration, and event nodes can set flags.
- One-time ("once") choices: a choice flagged "Hide after picked" is hidden
for the rest of the current conversation only (per-session, resets on
begin()); GMs can persist across conversations with a condition flag.
- Admin editor: colour hint, once checkbox on choices, amber "once" badge.
Migration repair: the player_flags migration (20261005_185014) was sorting
before 20261006_000000, whose stale snapshot omitted player_flags, so any
future `migrate:create` re-emitted player_flags DDL. Restored 20261006_000000's
snapshot to the full current schema so it is the correct diff base.
Verified: `bun run payload migrate` clean, `migrate:create` reports no
schema changes, `tsc --noEmit` clean.
- GameNpcs: Narrative Activity group (weighted options, forced flag,
configurable reshuffle interval), level + richText levelDescription,
canMessage toggle
- New npc-dialogues collection with a purpose-built React Flow dialogue
editor (dialogue/choice/event/end nodes) in the admin panel
- Frontend: Currently-activity line and level description on the contact
profile page; NpcConversation messaging surface with a documented
(disabled) LLM extension seam
- Permissions: npc-dialogues CRUD + admin manage in a new NPC Dialogue
group; event types for dialogue triggers
- Migration 20261006_000000 (applied to dev DB) with full schema
snapshot sidecar
Remove the hover-only brightening of the tactical dossier grid texture so it
keeps a constant opacity across EmploymentCard, CampaignCard, and the
operations surfaces (OperationSections, StrategicSummary, tokens).
Game NPCs gain an image upload and a Lexical rich-text bio (with data
migration that wraps existing plain text in a paragraph). NPC profile, card
and directory surface the portrait, a status-chip row and initials fallback;
contacts list and detail pages adopt the redesigned cards.
Per-map grid config (gridEnabled, easting/northing origin, spacing, label
digits, over-lines) rides on the Maps collection and surfaces via
/api/map-features. Pure math in src/lib/map/grid.ts mirrors CfgWorlds Grid
(floor truncation, mod-10^digits wrapping, nested levels). GridLayer renders
hairlines + edge labels on the world map and mission planning maps, and
armaGridRef now delegates to gridRef. Migration 20261005_001212_add_map_grid_config.
- New mission-map-markers collection (permission-gated, removed with its
mission via a Missions beforeDelete hook) plus an opt-in
classification.planningMapEnabled flag on missions.
- The mission page gains a planning section: place and edit Arma markers
(icons, ellipses, rectangles, polylines) with debounced saves, an SQF copy
export, and an Arma grid readout. Everyone who can read the mission sees the
plan once enabled; editing requires missions:update or mission ownership.
- Base layers come from GET /api/map-features?layers=base, which skips the
structure, node and shipment queries; marker icons render tinted by color
exactly like in-game.
- Includes the hand-written migration, the missionMap service lib, server
actions emitting mission:map-marker-* events, and integration plus e2e
coverage.
- The mission tick now runs two idempotent sweeps: auto-start flips Scheduled
missions whose start time has arrived to Active, and auto-complete sets
missions whose scheduled window (start plus duration) has fully passed to
Completed with a stamped completedAt.
- Side ops are created as quiet Ready drafts and committed with a "Mark as
Scheduled" control, which is what posts the Discord roll-call and hands the
op to the lifecycle above.
- Daily schedule reminders nudge the creator to set a draft live (web
notification plus Discord DM).
- Adds the mission lifecycle/commit event types and the matching notification
labels, and updates the bot docs.
- Promotion nominations: members can nominate a peer for promotion from their
profile, and a new /personnel/promotions page lets staff review and action
the nominations (with an optional note on each).
- Leadership transfers: a member's leadership can be handed over to another
member, surfaced on the transfers page and in the roster (which also gains a
staff remove-member dialog).
- Adds the PromotionNominations and LeadershipTransfers collections (registered
in the Payload config), their service libs, the migration, and integration
coverage.
Add usage analytics via @microsoft/clarity across the frontend app and the
login page. ClarityAnalytics loads the tracking script only in production
builds (never local dev), keyed by NEXT_PUBLIC_CLARITY_ID; unset disables it.
Mounts it in both the (frontend) root layout and the standalone login layout
so both surfaces are covered without touching the admin panel.
The suite could not pass on the test database: global setup now seeds the shared dev/Test123 login with a superuser Roles doc and the dashboard rank, and points its own Payload connection at the test database. Playwright runs one worker with generous test and expect timeouts because first navigation to a route triggers a cold webpack compile, and gains E2E_BROWSER_PATH to swap the browser binary when the installed Vivaldi crashes under automation. The landing page gains the missing h1 the guest specs assert, login flows wait for the redirect to land, strict-mode locator collisions get exact or level-scoped matches, the session banner test re-signs the login claims with a short expiry using the runtime secret, and the reservation dialog click forces the dispatch and verifies the dialog opened (the trigger goes aria-hidden behind the modal mid-click, which stranded the retry loop).
Pages declare brief tours in code, keyed to stable data-tour anchors. The layout resolves each visitor's access signals (intelligence and logistics qualifications, admin-panel access, feature flags) and step filtering hides what a user cannot reach, mirroring the sidebar. A tour auto-starts the first time a browser visits its page; dismissals are remembered per browser in localStorage. The header gains a replay control for on-demand runs on toured routes, the tour card gains Skip all tours on this device to opt a browser out of auto-starts, and the Account page holds the re-enable toggle. The card and spotlight get a distinct overlay treatment (glow, accent strip, outlined target).
New in-depth, non-developer guides for the core systems: logistics and storage rules, banking, market and negotiation, shipments, base management, and the map. Read stays open to any logged-in user; create and edit require admin or developer roles (enforced in the collection access functions and the wiki server actions, since the service layer runs with overrideAccess). Category escalation via update is blocked too. Ships the enum migration, regenerated schema/types, and the idempotent seed script with its markdown sources.
Players meeting a role's minimum rank and MOS can queue for mission roles before op time. Slot holders are recomputed statelessly from signup order plus current RSVP (first N committed signups hold the role); attendance writes diff holders around the write so RSVP changes auto-promote, with notifications and events. Adds mission-role-signups collection, roleSignups/missionTime libs, sign-up panel, role slots + rich-text descriptions (with RoleDescription renderer), orphan-pruning hook, migrations, tests, and AGENTS.md docs.
Replace the maps:create/update/delete catch-all for map features: roads, zones, and nodes each take a per-collection author permission, structure placement takes maps:place (still co-gated with the logistics qualification), and GeoJSON import requires all three author permissions. The map view page keys edit UI per feature type; admin role seed grants the new values. Tests updated for the permission split.
Touch drags flip pages: the page follows the finger live, the axis locks
on first movement so vertical pans never flip, and edge drags get
rubber-band resistance. Swipes starting on interactive controls are
ignored. Swipe intent lives in bookSwipeDirection with unit tests.
Fullscreen reader alongside Immersive view: paginated two-page spread
with no vertical scroll, chevron and arrow-key page turns, and a page
indicator. Chapters always render in reading order (Chapter 1 first).
Layout knobs (spine gap, single-column breakpoint, book max width) live
in lib/story/bookLayout with unit-tested paging math.