feat: connect prepared run and refine presenter notes

This commit is contained in:
lda
2026-07-14 08:59:32 +07:00 Verified
parent 5ba9e55f92
commit 184e41858c
26 changed files with 296 additions and 114 deletions
@@ -232,7 +232,7 @@ describe("AssistantOperatorThread", () => {
}
});
it("can show the latest response in a static comparison transcript", async () => {
it("can show the latest response even when an authoring group is synchronized", async () => {
const setScrollTop = vi.fn();
const descriptors = {
scrollTop: Object.getOwnPropertyDescriptor(HTMLDivElement.prototype, "scrollTop"),
@@ -246,7 +246,14 @@ describe("AssistantOperatorThread", () => {
scrollHeight: { configurable: true, get: () => 240 },
clientHeight: { configurable: true, get: () => 80 },
});
render(<AssistantOperatorThread mode="dock" messages={[]} scrollMode="end" />);
render(
<AssistantOperatorThread
mode="dock"
messages={[]}
activeToolGroupId="authoring-deployment"
scrollMode="end"
/>,
);
await waitFor(() => expect(setScrollTop).toHaveBeenCalledWith(160));
} finally {
@@ -276,9 +276,9 @@ export const AssistantOperatorThread = ({
const viewport = viewportRef.current;
if (!viewport) return;
// Static comparison transcripts should show their final answer; live
// presentation docks instead keep the beat-owned tool group in view.
if (!activeToolGroupId && scrollMode === "end") {
// A terminal exchange must override phase anchoring so its result and
// final assistant response remain visible after the composer submits.
if (scrollMode === "end") {
viewport.scrollTop = Math.max(0, viewport.scrollHeight - viewport.clientHeight);
return;
}