1
0
Fork 0
Commit graph

1263 commits

Author SHA1 Message Date
1d45c3fee1 feat(intelligence): add undiscovered faction state with read masking
Factions gain a discovered checkbox plus a read-time mask so players see
the entry (UNDISCOVERED card, classified detail stub) without its name,
description, standing, relationships, campaigns or cover image.

The mask runs in the Factions afterRead hook, so every reader path is
covered: pages, REST, and populated relationships. Readers holding the new
factions:view-undiscovered permission or system:admin-access see the real
record; admin panel reads are exempt so a masked edit form can never write
the placeholder name back over a record.
2026-11-18 09:19:57 -05:00
4264431e4d feat(npc-dialogue): AI-assisted conversation drafting behind the review gate
Add a Generate button to the flow editor that drafts a whole conversation
from a form brief, and per-line Rewrite/Shorten/Sharpen controls in the node
dialog. Both land in unsaved field state, so a draft only reaches players when
an author saves the document: neither server action writes to npc-dialogues.

- src/lib/ai/generate.ts: extract the Unsloth client out of payload.config so
  Compose and dialogue drafting share one path; add generateStructured and
  resolveModel, with an optional UNSLOTH_MODEL_STRUCTURED override
- generationSchema.ts (pure): strict-safe JSON schema, normalizer with
  breadth layout, validator that rejects unknown flag keys, unauthorised
  effects, dangling hops and missing keys
- generation.ts: context loading, one validate-and-retry, then give up rather
  than hand back a broken graph; dash normalization keeps shipped copy clean
- effect vocabulary limited to notify and flag; emit, reward and discord stay
  author-only
- provenance group on npc-dialogues (migration 20261112_171955) records model,
  prompt version, attempts and the brief the draft was accepted from
- tests: 21 cases covering the normalizer, validator, retry paths and the
  rewrite parser, with the model call injected
- docs/npc-dialogue-ai.md and src/lib/npc-dialogue/AGENTS.md
2026-11-12 12:26:35 -05:00
9f192a8159 v0.15.1 - fix Discord bot crash on stale interactions 2026-11-03 12:51:35 -05:00
8108465354 docs: add v0.15.1 changelog entry 2026-11-03 12:50:36 -05:00
6ee32f5085 docs(bot): record the interaction ack and error-path rules 2026-11-03 12:50:29 -05:00
c4cbe43c4f fix(bot): survive a stale Discord interaction instead of crashing
A manual /rollcall took the bot down: the command fetched the guild member
and ran the staff check before acknowledging, missed Discord's 3 second ack
window, then died on "Unknown interaction" when it tried to defer (and again
when the error path tried to reply). discord.js re-emits a rejected event
listener on the client as an 'error' event, and with no handler attached Node
threw and exited the process.

Ack first, protect the error paths:
- /rollcall, /remind-evaluations and /debug defer immediately and report
  permission denials through editReply.
- safeEphemeralReply (bot/lib/interactions.ts) never rethrows, and the RSVP
  and transfer handlers use the same guarded behaviour.
- client.on(Events.Error) logs instead of exiting. The entrypoint restarts a
  dead bot after 5 seconds, so the previous symptom was a silent gap.
2026-11-03 12:50:29 -05:00
8fff9c3f92 v0.15.0 - style mission detail as dossier cards, add command chain editor, faction links 2026-11-02 16:13:47 -05:00
da601dcc8a docs: add v0.15.0 changelog entry 2026-11-02 16:13:47 -05:00
9aa6a5c0ef chore(frontend): move command-chain chevron into a full-width centered rule
Replace the header chevron button with a full-width rule and a
centered toggle between the description and the player list.
2026-11-02 15:42:09 -05:00
c0538f902c feat(frontend): style mission-detail sidebar cards as dossier frames
Convert the Campaign, Roster, and Server sidebar cards from Item
variant=outline to the TacticalFrame primitive (squared corners, grid
texture, corner brackets, classification strip with REF code). The
campaign body content is the link; the status badge moves onto the
title row with a hover-reveal chevron, matching the Roster rows.
2026-11-02 15:42:09 -05:00
3ac6ebd87d feat(frontend): make the command-chain editor a collapsible panel
Wrap the mission command-chain editor content in a Collapsible with an
expand/collapse trigger in the header row, next to the Override/Legacy/
Defaults badge. The 'Command chain' title folds into the trigger so the
card header holds only the toggle and the status badge.
2026-11-02 14:28:55 -05:00
b6e8fa6f90 feat(frontend): make faction cards links with type-tag width and cover-image backgrounds
Each faction card in the Mission Details FACTIONS section is now an anchor
to /intelligence/factions/<id>. The type badge (Player/Major/Minor/
Corporation/Special) uses width:fit-content so its colored background only
spans the text instead of the full card, and a faction's coverImage (when
present) renders as a centered object-cover background at low opacity that
brightens on hover.
2026-11-02 14:28:53 -05:00
e5f6d107b9 feat(frontend): drop redundant internal section titles from mission detail cards
The TacticalFrame header (icon + 'OPERATION // Topic') now owns each
card's heading; the duplicate per-component content titles are removed
across Rating, Mission Details, Briefing (SQF export retained),
Objectives, Factions, Roles (Max Players stat retained), Comms,
Logistics, and Role Sign-Ups (queue note retained). The Command Chain
title removal is left in the working tree, on top of the separate
collapsible-panel work-in-progress in MissionCommandChainEditor.tsx.

Cleans up the now-unused ClipboardListIcon import and a dangling
aria-labelledby reference left by the removed Rating heading.
2026-11-02 13:35:40 -05:00
e070d2b586 feat(frontend): restore frame section titles and color-code faction types
TacticalFrame classification labels are back on all 11 mission-detail
frames (the earlier label-less pass is reverted). Faction type is now
rendered as a friendly, type-colored tag (Player/Major/Minor/Corporation/
Special) instead of the raw database value.
2026-11-02 13:23:53 -05:00
9db57a465c fix(frontend): remove doubled corner chrome from threat assessment card
The card rendered its own border, grid texture and corner brackets on top
of the TacticalFrame's, so its bottom brackets coincided with the frame's
and read as a heavier, doubled corner. Both the empty-state and populated
branches now drop that redundant chrome and let the frame own the border,
brackets and texture.
2026-11-02 13:06:30 -05:00
d279720376 feat(frontend): drop duplicate frame labels from mission detail cards
TacticalFrame takes an optional 'classification' prop, rendered in the
strip only when provided. All 11 mission-detail frames now omit it, so
the uniform 'OPERATION // <Topic>' label is gone and each card's own
content title owns the heading (Mission Rating, Mission Details,
Briefing, Communications, and so on). The lead icon and REF code stay.
2026-11-02 13:06:27 -05:00
f2f637e289 feat(frontend): render threat assessment empty state and drop redundant internal header
When no analyst estimate exists, the card now shows an inline
'Threat assessment unavailable / insufficient intel' placeholder that
matches the card chrome instead of collapsing to nothing. The duplicate
internal 'Threat Assessment // Intel' strip is removed now that the
section header carries the icon and label; the unused refCode is dropped
with it.
2026-11-02 12:20:11 -05:00
0a8246ebcc feat(frontend): add lead icons to mission detail section headers
TacticalFrame takes an optional 'icon' prop rendered before the
classification label in the strip. Each of the 11 headers now passes an
icon, reused from its section's existing component icon for coherence:
RATING star, DETAILS clipboard, THREAT radar, BRIEFING doc,
OBJECTIVES crosshair, FACTIONS shield, ROLES users, COMMAND branch,
SIGN-UPS user-plus, LOGISTICS truck, COMMS radio.
2026-11-02 12:20:04 -05:00
bb7d7337ed chore(intelligence): standardize mission detail section labels and gutters
Standardize every TacticalFrame section header on the mission detail page to
"OPERATION // <Topic>" (was RATING // THREAT, OBJECTIVES, FACTIONS // INVOLVED,
ROLES // MANNING, etc.) so each card shares a uniform dossier label.

Add a consistent px-4 py-4 min-w-0 gutter to the six content-block sections
(briefing, objectives, factions, roles, comms, logistics) plus Mission Rating,
so their content no longer sits flush against the card borders. The already
bordered cards (Mission Details, Threat Assessment, Command Chain, Sign-Ups)
are left untouched.
2026-11-02 12:03:45 -05:00
7380131510 feat(frontend): style mission details sections as dossier cards
Wrap each main-content section of the mission details page in a
TacticalFrame card (classification strip, corner brackets, grid
texture, readout footer) following the tactical dossier recipe.
Add a `grow` prop to TacticalFrame for content-height frames.
The hero header is left untouched.
2026-11-02 11:14:43 -05:00
5d4dbab36b feat(dev): add seed-attendance bin for random mission attendance
New Payload bin seeds a random subset of users with weighted attendance
(75% yes / 15% no / 10% tentative) for a given mission, clearing prior records
first so each run produces a fresh sample. Written through the single attendance
write path so events and slot-holder notifications fire normally.
2026-11-02 10:01:32 -05:00
fa3e9ec865 chore(sidebar): add intro text to the Contribute dropdown 2026-11-02 10:00:16 -05:00
29bc2d40d7 fix(dashboard): center empty mission text and neutralize heading when none exist
The mission briefing widget now centers its 'No missions currently scheduled.'
empty state, and its heading falls back to a neutral 'Missions' label when there
is neither an upcoming nor a completed mission (previously it still said
'Last Mission').
2026-11-02 10:00:12 -05:00
51a6deb2b5 feat(mission-reminder): count chain supervisors as rateable leaders
The reminder endpoint/lib now treats a supervisor->subordinate command link as a
rateable relationship, so a completed mission prompts feedback even when the
co-attendees are at equal rank but linked by the mission chain.
2026-11-02 10:00:07 -05:00
79f790e02b feat(evaluations): allow equal-rank command-link reviews via mission chain
Resolve each evaluation mission against the command chain so a rater can rate a
ratee at equal rank when a supervisor->subordinate command link exists. Partition
graded docs into command vs spectrum buckets and surface command-link missions on
profiles that lack a strict rank gap.
2026-11-02 10:00:02 -05:00
ef3f26d4f9 feat(missions): add command chain editor and MissionCommandLinks collection
Introduce a per-mission command chain: a new MissionCommandLinks collection, a
lib/command-chain resolver, and an admin/mission-page editor for supervisor ->
subordinate links. Evaluations and mission reminders later consume this chain to
resolve equal-rank command relationships.
2026-11-02 09:59:55 -05:00
8951b32157 feat(sidebar): move Contributions link into Contribute sub-navlist above Minigames 2026-11-02 02:04:00 -05:00
70b773ee5b v0.14.2 - require attendance from both players, route direct-supervisor reviews 2026-11-01 15:51:59 -05:00
09116fc76b docs: add v0.14.2 changelog entry (evaluation attendance and command reviews) 2026-11-01 15:51:53 -05:00
e64c477250 fix(evaluations): require attendance from both players and route direct-supervisor reviews
- peer eligibility now requires a yes-RSVP from both rater and ratee, so
  absent players can neither rate nor be rated for that op
- a rating from the ratee's direct supervisor (rater leads an assignment the
  ratee is a member of and ranks above them) is the command review; every
  other rating feeds the anonymous leadership spectrum
- dialog copy and collection docs updated to match; tests cover both rules
2026-11-01 15:51:45 -05:00
21cced3ad9 v0.14.1 - add modlist 8h reminder, allow anonymous modlist downloads, block author self-ratings 2026-11-01 15:22:53 -05:00
3b89170293 docs: add v0.14.1 changelog entry 2026-11-01 15:22:26 -05:00
99ef9ec73c fix(mission-ratings): block mission authors from rating their own mission
Authors can no longer rate a mission they ran or planned. The rating action, the availability check and the server submit all enforce it, and the UI explains why. The mission-ratings fixtures now use a dedicated author so the rater accounts stay non-authors.
2026-11-01 15:21:53 -05:00
e9bc929213 feat(bot): post modlist reminder 8 hours before scheduled operations
Adds reconcileModlistBuffer, which resends the modlist-updated message once per Scheduled mission with a modlist attached, when its start is within DISCORD_MODLIST_BUFFER_HOURS (default 8). Tracked by the new discordModlistBufferSentAt marker, so it is independent of the roll-call modlist sync. Also fixes type errors in modlist-file-access.int.spec.ts.
2026-11-01 15:20:02 -05:00
a6709e4cf3 fix(modlists): allow anonymous link download of preset files
The file-serving route (/api/mod-lists/file/<name>) runs the collection
read access with isReadingStaticFile: true, but mod-lists required the
mod-lists:read permission, so anyone clicking a shared download link got
403 until they signed in. Gate the read access on isReadingStaticFile: the
file-serving path serves the preset to anyone with the link, while REST and
admin-panel reads keep the mod-lists:read gate. Documented in
src/collections/AGENTS.md and covered by an integration test.
2026-10-31 15:01:29 -04:00
948109e362 v0.14.0 - add mission ratings system, post-op survey, Discord prompt, rating XP 2026-10-31 10:28:31 -04:00
1f46275926 chore(mission-ratings): sanitize em-dash placeholders in overview + discord embed 2026-10-31 10:28:28 -04:00
b207adc4dc docs: add v0.14.0 changelog entry (mission ratings) 2026-10-31 10:28:11 -04:00
8faa45a954 test(mission-ratings): eligibility, aggregate math, threshold, XP
Covers window classification, yes-RSVP/prior-rating gating, idempotent write,
factor validation, per-factor/distribution/overall-average aggregation,
anonymity threshold, custom-factor aggregation, numeric myValues, XP grant +
per-user idempotency, and permission gating (deny without / allow with read).
2026-10-31 10:25:37 -04:00
afe47ccd87 feat(mission-ratings): add collection, mission field, and discord rating marker
- add_mission_ratings: mission-ratings collection + enum values + missions
  missionRating.customFactors field
- add_mission_rating_sent_at_marker: Missions.discordRatingSentAt one-shot flag
- register both in migrations/index.ts
2026-10-31 10:25:33 -04:00
ee622ff6dd feat(mission-ratings): UI, page wiring, discord embed + button handler
- MissionRating.tsx star form + overview renderer, wired into missions/[id]
- Discord rating embed + ptf-rate action row, posted on mission Completed
- interactionCreate ptf-rate handler replies ephemeral with mission URL
2026-10-31 10:25:28 -04:00
f41a5bd5e4 feat(mission-ratings): service, contribution rule, server action
- service: isRatingAvailable, submitMissionRating, getMissionRatingState,
  getMissionRatingAggregate (per-factor/distribution/overall-average math,
  anonymity threshold, custom-factor support)
- contributions: mission-rating-completion rule (50 instant XP)
- server action submitMissionRating with permission + contribution XP award
2026-10-31 10:25:24 -04:00
1db0aabb7c feat(mission-ratings): add permissions, collection, mission field, config, generated types
- permissions: mission-ratings group + ALL_PERMISSION_VALUES, granted in seedRoles
- collection: src/collections/intelligence/MissionRatings.ts (field-gated, Intelligence group)
- Missions: missionRating.customFactors group (array of {label})
- payload.config: register MissionRatings + requireAdminPageAccess
- regenerate payload-types
2026-10-31 10:24:04 -04:00
35185600b4 v0.13.3 - drop stored evaluation kind, derive rating direction from ranks 2026-10-31 03:34:13 -04:00
43446d2a40 docs: add v0.13.3 changelog entry 2026-10-31 03:32:44 -04:00
66666547ad refactor(evaluations): drop stored kind, derive rating direction from ranks 2026-10-31 03:26:51 -04:00
fee3377474 v0.13.2 - label subordinate ratings on profiles 2026-10-31 02:23:58 -04:00
f1a246c945 docs: add v0.13.2 changelog entry 2026-10-31 02:23:33 -04:00
502eef5228 fix(profile): label downward leadership ratings as rate subordinate
Seniors viewing a junior's profile saw 'Rate leadership', but that rating is
stored as a subordinate review. The section now passes the rank direction to
the dialog, which labels the trigger, title, copy and toast accordingly.
2026-10-31 02:23:29 -04:00
2f81cc9ede v0.13.1 - add extraction review, vehicle cargo blacklist, brass ribbon devices 2026-10-27 02:16:03 -04:00