feat: make scene 9 a split authoring workspace
This commit is contained in:
+31
-5
@@ -62,16 +62,42 @@ describe("PreparedAuthoringLifecycleScene", () => {
|
||||
expect(screen.getByRole("region", { name: label })).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("keeps the same conversation as a synchronized bottom dock", () => {
|
||||
it("keeps the assistant and dominant phase visual visible as stable siblings", () => {
|
||||
renderBeat("draft");
|
||||
|
||||
const workspace = screen.getByRole("region", { name: "prepared workflow authoring lifecycle" });
|
||||
const assistant = screen.getByRole("complementary", { name: /prepared authoring assistant/i });
|
||||
const visual = screen.getByRole("region", { name: "draft graph evidence" });
|
||||
|
||||
expect(workspace).toContainElement(assistant);
|
||||
expect(workspace).toContainElement(visual);
|
||||
expect(assistant).toHaveAttribute("data-phase", "draft");
|
||||
expect(assistant).toHaveAttribute("data-surface", "prepared-replay");
|
||||
expect(assistant.querySelector('[data-surface="stage"]')).toBeInTheDocument();
|
||||
expect(workspace.querySelector(".prepared-lifecycle-scene__dock")).not.toBeInTheDocument();
|
||||
expect(workspace.querySelector("[role='dialog']")).not.toBeInTheDocument();
|
||||
expect(workspace.querySelector("[aria-label='authoring phase rail']"))
|
||||
.toBeInTheDocument();
|
||||
expect(visual).toHaveAttribute("data-presentation-surface", "editorial");
|
||||
});
|
||||
|
||||
it("synchronizes the assistant phase, active group, rail, and visual", () => {
|
||||
renderBeat("validate");
|
||||
|
||||
expect(screen.getByRole("complementary", { name: /prepared authoring assistant/i }))
|
||||
.toHaveAttribute("data-phase", "validate");
|
||||
expect(screen.getByRole("button", { name: /validate.*2 tool calls/i }))
|
||||
.toHaveAttribute("aria-expanded", "true");
|
||||
expect(screen.getByRole("button", { name: /draft.*3 tool calls/i }))
|
||||
.toHaveAttribute("aria-expanded", "false");
|
||||
expect(screen.getByLabelText("authoring phase rail").querySelector("[data-active='true']"))
|
||||
.toHaveTextContent("Validate");
|
||||
const chat = screen.getByRole("log", { name: "prepared authoring conversation" });
|
||||
expect(chat).toHaveAttribute("data-surface", "dock");
|
||||
expect(screen.getByRole("region", { name: "draft graph evidence" })).toHaveAttribute(
|
||||
expect(chat).toHaveAttribute("data-surface", "stage");
|
||||
expect(screen.getByRole("region", { name: "validation repair evidence" })).toHaveAttribute(
|
||||
"data-presentation-surface",
|
||||
"editorial",
|
||||
);
|
||||
expect(screen.getByRole("button", { name: /draft.*3 tool calls/i }))
|
||||
.toHaveAttribute("aria-expanded", "true");
|
||||
});
|
||||
|
||||
it("does not render the obsolete trace modal or receipt", () => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { projectPreparedAuthoringPhase } from "./authoring-projection.js";
|
||||
import { AuthoringConversation } from "./AuthoringConversation.js";
|
||||
import { AuthoringPhaseVisual } from "./AuthoringPhaseVisual.js";
|
||||
import { PresentationAssistantPane } from "./PresentationAssistantPane.js";
|
||||
import type { AuthoringPhaseId } from "./authoring-recording.js";
|
||||
import type { SceneBeatDefinition, SceneDefinition } from "../storyboard.js";
|
||||
import { StageCaption } from "../StageCaption.js";
|
||||
@@ -21,9 +21,8 @@ const phases: readonly { readonly id: AuthoringPhaseId; readonly label: string }
|
||||
/**
|
||||
* Scene 9 — Prepared workflow authoring lifecycle.
|
||||
*
|
||||
* Each beat shows a compact orientation rail and one dominant phase projection
|
||||
* sourced from the prepared authoring recording. The same Scene 8 conversation
|
||||
* remains below the canvas as a beat-synchronized assistant dock.
|
||||
* Each beat shows a persistent prepared assistant beside one dominant phase
|
||||
* projection sourced from the prepared authoring recording.
|
||||
*/
|
||||
export const PreparedAuthoringLifecycleScene = ({ scene, beat }: PreparedAuthoringLifecycleSceneProps) => {
|
||||
// Storyboard beats normally match these IDs. Discovery is a safe projection
|
||||
@@ -44,23 +43,19 @@ export const PreparedAuthoringLifecycleScene = ({ scene, beat }: PreparedAuthori
|
||||
data-support-surface="prepared-chat"
|
||||
data-presentation-surface="editorial"
|
||||
>
|
||||
<ol className="prepared-lifecycle-scene__rail" aria-label="authoring phase rail">
|
||||
{phases.map((phase) => (
|
||||
<li key={phase.id} data-active={phase.id === beatId ? "true" : "false"}>
|
||||
<strong>{phase.label}</strong>
|
||||
</li>
|
||||
))}
|
||||
</ol>
|
||||
<PresentationAssistantPane phase={beatId} />
|
||||
<div className="prepared-lifecycle-scene__presentation">
|
||||
<ol className="prepared-lifecycle-scene__rail" aria-label="authoring phase rail">
|
||||
{phases.map((phase) => (
|
||||
<li key={phase.id} data-active={phase.id === beatId ? "true" : "false"}>
|
||||
<strong>{phase.label}</strong>
|
||||
</li>
|
||||
))}
|
||||
</ol>
|
||||
|
||||
<article className="prepared-lifecycle-scene__projection" key={beatId}>
|
||||
<AuthoringPhaseVisual projection={projection} />
|
||||
</article>
|
||||
<div className="prepared-lifecycle-scene__dock">
|
||||
<AuthoringConversation
|
||||
throughPhase={beatId}
|
||||
activePhase={beatId}
|
||||
surface="dock"
|
||||
/>
|
||||
<article className="prepared-lifecycle-scene__projection" key={beatId}>
|
||||
<AuthoringPhaseVisual projection={projection} />
|
||||
</article>
|
||||
</div>
|
||||
</section>
|
||||
</>
|
||||
|
||||
@@ -38,7 +38,7 @@ export const PresentationAssistantPane = ({ phase }: PresentationAssistantPanePr
|
||||
<AuthoringConversation
|
||||
throughPhase={phase}
|
||||
activePhase={phase}
|
||||
surface="dock"
|
||||
surface="stage"
|
||||
/>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
Reference in New Issue
Block a user