1
0
Fork 0
Commit graph

826 commits

Author SHA1 Message Date
78dc4945f7 v0.5.1 - global flags on NPC dialogue condition/flag system 2026-10-06 11:59:11 -04:00
035dd49149 feat(npc-dialogue): add global flag support (nullable user on player-flags) 2026-10-06 11:58:54 -04:00
4c2fc86ecb v0.5.0 - coloured NPC dialogue text, one-time choices, condition/flag branching, player flags 2026-10-06 01:19:14 -04:00
ac6415d034 feat(npc): complete dialogue feature and fix migration snapshot base
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.
2026-10-05 16:02:53 -04:00
2a3ad57bce feat(npc): add weighted activity, level, and dialogue conversations
- 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
2026-10-05 12:51:59 -04:00
76ca0e1d72 docs: add OpenChamber browser tab hygiene guidance to agent protocol 2026-10-05 12:40:47 -04:00
d21b36612f docs: add v0.4.1 player-facing changelog 2026-10-05 03:56:42 -04:00
d5bbf86e04 v0.4.1 - coordinate grid, locker sync, item storage, NPC portraits/bio, eval window, flappy ambient layers, /announce role mention 2026-10-05 03:39:43 -04:00
3e9d54486f chore(ui): replace em-dash placeholders with hyphen in NPC readouts
The 'Goods' readout cell rendered an em-dash when the NPC was not a vendor;
dash-sanitize gate requires a plain hyphen on user-facing surfaces.
2026-10-05 03:39:23 -04:00
6959a5ca0d docs: remove stale AI compose changelog entry 2026-10-05 03:37:20 -04:00
9b6935314d feat(bot): auto-mention a role in /announce when unset
Adds DISCORD_ANNOUNCE_MENTION_ROLE_ID; when set, /announce without a message
(compose dialog) posts the announcement with that role mentioned. Documented
in config, env example and the bot design guide.
2026-10-05 03:37:15 -04:00
c626ca3ccc feat(minigames): add drifting clouds and V-flock ambient layers to flappy
Adds drifting cloud layers and a V-flock of ambient birds to the flappy
bird arena for a more lived-in feel, without affecting gameplay.
2026-10-05 03:37:07 -04:00
4b9d231ba5 chore(ui): drop grid-texture hover fade
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).
2026-10-05 03:36:38 -04:00
665992a7ea feat(evaluations): mark mission evaluable after scheduled window
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.
2026-10-05 03:36:12 -04:00
f4a0c8e378 chore(types): regenerate payload-types and generated schema 2026-10-05 03:29:34 -04:00
d530de315b chore(migrations): register grid, item storage and NPC migrations
Register 20261005_001212_add_map_grid_config,
20261005_051452_add_game_structure_item_storage and the two game-npc
migrations in the migration index, and normalize trailing commas on the
preceding entries.
2026-10-05 03:27:14 -04:00
755bd04875 feat(personnel): add NPC portraits and rich bio, redesign contact cards
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.
2026-10-05 03:22:11 -04:00
4755cb681a feat(game-structures): add item storage model with per-structure access control
New item storage (limited-arsenal stock) on game-structures: a unique
storageSlug identifying the structure to the game bridge, an Item Storage
Access group (anyone / specific roles / specific users) backed by
canAccessStructureStorage, a storedAssets array (asset, quantity, grid
position, rotation, per-instance attachments/skin/custom name) with a
storedAssetCount rollup, and a beforeChange hook that pushes a locker.apply
command to the game whenever web-originated stock changes. Migration
20261005_051452_add_game_structure_item_storage.
2026-10-05 03:19:32 -04:00
5963082f9d feat(arma-bridge): sync limited-arsenal locker stock with the game
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.
2026-10-05 03:17:59 -04:00
12cb62b487 feat(map): add Arma-style coordinate grid config, overlay and mission-map wiring
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.
2026-10-05 03:17:52 -04:00
84939cc839 v0.4.0 - add mission planning maps, restore intelligence nav visibility 2026-10-04 02:53:34 -04:00
9865aa63b7 docs(changelog): add v0.4.0 changelog 2026-10-04 02:53:34 -04:00
d08ea8929c docs: document the intelligence visibility access layer 2026-10-04 02:53:24 -04:00
ef7295c0d4 fix(intel): show the intelligence section to anyone with read access
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.
2026-10-04 02:53:24 -04:00
838c5035a4 docs: document the mission planning map 2026-10-04 02:53:24 -04:00
1f230c0868 feat(missions): add a per-mission planning map with Arma markers
- 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.
2026-10-04 02:53:21 -04:00
54e9a787cb feat(arma): extract the marker catalog from game files
- Add bun run markers:arma (src/tools/arma/extractMarkers.ts), which scans the
  game install and every DLC addons dir, merges CfgMarkers, CfgMarkerColors,
  CfgMarkerBrushes and CfgMarkerClasses with inheritance, resolves stringtable
  names, and converts marker icons to PNG.
- Commit the converted PNGs under public/arma/markers so production needs no
  game files.
- Add the pure, client-safe catalog lib in src/lib/arma-markers: generated
  catalog, case-insensitive lookups, the Arma marker model with validation,
  and SQF export helpers.
2026-10-04 02:53:15 -04:00
063fadd87d v0.3.1 - fix tech tree auto-arrange overloading the server 2026-10-03 04:10:43 -04:00
e8f5043020 docs(changelog): add v0.3.1 changelog 2026-10-03 04:10:43 -04:00
98cc860299 docs: document bulk tech tree position writes 2026-10-03 04:08:29 -04:00
80ad24580a fix(tech-tree): save canvas positions in one request so auto-arrange cannot overload the server
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.
2026-10-03 04:08:29 -04:00
47b2988ae7 v0.3.0 - promotion nominations, leadership transfers, mission lifecycle, tech tree editing 2026-10-03 03:36:02 -04:00
a3bf78359e docs(changelog): add v0.3.0 changelog 2026-10-03 03:36:02 -04:00
65ee082f77 docs: document the tech tree, promotions, missions, and arma tooling
Update AGENTS.md for the tech tree drag/snap/edge-routing work, the promotion
nominations and leadership transfers, the mission lifecycle and side-op
workflow, and the Arma icon tooling; adjust the v0.2.59 changelog entry.
2026-10-03 03:31:00 -04:00
15a5f14ad2 chore(deps): patch @payloadcms/ui and add the arma icons script
Adds a patched dependency for @payloadcms/ui 3.88.0 and an `icons:arma`
package script.
2026-10-03 03:30:49 -04:00
d9253e6725 chore(payload): regenerate types and schema, harden sequence reset
- Regenerate payload-types and the drizzle schema for the new collections and
  fields (promotion nominations, leadership transfers, the accessory asset
  type, the Ornith model settings) and register the new migrations.
- Fix the reset-sequences SQL function to skip empty tables, and update the
  prod sync script to match.
2026-10-03 03:30:43 -04:00
35150e73ac feat(logistics): add the accessory asset type
Adds an "accessory" asset type for flashlights and lasers, allowed on the same
equipment slots as optics, muzzles, and bipods, with a locker label and colour.
2026-10-03 03:30:34 -04:00
a06060eb9f feat(ai): switch AI compose to the Ornith 9B model
Point the AI compose plugin at Unsloth Studio serving Ornith 1.0 9B (replacing
Gemma 4 26B), and rename the model settings to ornith-9b-settings. Ornith is a
reasoning model, so requests disable reasoning (reasoning_effort "none") to stop
a small token budget being spent entirely on the reasoning block. Adds the
migration and documents UNSLOTH_URL / UNSLOTH_API_KEY in .env.example.
2026-10-03 03:30:10 -04:00
d4f9051b17 feat(arma): extract catalog icons and extend the import library
- 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.
2026-10-03 03:29:58 -04:00
74564afb2b feat(missions): auto-start and auto-complete ops, plus side-op scheduling
- 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.
2026-10-03 03:29:35 -04:00
62573f74e6 feat(promotions): add promotion nominations and leadership transfers
- 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.
2026-10-03 03:29:24 -04:00
d43b2ef658 feat(tech-tree): drag groups, snap to grid, and route edges around nodes
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.
2026-10-03 03:28:27 -04:00
2f8e8e1b34 v0.2.59 - tech tree admin editor, shop money sync, clarity analytics, catalog import refactor 2026-10-01 10:15:52 -04:00
abb8a176fc docs(changelog): add v0.2.59 changelog 2026-10-01 10:15:52 -04:00
4fdc887a13 docs: document NEXT_PUBLIC_CLARITY_ID analytics env var 2026-10-01 10:04:48 -04:00
4845084c1c feat(analytics): add Microsoft Clarity analytics
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.
2026-10-01 10:04:45 -04:00
64d92bf848 refactor(arma): extract catalog import logic into lib/arma-import
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.
2026-10-01 10:04:38 -04:00
73cae3defd feat(arma): sync in-game shop money events to bank accounts
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.
2026-10-01 10:04:32 -04:00
affc899da0 docs: document the admin tech tree editor
Add a "Tech Tree (admin)" section covering the tech-categories collection,
treePosition, the React Flow admin view, the propagating layout, the
stability contract (connect/save-positions/auto-arrange), edge visuals, and
the integration and e2e test commands. Note the tech tree e2e suite.
2026-10-01 10:04:18 -04:00
5f7fd508a5 test(tech-tree): add integration and e2e coverage
- `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.
2026-10-01 10:04:07 -04:00