The countdown rendered each time unit with a raw monospace space,
which reads wide and odd when inline with proportional text. Split the
value into per-unit inline-flex cells separated by a CSS gap so spacing
stays consistent, and cover the new markup in the interpolate
integration test.
The MCP plugin's key collection was gated by hasRoles(), which reads only
the legacy roles enum column. All current admins authenticate through
dynamic roleDocs superuser roles, so nobody could create an MCP API key
and every client of /api/mcp got 401. Both override blocks (MCP keys and
the AI plugin instructions) now use requirePermission('system:admin-access'),
and the sync-only admin.hidden checks were dropped in favor of the read
gate, matching the repo's requireAdminPageAccess pattern.
Adds tests/int/mcp-api-keys.int.spec.ts covering the plain-user rejection,
dynamic-superuser key creation with HMAC index resolution (mirroring the
plugin's resolveAccessSettings), explicit system:admin-access grants, and
read visibility.
- Enlarge flow-editor wire handles from size-2 (8px) to size-3 (12px) so
they are easier to click and grab.
- Select an edge by clicking it, then remove it with the Delete key.
Selection is tracked in state and the highlight renders through BaseEdge
stroke props so the chosen line stands out.
- Edges are a derived projection, so deletion scrubs the hop from the
source node data via a new pure removeHopFromNode() helper in dialogue.ts
(choice row, condition branch, or single continuation).
- Add tests/int/npc-dialogue-remove-hop.int.spec.ts (4 tests).
Choice rows in the dialogue node editor now have up/down buttons so a
choice can be moved up or down into the desired order, which is the
order shown to the player. The swap lives in a pure reorderChoice
helper (no-op at the edges, input not mutated) with a focused test.
Event node flag effects previously always wrote the active participant's
flag. A flag's identity is (owner, key), so the same key can hold
independent values for different owners, but there was no way to target
them from the editor.
- Add flagTarget ("self" | "global" | "user") + flagTargetUserId to
NpcDialogueEffect. "self" (default) keeps current behavior.
- Add resolveFlagOwner (flags.ts) to map a scope onto the player-flags
user column; "user" with no id falls back to the participant so a
misconfigured effect never nudges the global flag.
- Move applyFlagEffect into flags.ts, parameterized by resolved owner;
the runtime action resolves the owner and delegates.
- Add a Target control (+ user picker) to the event node editor and
validateGraph enforcement for the "user" scope.
- Integration tests cover owner resolution and self/global/user writes.
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.
New Game collection reinforcement-pools (name, faction, armaFactions,
available, enabled) with manual-edit audit via reinforcement:adjust. The
events hook applies reinforcement.spawn/.refund deltas (soft limits, no
floor, idempotent by eventId) before the game's next pull, and a new GET
/api/arma/v1/reinforcements endpoint serves enabled pools to the server.
The helper counted arma-commands DB-wide, so any spec file that leaves a
game-server online (operation-*, supply-*, respawn-tickets) made later
web-originated locker edits leak into the count once vitest's timing-based
file order put those files first. Filter commands by this run's instance
refs, and mark the grid-metadata fixture write with the lockerSyncOrigin
context flag so it stops enqueuing an echo command of its own.
- 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)
Rearranging nodes on the canvas (positions, edge ids, styling) no longer
changes the flow hash, so tidying a conversation in the editor does not
re-badge it as NEW for every player. The hash now covers node identity,
type, data, and edge source/target with order-independent serialization;
real text or branching edits still re-flag.
- 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
- npc-dialogues gains priority + entryGate (flag key/op/amount) fields
- contact page offers the highest-priority conversation whose gate
passes (ungated = fallback, ties by oldest); only the winner's flow
leaves the server so locked story content never reaches clients
- extract shared flag reads (readFlag/evaluateCondition) to
lib/npc-dialogue/flags and pure selection to lib/npc-dialogue/selection
- migration 20261006_203217_add_dialogue_entry_gate; spec covers
ordering, gating, fallback, and storage round-trip
Extract the dialogue canvas's routing upgrades into routeEdge() in the
shared lib: perpendicular handle stubs, candidate scoring (Z-step vs
straight for forward edges, top/bottom bus corridors for back edges),
per-edge detour lane spreading, and multi-pass obstacle clearing. The
NPC dialogue RoutedFlowEdge becomes a thin renderer over it, and the
tech tree RoutedEdge now inherits the same logic while keeping its own
features intact: manual waypoints route verbatim (and define the
add-a-bend base), per-source stepPosition lanes feed the Z-step, and
its fixed right/left handles map to the new direction params.
New pure spec covers the Z-step shape, blocked-forward detouring,
back-edge bus routing, per-id lane spread, and waypoint pass-through.
isMissionEvaluable now considers the full scheduled window (start +
estimated duration) rather than the start alone, so evaluation reminders
fire once a mission's window has genuinely closed. Extends the profile page,
the remindEvaluations command and the evaluationReminders service to match,
and adds integration tests. Updates the bot evaluation-reminders docs.
New locker-sync bridge: web-originated storedAssets edits enqueue a
locker.apply command sent to the game, and game-side locker.sync merges
feed back into the member UI. Position/equipment layout is preserved across
merges. Adds the lockers service, LockerStorages + ArmaSyncEvents wiring and
integration tests. Docs in docs/arma-bridge/locker-sync.md.
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.
v0.2.33 tightened hasIntelligenceQualification to write permissions for wiki
moderation, but the same check also gated navigation: regular members lost the
Intelligence sidebar section, command palette entries, keyboard shortcuts,
dashboard widgets, and tour steps. Add canViewIntelligence (intel read
permissions, with the strict qualification as a fallback) and use it for those
visibility surfaces. Wiki moderation, the tech tree, and division admin pages
keep the strict qualification.
- 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.
Every canvas position write (Auto-arrange, Save positions, drags, freeze pins)
used to send one PATCH per technology, all at once. On a large tree that was
dozens of concurrent full document updates, which exhausted the database pool
and could crash the server.
- Add POST /api/tech-tree/positions: validates `{ positions: [{ id, x, y }] }`
(null x/y clears a pin, capped at 2000) and applies every position in a
single UPDATE on the tree position columns. Access mirrors the technologies
update rule (technologies:update or Intelligence membership).
- Route all canvas position writes through it; failures now surface in the
toolbar instead of being swallowed.
- Auto-arrange is optimistic: the canvas re-lays out on click and the pins
are restored if the save fails. A spinner status chip shows while a layout
save runs, and layout controls and dragging are locked until it finishes.
- Integration tests for validation and the bulk write; the e2e checks the busy
indicator and that no per-node PATCHes are sent.
- Add an `icons:arma` tool (extractArmaIcons.ts) that pulls inventory icons
out of the game's PBOs and materializes the .paa files the catalog needs.
- Extend the catalog import library with the matching planning and upsert
support, and cover it with integration tests.
- 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.
Round out the canvas editing experience.
- Dragging one card of a multi-selection now moves and persists the whole
selection (React Flow hands the full dragged set to onNodeDragStop).
- A category band is draggable by its header, which moves every technology in
that band; the band body stays click-through.
- A "Snap: On/Off" toolbar toggle (default on, remembered per browser) snaps
dragged cards to a 46px grid that divides the column and row steps, so
snapped cards line up with the automatic layout.
- Connection lines are adjustable: select an edge to reveal "+" handles at each
segment's midpoint (click to add a bend), drag bends to reroute, and
double-click a bend to remove it. Routes persist per browser.
- Edges route around technologies they are not connected to, and corners are
rounded, so lines no longer cut through unrelated cards.
- Ctrl/Cmd-clicking to multi-select no longer pops the side panel over the
canvas.
Move the record contract, planning, and upsert logic out of the CLI script
and into src/lib/arma-import/catalog.ts so it can be unit-tested and reused.
The CLI (importArmaLibrary.ts) becomes a thin wrapper. Records are upserted
into assets (keyed by className) and vehicles (by classname); thumbnails are
materialized from .paa inventory icons, and fuel config is resolved per
record type. Adds integration coverage for the catalog import path.
Route the game's `money.delta` events into the web banking system so a
player's personal bank account tracks their in-game wallet.
- New `processMoneyEvent` (src/lib/arma-bridge/money.ts) applies a parsed
money delta to the player's personal account: debits go to the unit
treasury (or leave if no treasury), refunds hit the treasury first and
fall back to a plain deposit, and rewards/grants deposit directly.
- Wire the handler into ArmaSyncEvents and add a `POST /api/arma/v1/balances`
route (get_balances) that returns personal balances for Steam IDs, omitting
unlinked IDs so the game keeps its own stored value.
- Events dedupe by serverId+eventId so a retried delivery never
double-charges, and the whole path never throws.
- `tech-tree-layout.int.spec.ts`: pure layout (wrapping, manual overrides,
category bands, forward-edge warnings, cycles, catalog-stability).
- `tech-tree-prereq-edits.int.spec.ts`: add/remove/switch prerequisites with
cycle rejection and the pin-on-connect stability contract.
- `tech-tree-stability.int.spec.ts`: freeze pins every relocated card on a
data change, plus edge visuals (per-path colors, per-source lanes).
- `tech-categories.int.spec.ts`: CRUD, RBAC, division gating, FK set-null,
position round-trip.
- `tech-tree.e2e.spec.ts`: nav entry, render, preview/panel edits, both
quick-create paths, drag persistence + Auto-arrange, save positions
surviving a reload, connect/disconnect, and multi-column wrapping.
Covers the category registry sync, create and update gating per role (plain user, admin, developer, guest), the update-time escalation block, and read gating.
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).
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.
- Introduced voiceover relationship to StoryBeats with AI-generated flag.
- Added BeatVoiceover component for playing audio narrations with a minimal interface.
- Updated StoryPage, StoryViewer, and StoryTableOfContents to display and handle voiceovers.
- Created Voiceovers collection for uploading and managing audio narrations for beats.
- Included migration script to support voiceover functionality in the database.
- getPendingSurveys resolves open + eligible + unsubmitted surveys (single eligibility path shared with the list page)
- GET /api/surveys/pending poll endpoint (cookie auth)
- SurveyReminderToasts in the frontend layout: polls every 5 min, toasts at most once per 15 min, action deep-links into the modal
- integration coverage for the pending resolution
- forms collection: targeting group (all/users/roles/qualifications), activeFrom/activeUntil window, radio/date field blocks enabled
- form-submissions: server-side user attribution, expiry and audience gates, one attempt per user
- forms/submissions permissions in the Surveys registry group + admin role seed grants
- frontend /surveys list and /surveys/[id] take page with client block renderer
- register the pending role permission enum values migration
- announcements collection: info/success/warning/error variants, banner/modal/dialog/toast display types, up to 3 action buttons, dismissible flag, activeFrom/activeUntil windows, audience targeting (all/users/roles) and path include/exclude matching copied from the Shims pattern
- pure client-safe evaluation lib (enabled, time window, audience via roleDoc IDs, path match) plus per-browser localStorage dismissals
- AnnouncementHost mounted in the (frontend) layout: banners render inline, toasts via sonner custom markup, modals and confirmation dialogs queue one at a time
- permissions announcements:create/read/update/delete + admin:announcements:manage
- description is Lexical richText rendered via RichText/lexical-content on all surfaces; role targeting uses the dynamic Roles collection
- hand-written migrations with snapshot sidecars (collection, roleDocs targeting, description richtext conversion) + integration tests (12 passing)
Bootstrap a per-run test database (ensure, push schema, truncate, seed baselines, repair sequences), wire vitest/playwright globals, and gate schema push behind DB_PUSH. Serial test files share the one database.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
- scopedAdminPageAccess replaces requireAdminPageAccess: technologies pass for
intelligence division members, assets/resources/vehicles for logistics;
everyone else still needs admin:<slug>:manage
- technology approval is stripped from create/update below admin so division
members can never self-approve; technologies access moves to the
intelligence permission
- assets/resources/vehicles move to logistics division permissions
- vehicle fixtures are named to sort first so the 50-item name-sorted options
window includes them even on a DB crowded with older idle vehicles
- the respawn bridge assertion filters to this run's steam ids so leaked rows
from aborted runs cannot break exact equality
Satisfies the Next 16 rule that page files only export page fields:
getSupplyBoxDetail/getSupplyBoxList and getReservationList/getReservationDetail
move to reservations/surface.ts and pages import from it.
- Maps gain worldMap flag, description, freeform weather, latitude/longitude,
easeOfAccess and factionControl; picker cards render them as stat tags
- resource-nodes gain a shared icon set and may exist with no resources as
plain marker nodes (placement ignores marker-only nodes)
- sidebar gains the World Map entry; Infrastructure section gets defaultOpen
- migrations 20260921_120000/123000/130500/134000; includes the generated
types/schema sweep (currency emblem fields land in the next commit)