1
0
Fork 0
Commit graph

512 commits

Author SHA1 Message Date
7ca8cd8551 feat(version): expose build metadata
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-08-27 18:36:11 -04:00
7490f34267 feat(version): add build metadata fields
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-08-27 18:36:11 -04:00
d518b13f36 feat(xp): show experience descriptions
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-08-27 18:36:11 -04:00
523b19ee52 feat(xp): expose experience descriptions
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-08-27 18:36:11 -04:00
21f61ca33f feat(evaluations): add permissions and event logging
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-08-27 18:36:04 -04:00
22b7343fa8 feat(evaluations): register collection and generated types
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-08-27 18:36:04 -04:00
6bbafc7c5a feat(profile): integrate evaluations into profile pages
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-08-27 18:36:04 -04:00
b8ba036965 feat(profile): add leadership evaluation controls
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-08-27 18:36:04 -04:00
959f65b51e feat(evaluations): add profile evaluation actions
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-08-27 18:36:04 -04:00
a21770e54e feat(evaluations): add evaluation service
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-08-27 18:36:04 -04:00
15145f613a feat(evaluations): add evaluations collection and migration
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-08-27 18:36:04 -04:00
9955c376f9 feat(evaluations): define performance levels
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-08-27 18:36:04 -04:00
9323a7ce08 feat(notifications): notify users when awards are granted via profile edit
Add a Profiles afterChange hook that diffs progression.awards against previousDoc (row id, falling back to award+date composite key) and sends an award:granted notification including the grant reason and issuer. Register award:granted as a muteable notification type.
2026-08-27 14:01:16 -04:00
503e7a35f9 feat(import): add Arma library importer with PBO icon extraction
- importArmaLibrary: upsert Arma export catalog into assets/vehicles via
  Payload, materialize .paa thumbnails (convertPaaToPng) and link uploads,
  resolve Fuel resource for vehicle fuel defaults
- extractArmaIcons: ref-driven PBO .paa extraction into a --paa-root tree
  shaped like inventory icon ref paths
- package.json: add import:arma script
2026-08-27 11:25:28 -04:00
d740d43800 feat(eod): update difficulty selection in EOD components and bump version to 0.2.0 2026-08-26 23:55:03 -04:00
7a34c3901e feat(eod): add best times tracking for training, perimeter, and supply road games 2026-08-26 23:24:24 -04:00
a247e61fa9 feat(eod): add high-contrast toggle, improved leaderboard, new effects on bad-flag cells 2026-08-26 22:36:06 -04:00
b99520bc64 feat(version): add version bump script for CI deployments 2026-08-26 22:13:24 -04:00
2922df23dd chore(db): add EOD profile migration 2026-08-26 22:04:48 -04:00
3e82ef4ed9 feat(profiles): track EOD minesweeper progress 2026-08-26 22:04:48 -04:00
512cdd62ad feat(eod): add minesweeper clearance game 2026-08-26 22:04:48 -04:00
3112b72972 feat(profiles): adjust experience points calculation for kills 2026-08-26 18:12:34 -04:00
287a0f7db8 feat(server): add stale presence monitoring 2026-08-26 18:05:57 -04:00
3dfdc8916d feat(arma): track player kills from sync events 2026-08-26 18:05:51 -04:00
d4060c06f0 feat(campaigns): include cover images in frontend queries 2026-08-26 18:05:41 -04:00
b22a1836e4 chore(migrations): track schema snapshots and require explicit apply 2026-08-26 00:53:57 -04:00
83f203d736 feat(shims): add targeted client-side injections 2026-08-26 00:53:31 -04:00
0771424446 feat(campaigns): let members create and own campaigns 2026-08-26 00:53:17 -04:00
d6b2ffa5d2 chore(access-control): scaffold empty isAuthor helper stub 2026-08-25 13:27:48 -04:00
f1dd3c67ce feat(campaigns): add Zeus campaign-creation CTA to campaigns header 2026-08-25 13:27:48 -04:00
802873c7fa feat(structures): hero image header on structure detail page
When the structure type has an image, render it as a full-bleed
cover behind the page header with vertical and horizontal gradient
overlays; text shifts to white for contrast. Headers without an
image keep the previous plain layout.
2026-08-25 12:34:35 -04:00
fff9e82d62 feat(tools): scaffold reset-password CLI
Add src/tools/cli with a CliFlow helper (boxed headers, labeled log
lines) and a reset-password command stub wired to the prompt package.
Runnable via 'bun run u:reset-password'; interactive flow to follow.
2026-08-25 12:32:03 -04:00
41b9d62e15 feat(sidebar): add sparkle accent to mini XP display
Show a sparkle icon next to the XP number in the collapsed sidebar
XP strip; inline the level-name/XP spans per prettier.
2026-08-25 12:31:54 -04:00
3348466f3b fix(roster): tighten tab icon spacing and allow org chart scroll
Add gap-1.5 to the roster tab triggers so icons and labels are not
glued together, and let the org chart tab scroll horizontally instead
of overflowing the page.
2026-08-25 12:31:53 -04:00
7cfb650095 style(bot): capitalize attendance embed field labels
Title-case 'Operation Type' and 'Max Players' in the RSVP embed and
apply prettier formatting to the listener error log call.
2026-08-25 12:31:20 -04:00
9b909e85e6 refactor(arma-bridge): extract shared server guard and json coercion
requireArmaServer (src/lib/arma-bridge/server.ts) wraps the shared
bridge auth + game-servers lookup that every v1 route repeated;
asJson (json.ts) narrows untrusted request values to what Payload's
json field validation accepts (strings normalize to the fallback
instead of failing the write). All four v1 routes now use both.

Also document the ARMA_BRIDGE_API_KEY env var missed when the bridge
routes landed.
2026-08-25 12:30:50 -04:00
c628f8a90b feat(missions): auto-complete past missions via mission-tick bin
Add the mission-tick Payload bin (external cron): sweeps missions
whose status is Scheduled/Active and whose scheduled calendar day
(classification.startDateTime, server-local) has fully passed and
sets them to Completed, emitting a mission:auto-complete event per
mission. Draft and terminal statuses are never touched; idempotent.
Notifies clients via the game-tick SSE path.

Logic lives in src/lib/intelligence/missionLifecycle.ts with an
integration test in tests/int/mission-lifecycle.int.spec.ts.
2026-08-25 12:30:04 -04:00
de1230a757 fix(generate-mission): strip array row ids when cloning missions
Cloning a mission whose array rows still carry the source doc's row
ids trips a unique-constraint violation in the drizzle adapter,
surfacing as 'ValidationError: The following field is invalid: id'.
Walk the collection's field schema (groups, tabs, rows, nested
arrays) and strip row ids before create — schema-driven so Lexical
richText blobs are cloned verbatim.

Also adopt the bin file logger and the standard fatal-error exit
path.
2026-08-25 12:29:26 -04:00
e72b849774 feat(scripts): tee bin script logs to daily files
Add createBinLogger (src/scripts/lib/binFileLogger.ts): every log call
is appended synchronously to logs/<bin-key>/<YYYY-MM-DD>.log (UTC) in
addition to the console logger — sync writes because bin scripts
process.exit() immediately. Bin bodies are wrapped in try/catch so a
fatal error is logged to file and exits code 1. Override the directory
with BIN_LOG_DIR. logs/ is gitignored.

game-tick, market-tick, and processShipmentTick adopt the logger;
generate-mission follows with its clone fix; mission-tick lands with
its feature. Document BIN_LOG_DIR in .env.example and the logging in
AGENTS.md / README.
2026-08-25 12:29:07 -04:00
824b03ec49 feat(missions): add redacted objective toggle
Mission objectives gain a redacted checkbox. Redacted objectives are
shown block-redacted to players; mission managers, authors, and Zeus
see the real text (via tooltip) and can toggle the flag from the
mission detail page. Toggles emit mission:objective-redacted-toggle
events. Also registers the mission:auto-complete event type used by
the upcoming mission-tick bin.
2026-08-25 12:27:52 -04:00
c0d00fc113 fix(auth): reject MCP API-key sessions in user auth paths
With the MCP plugin enabled, payload.auth() can return a
payload-mcp-api-keys doc instead of a User. Add an isPayloadUser
type guard and use it in every server action, page, and route that
treats the auth result as a real user, so API-key sessions can no
longer pass user auth checks. hasRoles now explicitly requires a
users-collection doc.
2026-08-25 12:27:35 -04:00
b70ff4dff8 feat(mcp): enable Payload MCP plugin
Register mcpPlugin on the Payload config. Auth now also accepts
payload-mcp-api-keys, so the generated types carry the new
collection and the user union widens accordingly. Follow-up commits
guard user auth paths against these API-key sessions.

Also apply incidental prettier formatting to generatePlainText().
2026-08-25 12:27:01 -04:00
98f2b0447a fix(awards): tighten ribbon rack sizing and hover effect
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-08-23 18:52:36 -04:00
c2655b225f fix(tools): exit backfillProfiles script after completion
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-08-23 18:52:36 -04:00
38400366a1 feat(sidebar): regroup commerce nav and add XP mini toggle
Move Banking and Market out of Logistics into a commerce group beside Personal, and add a quick XP mini-mode toggle synced to the saved display preference via the layout-provided preferences prop.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-08-23 18:52:18 -04:00
906af4feb1 feat(preferences): expose XP mini-mode toggle in account settings
Add the mini XP display switch to PreferencesForm, wire it through the account page, and cover it in the integration test.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-08-23 18:52:09 -04:00
b581670e72 feat(preferences): add xpDisplayMini preference and update action
Add the xpDisplayMini checkbox to user display preferences, regenerate types, and accept it in updatePreferences.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-08-23 18:51:59 -04:00
a0c4eaabcf fix(banking): join parent transaction in account provisioning hooks
Thread the Payload request through createAccount/ensurePersonalAccount and the Users beforeChange hook writes so nested creates share the parent transaction instead of failing FK checks on a fresh connection.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-08-23 18:51:49 -04:00
fc3b961a43 feat(arma-bridge): add authenticated v1 bridge API routes
Add key-and-server-id authenticated endpoints for server heartbeat, event ingestion, and command pull/ack.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-08-23 18:51:33 -04:00
347cbdf956 feat(server): add game-server sync collections
Add GameServers, ArmaSyncEvents and ArmaCommands collections plus registration in payload config and regenerated types.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-08-23 18:51:24 -04:00
bfb3e1495a feat(awards): sort awards by experience points in award display 2026-08-21 16:57:31 -04:00
432929cc29 feat(awards): finish award profile presentation 2026-08-21 15:40:33 -04:00
91d1214a7b feat(profiles): add award metadata 2026-08-21 15:39:36 -04:00
1dfbb58dae fix(migrations): migrate profile awards to array storage 2026-08-21 15:38:54 -04:00
e1014207f4 fix(version-overlay): remove redundant check for commit info display 2026-08-21 12:47:54 -04:00
b060b967c0 feat(awards): add AwardCard and RibbonRack components for award display 2026-08-21 12:46:44 -04:00
9e91203330 fix(collections): correct asset filter callback 2026-08-21 02:27:57 -04:00
40b130c8d3 feat(attendance): implement real-time attendance change notifications for Discord 2026-08-21 02:12:01 -04:00
4ad49d3b95 fix(discord): send mission roll calls once 2026-08-21 01:56:12 -04:00
dcc58327e3 feat(impersonation): implement user impersonation functionality and UI 2026-08-21 01:41:14 -04:00
2a0668fc03 feat(migrations): add new migration for projects, sprints, releases, and tickets 2026-08-21 00:37:44 -04:00
643e282fe7 feat(flappy): keep current pilot visible on leaderboard 2026-08-21 00:26:52 -04:00
f69c7ca0b4 feat(ui): show rank in dashboard navigation 2026-08-21 00:26:47 -04:00
6d58451978 feat(projects): enforce permissions and improve search 2026-08-21 00:26:33 -04:00
282ca9eddf feat(xp): animate sidebar gains 2026-08-21 00:25:33 -04:00
485e26bbda feat(realtime): publish user-scoped update events 2026-08-21 00:25:20 -04:00
4c03784c68 chore(db): add migration runner and schema baseline 2026-08-20 19:57:22 -04:00
1a86a3a8b5 feat(realtime): add channel presence 2026-08-20 19:57:01 -04:00
3f4403d151 feat(intelligence): refresh mission presentation 2026-08-20 19:56:41 -04:00
9bf984fc96 feat(projects): add project tracking workspace 2026-08-20 19:55:33 -04:00
9b42d2054c fix(types): add draft:false and dossier to profiles create calls 2026-08-19 22:48:45 -04:00
97bdf2f40c fix(layout): await isSuperuser() call for VersionOverlay prop 2026-08-19 20:51:17 -04:00
7575d1df82 chore(migrations): add roles collection and showVersionOverlay migration 2026-08-19 20:48:01 -04:00
38944d9aa2 fix(types): regenerate payload-types for showVersionOverlay 2026-08-19 20:47:20 -04:00
a9d9ba50ea feat(preferences): add version overlay toggle and redesign settings UI
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-08-19 20:40:56 -04:00
d57b0cbc22 feat(ui): add shadcn switch and radio-group components
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-08-19 20:40:46 -04:00
a8e147e52a docs: add AGENTS.md subdirectories and login case study
Add domain-specific AGENTS.md files for collections, components, lib,
utils, and bot. Add login-return-url case study documenting the
return-URL flow design decisions and debugging lessons learned.
2026-08-19 19:48:35 -04:00
fb74e6b0c2 chore(seed): update seed scripts for RBAC roles
Assign the developer role document to the sysadmin user on seed. Add
seedRoles script to create default RBAC roles.
2026-08-19 19:48:31 -04:00
d3890cc191 feat(discord): integrate RBAC into Discord bot
Replace legacy role-name checks in isStaff with hasPermission(discord:staff).
Auto-assign the 'user' role document on signup. Import hasPermission in
announce command for future permission gating.
2026-08-19 19:48:28 -04:00
1f9f919443 feat(auth): add return-URL flow for login redirects
Add LoginLink client component that captures current path via usePathname()
and passes it as returnTo query param. Update login page to read and
sanitize returnTo (open-redirect guard: must start with /, reject //).
Update LoginForm to redirect to returnTo after successful login. Wire
LandingPage CTA through LoginLink. Add returnTo redirect for already-
authed users hitting /login. Add return-URL to flappy page redirect.
Remove trailing blank line from (frontend) layout.
2026-08-19 19:48:24 -04:00
eef1b11bb1 feat(rbac): migrate server actions and service layers to RBAC
Replace hasRoles calls with hasPermission in all server actions and page
components. Update qualification checks (logistics, intelligence) to use
permission-based checks instead of role name matching. Update staff lookup
in tickets/staff.ts to query roles collection. Use enlistmentDate field
on profile page instead of createdAt.
2026-08-19 19:47:57 -04:00
653caa8064 feat(rbac): migrate collection access controls to RBAC permissions
Replace legacy isDeveloper/isAdmin/hasRoles checks with
hasPermission/requirePermission across all collections. Add roleDocs
relationship to Users, enlistmentDate to Profiles, and field-level
intel_excerpt permission gate on Profiles. Auto-generated payload-types
updated to reflect the new Roles collection and roleDocs field.
2026-08-19 19:47:51 -04:00
80f28ed939 feat(rbac): add dynamic roles collection and permissions system
Introduce a dynamic RBAC system with a new 'roles' collection that grants
granular permissions. Add hasPermission/requirePermission/loadUserPermissions
utilities and a central permissions registry. Register the Roles collection in
payload.config and add roleDocs relationship to Users.
2026-08-19 19:47:36 -04:00
4c3c3373d3 feat(roster): implement leadOrActual display preference
- Fetch current user's leadOrActual preference in roster page via payload.auth()
- Add RosterDisplayContext to avoid prop drilling through org chart components
- MemberCard shows 'Lead' or 'Actual' based on user preference
- Add preference radio buttons to PreferencesForm under Display section
- Update updatePreferences server action to save leadOrActual
- Add TODO for restyling radio buttons later
2026-08-18 02:20:58 -04:00
feccbc0ced chore(migrations): archive superseded migrations and add consolidated migration
Move old migrations (20260109 through 20260817) to _archived/ and add a
single consolidated migration (20260818_024510). Update the migrations
index to reference only the new migration.
2026-08-18 02:05:56 -04:00
72262d53b6 feat(users): add leadOrActual roster display preference
Adds a 'leadOrActual' select preference to the display group so users
can choose between 'Lead' or 'Actual' when reviewing the unit roster.
2026-08-18 02:05:41 -04:00
cb2029ea97 feat(command-palette): register page-specific commands across UI
Wire CommandPalette/Provider into the frontend layout and add Cmd+K
hint in the SiteHeader. Register context-aware commands for banking,
helpdesk, mission RSVP, locker, shipments, and market pages.

Also removes the locker search's duplicate Cmd+K listener (now handled
globally), renames its button to 'Search Locker', and cleans up a
flappy page parenthetical.
2026-08-18 02:05:36 -04:00
4906fc8008 refactor(ui): make dialogs controlled via open/onOpenChange props
Support external open state management so parent components and the
command palette can trigger these dialogs programmatically.
2026-08-18 02:05:20 -04:00
0fc61ebb47 feat(command-palette): add command palette with Cmd+K keyboard shortcuts 2026-08-18 02:05:00 -04:00
2f536a814b chore(flappy): remove parenthetical from flight simulator message 2026-08-17 22:22:06 -04:00
452aa392bd feat(ui): enhance shadcn dialog, tabs, tooltip, and command components
- Add showCloseButton prop to DialogContent for modal workflows
- Add line variant to TabsList via class-variance-authority
- Add arrowClassName prop to TooltipContent for arrow styling
- Add optional title prop to CommandDialog for accessibility
2026-08-17 22:18:31 -04:00
ae732496ed chore: regenerate Payload types and import map 2026-08-17 22:18:27 -04:00
e57f38cd8f feat(config): switch AI provider from Ollama to Unsloth with streaming support
- Add Unsloth OpenAI-compatible provider with @ai-sdk/openai
- Rewrite AI generation handlers with Vercel AI SDK streaming
- Add plainTextToLexicalJson helper for richText field generation
- Configure HeadingFeature and PayloadAiPluginLexicalEditorFeature
- Stub @payloadcms/richtext-lexical server entry in client bundle
- Extract meta constants for site title and description
- Add UNSLOTH_API_KEY to .env.development
2026-08-17 22:18:23 -04:00
50bc0e3441 style(migrations): rename migration files, add new migration for shims, add favicon for front-end 2026-08-17 02:02:16 -04:00
cdeebd05f8 style(static): format payload admin static components 2026-08-16 23:27:51 -04:00
9f4faa948b style(config): format generated payload schema 2026-08-16 23:27:51 -04:00
c27b12c76c style(bot): format Discord bot modules 2026-08-16 23:27:51 -04:00
50f964cdf9 style(scripts): format tick scripts, seed tools, and migrations 2026-08-16 23:27:51 -04:00
2acf52788f style(collections): format Payload collection configs 2026-08-16 23:27:51 -04:00
6685fe68cd style(lib): format shared libraries and remove unused imports 2026-08-16 23:27:51 -04:00
5058d9ce6c style(admin): format admin narrative-flow and award components 2026-08-16 23:27:51 -04:00
a21564a78d style(frontend): format frontend feature components 2026-08-16 23:27:51 -04:00
7db1f648bf style(app): format app routes, pages, and server actions 2026-08-16 23:27:51 -04:00
05c7c83799 style(ui): format shadcn/ui primitives and utility hooks 2026-08-16 23:27:51 -04:00
afb61f6227 feat(globals): add Shims global for admin CSS/JS shims 2026-08-16 23:27:51 -04:00
088b6cefb6 fix(ui): correct sidebar inset layout and Tailwind v4 custom-property widths
The shadcn component update pulled sidebar.tsx using Tailwind v3-style
bare-bracket custom property syntax (w-[--sidebar-width]). Under Tailwind
v4 this compiles to invalid CSS (width: --sidebar-width) which the browser
ignores, so width fell back to auto and the fixed sidebar blew out to its
content's intrinsic width (the 1372px logo header ~ half the page). The
empty spacer div was equally broken, reserving zero space and leaving the
inset m-2 margin as a stray left gap.

Three fixes:
- sidebar.tsx: wrap all 7 bare-bracket custom properties in var() so they
  compile to width: var(--sidebar-width) / var(--sidebar-width-icon) /
  max-width: var(--skeleton-width). The calc(var(...)) rules were already
  valid; only the bare forms were broken.
- layout.tsx: replace the raw <main className="min-h-full bg-background
  w-full"> with <SidebarInset>. AppSidebar uses variant="inset", whose
  peer styling (md:peer-data-[variant=inset]:m-2 / :rounded-xl / :shadow)
  only applies to a SidebarInset sibling, so the inset gap/rounding/shadow
  were silently dropped.
- SiteHeader.tsx: replace the raw <div> + border-gray-800 + p-4 with the
  standard shadcn <header className="flex h-16 shrink-0 items-center gap-2
  border-b px-4"> using semantic border-b, plus -ml-1 on SidebarTrigger
  and an ml-auto wrapper for NotificationsBell (which takes no className).

Verified via the running dev server: SSR HTML carries
data-variant="inset", a single <main> with the peer-data-[variant=inset]
classes, <header ... border-b>, and zero border-gray-800 occurrences.
tsc --noEmit clean for the changed files.
2026-08-16 23:27:51 -04:00
fa70ed0956 feat(config): add meta information for Polaris Task Force website 2026-08-16 19:41:21 -04:00
4905022dd5 feat(config): wire prodMigrations for auto-migrate on prod boot
Import the migrations array from src/migrations/index.ts and pass it as prodMigrations to the postgres adapter. Per @payloadcms/db-postgres connect.js, when NODE_ENV=production the adapter now auto-runs payload migrate against this array on every boot, so pending migrations apply on deploy without a manual docker exec step. Idempotent on next prod boot since payload_migrations already tracks batches 1-2. DEPLOYMENT.md §7's manual 'docker exec ... payload/bin.js migrate' still works as a fallback via filesystem discovery.
2026-08-16 19:39:19 -04:00
0ed8721889 refactor(migrations): split tickets DDL out of migration 7 into migration 8
Migration 7 originally bundled tickets DDL with pending schema drift, which made it fail against prod (no tickets objects existed there). Split into a stripped migration 7 (no tickets statements) and a new tickets-only migration 8 that creates enum_tickets_* types, ALTER TYPE ADD VALUE for 'tickets' + 'ticket:*' muted-type values, tickets and tickets_activity tables, and the payload_locked_documents_rels.tickets_id column + FK + index. Migration 8's .json snapshot is the new forward baseline for migrate:create (verified via zero-diff probe). Applied to prod: m1-7 baselined as batch 1, m8 applied as batch 2.
2026-08-16 19:38:56 -04:00
10560c1446 fix(version): resolve git metadata from env/SOURCE_COMMIT for Coolify builds
Coolify strips .git from the build context, so git CLI calls in
generate:version-info fail during Docker builds. The script now
resolves metadata in priority order: GIT_* env overrides, then
SOURCE_COMMIT (Coolify's injected build arg, shortened to 7 chars),
then git CLI fallback for local builds. Dockerfile passes the ARGs
through as ENV before the build; DEPLOYMENT.md documents the required
'Include Source Commit in Build' setting.
2026-08-16 18:46:21 -04:00
8fe7276ba3 refactor(ui): update shad/cn components 2026-08-16 18:34:23 -04:00
dad652b1d4 feat(helpdesk): enhance create ticket dialog with critical alert for priority tickets 2026-08-16 18:26:01 -04:00
56b79e142e fix(migrations): backfill grid columns before NOT NULL on data-bearing table
The generated migration added grid_x/grid_y as numeric NOT NULL without a
default, which fails on prod where game_structures_stored_resources already
has rows ('column contains null values'). Add the columns with DEFAULT 0 to
backfill existing rows, then drop the default to match the target schema.
2026-08-16 18:23:33 -04:00
931c60e234 refactor(helpdesk): replace inline hint with Alert in create ticket dialog
Use the shadcn Alert component for the file-sharing hint instead of a bare Message element.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-08-16 18:13:22 -04:00
9ec4555200 feat(migrations): add production migration for tickets and pending schema drift
Add migration 20260816_213455 covering the Tickets collection plus all schema drift accumulated since 20260109 (banking, market, game vehicles/NPCs, attendance, enum extensions).

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-08-16 18:12:59 -04:00
5064890452 feat(helpdesk): add helpdesk sidebar entry
Add the Helpdesk nav item with LifeBuoy icon under the core nav group.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-08-16 18:12:49 -04:00
c80ecf9141 feat(helpdesk): add helpdesk UI components
Add TicketsView, TicketCard, TicketDetail, TicketTimeline, CreateTicketDialog, and TicketBadges components.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-08-16 18:12:44 -04:00
14d92bf277 feat(helpdesk): add helpdesk pages
Add the helpdesk list page and ticket detail page routes.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-08-16 18:12:40 -04:00
40f23e8774 feat(helpdesk): add ticket server actions
Add createTicket, replyToTicket, updateTicketStatus, and assignTicket server actions with notification and event-log emission.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-08-16 18:12:36 -04:00
ff986bf4ec feat(helpdesk): add ticket domain libs
Add shared ticket metadata (labels, styles), staff resolution, and plaintext-to-lexical conversion helpers.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-08-16 18:12:33 -04:00
e7eff028b7 feat(tickets): add Tickets collection
Add the helpdesk Tickets collection with status/priority/category enums, reporter/assignee relationships, activity timeline, and closedAt lifecycle. Register in payload.config and refresh generated types.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-08-16 18:12:27 -04:00
94cd7c5626 feat(helpdesk): add ticket notification types
Add ticket:created/assigned/reply/status labels and muteable notification types.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-08-16 18:12:22 -04:00
6419c9676f feat(helpdesk): add ticket event log wiring
Add ticket:create/reply/status-change/assign event types, extend the emit targetCollection union, and register tickets in GameEventLogs target collections.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-08-16 18:12:19 -04:00
6c97b1a41c feat(docker): gate Discord bot on DISCORD_TOKEN presence in container entrypoint 2026-08-13 20:04:27 -04:00
5694dbf218 feat(admin): add GoToFrontendLink to admin nav
Register a beforeNav component linking the Payload admin panel back to the public frontend.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-08-13 17:00:51 -04:00
cabbe071d7 feat(bot): register signup/link/ping commands globally for DM use
Add a scope field to BotCommand so /signup, /link and /ping register globally (available in DMs — guild-scoped commands never appear there) while /announce stays guild-only. Migrate ephemeral replies to MessageFlags and make the /signup welcome message resilient to blocked DMs.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-08-13 17:00:44 -04:00
4a96c57546 style(frontend): swap ShieldIcon for AppLogo on landing page 2026-08-12 23:14:08 -04:00
4a2e0d5406 feat(banking): redesign banking overview with wallet hero, activity feed, and tabs 2026-08-12 23:13:27 -04:00
9210b7bbec feat(banking): add WalletHero and ActivityFeed components for banking overview 2026-08-12 23:13:11 -04:00
034f0af5f3 refactor(banking): extract shared UI constants for status styling and transaction colors 2026-08-12 23:12:57 -04:00
2dff16a291 fix(logistics): normalize Structure minFrequency defaultValue as string 2026-08-12 23:11:45 -04:00
ba94dfa7da fix(deploy): set force-dynamic and outputFileTracingRoot for container builds 2026-08-12 23:11:32 -04:00
91c5a8f625 feat(deploy): add /api/health endpoint for container liveness probes 2026-08-12 23:11:16 -04:00
110112e9b4 feat(factions): redesign faction card and add faction detail page
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-08-12 16:21:13 -04:00
ab0ff6b96e fix(maps): set useAsTitle for admin label
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-08-12 16:21:11 -04:00
5f601e393d style(intelligence): reformat mission components and refine objective display
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-08-12 16:21:09 -04:00
dcf8a03dea feat(missions): add cover image and redesign mission detail page with hero header
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-08-12 16:21:07 -04:00
cce00861c2 feat(campaigns): redesign campaign detail page with cover hero and mission thumbnails
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-08-12 16:21:06 -04:00
11afd905f5 feat(campaigns): add cover image and mission stats to campaign cards
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-08-12 16:21:04 -04:00
b14e04c487 feat(factions): add player-faction type, reputation, relationships, and cover image
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-08-12 16:21:03 -04:00
00919ceeb3 feat(bot): add Discord bot scaffold with sign-up, attendance embeds, and notification bridge 2026-08-12 12:39:00 -04:00
ad774121b0 feat(missions): add generate-mission bin for next Saturday template 2026-08-12 12:38:55 -04:00
f065aa6796 feat(missions): add RSVP attendance collection and detail UI 2026-08-12 12:38:53 -04:00
2984c72d77 fix(notifications): harden bell dropdown against failed mark-read 2026-08-12 12:38:48 -04:00
bc1456db88 feat(notify): push banking move and shipment arrival owner notifications 2026-08-12 12:38:46 -04:00
2a457a5dd9 feat(notify): add finance and shipment-completed notification types 2026-08-12 12:38:45 -04:00
83879687ae feat(users): add discordId and Discord notification preferences 2026-08-12 12:38:43 -04:00
bbfbd5966c feat(version): expose build/commit metadata via /api/version and overlay 2026-08-12 12:38:33 -04:00
b024bcf2da style(ui): add theme-matching scrollbars across the frontend 2026-08-11 23:25:47 -04:00
7f27b5e823 style(dashboard): polish quick stats and recent events feed
- Emphasize stat values and keep labels on one line
- Rework the recent events feed into a two-line layout with human-readable type labels and narrative highlighting
2026-08-11 23:25:44 -04:00
66816e2182 refactor(event-log): extract shared formatType helper and restyle ledger entries
- Move the event type formatter into its own util for reuse
- Reflow ledger rows into a stacked two-line layout with a type chip
2026-08-11 23:25:41 -04:00
9bf16980cc feat(roster): build org chart from explicit subassignment hierarchy
- Resolve parents via subAssignments instead of inferred member overlap
- Drop cyclic or dangling subassignment edges
- Render members only at their deepest unit; widen unit boxes and pluralize member counts
2026-08-11 23:25:38 -04:00
d4ff6ba1a1 feat(frontend): add account navigation, qualification-gated sidebar sections, and callsign display
- Add Account entry to the sidebar and user menu
- Hide Intelligence and Infrastructure sections unless the user is qualified
- Make the sidebar content area scrollable
- Support showing the callsign in the user menu via preferences
2026-08-11 23:25:33 -04:00
caae76e6b2 feat(intelligence): gate intelligence content behind the intelligence qualification
- Add hasIntelligenceQualification access helper
- Redirect non-qualified users away from /intelligence
- Hide mission and campaign widgets on the dashboard for non-qualified users
- Guard hasLogisticsQualification against a null user
2026-08-11 23:25:27 -04:00
c81036bd82 feat(account): add self-service account page with profile, password, Discord request, and preferences
- Add /account page backed by server actions
- Allow editing display name, changing password, and requesting a Discord username change
- Add notification muting and callsign display preferences UI
- Add shadcn card component and account event types
2026-08-11 23:25:21 -04:00
b8cbb85dc8 feat(notifications): add notification inbox page and preference-aware muting
- Add /notifications inbox with mark-read and mark-all-read actions
- Respect mutedAll/mutedTypes preferences when creating notifications
- Add View all link and Discord request label to the notifications bell
2026-08-11 23:25:16 -04:00
5ee98d61da feat(users): add trusted role, preferences, and profile/account auto-provisioning
- Add trusted role and isTrusted access helper
- Add notification muting and display preferences to the user schema
- Auto-create a profile and personal bank account when a user signs up
- Add idempotent backfillProfiles seed script for existing members
2026-08-11 23:25:09 -04:00
35e1354043 chore(frontend): remove stale dashboard redirect and sample API route 2026-08-11 23:25:03 -04:00
89b8474e23 feat(market): add trading marketplace with listings, haggling, and NPC vendors
Tarkov-style flea market where users list locker items at a fixed price
and buyers pay through the banking system; items transfer directly
into the buyer's locker.

- market-listings + market-negotiations collections and the market page
  with search/rarity filters and a Countdown timer on each card
- service lib (buyListing with partial-quantity + negotiated-price
  support, clean-stock rule, creditLockerQuantity, auto pricing)
- negotiation flow: make/accept/reject/counter/withdraw, strictly-
  increasing buyer offers, NPC vendor auto-resolution
- NPC vendors: game-npcs attribution, patience meter, dialogue, chat
  bubbles, historical threads dialog
- 30d user / 7d auto listing durations, market-tick bin for expiry +
  vendor restock, SSE notify on tick
- market event types + game-npcs/market target collections in the
  event log; sidebar Market entry under Logistics
- partial-quantity purchases (buyListing/buyMarketListing/makeMarketOffer)
  with full int test coverage (25 tests)
2026-08-10 16:05:57 -04:00
3a46d4e5be feat(npcs): add game-npcs collection for vendors
Developer-gated collection for NPC characters, including the vendor
fields (enabled, priceModifier, sells[]) used by the marketplace to
attribute auto-generated listings to background merchants.
2026-08-10 16:03:52 -04:00
9c15117b9b feat(notifications): add in-app player notification center
- user-notifications collection (per-user inbox, owner-scoped read)
- notifyUser() fire-and-forget helper + notification label mapping
- NotificationsBell in the site header with 30s polling, unread badge,
  mark-read on click, and "Mark all read"
- markNotificationsRead / markAllNotificationsRead server actions
2026-08-10 16:02:55 -04:00
4a76b54426 chore(types): regenerate payload types and schema
Regenerate payload-types.ts and payload-generated-schema.ts to cover
the forthcoming user-notifications, game-npcs, and market collections
(including the quantity column on market-negotiations).
2026-08-10 16:02:04 -04:00
6b94686de4 style(dashboard): drop obsolete text-shadow utilities
Remove the text-shadow-orange classes from the WIP alert now that the
dark theme renders the title/description legibly without them.
2026-08-10 16:01:56 -04:00
0b6e00b99c chore(ui): add shadcn badge, checkbox, sonner toaster, and useNow hook
- badge, checkbox, sonner shadcn primitives
- useNow hook for client-side now() with re-render
- mount <Toaster /> in the frontend root layout
2026-08-10 16:01:43 -04:00
fc27f11ab8 fix(locker): revert to onClick and add error feedback to slot picker
- Revert onPointerDown back to onClick for item selection
- Add error state to display server action failures to user
- Add pending state to disable buttons during submission
- Update onPick to return ActionResult for error handling
2026-08-02 19:00:05 -04:00
bf6b29690f fix(locker): use onPointerDown for slot picker item selection
- Change onClick to onPointerDown with preventDefault on item buttons
- Also update Cancel and Clear Slot buttons for consistency
- Fixes item selection not working inside the dialog
2026-08-02 18:58:28 -04:00
11e9bfef24 fix(locker): use onPointerDown for wardrobe slot clicks
- Change onClick to onPointerDown with preventDefault
- Prevents Tooltip from intercepting the click event
- Slot picker dialog now opens reliably when clicking hotspots
2026-08-02 18:56:57 -04:00
58b70fc154 fix(locker): match tooltip arrow color to dark popover background
- Add arrowClassName prop to TooltipContent component
- Pass bg-popover fill-popover to wardrobe tooltip arrow
- Arrow now matches the dark tooltip body instead of being white
2026-08-02 18:54:42 -04:00
775b61e1f4 style(locker): increase wardrobe tooltip text size and use dark theme
- Change tooltip background from bg-foreground to bg-popover (dark)
- Increase text size from text-xs to text-sm
- Add border border-border for subtle definition
- Use font-semibold for slot name label
2026-08-02 18:53:47 -04:00
be8e537385 feat(locker): add hover tooltip to wardrobe slot hotspots
- Wrap each wardrobe slot button with shadcn Tooltip component
- Show slot name and current item name on hover
- Use smooth fade-in/zoom-in animation from shadcn tooltip
- Position tooltip to the right of each hotspot with 8px offset
2026-08-02 18:52:45 -04:00
4ae2b3137c feat(locker): add drag-drop attachment in grid
- Add attachItemFromGrid server action for drag-drop attachment
- Add attach drop detection in LockerGrid handleDragEnd
- Add attach drop styling with amber highlight on weapon footprint
- Add isAttachDrop prop to GridCell for attach-specific feedback
- Add dragError state with 5s auto-clear for attach failures
- Reuse setItemAttachment/removeItemAttachment semantics
- Handle slot replacement with no-room fallback for old attachments
2026-08-02 18:50:19 -04:00
a466ed54ed feat(locker): add command palette search
- Add LockerSearch component with Search button and ⌘K shortcut
- Add search.ts with buildSearchEntries, buildAssetStats, resolveAssetRef
- Add command.tsx shadcn component (cmdk dependency)
- Group search results by asset type with quantities and location chips
- Show stats: slot, capacity, ammo, weight, NVG generation, rarity
- Support navigation: weapon → customize, attachment → parent customize
- Add locker-search-highlight animation for 3s amber pulse feedback
- Add cmdk@^1.1.1 dependency
2026-08-02 18:50:07 -04:00
6e717684fb feat(locker): add equipment editor and wardrobe tab
- Add EquipmentEditorDialog for per-category attachments, skins, and custom names
- Add Wardrobe component with soldier image and clickable equipment slots
- Add WardrobePanel with loadout selector and current equipment display
- Add WardrobeSlotPicker dialog for equipping items from locker
- Add equip/unequip loadout functionality with equipped badge
- Add equipment schema to LockerStorages (attachments, skin, customName)
- Add wardrobe slot layout with hotspot positions for each equipment type
- Add locker:item-attach, locker:item-detach, locker:item-skin event types
- Update LoadoutCard to show equipped status and equipment list
- Update LoadoutsPanel to pass ownedItems for equipment display
2026-08-02 18:49:59 -04:00
6b2778751b refactor(flappy): use obstacle terminology instead of pipes 2026-08-02 14:32:53 -04:00
e5f544f103 feat(flappy): rework obstacles as lit buildings with day-night cycle 2026-08-02 14:32:51 -04:00
126d5b6dae feat(locker): add personal locker page and UI 2026-08-02 14:32:49 -04:00
d32f36a39c feat(locker): add locker and loadout server actions 2026-08-02 14:32:47 -04:00
0fc898d227 feat(locker): add locker grid and loadout helpers 2026-08-02 14:32:45 -04:00
9a565986e9 feat(locker): add event logging for locker and loadout actions 2026-08-02 14:32:42 -04:00
7f4df6597a feat(locker): add locker-storages and loadouts collections 2026-08-02 14:32:40 -04:00
9d990d2965 feat(flappy): rebrand references to "definitely not Flappy Bird" 2026-08-02 12:56:41 -04:00
f81b7ecce6 feat(flappy): add top-10 leaderboard beneath the game 2026-08-02 12:56:26 -04:00
d754b2954a feat(flappy): add flight simulator minigame with per-run XP rewards 2026-08-02 12:55:54 -04:00
898c09e302 feat(banking): add banking overview and account detail UI 2026-08-02 04:10:40 -04:00
ee87bd3023 feat(banking): add banking server actions and event logging 2026-08-02 04:10:37 -04:00
4e0a906697 feat(banking): add banking service library with transaction engine 2026-08-02 04:10:34 -04:00
a440623d93 feat(banking): add bank accounts, transactions, and ledger entries collections 2026-08-02 04:10:28 -04:00
83d5b85247 feat(sidebar): enhance sidebar navigation and improve org chart styling 2026-08-02 03:14:30 -04:00
d583fe6de6 feat(logistics): add shipment action controls to shipment detail page 2026-08-02 02:04:51 -04:00
2e65ab08d8 chore(types): regenerate payload types and database schema 2026-08-02 02:04:48 -04:00
6cce6116b8 refactor(sidebar): use next/link for client-side navigation 2026-08-02 02:04:12 -04:00
01f4820f2e feat(logistics): enforce structure storage rules on deposits, transfers, and shipments 2026-08-02 02:04:07 -04:00
a9af0b5246 feat(auth): add frontend login page and guest landing gate 2026-08-02 02:04:02 -04:00
d3afc6a0c1 feat(realtime): add game-tick SSE notification pipeline 2026-08-02 02:03:56 -04:00
75a1c8ed9a feat(logistics): add shipments collection with dispatch, transit, and arrival processing 2026-08-02 02:03:50 -04:00
d6ba4ccc39 feat(logistics): add game-vehicles collection and deployed vehicle views 2026-08-02 02:03:43 -04:00
9a5952ec99 chore(deps): bump @payloadcms/next and next to 3.79.1/16.2.11 2026-08-02 02:03:38 -04:00
827a36e901 fix: update grid cell and item component styling
- Increase grid cell border opacity from 30% to 60% for better visibility
- Change item alignment from items-center to items-start for better layout
2026-07-31 20:04:44 -04:00
9c89831f20 refactor: update sidebar navigation with new sections
- Add Intelligence section with Campaigns, Missions, and Factions links
- Add Roster link to main navigation
- Update Logistics section with Resources and Vehicles links
- Update XPDisplay prop from xp to xpLevel for level resolution
- Remove commented-out navigation items
2026-07-31 20:04:28 -04:00
35d992e597 fix: update campaign access control to allow authenticated users
- Add read access rule allowing any logged-in user to view campaigns
2026-07-31 20:04:12 -04:00
1882a74066 feat: add qualifications field to profiles
- Add qualifications relationship field to Profiles collection progression
- Update payload-types.ts with new type definitions
2026-07-31 20:03:58 -04:00
a3e88ef9fa feat: add mission access control with assignment-based permissions
- Add commandAssignments and intelAssignments to GameRules global
- Implement role-based read access for missions (developer, admin, command, intel)
- Add visibility levels: unit, leadership, intel, private
- Restrict draft missions to authors, zeus, command, and intel
- Change faction field from text to relationship in missions
- Make missionFile optional in game setup
2026-07-31 20:03:35 -04:00
f9c33c3fb9 feat: add award ribbon and medal designers
- Add RibbonDesigner admin component for visual ribbon design
- Add MedalDesigner admin component for visual medal design
- Add ribbonDesign and medalDesign JSON fields to Awards collection
- Conditionally show design fields based on award type
2026-07-31 20:03:19 -04:00
f16b76a198 feat: add profile page with service record
- Add profile page at /profile/[username] showing user service record
- Update NavUser dropdown to link to Service Record instead of Upgrade to Pro
- Remove unused Billing menu item from user dropdown
2026-07-31 20:03:03 -04:00
f645eb16e5 feat: add roster page with member management
- Add roster page displaying unit members with rank and assignment info
- Add RosterView component with sortable member table
2026-07-31 20:02:43 -04:00
3797cbcc03 feat: add logistics pages for resources and vehicles
- Add resources list page with resource cards and detail pages
- Add vehicles list page with vehicle cards, filters, and detail pages
- Add ResourceCard, VehicleCard, and VehicleFilters components
- Widen structure detail page max-width from 4xl to 7xl
2026-07-31 20:02:25 -04:00
28a148c06f feat: add intelligence section with campaigns, missions, and factions
- Add campaigns list page with campaign cards
- Add missions list page with filtering and mission cards
- Add factions list page with faction cards
- Add mission detail components: briefing, comms, factions, logistics, objectives, roles
- Add MissionFilters for status and type filtering
2026-07-31 20:02:07 -04:00
25c088aebf feat: add operations dashboard with mission briefing and stats
- Redesign homepage as authenticated operations dashboard
- Add ProfileSummary, MissionBriefing, RecentEvents, QuickStats components
- Add UpcomingMissions and ActiveCampaigns sidebar widgets
- Redirect /dashboard to / (homepage is now the dashboard)
- Show welcome screen with login link for unauthenticated users
2026-07-31 20:01:50 -04:00
98e171d088 feat: add XP level system with resolveLevel utility
- Add resolveLevel utility to compute level name, progress, and XP thresholds
- Add seedExperience script for populating experience levels
- Update XPDisplay to show level name, progress bar, and percentage to next level
- Update layout to fetch experience levels and pass resolved XP data to sidebar
2026-07-31 20:01:23 -04:00
2ffd5e2a84 refactor: LiteGraph-style node layout with NodeShell wrapper
- NodeShell component wraps all nodes with handle rendering + px-8 content padding
- Handles positioned at node edges with labels outside (no overlap with content)
- Labels: 9px mono font, full opacity, color-matched to socket type
- Removed old TypedHandle + NodeHandles (replaced by NodeShell internals)
- All 18 node components updated to use NodeShell
- Format node dynamically generates handles from template {0}, {1}, etc.
2026-07-28 18:26:13 -04:00
707562faaa fix: restore small handle labels and make Format node dynamic
- TypedHandle now shows tiny 8px labels next to handles (color-matched)
- Labels positioned outside the handle, no overlap with node content
- Format node dynamically generates input handles from template {0}, {1}, etc.
- NodeHandles accepts dynamicInputs/dynamicOutputs overrides
- isValidConnection treats dynamic handles (arg-*, option-*) as any-type
2026-07-28 18:22:25 -04:00
8ec0c194ff fix: reduce handle size and remove overlapping labels
- Flow handles: 12px → 8px (rounded square)
- Data handles: 10px → 6px (circle)
- Border: 2px → 1.5px with softer opacity
- Removed label text from handles (color indicates type)
- Removed wrapper div — handles render directly via React Flow
2026-07-28 18:19:06 -04:00
06fb1ede75 feat: new blueprint node types for data flow and logic
New node types:
- GameData: reads runtime state (structure health, deliveries, resources, etc.)
- Flag: read/write persistent flags by name
- Compare: A [op] B → boolean (>, <, ==, !=, >=, <=)
- Math: A [op] B → number (+, -, *, /)
- Format: template string with {0}, {1} placeholders → string
- Logic: A [op] B → boolean (AND, OR, XOR)
- NOT: boolean → inverted boolean
- Branch: flow in + boolean condition → true/false flow out
- Sequence: flow in → 3 flow outs (executes in order)

Toolbar updated with categorized buttons (Story, Data, Logic).
MiniMap color-coded for all 18 node types.
NodeEditDialog handles all new types with operator/field selectors.
2026-07-28 18:16:20 -04:00
9a7462e5f7 feat: typed socket foundation for LiteGraph-style blueprint editor
Phase 1 — Typed Socket Foundation:
- SocketType enum: flow, number, string, boolean, any
- Socket definitions for all 9 existing node types (inputs + outputs)
- TypedHandle component: color-coded circles (flow=white square, number=purple, string=teal, boolean=green, any=indigo)
- NodeHandles helper: auto-renders handles from socket config with proportional spacing
- isValidConnection: rejects type mismatches, any-type sockets accept all connections
- All existing nodes refactored to use NodeHandles instead of manual Handle components
2026-07-28 18:11:52 -04:00
cfba38ca24 refactor: switch all node types to left/right handles for L-to-R layout
- Updated handle positions:
  - Target: Position.Left (incoming edges from left)
  - Source: Position.Right (outgoing edges to right)
- Updated MiniMap nodeColor to color-code all 9 node types
- Maintains consistency across narrative, primitive, and control nodes
2026-07-28 17:49:48 -04:00
4a573f7cfc feat: add Wait and primitive node types to NarrativeFlowEditor
- New node types:
  - Wait: delays execution for N ticks, supports optional input
  - Number: stores a numeric value
  - String: stores a string value
  - Random: generates random numbers in range [min, max]
  - Boolean: stores true/false flag
  - Date: stores a date value
- Color-coded nodes matching React Flow palette:
  - Wait: yellow
  - Number: purple
  - String: teal
  - Random: pink
  - Boolean: emerald
  - Date: cyan
- NodeEditDialog now handles all new types with appropriate fields
- Toolbar updated with color-matched buttons
2026-07-28 17:44:46 -04:00
9651ad83ae fix: use span for close button to ensure true transparency
- Browser button elements have default background/border
- Span with onClick provides the same functionality with no defaults
- Maintains keyboard focus states and accessibility
2026-07-28 17:33:20 -04:00
fbaad2e4bb fix: close button is now transparent with solid X icon
- No padding, no border, no background on button
- X icon itself has text-zinc-500 color
- Only hover background tint on the button
2026-07-28 17:30:40 -04:00
8ddca4d647 refactor: simplify close button to transparent X icon only 2026-07-28 17:29:38 -04:00
56980eebd3 fix: add dark mode utility classes to NodeEditDialog inputs and buttons
- Add dark:bg-zinc-800 dark:border-zinc-700 dark:text-zinc-100 to all Inputs/Textareas
- Add dark:bg-blue-600 dark:hover:bg-blue-700 dark:text-white to Save button
- Add dark:border-zinc-700 dark:text-zinc-300 to Cancel, Add buttons
- Add dark:bg-red-900/60 dark:hover:bg-red-800/80 to destructive icon buttons
- Ensures dialog renders correctly inside Payload admin portal context
2026-07-28 17:23:10 -04:00
fe863845bb refactor: use shadcn components in NodeEditDialog, add Textarea component
- Replace raw <textarea> with shadcn Textarea component
- Replace raw <button> with shadcn Button (variant='destructive' + icon)
- Remove custom className overrides fighting admin dark theme
- Add shadcn preference rule to AGENTS.md
2026-07-28 16:28:14 -04:00
103340271b feat: narrative events flowchart editor with React Flow
- NarrativeEvents collection redesigned with flowData JSON (React Flow format)
- Custom admin field component: NarrativeFlowEditor with @xyflow/react
- Three node types: NarrativeBeat (blue), Choice (amber), Outcome (emerald)
- NodeEditDialog with type-specific forms replacing prompt() editing
- Right-click context menu (Delete node/edge with Radix primitives)
- Dynamic handles on Choice nodes (one per option)
- Dark-themed canvas with MiniMap, Controls, and animated edges
- All changes sync bidirectionally with Payload form state
- AGENTS.md updated with architecture docs
2026-07-28 16:26:57 -04:00
6efb1e1d65 chore: remove unused LogisticsEvents collection
- Dead collection — never registered in payload.config.ts
- Superseded by the new GameEventLogs event log system
2026-07-28 16:11:48 -04:00
dfbe0cb6c5 feat: add EventLedger UI component with live updates and filtering
- Client-side EventLedger component that queries game-event-logs REST API
  for a given structureId and renders a scrollable feed
- Actor name prefix with 'You' substitution for the current user, messages
  lowercased to fit sentence syntax
- Multi-select dropdown filter (shadcn DropdownMenuCheckboxItem) for event
  types with PascalCase formatting
- Narrative/GM events (system: false) styled with amber accent + book icon
- Smart refresh: smooth re-fetch without clearing existing entries, 30s
  polling interval, and instant refreshKey trigger from parent actions
2026-07-28 16:08:13 -04:00
5679020b42 feat: wire storage actions and collection hooks to emit game events
- Emit events from all storage/grid server actions: addResource,
  removeResource, transferResource, placeResourceOnGrid, moveGridItem,
  mergeGridStacks, rotateGridItem, removeGridItem, splitGridStack,
  retrieveFromVoid, and autoArrangeGrid
- Add afterChange hook on GameStructures to capture admin-panel edits
- Emit structure:resize event from Structures beforeChange hook on grid
  dimension changes
2026-07-28 16:08:08 -04:00
59769076ff feat: add GameEventLogs collection and event emission infrastructure
- New game-event-logs collection with timestamp, type, message, actor,
  structure, targetCollection/targetId, and data (JSON) fields
- EventTypes constants registry for modular event category management
- emitGameEvent() utility for emitting events from server actions and hooks
- Register collection in Payload config
- Document event log system architecture in AGENTS.md
2026-07-28 16:08:04 -04:00
d88fe04b56 fix(grid): prevent split collision by including source in overlap check
Server action: remove 'other.id === entryId' exclusion from the
split overlap scan so the source item's own footprint is treated
as occupied, forcing the split to find a different position.

UI: disable the split button via findEmptySpot check when no room
exists for the split stack, preventing a failed action.
2026-07-28 14:51:56 -04:00
256e5bd68a fix: use arbitrary box-shadow for hover inset effect 2026-07-28 14:47:47 -04:00
f1871ec889 feat(ui): add hover scale and shadow to structure cards 2026-07-28 14:37:24 -04:00
a456c8a246 refactor(nav): replace Storage page with Structures list at /logistics
- Move storage overview from /logistics/storage to /logistics root
- Rename page heading and sidebar label from Storage to Structures
- Update back link on structure detail page
- Remove old /logistics/storage route
2026-07-28 14:23:04 -04:00
5d146f22bf fix(security): restrict deposit/withdraw to admin/dev, allow transfer/reorganize for users
- addResource, removeResource, placeResourceOnGrid, removeGridItem
  now require admin or developer role (game master operations)
- transferResource, moveGridItem, mergeGridStacks, rotateGridItem,
  splitGridStack, autoArrangeGrid require user, admin, or developer
  (logistics operations that don't change total inventory)
- Guests are excluded from all mutating operations
2026-07-28 14:17:52 -04:00
01ac20f44f fix(ui): add router.refresh after storage mutations, pluralize labels
ManageStorageDialog now calls router.refresh() after deposit,
withdraw, and transfer so the grid view reflects changes.
Await fetchData() before refreshing.

Resource labels now use pluralize() for correct unit display
(e.g. "1 liter" vs "3 liters").
2026-07-28 14:03:43 -04:00
a4844efe22 feat(grid): integrate grid view into structure detail page
Replace flat ResourceList with StructureStorageView (grid/list
toggle for structures with dimensions, flat list fallback for
non-grid structures). Apply pluralize to upkeep labels.
2026-07-28 14:03:39 -04:00
9175b103c2 feat(grid): add drag-and-drop grid UI components
GridCell — droppable cell with hover/valid/invalid state
GridItem — draggable item with grip icon, visual feedback
GridToolbar — view toggle, auto-arrange, selected-item actions
InventoryGrid — DndContext wiring, R-key rotation, ResizeObserver
  cell sizing, drag overlay
StructureStorageView — client wrapper with grid/list mode toggle,
  action handlers, resource-to-GridItem mapping
2026-07-28 14:03:34 -04:00
d2222e8701 feat(grid): add grid-aware server actions
addResource now auto-places deposited resources onto the structure
grid (first-fit scan, fills existing stacks first, falls back to
flat-list behavior for non-grid structures).

New server actions:
- placeResourceOnGrid — explicit placement at x,y,rotated
- moveGridItem — move item to new position with optional rotation
- mergeGridStacks — merge two stacks of the same resource
- rotateGridItem — toggle rotation in-place
- removeGridItem — delete a grid entry
- splitGridStack — split a stack into two at an empty spot
- autoArrangeGrid — re-pack all items into grid
2026-07-28 14:03:00 -04:00
7bcbd534e4 feat(grid): add grid utility functions
- GridItem type and GridDimensions helper type
- getItemFootprint: effective size accounting for rotation
- getOccupiedCells: list of "x,y" cell keys
- isValidPlacement: overlap and bounds checking
- findEmptySpot: first-fit scan for available placement
- autoArrangeItems: pack items into grid
- getGridOccupancy: used/total cell counts
2026-07-28 14:02:52 -04:00
5982abfb05 feat(ui): add pluralize utility function
Handles irregular plurals, measurement units that stay singular,
and standard English pluralization rules.
2026-07-28 14:02:41 -04:00
159755af8d feat(collections): add grid fields to game-structures and resources schemas
GameStructures:
- Add gridX, gridY, rotated fields to storedResources rows
- Remove beforeValidate hook that merged duplicate resources
- Add read access (was missing)
- Add min: 1 constraint on amount

Resources:
- Add gridWidth, gridHeight, stackable, maxStackSize, rotatable fields
- Add read access (was missing)
- Wrap game-rules afterRead hook in try/catch to handle missing global
2026-07-28 14:02:35 -04:00
275cb49a92 fix: remove console.log from layout causing repeated page requests 2026-07-27 19:42:59 -04:00
866a470750 feat: cap Amount input max to stored amount and remaining capacity
- Withdraw/Transfer tabs: max = currently stored amount of selected resource
- Deposit tab: max = remaining capacity divided by resource massPerUnit
- Amount auto-clamps when resource selection changes
- Show 'Max: X' hint below each amount input
2026-07-27 19:34:47 -04:00
b719f25ff2 feat: use resource unitOfMeasure instead of hardcoded kg, add capacity preview to manage dialog
- Replace hardcoded 'kg' labels with resource.unitOfMeasure in ResourceList
- Rename 'Max Mass' to 'Max Capacity' on structure detail page
- Add dynamic capacity preview bar to ManageStorageDialog deposit/withdraw/transfer tabs
- Add baseline capacity display above tabs in manage dialog
- Clean up unused imports across storage components
2026-07-27 19:27:53 -04:00
12d276d44d feat: implement storage system with capacity tracking and resource management
- Rebuild /logistics/storage overview with capacity bars, filters, and structure cards
- Add /logistics/structures/[id] detail page with resource list, storage rules, upkeep
- Add server actions for deposit, withdraw, and transfer of resources
- Add ManageStorageDialog with deposit/withdraw/transfer tabs
- Add capacity bar component with color-coded utilization
- Add StorageGrid, StructureCard, StorageFilters, ResourceList, StorageRules components
- Add logistics utility functions for mass calculations
- Install shadcn dialog, select, tabs, label components
2026-07-27 19:19:48 -04:00
0280d564f9 feat: add faction ownership to game-structures and relax factions read access
- Allow authenticated users to read factions (was developer-only)
- Add optional faction relationship field to game-structures
- Regenerate payload-types.ts
2026-07-27 19:19:41 -04:00
1eddf741ff feat: add AGENTS.md with technical documentation and configure email sending via Nodemailer 2026-07-27 17:48:43 -04:00
ff1f44832e feat: add approval status field to multiple collections with filtering for developer roles 2026-01-09 02:23:04 -05:00
ade5616c68 feat: add migration for experience table and update payload_locked_documents_rels 2026-01-09 01:55:56 -05:00
2eb38c7a82 feat: enhance form descriptions with dynamic tick calculations and validations
- Replace static descriptions in admin fields with dynamic `TickDurationDescription` components.
- Add minimum and maximum constraints to duration fields in various schemas.
- Update `TickDurationDescription` to use `useField` hook for better form integration.
2026-01-09 01:50:55 -05:00
2f00722f30 chore: clean up unused imports in AppSidebar 2026-01-09 01:26:58 -05:00
d04630ca65 feat: add XP display component and experience collection, integrate user XP in layout 2026-01-09 01:26:40 -05:00
9426f12574 feat: add resources to technology schema, improve version display, and introduce migration for resource costs on technologies 2025-12-23 01:01:30 -05:00
c6fecb54f2 feat: add LAST_UPDATED environment variable, update VersionOverlay to display last updated timestamp, and introduce patch script 2025-12-22 16:41:29 -05:00
2727580c24 feat: display app version using environment variable and add VersionOverlay component, add migration for new database tables 2025-12-22 16:07:48 -05:00
877f8531aa feat: add Hard Resources for system-managed game resources 2025-12-22 12:00:34 -05:00
c1360da9c2 chore: add migration for GameStructures and altered Structure fields 2025-12-19 01:33:49 -05:00
2e00220808 chore: remove redundant access control property 2025-12-19 01:31:00 -05:00
adea2dc996 feat: add ranges to production amounts and frequencies, add dynamic value description to build time 2025-12-19 01:28:40 -05:00
9e4215a84d refactor: rename Page component to DashboardPage, update metadata type, and fix optional chaining in resource mapping 2025-12-17 15:28:43 -05:00
def59ee1fb fix: move Dashboard to frontend, pin dependencies in bun.lock to specific versions for stability 2025-12-17 15:15:07 -05:00
dd6bcd30dc feat: switch to Bun, add fonts and styling, update components and UI, add basic front-end
- Added Google Fonts import for `Geist` and `Geist Mono` to `styles.css`.
- Aligned, cleaned styling variables and properties consistently.
- Updated `seedUsers.ts` to include a developer role.
- Introduced `bun.lock` file for dependency management.
2025-12-16 23:26:52 -05:00
Z8MB1E
2e695bd43f feat: application staging deployment (ensure better commits after this) 2025-12-15 01:14:30 -05:00
Z8MB1E
4d639387f4 feat: initial payload scaffolding 2025-10-24 02:07:13 -04:00
Z8MB1E
e4a367489f feat: initial commit 2025-10-15 14:03:31 -04:00