1
0
Fork 0
Commit graph

59 commits

Author SHA1 Message Date
86464b528a refactor(market): reuse banking treasury account helper
Drops market's local treasury account lookup in favor of getTreasuryAccountId from the banking lib, re-exported for compatibility.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-09-06 01:23:57 -04:00
80ec3a0386 refactor(market): pass currency config through market UI
Market listings, offer dialogs, negotiation panels, and history now render prices from the full CurrencyConfig (symbol + singular/plural) instead of a nullable currency label string.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-09-06 01:23:57 -04:00
8205c33768 feat(banking): add configurable currency display names
Adds a Universal Currency group to Game Rules (name, symbol, singular, plural, denomination) with a CurrencyConfig reader in the banking lib that pluralizes labels and prefixes symbols; registers the game_rules migration.

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

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-09-06 01:23:53 -04:00
3ec364a8b9 feat(wiki): add wiki service library and markdown pipeline
Service layer (createPage/updatePage/restoreRevision/setPageLockdown/
deletePage, slugification, template expansion, wikilink preprocessing,
category constants) plus the client-safe markdown rendering pipeline
(react-markdown + remark-gfm + remark-directive) shared by the server
component and the editor's live preview. Adds the three markdown
dependencies to package.json and bun.lock.
2026-09-05 00:02:01 -04:00
7d6a4bd671 feat(qualification): add civilian target scoring rules
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-09-04 12:04:44 -04:00
73d689a680 feat(qualification): add aim trainer rules
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-09-03 23:36:22 -04:00
a1bdf4ffb1 feat(awards): add cleanupDuplicateAwards utility and CLI tool skeleton 2026-09-02 16:14:12 -04:00
4594ff3d7c feat(tickets): add ticket mutation services
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-09-01 17:48:37 -04:00
76e948fd59 feat: Add remaining transfer components and utilities
Add transfer workflow components and utilities:

1. Transfer types and core functions (src/lib/transfers/index.ts):
   - Type-safe transfer request and decision creation
   - Appeal, cancel, and resolve core functions
   - Server action conventions with error handling

2. Transfer UI components (src/components/frontend/transfers/):
   - TransferActionDialog.tsx: Handle approval/rejection appeals
   - TransferApprovalCard.tsx: Display approval decisions
   - TransferNoteDialog.tsx: Add notes for transfers/appeals
   - TransferRequestCard.tsx: Show transfer request details
   - TransferResolutionCard.tsx: Display superuser resolutions
   - TransfersView.tsx: Main transfers list page
   - transferTypes.ts: Shared TypeScript types

3. Notification types (src/lib/transfers/notificationTypes.ts):
   - Define notification type constants for transfer events
   - Include TRANSFER_NOTIFICATION_TYPES for bridge filtering

4. Integration tests (tests/int/):
   - transfer-requests.int.spec.ts: Test bot request polling
   - transfer-bot-delivery.int.spec.ts: Test Discord notification delivery

These components and utilities complete the transfer workflow
implementation including approvals, appeals, and delivery.
2026-08-31 23:41:29 -04:00
6c71e003c9 feat(config): Update payload config, notifications, and migrations
Update Payload configuration:
- Import AssignmentTransfers collection in src/payload.config.ts

Update notification system:
- src/lib/notifications/index.ts: Add transfer notification types
- Update notification helper to support new notification types

Update migrations index:
- src/migrations/index.ts: Register new assignment transfer migrations

These changes integrate the AssignmentTransfers collection into the
existing Payload configuration and notification infrastructure.
2026-08-31 23:40:41 -04:00
24c5259056 feat(awards): add awards listing page, grant permissions, and profile ribbon rack integration 2026-08-31 12:27:20 -04:00
0eba54b8b8 feat(presence): add presence channel handling in real-time updates 2026-08-28 22:08:37 -04:00
64babe2608 feat(intelligence): track mission completion and campaign modes 2026-08-28 00:20:47 -04:00
d94da34af2 feat(intelligence): add mission feedback reminders 2026-08-28 00:20:41 -04:00
c2a16120cc feat(auth): handle expiring sessions in frontend 2026-08-28 00:20:35 -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
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
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
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
83f203d736 feat(shims): add targeted client-side injections 2026-08-26 00:53:31 -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
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
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
40b130c8d3 feat(attendance): implement real-time attendance change notifications for Discord 2026-08-21 02:12:01 -04:00
dcc58327e3 feat(impersonation): implement user impersonation functionality and UI 2026-08-21 01:41:14 -04:00
6d58451978 feat(projects): enforce permissions and improve search 2026-08-21 00:26:33 -04:00
485e26bbda feat(realtime): publish user-scoped update events 2026-08-21 00:25:20 -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
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
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
6685fe68cd style(lib): format shared libraries and remove unused imports 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
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
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
034f0af5f3 refactor(banking): extract shared UI constants for status styling and transaction colors 2026-08-12 23:12:57 -04:00
f065aa6796 feat(missions): add RSVP attendance collection and detail UI 2026-08-12 12:38:53 -04:00
2a457a5dd9 feat(notify): add finance and shipment-completed notification types 2026-08-12 12:38:45 -04:00
bbfbd5966c feat(version): expose build/commit metadata via /api/version and overlay 2026-08-12 12:38:33 -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
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
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
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