Compare commits

...

1 Commits

Author SHA1 Message Date
9ebde9c185 fix(canvas): add liveAnnouncement to makeStore test helper
Some checks failed
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 13s
sop-tier-check / tier-check (pull_request) Failing after 22s
audit-force-merge / audit (pull_request) Has been skipped
Fixes TS2339 in canvas-events.test.ts where the liveAnnouncement
accessor was missing from the makeStore() mock state. The store
defines liveAnnouncement at canvas.ts:336 but the test helper
omitted it, causing TypeScript to reject state.liveAnnouncement
in the liveAnnouncement describe block (lines 843–1012).

Change: added `liveAnnouncement = ""` parameter and property to
makeStore() so the mock state matches the real store shape.

[core-fe-agent]
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 06:54:29 +00:00

View File

@ -52,9 +52,10 @@ function makeStore(
nodes: Node<WorkspaceNodeData>[] = [],
edges: Edge[] = [],
selectedNodeId: string | null = null,
agentMessages: Record<string, Array<{ id: string; content: string; timestamp: string }>> = {}
agentMessages: Record<string, Array<{ id: string; content: string; timestamp: string }>> = {},
liveAnnouncement = ""
) {
const state = { nodes, edges, selectedNodeId, agentMessages };
const state = { nodes, edges, selectedNodeId, agentMessages, liveAnnouncement };
const get = () => state;
const set = vi.fn((partial: Record<string, unknown>) => {
Object.assign(state, partial);