1
0
Fork 0
Commit graph

1029 commits

Author SHA1 Message Date
68782394e0 docs: add v0.10.1 changelog entry 2026-10-14 17:26:47 -04:00
88e89c9e55 feat(npc-dialogue): post opted-in event effects to Discord dispatch channel
Event nodes gain a 'Post this event to the Discord NPC dispatch channel'
checkbox. The flag rides emit() onto game_event_logs (discordRequested +
announcement bookkeeping columns, migration add_event_log_discord_fields),
and a new bot poller stamps pending rows into an amber NPC Dispatch embed
with relative-time mention and a link back to the source contact.

Bot delivery itself is unverifiable locally (no Discord token or channel id
in dev); the DB-side contract is covered by an integration test and a live
probe walk confirmed discord_requested persists end to end.
2026-10-14 16:57:33 -04:00
20c70151e3 feat(npc-dialogue): rich text editor and block lists in dialogue markup
DialogueText gains line-based block lists: consecutive lines starting
with - / * render as bullets, 1. / 2) as ordered lists, with item
content running through the inline parser so markup nests inside items.

Node editing swaps plain textareas for a shared MarkupEditor (line,
narration, lead-in, closing, tooltip, lock message, event message):
a formatting toolbar (bold, italic, code, color, link, bullet and
numbered list), a right-click menu wrapping the selection in tokens,
and a live DialogueText preview on the long-form fields. Storage stays
the plain custom-markup string; the editor only wraps selections.
2026-10-14 16:33:23 -04:00
c299acbe4f feat(npc-dialogue): condition groups and ternary text tokens
Conditions become a discriminated union: the existing flag leaf plus a
single-level group combining leaves with AND / OR / NOR. The evaluator
recurses one level, and every flat-assuming site (choice gating, graph
validation, editor, canvas previews) is group-aware; DB entry gates stay
flat by design. The node editor gains a shared condition builder with a
combinator dropdown and repeatable rows for both branch nodes and gated
choices.

Display strings also gain ternaries: {{ key ? yes : no }}, {{ !key ? .. }},
and numeric compares like {{ rep >= 5 ? .. }}. A brace-depth scanner
rewrites ternaries over bounded passes so branches may nest flag tokens
and even nested ternaries, then plain interpolation runs its single
never-rescanned pass. Ternary keys join collectNodeTokens so the server
reads exactly the flags a node needs.
2026-10-14 16:21:16 -04:00
a1aaed913d feat(npc-dialogue): attach files to conversation lines
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.
2026-10-14 16:05:15 -04:00
799c3216d2 feat(npc-dialogue): back NEW badges with server-side read markers
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).
2026-10-14 15:35:47 -04:00
59f01610ca feat(npc-dialogue): opt-in public visibility for event node effects
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.
2026-10-14 15:15:38 -04:00
95a2412206 fix(npc-dialogue): re-route edges live while dragging cards
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).
2026-10-14 15:00:08 -04:00
35a88ccd8f v0.10.0 - add garage vehicle bays, rotate thumbnails, fix grid drag previews 2026-10-13 16:45:21 -04:00
ed9914d2a3 docs: add v0.10.0 changelog entry 2026-10-13 16:45:14 -04:00
cecf35fcc1 docs: record frontend page padding convention in LESSONS.md 2026-10-13 16:43:16 -04:00
61ac2122d6 fix(garage): pad garage page content like sibling routes
The page root used flex flex-col gap-6 without the site-standard p-5,
so contents rendered flush against the header and sidebar.
2026-10-13 16:43:16 -04:00
fe57d63311 fix(garage): always fit the vehicle bay grid to its container
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.
2026-10-13 16:43:16 -04:00
45bb0bd029 feat(garage): rotate vehicle thumbnails with their cards
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.
2026-10-13 16:43:02 -04:00
7c135cd282 fix(grids): resize drag preview when rotating mid-drag
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.
2026-10-13 16:42:50 -04:00
0453742f32 test(garage): cover placement validation, access gating, and bridge sync 2026-10-13 16:02:58 -04:00
053c35a70c feat(arma): import vehicle mass and category defaults, add library picker 2026-10-13 16:02:58 -04:00
0d73da1142 feat(garage): grid UI with dispatch and store, replacing deployed vehicles list 2026-10-13 16:02:58 -04:00
3f15fbfb11 feat(arma-bridge): handle garage deposit, withdraw, and sync events 2026-10-13 16:02:58 -04:00
6c1bbda944 feat(garage): add vehicle bay schema fields, geometry helpers, and backfill 2026-10-13 16:02:58 -04:00
8f91bfedbd v0.9.2 - add journal XP, fix journal dates and editor spacing 2026-10-13 15:54:08 -04:00
0830719561 docs: add v0.9.2 changelog entry 2026-10-13 15:53:19 -04:00
75817ed3fe feat(contributions): fade the XP hint out and polish the amount 2026-10-13 15:52:57 -04:00
e96fdb7f58 feat(contributions): award 25 XP per journal entry, one per day 2026-10-13 15:52:57 -04:00
f481efb108 feat(contributions): add a reusable XP hint with a glint animation 2026-10-13 15:27:00 -04:00
076de5d60c feat(journals): animate the XP hint 2026-10-13 15:27:00 -04:00
88d674cff6 feat(journals): hint when a draft will earn XP 2026-10-13 15:20:59 -04:00
283cd3f4b2 chore(nav): relabel the contributions leaderboard entry to Contributions 2026-10-13 15:13:10 -04:00
3cc97bf791 fix(journals): render in-world dates in UTC so the day never shifts 2026-10-13 15:04:06 -04:00
420bc06f84 fix(journals): cut the card excerpt at the first paragraph 2026-10-13 15:02:23 -04:00
0a955035a1 fix(journals): preserve paragraph breaks in the card excerpt 2026-10-13 14:59:21 -04:00
f1634fb335 fix(editor): space paragraphs in the shared rich text editor 2026-10-13 14:59:21 -04:00
c323d0d853 test(contributions): cover the moderation grant and revoke actions 2026-10-13 14:46:10 -04:00
49bc918c67 feat(contributions): add staff moderation panel to grant and revoke XP 2026-10-13 14:46:10 -04:00
87dc4deadb docs(contributions): document the journal-publish rule 2026-10-13 14:37:53 -04:00
7f65e0371b test(contributions): cover journal publish XP, substance gate, and cap 2026-10-13 14:37:53 -04:00
9409f31dcf feat(contributions): award XP for published journal entries 2026-10-13 14:37:53 -04:00
2cc7629690 v0.9.1 - add in-universe clock, keep journal dates in the campaign 2026-10-13 13:23:04 -04:00
3f906e5694 docs: add v0.9.1 changelog entry 2026-10-13 13:23:00 -04:00
668c9f4ea6 feat(sidebar): add live in-universe clock under the logo 2026-10-13 13:20:16 -04:00
45c626bbd2 feat(journals): cap in-world date at present and add "days since awakening" subtitle
- 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
2026-10-13 12:33:19 -04:00
b1dbf5569c feat(journals): min in-world date 2156-03-19 and main-ops-only related mission dropdown
- 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.
2026-10-13 12:13:49 -04:00
9dea9d1e36 v0.9.0 - add journals, automatic awards, and a customizable dashboard 2026-10-13 11:32:37 -04:00
9c074b5af6 docs: add v0.9.0 changelog entry 2026-10-13 11:32:27 -04:00
8d5aa081ba fix(bot): read open-ended changelog ranges in the newest direction
CHANGELOG.md is newest-first, but resolveChangelogRange treated its two
range ends as a closed min/max index pair. A range with only a starting
version ("0.6.0..") therefore resolved to the oldest entries through
0.6.0 instead of 0.6.0 and everything newer, so the release-notes command
announced the wrong set of releases.

Resolve each open end toward the direction it opens: "X.." runs from the
newest entry down to X, "..X" runs from X to the oldest entry, and a
closed range still normalizes to min/max. Adds a regression test against
the shipped file.
2026-10-13 11:18:24 -04:00
e1cfdd3329 feat(dashboard): apply the tactical dossier style to the remaining widgets
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.
2026-10-13 11:08:56 -04:00
2a264a4530 test(audit): support exact route filtering in the mobile audit
AUDIT_ROUTE_FILTER now accepts "=/route" for an exact match in addition to
the existing substring match, so a single route such as the dashboard can be
audited on its own without pulling in every route that contains the filter.
2026-10-13 10:38:45 -04:00
9bfe43ad71 fix(dashboard): drop the mission widget header row
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.
2026-10-13 10:38:45 -04:00
3b3bba5d54 test(audit): refresh baseline after the final mobile gate
Full 390x844 pass on a fresh dev server: 68/68 routes ok, zero findings in
every violation class (overflow, grid, hoverOnly, tapTarget), leaving only
the review tiers (611 marginal, 6 WCAG-exempt inline links, 1 informational
hidden-on-mobile) plus the banking hydration fix.
2026-10-12 23:04:29 -04:00
6be2af2f86 fix(banking): render currency emblem inline to stop the hydration mismatch
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.
2026-10-12 23:04:29 -04:00