Missions gain an attendanceUnlocks tier list (admin tab plus side-op dialog),
rendered as a timeline under the attendance card: reached tiers light up in
their accent, unreached tiers stay muted with an X TO GO tag.
- shared derivation, validation and side-op parser in lib/intelligence
- thresholds sorted on save, duplicates rejected, above-max allowed
- one compact field in the Discord roll-call; attendance hash now includes
tiers, embed schema version 4
- int tests and an e2e render check at two attendance levels
The claim path appended a credit line to the invitation, so a claimed notice
still said the slot was open, that nobody had picked it up, and that Jason
would host if nobody did.
- renderClaimedNotice(): the whole body for the claimed state, role ping
dropped since there is nothing left to ask for
- compare the live message against the rendered body each poll, so a message
left contradictory by an older build heals on the next tick
- a cancelled claim still restores the full invitation, ping included
- cover both bodies and the claim parser in the notice integration test
Discord renders <t:epoch:D> in each viewer's timezone, so the slot's Friday
00:00 Eastern epoch read as Thursday for members west of Eastern. Render the
date as a pinned Eastern label instead.
- add fridayDateLabel(): the upcoming Friday in America/New_York
- noticeToken() now returns that label, keeping dedup stable per Friday
- legacyNoticeToken() still matches older <t:epoch:D> notices and the service
rewrites them in place, so a deploy does not duplicate or leave one behind
- only match the bot's own messages, since a plain-date token could otherwise
hit a member's message (which the bot cannot edit)
- document the timezone rule in the bot AGENTS.md
The two meters on a faction dossier shared a centered track, but a negative
score grew to the right and a positive one to the left, so the side a bar sat
on said the opposite of what it meant. Negative now extends left of the zero
line and positive right.
The labels also read badly side by side: "They see us" and "We see them" each
start with the party being looked at, which invites reading them the wrong way
round. "How they see us" and "How we see them" name the direction first.
The matrix answers "what is this faction's score", not "who is tied to whom".
Add a graph view behind a Matrix/Graph switch on the same page.
The player faction sits at the center and every other faction is placed on a
ring by classification (majors innermost, then minors, corporations, specials),
so its relations read as spokes and the rest as chords. Positions are
deterministic: rings ordered by type, members by name, starting at twelve
o'clock, with faint guide rings so the structure is legible without hovering.
Relations are straight lines. A relationship runs both ways, so where both
sides have an opinion the two directions are drawn side by side on either side
of the axis, each spanning the full distance between the factions, colored and
weighted by its own score, with an arrowhead at the faction being regarded. The
two directions differ independently: a faction can be resented by one that it
regards neutrally. A pair with only one opinion keeps a single centered line.
A line that would cut through an unrelated faction steps aside just far enough
to clear it, and only for factions actually alongside the line rather than
beyond either end. Straight stays straight.
Hovering a faction isolates its web and opens a panel listing what it regards
and who regards it; clicking opens the dossier. Pan, wheel zoom and reset are
local, and the whole view is hand-drawn SVG, so no graph library was added.
The layout is pure and unit-tested: input order cannot move a node, the two
directions of a pair run parallel rather than overlapping, single-direction
pairs span the whole pair, and a blocked line dodges instead of crossing a node.
The body editor painted highlighted markdown in a div behind a transparent-text
textarea, so the painted text and the caret were two different layout engines.
Any wrap-point difference (borders, scrollbar gutters, engine rounding, trailing
newlines) shifted the overlay by whole lines once content soft-wrapped, making
clicks land on the wrong glyph and the document end feel unreachable. The CSS
patch that preceded this reduced the drift but could not remove the class of bug.
CodeMirror 6 owns text and caret together, so the failure mode is gone by
construction rather than by maintenance. The body remains a markdown string, so
prepareMarkdown, ::: directives, wikilinks, templates, revisions and the preview
pipeline are untouched, with no data migration.
- WikiMarkdownEditor: EditorView lifecycle, theme and markdown HighlightStyle
bound to the app's CSS tokens, history, line wrapping, IME-safe keymap.
- markdownCommands: one pure command table shared by toolbar buttons and keys.
- editorChange: toolbar updates dispatch only the differing span, keeping undo
granular and selections outside the edit intact.
- Removes WikiEditorHighlightLayer, editorMetrics, lib/wiki/editorHighlight,
useEditorHistory and the now-dead textarea selection reader.
- Adds e2e proof: glyph-precise clicks across wrapped paragraphs, list items,
image markdown and scrolled documents land at the exact clicked offset.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Nothing stores a pairwise score on a faction any more, so remove the array
field, its admin UI and the masking line that blanked it for undiscovered
factions. The disposal-mask doc comment now points at the ledger, which
applies the same rule by filtering entries that name an undiscovered faction.
The second migration converts every non-zero legacy value into an
opening-balance entry (custom delta, dated at the owning faction's last update
so it does not read as a fresh event, legacy note preserved) and then drops
the table. Zero rows are skipped because a stored 0 and no entries mean the
same thing.
Two integration specs that created or asserted `relationships` now use the
ledger instead.
The faction dossier's Relationships block only ever showed one direction, and
only the directions someone had bothered to type by hand.
Read both directions from the ledger instead: each row now carries "they see
us" and "we see them" meters, and a Recent Developments list under them spells
out the events behind those numbers in plain language. Hidden entries move the
meters without appearing in that list.
Add /intelligence/factions/relations, a full cross-table of every faction
against every other, player faction first, with the existing band labels as a
legend. Rows and headers link back to dossiers, and the table scrolls sideways
rather than truncating scores. A Relations entry in the Intelligence sidebar
points at it.
Pairwise faction attitudes were hand-typed into a per-faction array, so the
two directions of one relationship lived in different documents and could
disagree with each other.
Add `faction-relation-entries`: one row per event that moved one faction's
attitude toward another, with the score computed on read instead of stored.
Entries are directed by default with a mutual flag for shared events; severity
tiers set the delta with a custom override; decaying entries halve per
half-life (new GameRules knob, 30 days default) while lasting shifts never
fade; voiding retires an entry with a stamped reason instead of deleting it;
hidden entries still move the score but never explain it to players.
`factionRelations.ts` holds the pure math (severity presets, decay, directed
and mutual scores, bands), and `factionRelationLedger.ts` is the single read
path so the voided, hidden and undiscovered-faction rules exist in one place.
Reads run as the caller, never with `overrideAccess`; GM notes are gated by
field read access, and hidden rows are censored by an `afterRead` hook.
Includes the permission group, the `admin:faction-relation-entries:manage`
page gate, the integration spec, and the migration that creates the table and
its enums.
The markdown overlay shared the wrapper's inset-0 box with the transparent-text
textarea, but its inner div added a 1px transparent border while the textarea is
border-0, shrinking its text width by ~2px; Firefox/Safari classic scrollbars
reserve another ~15px inside the scrolled textarea that the overflow-hidden
overlay never sees. Either gutter makes long unbreakable tokens (e.g. image
markdown URLs) wrap differently between the two layers, so the overlay text
drifts vertically under the caret/click math and editing feels like it's one or
more lines off right after inserting an image.
Compose both layers' classes from a shared WIKI_EDITOR_METRICS constant, drop
the overlay border, hide the textarea scrollbar so its content width matches the
overlay in every browser, and lock class parity with a jsdom RTL spec.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
RichText authored in the admin panel was rendered as plain text on the
public site: headings/lists/quotes were flattened by Tailwind preflight
(no @tailwindcss/typography installed), and Payload's default JSX
converter ignored text colours.
- src/lib/lexical: shared editor factory (ptfLexicalEditor) + shared
colour palette (textState) + colour converter (richTextConverters)
- RichTextView: canonical .lexical-content renderer (colour-aware),
swapped into every frontend render site
- All rich-text editors route through the factory, so every field
inherits the coloured editor (incl. the previously-unedited ones)
- .lexical-content CSS extended with checklist/table/heading rules,
wrapped in @layer components so per-page utilities still override;
dropped the now-dead per-page prose hacks
- Remove the now-dead briefingConverters in favour of the shared
converter; add tests/int/rich-text-view.int.spec.ts
Wiki pages gain a Draft flag pinned to their original creator. A draft is
visible only to its creator, wiki moderators and admins: the collection's
read access returns a where clause so the REST/local API filters drafts,
and every frontend query ANDs the same clause (they run with overrideAccess).
Publishing is one-way. A page whose stored draft is false is rejected (403)
when sent draft: true, both in the service and in access.update.
UI: amber DraftBanner on the detail page, a Draft chip in WikiRow, and a
Draft switch in the editor that disables once the page is published.
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.