fix: prevent authoring evidence clipping

This commit is contained in:
lda
2026-07-13 02:48:43 +07:00 Verified
parent 70f1d1e9cf
commit 759b14a070
4 changed files with 22 additions and 17 deletions
@@ -1,4 +1,4 @@
import { useLayoutEffect, useReducer, useRef } from "react";
import { useReducer } from "react";
import { projectPreparedAuthoringPhase } from "./authoring-projection.js";
import { AuthoringPhaseVisual } from "./AuthoringPhaseVisual.js";
import { PresentationAssistantPane } from "./PresentationAssistantPane.js";
@@ -41,16 +41,6 @@ export const PreparedAuthoringLifecycleScene = ({ scene, beat, onAdvance }: Prep
// if a future beat reaches this scene before its authoring mapping is added.
const beatId = phases.find((phase) => phase.id === beat.id)?.id ?? "discover";
const projection = projectPreparedAuthoringPhase(beatId);
const lifecycleRef = useRef<HTMLElement>(null);
useLayoutEffect(() => {
// The assistant owns its aside markup; decorate that existing boundary here
// so the scene can expose hierarchy metadata without widening its API.
lifecycleRef.current
?.querySelector<HTMLElement>('[aria-label="prepared authoring assistant"]')
?.setAttribute("data-visual-role", "support");
}, [beatId]);
return (
<>
<StageCaption eyebrow="Prepared workflow" title={scene.title}>
@@ -58,7 +48,6 @@ export const PreparedAuthoringLifecycleScene = ({ scene, beat, onAdvance }: Prep
</StageCaption>
<section
className="prepared-lifecycle-scene"
ref={lifecycleRef}
aria-label="prepared workflow authoring lifecycle"
data-active-phase={beatId}
data-primary-surface="authoring-phase"
@@ -67,6 +56,7 @@ export const PreparedAuthoringLifecycleScene = ({ scene, beat, onAdvance }: Prep
>
<PresentationAssistantPane
phase={beatId}
visualRole="support"
message={projectScene9Message(messageState, beatId)}
submittedOverrides={projectScene9SubmittedOverrides(messageState)}
runRequested={messageState.runRequested}