docs: complete scene 9 staged message box

This commit is contained in:
lda
2026-07-12 08:11:50 +07:00 Verified
parent 10c06c882d
commit 97c2bbe9a0
4 changed files with 80 additions and 41 deletions
+10 -5
View File
@@ -211,6 +211,8 @@ were removed. Plans:
[`presentation agent authoring story`](historical/superpowers/plans/2026-07-11-presentation-agent-authoring-story.md)
and
[`Scene 9 assistant pane`](historical/superpowers/plans/2026-07-12-scene-9-assistant-modal.md).
The staged message-box completion is recorded in
[`Scene 9 staged message box`](historical/superpowers/plans/2026-07-12-scene-9-staged-message-box.md).
Recommended next visual slices:
@@ -273,11 +275,14 @@ separate activity after these surfaces are stable.
reveals the first prepared authoring conversation without starting a
workflow run. Implementation:
[`Scene 8 chat entry`](historical/superpowers/plans/2026-07-12-scene-8-chat-entry.md).
2. **Completed: Scene 9 assistant pane:** replaced the lower chat dock with a
persistent prepared-agent pane on the left and a dominant adaptive phase
canvas on the right, starting near a 35/65 split. The Scene 8 handoff beat
was removed; the request route remains local and deterministic. Implementation:
[`Scene 9 assistant pane`](historical/superpowers/plans/2026-07-12-scene-9-assistant-modal.md).
2. **Completed: Scene 9 staged message box:** kept one message box visible
across Discover, Draft, Validate, Artifact, and Deployment; Draft and
Artifact Send advance the prepared lifecycle while preserving edited user
turns, and Deployment Send records a truthful local run request without
execution or RPC. Implementation:
[`Scene 9 staged message box`](historical/superpowers/plans/2026-07-12-scene-9-staged-message-box.md).
The boundary is explicit: Scenes 1012 own run activation, approval,
resume, output, and trace evidence.
3. **Live/replay truth and run activation:** keep Scene 9 authoring evidence
recording-backed, make Scenes 1012 consume the active live timeline when a
run exists, keep replay fallback for direct links or unavailable services,
@@ -1,4 +1,4 @@
# Scene 9 Staged Message Box Implementation Plan
# Historical: Scene 9 Staged Message Box Implementation Plan
> **For agentic workers:** REQUIRED SUB-SKILL: Use `superpowers:subagent-driven-development` (recommended) or `superpowers:executing-plans` to implement this plan task-by-task. Steps use checkbox syntax for tracking.
@@ -21,42 +21,42 @@
## Task 1: Define Staged Message State And Projections
- [ ] Create `web/apps/console/src/presentation/authoring/scene9-message-state.ts` and its test before implementation.
- [ ] Define phase-keyed prompt metadata with the exact strings above and an explicit empty value for Discover and Validate.
- [ ] Define a pure state model containing:
- [x] Create `web/apps/console/src/presentation/authoring/scene9-message-state.ts` and its test before implementation.
- [x] Define phase-keyed prompt metadata with the exact strings above and an explicit empty value for Discover and Validate.
- [x] Define a pure state model containing:
- current draft text;
- submitted message overrides keyed by destination phase (`validate`, `deployment`);
- final `runRequested` text, initially null.
- [ ] Define pure actions for draft edits, submit at Draft, submit at Artifact, and final run-request submission. Blank submissions must be ignored for transitions and requests.
- [ ] Add projection helpers that return the current phase's prefill/placeholder and a per-phase override map suitable for `projectPreparedAuthoringThread`.
- [ ] Test exact prompts, empty phases, edited text, successful transitions, duplicate-submit idempotency, and truthful final run-request state. Commit as `feat: model scene 9 staged messages`.
- [x] Define pure actions for draft edits, submit at Draft, submit at Artifact, and final run-request submission. Blank submissions must be ignored for transitions and requests.
- [x] Add projection helpers that return the current phase's prefill/placeholder and a per-phase override map suitable for `projectPreparedAuthoringThread`.
- [x] Test exact prompts, empty phases, edited text, successful transitions, duplicate-submit idempotency, and truthful final run-request state. Commit as `feat: model scene 9 staged messages`.
## Task 2: Make The Assistant Pane A Persistent Message Surface
- [ ] Extend `PresentationAssistantPane` with the staged-message controller props and an `onSubmit` callback. Keep the pane visible for every Scene 9 phase.
- [ ] Render the existing shadcn `Textarea` and `Button` at the bottom of the pane. Use a stable accessible label, keep Shift+Enter for newlines, and support Enter-to-submit only when it does not destroy multiline editing.
- [ ] Prefill Draft and Artifact from the phase metadata; leave Discover and Validate empty with a clear placeholder. Disable Send only for blank input or a terminal run-request state.
- [ ] Keep the current phase disclosure and prepared-replay disclosure. Do not add live actions, workflow RPC calls, or a second chat runtime.
- [ ] Pass submitted overrides into `AuthoringConversation` so edited Draft/Artifact text replaces the correct eventual user turn while canonical tool IDs/results remain unchanged.
- [ ] Add focused component tests for all five phases, exact prefill values, edit behavior, accessible controls, and override rendering. Commit as `feat: add scene 9 staged message surface`.
- [x] Extend `PresentationAssistantPane` with the staged-message controller props and an `onSubmit` callback. Keep the pane visible for every Scene 9 phase.
- [x] Render the existing shadcn `Textarea` and `Button` at the bottom of the pane. Use a stable accessible label, keep Shift+Enter for newlines, and support Enter-to-submit only when it does not destroy multiline editing.
- [x] Prefill Draft and Artifact from the phase metadata; leave Discover and Validate empty with a clear placeholder. Disable Send only for blank input or a terminal run-request state.
- [x] Keep the current phase disclosure and prepared-replay disclosure. Do not add live actions, workflow RPC calls, or a second chat runtime.
- [x] Pass submitted overrides into `AuthoringConversation` so edited Draft/Artifact text replaces the correct eventual user turn while canonical tool IDs/results remain unchanged.
- [x] Add focused component tests for all five phases, exact prefill values, edit behavior, accessible controls, and override rendering. Commit as `feat: add scene 9 staged message surface`.
## Task 3: Wire Phase Advancement And The Final Run Handoff
- [ ] Add the smallest existing navigation seam needed to let the Scene 9 assistant pane advance to the next main beat. Prefer passing a callback from `PresentationStage` using `nextMainLocation`; do not mutate `window.location` directly from the pane.
- [ ] Keep Scene 9 controller state alive while moving between its five beats so submitted Draft/Artifact text remains visible in the later transcript.
- [ ] On Draft submit, store the edited message under the Validate destination and advance exactly once to Validate.
- [ ] On Artifact submit, store the edited message under the Deployment destination and advance exactly once to Deployment.
- [ ] On Deployment submit, store `runRequested` and render a truthful local confirmation such as `Run request prepared for the next execution slice.`. Do not start `workflow.runs.start` in this slice.
- [ ] Ensure ArrowRight and direct-hash navigation still work. Direct navigation may start without prior overrides, but must never crash or render stale submitted text from another phase.
- [ ] Add integration tests for Draft → Validate, Artifact → Deployment, final run-request state, edited-text projection, and no RPC calls. Commit as `feat: connect scene 9 staged progression`.
- [x] Add the smallest existing navigation seam needed to let the Scene 9 assistant pane advance to the next main beat. Prefer passing a callback from `PresentationStage` using `nextMainLocation`; do not mutate `window.location` directly from the pane.
- [x] Keep Scene 9 controller state alive while moving between its five beats so submitted Draft/Artifact text remains visible in the later transcript.
- [x] On Draft submit, store the edited message under the Validate destination and advance exactly once to Validate.
- [x] On Artifact submit, store the edited message under the Deployment destination and advance exactly once to Deployment.
- [x] On Deployment submit, store `runRequested` and render a truthful local confirmation such as `Run request prepared for the next execution slice.`. Do not start `workflow.runs.start` in this slice.
- [x] Ensure ArrowRight and direct-hash navigation still work. Direct navigation may start without prior overrides, but must never crash or render stale submitted text from another phase.
- [x] Add integration tests for Draft → Validate, Artifact → Deployment, final run-request state, edited-text projection, and no RPC calls. Commit as `feat: connect scene 9 staged progression`.
## Task 4: Browser Acceptance, Documentation, And Review
- [ ] Capture and inspect Scene 9 at 1280x720 and 1024x768 for Discover, Draft, Validate, Artifact, and Deployment.
- [ ] Verify the text box is visible in every phase, empty where specified, correctly prefilled where specified, and never overlaps the phase visual or the assistant conversation.
- [ ] Verify changing the Draft message then sending shows that exact text in the Validate conversation. Verify the same for Artifact → Deployment.
- [ ] Verify the final Deployment message produces only the truthful run-request state and no execution claim or RPC request.
- [ ] Run the full verification gate:
- [x] Capture and inspect Scene 9 at 1280x720 and 1024x768 for Discover, Draft, Validate, Artifact, and Deployment.
- [x] Verify the text box is visible in every phase, empty where specified, correctly prefilled where specified, and never overlaps the phase visual or the assistant conversation.
- [x] Verify changing the Draft message then sending shows that exact text in the Validate conversation. Verify the same for Artifact → Deployment.
- [x] Verify the final Deployment message produces only the truthful run-request state and no execution claim or RPC request.
- [x] Run the full verification gate:
```powershell
pnpm --dir web test
@@ -66,16 +66,16 @@
git status --short
```
- [ ] Run the repository review skill and fix concrete standards/spec findings.
- [ ] Update `web/README.md`, `docs/current_roadmap.md`, and the relevant presentation runbook to describe the staged message behavior and its boundary before Scenes 1012.
- [ ] Move this plan to `docs/historical/superpowers/plans/2026-07-12-scene-9-staged-message-box.md` and commit documentation/archive changes as `docs: complete scene 9 staged message box`.
- [x] Run the repository review skill and fix concrete standards/spec findings.
- [x] Update `web/README.md`, `docs/current_roadmap.md`, and the relevant presentation runbook to describe the staged message behavior and its boundary before Scenes 1012.
- [x] Move this plan to `docs/historical/superpowers/plans/2026-07-12-scene-9-staged-message-box.md` and commit documentation/archive changes as `docs: complete scene 9 staged message box`.
## Self-Review Checklist
- [ ] One text box is visible in all five Scene 9 phases.
- [ ] Only Draft and Artifact Send advance the prepared lifecycle.
- [ ] Final Send is a truthful handoff, not a fake run.
- [ ] Edited text replaces the intended projected user turn and does not alter canonical tool data.
- [ ] No second router, store, runtime, transport, or live RPC path was introduced.
- [ ] ArrowRight and direct hashes remain reliable.
- [ ] Both panes remain visible with no overlap at 1280x720 and 1024x768.
- [x] One text box is visible in all five Scene 9 phases.
- [x] Only Draft and Artifact Send advance the prepared lifecycle.
- [x] Final Send is a truthful handoff, not a fake run.
- [x] Edited text replaces the intended projected user turn and does not alter canonical tool data.
- [x] No second router, store, runtime, transport, or live RPC path was introduced.
- [x] ArrowRight and direct hashes remain reliable.
- [x] Both panes remain visible with no overlap at 1280x720 and 1024x768.
@@ -54,3 +54,28 @@ pnpm --filter @lda/console build
20. Compact chat is hidden while the inspector is open
Screenshots require human approval and are not pixel-diff tests.
## Scene 9 Staged Message Review
Review these five deep links at `1280x720` and `1024x768`, at 100% zoom:
- `/present#scene/prepared-lifecycle/discover`
- `/present#scene/prepared-lifecycle/draft`
- `/present#scene/prepared-lifecycle/validate`
- `/present#scene/prepared-lifecycle/artifact`
- `/present#scene/prepared-lifecycle/deployment`
Confirm that one labelled textarea remains visible in every phase, is empty in
Discover and Validate, and contains the exact prepared prompt in Draft,
Artifact, and Deployment. Confirm the right phase projection remains dominant,
the panes do not overlap, and `document.documentElement.scrollHeight` equals
`clientHeight`. Reload direct hashes before capture: in dev mode, immediate
screenshots during an in-place hash transition can catch the presentation
animation between surfaces even though the settled/reloaded route is correct.
Edit and Send in Draft, then verify Validate contains that exact edited user
turn. Repeat from Artifact to Deployment. On Deployment, Send must show only
`Run request prepared for the next execution slice.`; compare `/api/rpc`
request counts before and after to confirm no execution call was made. Scenes
1012 own the subsequent run activation and live execution path; do not use
Scene 9 to claim a run has started.
+10 -1
View File
@@ -344,9 +344,18 @@ workflow authoring RPC operations.
to the available width. Its active tool group follows the current beat. There
is no lower chat dock, detached trace modal, or second transcript.
One staged message box remains visible in every phase. Discover and Validate
start empty with useful placeholders; Draft and Artifact use the exact next
authoring prompts. Sending an edited Draft advances to Validate and preserves
that text as the projected user turn; sending an edited Artifact does the
same for Deployment. Deployment Send records only `Run request prepared for
the next execution slice.` and makes no run or RPC request.
The authoring scenes consume deterministic prepared data and never call
workflow authoring RPCs. Scene 8 also skips live target probing so its request
and Send path remain fully local; later execution scenes own live-run behavior.
and Send path remain fully local. Scene 9 ends at the truthful run-request
handoff; Scenes 1012 own run activation, typed approval, resume, output, and
trace evidence. No Scene 9 message submission starts a workflow run.
### Demo Climax (Scenes 1012)