1
0
Fork 0
polaris-task-force/src
Z8MB1E de765fe725 feat(npc-dialogue): play an unsaved draft in the editor
Authoring meant saving, leaving the admin, and finding the contact on the player
site to see whether a branch worked. A Play button in the canvas toolbar now
walks the draft exactly as it stands, without saving it.

The walker is not the runtime component: that resolves text and choices through
server actions keyed on a saved dialogue id, and teaching all four a draft mode
would be a much larger change. preview.ts answers what is local (choice order,
branch targets, effect descriptions) and the server answers the one thing it
cannot, flag values, through a new previewDialogueCondition action gated on
npc-dialogues:update. It calls the same evaluateCondition the player runtime
uses, so a preview cannot disagree with the outcome.

Effects are described, never applied. Choices the author's own flags would hide
are shown as hidden rather than silently dropped.

Verified on a temp document with an event effect and a condition node: the event
step showed 'Would set flag preview_probe_flag to true' with a dry-run note, the
condition answered false for a missing flag, the walk followed the false branch to
its END node, and player_flags gained no row (5 before, 5 after).

Bare admin buttons render with the UA's white background, so each one carries an
explicit background; 9 pure tests cover the walker's reading of the graph.
2026-11-24 20:41:19 -05:00
..
app feat(npc-dialogue): mark contacts whose conversation has unread content 2026-11-24 20:26:47 -05:00
arena feat(minigames): superuser developer console dock across all ten games 2026-10-20 12:48:27 -04:00
assets/images feat: application staging deployment (ensure better commits after this) 2025-12-15 01:14:30 -05:00
bot feat(intelligence): add attendance-gated feature unlocks to mission pages 2026-11-21 02:30:48 -05:00
collections feat(npc-dialogue): natural typing rhythm, a beat between lines, a typing sound 2026-11-24 19:20:11 -05:00
components feat(npc-dialogue): play an unsaved draft in the editor 2026-11-24 20:41:19 -05:00
hooks feat(minigames): add Ordnance Disposal (bomperator) multiplayer drill 2026-10-16 00:32:52 -04:00
lib feat(npc-dialogue): play an unsaved draft in the editor 2026-11-24 20:41:19 -05:00
migrations feat(npc-dialogue): natural typing rhythm, a beat between lines, a typing sound 2026-11-24 19:20:11 -05:00
permissions feat(intelligence): add the faction relation ledger collection and score math 2026-11-18 14:13:20 -05:00
scripts feat(dev): add seed-attendance bin for random mission attendance 2026-11-02 10:01:32 -05:00
tools feat(intelligence): add undiscovered faction state with read masking 2026-11-18 09:19:57 -05:00
utils perf: cut queries per render and refreshes per realtime event 2026-11-22 22:39:10 -05:00
payload-generated-schema.ts feat(lockers): seed and unlimited-stock sync for limited arsenal 2026-11-20 19:52:15 -05:00
payload-types.ts feat(npc-dialogue): natural typing rhythm, a beat between lines, a typing sound 2026-11-24 19:20:11 -05:00
payload.config.ts fix(ai): bound the structured path too, and stop the dialog overpromising 2026-11-24 15:00:30 -05:00