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.
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
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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').
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.
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.
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.
- 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
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.
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.
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.
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.