1
0
Fork 0
Commit graph

1003 commits

Author SHA1 Message Date
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
5765492494 test(audit): measure effective tap targets and report violation tiers
Raw element boxes overstated violations, so the check now measures what a
user actually taps, and reports the tiers separately (violation under
24px, marginal 24-39px, inline-exempt):

- effective target is the wrapping label, or label[for] for small
  checkables only. Verified in the browser that clicking a label toggles
  its Radix Switch (label rows are 84px tall); a Select's 14px caption
  label is not charged because its 36px trigger is the real target
- stretched-link cards (after:absolute inset-0) are measured on the
  positioned ancestor, not the 18px anchor inside
- sr-only proxy controls (under 8px) and input[type=range] are excluded
  (a slider's thumb is the target, not the 4px track)
- display:inline anchors in prose get the WCAG 2.5.8 inline exception and
  are reported as tapTargetInlineText
- refreshed baseline: 0 violations, 573 marginal, 6 inline, 1 hidden
2026-10-12 22:17:58 -04:00
9c3870cf79 fix(mobile): meet the 24px tap-target floor across the app
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
2026-10-12 22:17:51 -04:00
61535aba58 test(audit): correct mobile viewport emulation and grid heuristic
The harness was measuring against a viewport Chromium had already widened:
with isMobile true it grows the layout viewport to fit overflowing content,
so scrollWidth > innerWidth could never fire and real overflows were masked.
hasTouch alone gives (pointer: coarse) while keeping the 390px viewport
fixed, which is what surfaced the remaining resources overflow.

- grid class: flag only grids that overflow a non-scrolling container;
  drop the narrow-track rule (it flagged intentional icon columns) and
  skip min-w-max boards, which scroll by design
- structures detail now resolves from game-structures (the page's
  collection), so the previous phantom 404 is gone
- refreshed baseline: overflow, grid and hoverOnly all at zero
2026-10-12 20:17:27 -04:00
55f6598569 fix(mobile): resolve horizontal overflow and touch-only affordances
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
2026-10-12 20:17:21 -04:00
d016075481 test(audit): add mobile layout audit harness with 390x844 baseline
Pass 2 Session A: scripted Playwright audit over all frontend routes at
mobile viewport, classifying overflow, dialog, grid, hoverOnly,
hiddenMobile, tapTarget (<24px WCAG violation) and tapTargetMarginal
(24-39px review tier) findings.

- resolves dynamic route ids from REST, skips unresolvable ones instead
  of navigating literal bracket URLs
- blocks the realtime SSE stream, uses domcontentloaded, retries 5xx and
  errors once, and aborts if the dev server dies mid-run
- AUDIT_ROUTE_FILTER for targeted re-audits (writes filtered files so
  the baseline report is never clobbered)
- markdown report clusters findings into cross-route pattern groups;
  Sessions B-D fix per class and re-run this as the regression gate
- includes the initial baseline report (159 tap violations, 24 overflow
  findings on 6 routes, 4 cramped grids, 1 hover-only, 1 hidden-on-mobile)
2026-10-12 18:36:43 -04:00
25df38cdd3 fix(sidebar): match Banking and Market nav icons to their page headers
Banking used TrendingUp and Market used ShoppingBag in the sidebar while
the pages render Landmark and Store respectively; adopt the page icons
2026-10-12 16:21:05 -04:00
e987952a9b feat(awards): polish Award Automation admin view styling
- 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
2026-10-12 15:27:12 -04:00
db9248244d feat(awards): add award automation platform
- 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)
2026-10-12 15:11:38 -04:00
8a7d79c369 feat(journals): member-authored journal entries with author-owned publishing
- 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)
2026-10-12 14:39:48 -04:00
3604c1d146 feat(sidebar): pin Platform section to top during reorder
- 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
2026-10-12 14:02:21 -04:00
0ca35ec251 feat(sidebar): add server-persisted section reorder with customize mode
- 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
2026-10-12 13:46:48 -04:00
8fb97fdd1c feat(dashboard): demo tactical dossier styling on hero widgets
- New shared TacticalFrame/ReadoutFooter primitives (classification strip,
  corner brackets, faint grid texture, mono readout bar) following the
  campaign-card recipe; each piece separable per widget
- ProfileSummary: full frame + service-record readout footer (XP/level/rank/assignments)
- MissionBriefing: frame + codename line, inner MissionCard kept conventional
- QuickStats: hairline-separated situation-report readout bar
- Dense widgets (events, tickets, notifications, wallet, negotiations) stay
  shadcn so the tactical surfaces stand out
2026-10-12 13:26:21 -04:00
3219142f88 feat(admin): add icons to sidebar nav and dashboard collections grid
- 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)
2026-10-12 13:20:50 -04:00
93af541f24 v0.8.14 - add editable Discord Rich Presence 2026-10-12 10:36:57 -04:00
2f06edef22 docs: add v0.8.14 changelog entry 2026-10-12 10:35:53 -04:00
8148aeb22d feat(bot): add editable Discord Rich Presence via command and CMS
Adds a discord-presence Payload Global as the single source of truth for the bot's Discord activity. Two writers update it and either takes effect live: the admin CMS page and the /discord-presence command (view/edit/clear, guild-only, gated by new discord:rp:read and discord:rp:update permissions). A poll loop reconciles Discord's live presence from the Global so CMS edits propagate without a restart; disabled or blank presence sets the bot idle.
2026-10-12 10:21:37 -04:00
c984f08ea0 v0.8.13 - add Call for Fire: Versus multiplayer, expand the command palette 2026-10-12 00:03:42 -04:00
3e6214ad41 docs: add v0.8.13 changelog entry 2026-10-12 00:03:33 -04:00
620c0a9d7d chore(call-for-fire-versus): use a hyphen for the empty impact placeholder 2026-10-12 00:02:48 -04:00
49782365c2 chore(call-for-fire-versus): finish place/structure wording in help and errors
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.
2026-10-12 00:01:34 -04:00
c3d3c8c574 chore(call-for-fire-versus): replace emplace/bracket wording
- 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
2026-10-11 23:25:49 -04:00
6bcf229268 feat(command-palette): add missing destinations, queue shortcuts, mini XP toggle
- 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
2026-10-11 23:06:36 -04:00
16e4b9f60d feat(minigames): rotate the L ammo depot around its fixed elbow anchor
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.
2026-10-11 22:46:36 -04:00
c8f625b12c feat(minigames): make the Ammo Depot an L-shaped block with four-way rotation
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.
2026-10-11 22:36:51 -04:00
8afbf00805 feat(minigames): add procedural SFX and hit explosions to the versus duel
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.
2026-10-11 22:28:10 -04:00
a1a2dbdcac feat(minigames): highlight the selected emplacement and add rotation controls
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.
2026-10-11 22:18:20 -04:00