From 018576103bac2e3d40e0262ec137bd26b699adc4 Mon Sep 17 00:00:00 2001 From: Christian Byrne Date: Wed, 2 Sep 2026 12:12:29 +0000 Subject: [PATCH 01/52] test(agent): add conversation replay fixture for agent panel e2e Add a request/response fixture pattern for the in-app agent: one user prompt in, an ordered agent response out (chat frames plus the semantic graph ops the doc host folds into the workflow document). - agentConversationFixture.ts drives the real composer, mocks the /api/agent routes, owns the /ws route, mints the seed workflow with the pinned comfy-multi-player applier, answers the follower's doc_subscribe with a catch-up, replays each graph_ops entry as a doc_update frame, and snapshots the rendered nodes and slot connectivity of the agent's doc. - data/agent/agentConversation.ts is the zod-typed conversation schema and loader; the two JSON conversations derive from evals agent-suite cases (agent-l4-zimage-string-node-prompt, agent-workflow-editing-05) with the response side synthesized from each case's expected outcome. - agentConversationReplay.spec.ts replays both and asserts the tool-call group, tab link, final message, CRDT status, and end graph state. - bootAgentApp accepts extra settings so Vue nodes can be enabled, which is the renderer that projects follower edits onto the canvas. Claude-Session: https://claude.ai/code/session_0181SuRew6ZZf4o47oPVdn5r --- .../fixtures/agentConversationFixture.ts | 376 ++++++++++++++++++ browser_tests/fixtures/agentPanelFixture.ts | 15 +- .../fixtures/data/agent/agentConversation.ts | 81 ++++ .../agent-l4-zimage-string-node-prompt.json | 277 +++++++++++++ .../agent-workflow-editing-05.json | 277 +++++++++++++ .../agent/agentConversationReplay.spec.ts | 137 +++++++ 6 files changed, 1159 insertions(+), 4 deletions(-) create mode 100644 browser_tests/fixtures/agentConversationFixture.ts create mode 100644 browser_tests/fixtures/data/agent/agentConversation.ts create mode 100644 browser_tests/fixtures/data/agent/conversations/agent-l4-zimage-string-node-prompt.json create mode 100644 browser_tests/fixtures/data/agent/conversations/agent-workflow-editing-05.json create mode 100644 browser_tests/tests/agent/agentConversationReplay.spec.ts diff --git a/browser_tests/fixtures/agentConversationFixture.ts b/browser_tests/fixtures/agentConversationFixture.ts new file mode 100644 index 00000000000..31ba17592f6 --- /dev/null +++ b/browser_tests/fixtures/agentConversationFixture.ts @@ -0,0 +1,376 @@ +import type { Locator, Page, WebSocketRoute } from '@playwright/test' +import { expect } from '@playwright/test' + +import { applyOps, mint, readGraph } from '@comfyorg/comfy-multi-player' +import type { WidgetCatalog, WorkflowJSON } from '@comfyorg/comfy-multi-player' +import * as Y from 'yjs' + +import enMessages from '@/locales/en/main.json' with { type: 'json' } +import type { GraphOperation } from '@/workbench/extensions/agent/crdt/graphOperations' +import { mintWireOps } from '@/workbench/extensions/agent/crdt/opEnvelope' +import type { + AgentCancelAccepted, + AgentMessages, + AgentTurnAccepted, + AgentWsEvent +} from '@/workbench/extensions/agent/schemas/agentApiSchema' +import { parseAgentWsEvent } from '@/workbench/extensions/agent/schemas/agentApiSchema' + +import { agentTest, bootAgentApp } from '@e2e/fixtures/agentPanelFixture' +import type { + AgentConversation, + RecordedWsEvent +} from '@e2e/fixtures/data/agent/agentConversation' +import { loadAgentConversation } from '@e2e/fixtures/data/agent/agentConversation' +import { jsonRoute } from '@e2e/fixtures/utils/jsonRoute' + +const THREAD_ID = 'e9a2f3d1-7c44-4b2e-9a01-5f6d8c7b3a10' +const TURN_ID = '0c5b1e77-2d4a-4f9e-8b63-1a2c3d4e5f60' +const SOCKET_SID = '7d1f2e3a-4b5c-4d6e-8f90-1a2b3c4d5e6f' +const HOST_ACTOR = 'agent:comfy' +const DOC_PROTOCOL_VERSION = 1 +const PANEL_MOUNT_TIMEOUT = 30_000 +const SUBSCRIBE_TIMEOUT = 15_000 + +const OPEN_AGENT_LABEL = enMessages.agent.askComfyAgent +const SEND_LABEL = enMessages.agent.send +const STOP_LABEL = enMessages.agent.stop + +interface DocFrame { + type: 'doc_subscribed' | 'doc_update' + data: Record +} + +function toBase64(bytes: Uint8Array): string { + return Buffer.from(bytes).toString('base64') +} + +function fromBase64(value: string): Uint8Array { + return new Uint8Array(Buffer.from(value, 'base64')) +} + +/** + * The doc host's side of the CRDT channel, in-process: the seed workflow is + * minted with the same pinned applier the real host runs, each `graph_ops` + * entry is applied to it, and the resulting Yjs delta is what the follower + * receives as a `doc_update` frame. + */ +class HostDoc { + private readonly doc: Y.Doc + private seq = 1 + + constructor( + private readonly workflowId: string, + seed: WorkflowJSON, + private readonly catalog: WidgetCatalog + ) { + this.doc = mint(seed, catalog) + } + + nodeIds(): Set { + return new Set(Object.keys(readGraph(this.doc).nodes)) + } + + subscribed(): DocFrame { + return { + type: 'doc_subscribed', + data: { + v: DOC_PROTOCOL_VERSION, + workflow_id: this.workflowId, + ok: true, + seq: this.seq + } + } + } + + catchUp(stateVectorB64: string): DocFrame { + const update = Y.encodeStateAsUpdate(this.doc, fromBase64(stateVectorB64)) + return this.updateFrame(update, HOST_ACTOR, []) + } + + apply(operations: GraphOperation[]): DocFrame { + const before = Y.encodeStateVector(this.doc) + const ops = mintWireOps(operations, { + actor: HOST_ACTOR, + baseVersion: this.seq + }) + const result = applyOps(this.doc, ops, this.catalog) + const rejected = result.outcomes.filter((o) => o.outcome !== 'applied') + if (rejected.length > 0) + throw new Error( + `conversation graph_ops did not apply: ${JSON.stringify(rejected)}` + ) + this.seq += 1 + return this.updateFrame( + Y.encodeStateAsUpdate(this.doc, before), + HOST_ACTOR, + ops.map((op) => op.op_id) + ) + } + + private updateFrame( + update: Uint8Array, + actor: string, + opIds: string[] + ): DocFrame { + return { + type: 'doc_update', + data: { + v: DOC_PROTOCOL_VERSION, + workflow_id: this.workflowId, + seq: this.seq, + update_b64: toBase64(update), + actor, + op_ids: opIds + } + } + } +} + +interface GraphNodeSnapshot { + id: string + title: string + /** Connected state of each rendered input slot, in slot order. */ + inputs: boolean[] + /** Connected state of each rendered output slot, in slot order. */ + outputs: boolean[] +} + +/** + * Drives one recorded user prompt -> agent response exchange through the + * real agent panel: the composer posts the prompt, the mocked backend acks + * it, and the recorded response is replayed over the routed `/ws` socket as + * chat frames plus doc-host `doc_update` frames the CRDT follower applies to + * the canvas. + */ +export class AgentConversationHarness { + readonly postedMessages: string[] = [] + readonly panel: Locator + readonly ack: AgentTurnAccepted + + private readonly host: HostDoc + private socket: WebSocketRoute | null = null + private resolveSubscribed: (() => void) | null = null + private readonly subscribed = new Promise((resolve) => { + this.resolveSubscribed = resolve + }) + + constructor( + private readonly page: Page, + readonly conversation: AgentConversation + ) { + const { workflow } = conversation + this.host = new HostDoc(workflow.id, workflow.seed, workflow.catalog) + this.ack = { + thread_id: THREAD_ID, + message_id: TURN_ID, + workflow_id: workflow.id + } + this.panel = page.locator('#agent-panel-root') + } + + async boot(agentFlag: boolean): Promise { + await this.mockAgentApi() + // The app may reopen `/ws` (the connect awaits an auth token), and the + // follower only re-drives a pending subscribe on a `status` frame, which + // the real server sends on every connect. So every routed socket becomes + // the live one and gets that frame. + await this.page.routeWebSocket(/\/ws/, (socket) => { + this.socket = socket + socket.onMessage((raw) => this.onClientFrame(raw)) + socket.send( + JSON.stringify({ + type: 'status', + data: { + status: { exec_info: { queue_remaining: 0 } }, + sid: SOCKET_SID + } + }) + ) + }) + await bootAgentApp(this.page, agentFlag, { + // Follower edits land in the ECS stores, which only the Vue node + // renderer projects onto the canvas. + settings: { 'Comfy.VueNodes.Enabled': true } + }) + + await this.page.getByRole('button', { name: OPEN_AGENT_LABEL }).click() + await expect(this.panel).toBeVisible({ timeout: PANEL_MOUNT_TIMEOUT }) + } + + async sendPrompt(): Promise { + const { content } = this.conversation.request + const composer = this.panel.getByRole('textbox', { + name: /^Describe ideas/ + }) + await composer.fill(content) + await this.panel.getByRole('button', { name: SEND_LABEL }).click() + await expect.poll(() => this.postedMessages.length).toBeGreaterThan(0) + expect(this.postedMessages[0]).toContain(content) + } + + async replayResponse(): Promise { + for (const entry of this.conversation.response) { + if (entry.kind === 'event') { + this.send(this.stampTurn(entry.event)) + continue + } + await this.waitForSubscribe() + this.send(this.host.apply(entry.ops)) + } + } + + async waitForTurnComplete(): Promise { + await expect( + this.panel.getByRole('button', { name: SEND_LABEL }) + ).toBeVisible() + await expect( + this.panel.getByRole('button', { name: STOP_LABEL }) + ).toHaveCount(0) + } + + /** + * The agent's workflow document as rendered on the canvas: every node the + * host doc owns, with its slot connectivity. Scoped to the doc's node ids + * because the tab the agent opens starts from the default template, whose + * nodes sit next to the follower's and would pin that template here. + */ + async graphSnapshot(): Promise { + const docNodeIds = this.host.nodeIds() + const snapshot = await this.page + .locator('[data-node-id]') + .evaluateAll((nodes) => + nodes.map((node) => { + const connected = (selector: string) => + Array.from(node.querySelectorAll(selector)).map((slot) => + slot.classList.contains('lg-slot--connected') + ) + return { + id: node.getAttribute('data-node-id') ?? '', + title: + node + .querySelector('[data-testid="node-title"]') + ?.textContent?.trim() ?? '', + inputs: connected('.lg-slot--input'), + outputs: connected('.lg-slot--output') + } + }) + ) + return snapshot + .filter((node) => docNodeIds.has(node.id)) + .sort((a, b) => Number(a.id) - Number(b.id)) + } + + private async mockAgentApi(): Promise { + const { page } = this + await page.route('**/api/agent/threads', (route) => + route.fulfill(jsonRoute({ threads: [] })) + ) + await page.route('**/api/agent/threads/*/messages', (route) => { + const request = route.request() + if (request.method() === 'POST') { + this.postedMessages.push(request.postData() ?? '') + return route.fulfill({ + status: 202, + contentType: 'application/json', + body: JSON.stringify(this.ack) + }) + } + const history: AgentMessages = [] + return route.fulfill(jsonRoute(history)) + }) + await page.route('**/api/agent/threads/*/messages/*/cancel', (route) => { + const cancelled: AgentCancelAccepted = { status: 'cancelling' } + return route.fulfill(jsonRoute(cancelled)) + }) + await page.route('**/api/workflows**', (route) => + route.fulfill( + jsonRoute({ + data: [], + pagination: { has_more: false, limit: 100, offset: 0, total: 0 } + }) + ) + ) + } + + private stampTurn(event: RecordedWsEvent): AgentWsEvent { + const stamped = { + type: event.type, + data: { ...event.data, message_id: TURN_ID, thread_id: THREAD_ID } + } + const parsed = parseAgentWsEvent(stamped) + if (!parsed.success) + throw new Error( + `recorded ${event.type} frame is not a valid agent event: ${parsed.error.message}` + ) + return parsed.data + } + + private send(frame: AgentWsEvent | DocFrame): void { + if (!this.socket) throw new Error('the app has not opened /ws yet') + this.socket.send(JSON.stringify(frame)) + } + + private onClientFrame(raw: string | Buffer): void { + const frame: unknown = JSON.parse(raw.toString()) + if (typeof frame !== 'object' || frame === null) return + const { type, data } = frame as { type?: unknown; data?: unknown } + if (type !== 'doc_subscribe' || typeof data !== 'object' || data === null) + return + const { workflow_id, state_vector_b64 } = data as { + workflow_id?: unknown + state_vector_b64?: unknown + } + if ( + workflow_id !== this.conversation.workflow.id || + typeof state_vector_b64 !== 'string' + ) + return + this.send(this.host.subscribed()) + this.send(this.host.catchUp(state_vector_b64)) + this.resolveSubscribed?.() + } + + private async waitForSubscribe(): Promise { + let timer: ReturnType | undefined + const timeout = new Promise((_, reject) => { + timer = setTimeout( + () => + reject( + new Error( + 'the follower never subscribed to the conversation workflow; graph_ops need an agent_active_tab (or a bound tab) first' + ) + ), + SUBSCRIBE_TIMEOUT + ) + }) + try { + await Promise.race([this.subscribed, timeout]) + } finally { + clearTimeout(timer) + } + } +} + +interface ConversationFixtures { + /** Case id of the conversation under `fixtures/data/agent/conversations`. */ + conversationCase: string + agentConversation: AgentConversationHarness +} + +export const agentConversationTest = agentTest.extend({ + conversationCase: ['', { option: true }], + agentConversation: async ( + { page, agentFlagEnabled, conversationCase }, + use + ) => { + if (conversationCase.length === 0) + throw new Error('test.use({ conversationCase }) names the conversation') + const harness = new AgentConversationHarness( + page, + loadAgentConversation(conversationCase) + ) + await harness.boot(agentFlagEnabled) + await use(harness) + } +}) diff --git a/browser_tests/fixtures/agentPanelFixture.ts b/browser_tests/fixtures/agentPanelFixture.ts index 033c519adb7..4ee0352f537 100644 --- a/browser_tests/fixtures/agentPanelFixture.ts +++ b/browser_tests/fixtures/agentPanelFixture.ts @@ -23,15 +23,21 @@ function agentFeatures(agentFlag: boolean): RemoteConfig { } } +interface BootAgentAppOptions { + /** Extra `/api/settings` entries layered over the panel defaults. */ + settings?: Record +} + async function mockAgentBoot( page: Page, - { agentFlag }: { agentFlag: boolean } + { agentFlag, settings }: { agentFlag: boolean } & BootAgentAppOptions ): Promise { await mockCloudBoot(page, { features: agentFeatures(agentFlag), settings: { 'Comfy.TutorialCompleted': true, - 'Comfy.RightSidePanel.ShowErrorsTab': false + 'Comfy.RightSidePanel.ShowErrorsTab': false, + ...settings } }) await mockBilling(page) @@ -65,14 +71,15 @@ export const agentTest = cloudAppFixture.extend({ export async function bootAgentApp( page: Page, - agentFlag: boolean + agentFlag: boolean, + options: BootAgentAppOptions = {} ): Promise { // The shell's onboarding coach is a modal; pre-seed its dismissal so the // panel chrome is interactable, as the canonical agent suite does. await page.addInitScript(() => { localStorage.setItem('Comfy.AgentPanel.onboarded', 'true') }) - await mockAgentBoot(page, { agentFlag }) + await mockAgentBoot(page, { agentFlag, ...options }) await bootCloud(page) await page.goto(APP_URL) await waitForCloudApp(page) diff --git a/browser_tests/fixtures/data/agent/agentConversation.ts b/browser_tests/fixtures/data/agent/agentConversation.ts new file mode 100644 index 00000000000..2a948ab5874 --- /dev/null +++ b/browser_tests/fixtures/data/agent/agentConversation.ts @@ -0,0 +1,81 @@ +import { readFileSync } from 'node:fs' +import { fileURLToPath } from 'node:url' + +import { FROZEN_OPS } from '@comfyorg/comfy-multi-player' +import type { WidgetCatalog, WorkflowJSON } from '@comfyorg/comfy-multi-player' +import { z } from 'zod' + +import type { GraphOperation } from '@/workbench/extensions/agent/crdt/graphOperations' + +function isRecord(value: unknown): value is Record { + return typeof value === 'object' && value !== null && !Array.isArray(value) +} + +/** + * A realtime agent frame as recorded, minus the turn identity + * (`message_id` / `thread_id`): the replay stamps those from the ack it + * minted, then validates the result against `zAgentWsEvent` before sending. + */ +const zRecordedWsEvent = z.object({ + type: z.string(), + data: z.record(z.string(), z.unknown()) +}) +export type RecordedWsEvent = z.infer + +// Payload shapes are the pinned applier's contract (it rejects a malformed +// op at replay time); the fixture only pins the vocabulary. +const zGraphOperation = z.custom( + (value) => + isRecord(value) && + typeof value.op === 'string' && + (FROZEN_OPS as readonly string[]).includes(value.op) +) + +const zWorkflowJson = z.custom( + (value) => + isRecord(value) && Array.isArray(value.nodes) && Array.isArray(value.links) +) + +const zWidgetCatalog = z.custom( + (value) => isRecord(value) && isRecord(value.types) +) + +const zResponseEntry = z.discriminatedUnion('kind', [ + z.object({ kind: z.literal('event'), event: zRecordedWsEvent }), + z.object({ + kind: z.literal('graph_ops'), + ops: z.array(zGraphOperation).min(1) + }) +]) + +/** + * One user prompt and the ordered agent response it produced: chat frames + * (`event`) interleaved with the semantic graph operations (`graph_ops`) the + * doc host folds into the workflow document. + */ +const zAgentConversation = z.object({ + schema_version: z.literal('agent-conversation.v1'), + source: z.object({ + repo: z.string(), + suite: z.string(), + case_id: z.string(), + response_side: z.enum(['recorded', 'synthesized']), + note: z.string().optional() + }), + workflow: z.object({ + id: z.string().uuid(), + name: z.string().min(1), + catalog: zWidgetCatalog, + seed: zWorkflowJson + }), + request: z.object({ content: z.string().min(1) }), + response: z.array(zResponseEntry).min(1) +}) +export type AgentConversation = z.infer + +export function loadAgentConversation(caseId: string): AgentConversation { + const file = fileURLToPath( + new URL(`./conversations/${caseId}.json`, import.meta.url) + ) + return zAgentConversation.parse(JSON.parse(readFileSync(file, 'utf-8'))) +} diff --git a/browser_tests/fixtures/data/agent/conversations/agent-l4-zimage-string-node-prompt.json b/browser_tests/fixtures/data/agent/conversations/agent-l4-zimage-string-node-prompt.json new file mode 100644 index 00000000000..afad82463e7 --- /dev/null +++ b/browser_tests/fixtures/data/agent/conversations/agent-l4-zimage-string-node-prompt.json @@ -0,0 +1,277 @@ +{ + "schema_version": "agent-conversation.v1", + "source": { + "repo": "Comfy-Org/evals", + "suite": "agent", + "case_id": "agent-l4-zimage-string-node-prompt", + "response_side": "synthesized", + "note": "Response synthesized from the case's expected outcome (string node added, text set, STRING wired into the prompt input). The eval seed is a Z-Image subgraph; this replay uses a flat text-to-image seed so the wiring lands on a plain CLIPTextEncode. The case's trailing run is not replayed." + }, + "workflow": { + "id": "6f1c2c1e-3b1c-4c88-9d9c-0d6e9b8e1a01", + "name": "Text to image", + "catalog": { + "types": { + "CheckpointLoaderSimple": { "widget_order": ["ckpt_name"] }, + "CLIPTextEncode": { "widget_order": ["text"] }, + "KSampler": { + "widget_order": [ + "seed", + "control_after_generate", + "steps", + "cfg", + "sampler_name", + "scheduler", + "denoise" + ] + }, + "VAEDecode": { "widget_order": [] }, + "SaveImage": { "widget_order": ["filename_prefix"] }, + "PrimitiveStringMultiline": { "widget_order": ["value"] } + } + }, + "seed": { + "nodes": [ + { + "id": 4, + "type": "CheckpointLoaderSimple", + "pos": [0, 0], + "size": [315, 98], + "inputs": [], + "outputs": [ + { "name": "MODEL", "type": "MODEL", "links": [3] }, + { "name": "CLIP", "type": "CLIP", "links": [1] }, + { "name": "VAE", "type": "VAE", "links": [5] } + ], + "widgets_values": ["sd_xl_base_1.0.safetensors"] + }, + { + "id": 6, + "type": "CLIPTextEncode", + "title": "Positive prompt", + "pos": [400, 0], + "size": [400, 200], + "inputs": [ + { "name": "clip", "type": "CLIP", "link": 1 }, + { + "name": "text", + "type": "STRING", + "widget": { "name": "text" }, + "link": null + } + ], + "outputs": [ + { "name": "CONDITIONING", "type": "CONDITIONING", "links": [2] } + ], + "widgets_values": ["a photo of a pier"] + }, + { + "id": 3, + "type": "KSampler", + "pos": [850, 0], + "size": [315, 262], + "inputs": [ + { "name": "model", "type": "MODEL", "link": 3 }, + { "name": "positive", "type": "CONDITIONING", "link": 2 }, + { "name": "negative", "type": "CONDITIONING", "link": null }, + { "name": "latent_image", "type": "LATENT", "link": null } + ], + "outputs": [{ "name": "LATENT", "type": "LATENT", "links": [4] }], + "widgets_values": [0, "randomize", 20, 7, "euler", "normal", 1] + }, + { + "id": 8, + "type": "VAEDecode", + "pos": [1200, 0], + "size": [210, 46], + "inputs": [ + { "name": "samples", "type": "LATENT", "link": 4 }, + { "name": "vae", "type": "VAE", "link": 5 } + ], + "outputs": [{ "name": "IMAGE", "type": "IMAGE", "links": [6] }], + "widgets_values": [] + }, + { + "id": 9, + "type": "SaveImage", + "pos": [1450, 0], + "size": [315, 270], + "inputs": [{ "name": "images", "type": "IMAGE", "link": 6 }], + "outputs": [], + "widgets_values": ["ComfyUI"] + } + ], + "links": [ + [1, 4, 1, 6, 0, "CLIP"], + [2, 6, 0, 3, 1, "CONDITIONING"], + [3, 4, 0, 3, 0, "MODEL"], + [4, 3, 0, 8, 0, "LATENT"], + [5, 4, 2, 8, 1, "VAE"], + [6, 8, 0, 9, 0, "IMAGE"] + ] + } + }, + "request": { + "content": "Add a text node that feeds the prompt of this workflow, put 'a red bicycle on a pier at dusk' in it, and run." + }, + "response": [ + { + "kind": "event", + "event": { + "type": "agent_thinking", + "data": { + "delta": "I'll add a multiline string node, set its text, and wire its STRING output into the positive prompt's text input." + } + } + }, + { + "kind": "event", + "event": { + "type": "agent_active_tab", + "data": { + "workflow_id": "6f1c2c1e-3b1c-4c88-9d9c-0d6e9b8e1a01", + "name": "Text to image" + } + } + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "tool_call_id": "call-add-string-node", + "tool_name": "add_node", + "status": "running" + } + } + }, + { + "kind": "graph_ops", + "ops": [ + { + "op": "add_node", + "node_id": 10, + "class_type": "PrimitiveStringMultiline", + "pos": [0, 300], + "node": { + "id": 10, + "type": "PrimitiveStringMultiline", + "title": "Prompt text", + "pos": [0, 300], + "size": [400, 200], + "inputs": [], + "outputs": [{ "name": "STRING", "type": "STRING", "links": [] }], + "widgets_values": [""] + } + } + ] + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "tool_call_id": "call-add-string-node", + "tool_name": "add_node", + "status": "success", + "duration_ms": 400 + } + } + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "tool_call_id": "call-set-prompt-text", + "tool_name": "set_widget", + "status": "running" + } + } + }, + { + "kind": "graph_ops", + "ops": [ + { + "op": "set_widget", + "node_id": 10, + "widget": "value", + "value": "a red bicycle on a pier at dusk" + } + ] + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "tool_call_id": "call-set-prompt-text", + "tool_name": "set_widget", + "status": "success", + "duration_ms": 200 + } + } + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "tool_call_id": "call-connect-prompt", + "tool_name": "connect", + "status": "running" + } + } + }, + { + "kind": "graph_ops", + "ops": [ + { + "op": "connect", + "link_id": 7, + "from_node": 10, + "from_slot": 0, + "to_node": 6, + "to_slot": 1, + "link_type": "STRING" + } + ] + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "tool_call_id": "call-connect-prompt", + "tool_name": "connect", + "status": "success", + "duration_ms": 300 + } + } + }, + { + "kind": "event", + "event": { + "type": "agent_message_delta", + "data": { + "delta": "Added a **Prompt text** node with *a red bicycle on a pier at dusk* and wired its STRING output into the positive prompt, so the prompt is now driven by that node. Say the word and I'll run it." + } + } + }, + { + "kind": "event", + "event": { + "type": "agent_message_done", + "data": { + "usage": { + "input_tokens": 5120, + "output_tokens": 310, + "total_tokens": 5430, + "cache_read_input_tokens": 0, + "cache_creation_input_tokens": 0 + } + } + } + } + ] +} diff --git a/browser_tests/fixtures/data/agent/conversations/agent-workflow-editing-05.json b/browser_tests/fixtures/data/agent/conversations/agent-workflow-editing-05.json new file mode 100644 index 00000000000..4cdeb940f97 --- /dev/null +++ b/browser_tests/fixtures/data/agent/conversations/agent-workflow-editing-05.json @@ -0,0 +1,277 @@ +{ + "schema_version": "agent-conversation.v1", + "source": { + "repo": "Comfy-Org/evals", + "suite": "agent", + "case_id": "agent-workflow-editing-05", + "response_side": "synthesized", + "note": "Response synthesized from the case's expected outcome: an ImageStitch node shows the generated output next to the input image. The eval case ships no seed, so a small image-to-image seed stands in." + }, + "workflow": { + "id": "2b7d9a34-5c1e-4f0a-8e6b-7d2f3a9c1b45", + "name": "Image edit", + "catalog": { + "types": { + "LoadImage": { "widget_order": ["image", "upload"] }, + "VAEEncode": { "widget_order": [] }, + "KSampler": { + "widget_order": [ + "seed", + "control_after_generate", + "steps", + "cfg", + "sampler_name", + "scheduler", + "denoise" + ] + }, + "VAEDecode": { "widget_order": [] }, + "SaveImage": { "widget_order": ["filename_prefix"] }, + "ImageStitch": { + "widget_order": [ + "direction", + "match_image_size", + "spacing_width", + "spacing_color" + ] + }, + "PreviewImage": { "widget_order": [] } + } + }, + "seed": { + "nodes": [ + { + "id": 1, + "type": "LoadImage", + "pos": [0, 0], + "size": [315, 314], + "inputs": [], + "outputs": [ + { "name": "IMAGE", "type": "IMAGE", "links": [1] }, + { "name": "MASK", "type": "MASK", "links": [] } + ], + "widgets_values": ["example.png", "image"] + }, + { + "id": 2, + "type": "VAEEncode", + "pos": [400, 0], + "size": [210, 46], + "inputs": [ + { "name": "pixels", "type": "IMAGE", "link": 1 }, + { "name": "vae", "type": "VAE", "link": null } + ], + "outputs": [{ "name": "LATENT", "type": "LATENT", "links": [2] }], + "widgets_values": [] + }, + { + "id": 3, + "type": "KSampler", + "pos": [700, 0], + "size": [315, 262], + "inputs": [ + { "name": "model", "type": "MODEL", "link": null }, + { "name": "positive", "type": "CONDITIONING", "link": null }, + { "name": "negative", "type": "CONDITIONING", "link": null }, + { "name": "latent_image", "type": "LATENT", "link": 2 } + ], + "outputs": [{ "name": "LATENT", "type": "LATENT", "links": [3] }], + "widgets_values": [0, "randomize", 20, 7, "euler", "normal", 0.6] + }, + { + "id": 8, + "type": "VAEDecode", + "pos": [1100, 0], + "size": [210, 46], + "inputs": [ + { "name": "samples", "type": "LATENT", "link": 3 }, + { "name": "vae", "type": "VAE", "link": null } + ], + "outputs": [{ "name": "IMAGE", "type": "IMAGE", "links": [4] }], + "widgets_values": [] + }, + { + "id": 9, + "type": "SaveImage", + "pos": [1400, 0], + "size": [315, 270], + "inputs": [{ "name": "images", "type": "IMAGE", "link": 4 }], + "outputs": [], + "widgets_values": ["ComfyUI"] + } + ], + "links": [ + [1, 1, 0, 2, 0, "IMAGE"], + [2, 2, 0, 3, 3, "LATENT"], + [3, 3, 0, 8, 0, "LATENT"], + [4, 8, 0, 9, 0, "IMAGE"] + ] + } + }, + "request": { + "content": "now use a stitch images node to show the output next to the input" + }, + "response": [ + { + "kind": "event", + "event": { + "type": "agent_thinking", + "data": { + "delta": "I'll stitch the loaded input and the decoded output side by side and preview the result." + } + } + }, + { + "kind": "event", + "event": { + "type": "agent_active_tab", + "data": { + "workflow_id": "2b7d9a34-5c1e-4f0a-8e6b-7d2f3a9c1b45", + "name": "Image edit" + } + } + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "tool_call_id": "call-add-stitch", + "tool_name": "add_node", + "status": "running" + } + } + }, + { + "kind": "graph_ops", + "ops": [ + { + "op": "add_node", + "node_id": 12, + "class_type": "ImageStitch", + "pos": [1400, 350], + "node": { + "id": 12, + "type": "ImageStitch", + "title": "Input vs output", + "pos": [1400, 350], + "size": [315, 150], + "inputs": [ + { "name": "image1", "type": "IMAGE", "link": null }, + { "name": "image2", "type": "IMAGE", "link": null } + ], + "outputs": [{ "name": "IMAGE", "type": "IMAGE", "links": [] }], + "widgets_values": ["right", true, 0, "white"] + } + }, + { + "op": "add_node", + "node_id": 13, + "class_type": "PreviewImage", + "pos": [1800, 350], + "node": { + "id": 13, + "type": "PreviewImage", + "title": "Side by side", + "pos": [1800, 350], + "size": [315, 270], + "inputs": [{ "name": "images", "type": "IMAGE", "link": null }], + "outputs": [], + "widgets_values": [] + } + } + ] + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "tool_call_id": "call-add-stitch", + "tool_name": "add_node", + "status": "success", + "duration_ms": 500 + } + } + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "tool_call_id": "call-wire-stitch", + "tool_name": "connect", + "status": "running" + } + } + }, + { + "kind": "graph_ops", + "ops": [ + { + "op": "connect", + "link_id": 5, + "from_node": 1, + "from_slot": 0, + "to_node": 12, + "to_slot": 0, + "link_type": "IMAGE" + }, + { + "op": "connect", + "link_id": 6, + "from_node": 8, + "from_slot": 0, + "to_node": 12, + "to_slot": 1, + "link_type": "IMAGE" + }, + { + "op": "connect", + "link_id": 7, + "from_node": 12, + "from_slot": 0, + "to_node": 13, + "to_slot": 0, + "link_type": "IMAGE" + } + ] + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "tool_call_id": "call-wire-stitch", + "tool_name": "connect", + "status": "success", + "duration_ms": 700 + } + } + }, + { + "kind": "event", + "event": { + "type": "agent_message_delta", + "data": { + "delta": "Done. An **Image Stitch** node now takes the loaded input on the left and the decoded output on the right, and a preview node shows the pair. Your save node is untouched." + } + } + }, + { + "kind": "event", + "event": { + "type": "agent_message_done", + "data": { + "usage": { + "input_tokens": 6010, + "output_tokens": 280, + "total_tokens": 6290, + "cache_read_input_tokens": 0, + "cache_creation_input_tokens": 0 + } + } + } + } + ] +} diff --git a/browser_tests/tests/agent/agentConversationReplay.spec.ts b/browser_tests/tests/agent/agentConversationReplay.spec.ts new file mode 100644 index 00000000000..235ec38448a --- /dev/null +++ b/browser_tests/tests/agent/agentConversationReplay.spec.ts @@ -0,0 +1,137 @@ +import { expect } from '@playwright/test' + +import { agentConversationTest as test } from '@e2e/fixtures/agentConversationFixture' + +test.describe('Agent conversation replay', { tag: '@cloud' }, () => { + test.describe('evals agent-l4-zimage-string-node-prompt', () => { + test.use({ conversationCase: 'agent-l4-zimage-string-node-prompt' }) + + test('adds a string node, sets its text, and wires it into the prompt', async ({ + agentConversation + }) => { + test.setTimeout(45_000) + const { panel } = agentConversation + + await agentConversation.sendPrompt() + await agentConversation.replayResponse() + await agentConversation.waitForTurnComplete() + + const toolGroup = panel.getByRole('button', { + name: 'Ran 3 tool calls for 0.9 seconds' + }) + await expect(toolGroup).toBeVisible() + await expect(toolGroup).toHaveAttribute('aria-expanded', 'false') + await toolGroup.click() + const toolRows = panel.getByRole('listitem') + await expect(toolRows).toHaveCount(3) + await expect(toolRows.filter({ hasText: 'Add node' })).toBeVisible() + await expect(toolRows.filter({ hasText: 'Set widget' })).toBeVisible() + await expect(toolRows.filter({ hasText: 'Connect' })).toBeVisible() + + await expect( + panel.getByRole('button', { name: 'Open Text to image' }) + ).toBeVisible() + await expect( + panel.locator('strong', { hasText: 'Prompt text' }) + ).toBeVisible() + await expect(panel.getByTestId('agent-crdt-status')).toContainText( + 'connected' + ) + await expect(panel.getByTestId('agent-crdt-status')).toContainText( + '4 updates' + ) + + await expect + .poll(() => agentConversation.graphSnapshot()) + .toEqual([ + { + id: '3', + title: 'KSampler', + inputs: [true, true, false, false], + outputs: [true] + }, + { + id: '4', + title: 'CheckpointLoaderSimple', + inputs: [], + outputs: [true, true, true] + }, + // The wired `text` input is widget-backed and renders as a widget, + // not a slot row; the link shows on the string node's output. + { + id: '6', + title: 'Positive prompt', + inputs: [true], + outputs: [true] + }, + { + id: '8', + title: 'VAEDecode', + inputs: [true, true], + outputs: [true] + }, + { id: '9', title: 'SaveImage', inputs: [true], outputs: [] }, + { id: '10', title: 'Prompt text', inputs: [], outputs: [true] } + ]) + }) + }) + + test.describe('evals agent-workflow-editing-05', () => { + test.use({ conversationCase: 'agent-workflow-editing-05' }) + + test('stitches the input next to the output and previews the pair', async ({ + agentConversation + }) => { + test.setTimeout(45_000) + const { panel } = agentConversation + + await agentConversation.sendPrompt() + await agentConversation.replayResponse() + await agentConversation.waitForTurnComplete() + + const toolGroup = panel.getByRole('button', { + name: 'Ran 2 tool calls for 1.2 seconds' + }) + await expect(toolGroup).toBeVisible() + await expect(toolGroup).toHaveAttribute('aria-expanded', 'false') + await expect( + panel.locator('strong', { hasText: 'Image Stitch' }) + ).toBeVisible() + await expect(panel.getByTestId('agent-crdt-status')).toContainText( + '3 updates' + ) + + await expect + .poll(() => agentConversation.graphSnapshot()) + .toEqual([ + { id: '1', title: 'LoadImage', inputs: [], outputs: [true, false] }, + { + id: '2', + title: 'VAEEncode', + inputs: [true, false], + outputs: [true] + }, + { + id: '3', + title: 'KSampler', + inputs: [false, false, false, true], + outputs: [true] + }, + { + id: '8', + title: 'VAEDecode', + inputs: [true, false], + outputs: [true] + }, + { id: '9', title: 'SaveImage', inputs: [true], outputs: [] }, + { + id: '12', + title: 'Input vs output', + inputs: [true, true], + outputs: [true] + }, + { id: '13', title: 'Side by side', inputs: [true], outputs: [] } + ]) + }) + }) +}) From 73220d5497baa6ef22dcd070d12380f2f37b002c Mon Sep 17 00:00:00 2001 From: cheap-drain Date: Wed, 2 Sep 2026 12:49:59 +0000 Subject: [PATCH 02/52] fix(agent): drop unused export flagged by knip AgentConversationHarness is only constructed inside its own file (the agentConversationTest fixture); the export served no external consumer and knip flagged it as an unused export. --- browser_tests/fixtures/agentConversationFixture.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/browser_tests/fixtures/agentConversationFixture.ts b/browser_tests/fixtures/agentConversationFixture.ts index 31ba17592f6..7b548a3928b 100644 --- a/browser_tests/fixtures/agentConversationFixture.ts +++ b/browser_tests/fixtures/agentConversationFixture.ts @@ -143,7 +143,7 @@ interface GraphNodeSnapshot { * chat frames plus doc-host `doc_update` frames the CRDT follower applies to * the canvas. */ -export class AgentConversationHarness { +class AgentConversationHarness { readonly postedMessages: string[] = [] readonly panel: Locator readonly ack: AgentTurnAccepted From 82842a1d8a9686d486efc100a5d0abdceecd1bad Mon Sep 17 00:00:00 2001 From: Christian Byrne Date: Wed, 2 Sep 2026 06:28:34 -0700 Subject: [PATCH 03/52] fix(agent): mint the agent tab from blankGraph, not the default template agent_active_tab for an unbound workflow called createTemporary(name) with no data, which seeds defaultGraph. The follower then reconciled the doc onto template nodes with the same ids (3, 8, 9); reconcileNode keeps any link it does not displace, so template link 8 (node 4 VAE to node 8 vae) survived and VAEDecode rendered [true, true]. The replay spec for agent-workflow-editing-05 caught this in CI. Pass blankGraph so the tab really is empty, as the surrounding comment and the PR describe. The "blank named tab" unit test now asserts the minted tab holds no nodes or links (fails on the old code). The fixture comment on graphSnapshot now describes the collision hazard instead of treating the template as expected. --- browser_tests/fixtures/agentConversationFixture.ts | 8 +++++--- src/workbench/extensions/agent/AgentPanelRoot.test.ts | 3 +++ src/workbench/extensions/agent/AgentPanelRoot.vue | 9 ++++++++- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/browser_tests/fixtures/agentConversationFixture.ts b/browser_tests/fixtures/agentConversationFixture.ts index 7b548a3928b..606634517c4 100644 --- a/browser_tests/fixtures/agentConversationFixture.ts +++ b/browser_tests/fixtures/agentConversationFixture.ts @@ -231,9 +231,11 @@ class AgentConversationHarness { /** * The agent's workflow document as rendered on the canvas: every node the - * host doc owns, with its slot connectivity. Scoped to the doc's node ids - * because the tab the agent opens starts from the default template, whose - * nodes sit next to the follower's and would pin that template here. + * host doc owns, with its slot connectivity. The tab the agent opens is + * expected to be blank (AgentPanelRoot mints it from `blankGraph`); the + * doc-id filter is defensive, so a stray template node cannot pin the + * template here. Colliding ids are the real hazard: a template link into a + * doc node survives the follower's reconcile and shows up as connectivity. */ async graphSnapshot(): Promise { const docNodeIds = this.host.nodeIds() diff --git a/src/workbench/extensions/agent/AgentPanelRoot.test.ts b/src/workbench/extensions/agent/AgentPanelRoot.test.ts index 090f81832ad..1b9374100b6 100644 --- a/src/workbench/extensions/agent/AgentPanelRoot.test.ts +++ b/src/workbench/extensions/agent/AgentPanelRoot.test.ts @@ -2400,6 +2400,9 @@ describe('AgentPanelRoot workflow binding', () => { ) const minted = hostStores.workflow.tabs.get('workflows/Video test.json') expect(minted?.filename).toBe('Video test') + // Blank, not the default template: the follower reconciles onto whatever + // the tab holds and keeps template links it does not displace. + expect(minted?.activeState).toMatchObject({ nodes: [], links: [] }) // The host minted the doc server-side; the follower fills the canvas. // Nothing loads, saves, or adopts here. expect(workflowService.saveWorkflowAs).not.toHaveBeenCalled() diff --git a/src/workbench/extensions/agent/AgentPanelRoot.vue b/src/workbench/extensions/agent/AgentPanelRoot.vue index 6dd86bb51ba..fbc35854405 100644 --- a/src/workbench/extensions/agent/AgentPanelRoot.vue +++ b/src/workbench/extensions/agent/AgentPanelRoot.vue @@ -47,6 +47,7 @@ import { ACTOR_CONFIG } from '@/renderer/core/layout/constants' import { LayoutSource } from '@/renderer/core/layout/types' import { api } from '@/scripts/api' import { app } from '@/scripts/app' +import { blankGraph } from '@/scripts/defaultGraph' import { useAgentNodeSelectionStore } from '@/stores/agentNodeSelectionStore' import { useExecutionErrorStore } from '@/stores/executionErrorStore' import { useWorkflowTabActivityStore } from '@/stores/workflowTabActivityStore' @@ -541,6 +542,9 @@ async function onAgentActiveTab( // A new agent workflow opens as an EMPTY tab: the host minted its doc // server-side (seed-at-bind), and the follower fills the canvas through // the ordinary subscribe catch-up - no snapshot fetch, no draft apply. + // `createTemporary` without data seeds the default template, whose nodes + // share ids with typical agent docs; the follower's reconcile keeps any + // template link it does not displace, so the tab must really be blank. const creatingStartedAt = Date.now() tabActivity.setCreating(true) const remainingCreatingTime = @@ -548,7 +552,10 @@ async function onAgentActiveTab( if (remainingCreatingTime > 0) await new Promise((resolve) => setTimeout(resolve, remainingCreatingTime)) if (stale()) return - const tab = workflowStore.createTemporary(agentTabFilename(data.name)) + const tab = workflowStore.createTemporary( + agentTabFilename(data.name), + blankGraph + ) tabActivity.setCreating(false) await workflowService.openWorkflow(tab) if (stale()) { From 9d898c5051a45d4788b6ff1ae67babaad6a1c4e9 Mon Sep 17 00:00:00 2001 From: Nathaniel Parson Koroso Date: Thu, 3 Sep 2026 09:37:26 -0700 Subject: [PATCH 04/52] test(agent): replay recorded agent conversations turn by turn A recorded conversation is a thread of turns (agent-conversation.v2) replayed onto the real panel and canvas: HTTP and the socket are data, the doc host is the real library in-process, and every expectation is derived from the fixture and the applier's graph. Covers recorded-gap timing, a human edit while the agent is still adding nodes, and the replay-coverage convention for agent bug fixes. --- browser_tests/README.md | 30 ++ .../fixtures/agentConversationFixture.ts | 379 +++++++++++++++--- .../fixtures/data/agent/agentConversation.ts | 117 ++++-- .../agentConversationConcurrentEdits.spec.ts | 64 +++ .../agent/agentConversationReplay.spec.ts | 200 ++++----- .../agent/agentConversationTiming.spec.ts | 33 ++ .../extensions/agent/AgentPanelRoot.test.ts | 3 +- .../extensions/agent/AgentPanelRoot.vue | 7 +- 8 files changed, 612 insertions(+), 221 deletions(-) create mode 100644 browser_tests/tests/agent/agentConversationConcurrentEdits.spec.ts create mode 100644 browser_tests/tests/agent/agentConversationTiming.spec.ts diff --git a/browser_tests/README.md b/browser_tests/README.md index 14080d2a449..85c6b4524d0 100644 --- a/browser_tests/README.md +++ b/browser_tests/README.md @@ -612,6 +612,36 @@ test.afterEach(async ({ comfyPage }) => { `debugShowCanvasOverlay()`, `debugGetCanvasDataURL()` are for local debugging only. Never commit them. +## Replay coverage for agent bug fixes + +When a fix changes how the agent's turns affect the app (graph edits, +CRDT frames, panel state), add a conversation replay case alongside the +fix so the bug stays fixed: + +1. **Capture the conversation.** Reproduce the bug's turn against the + cloud agent run locally in its non-standalone mode, with Postgres, + Redis and the doc host beside it: that is the only mode that writes + the per-op audit rows (`agent_tool_calls` parent and child rows) the + exporter reads. The same agent in standalone mode + (SQLite, no doc host) never writes them, so it can only + yield text-only or tool-error turns. Export the turn's rows and + convert them to a conversation JSON under + `browser_tests/fixtures/data/agent/conversations/` with + `scripts/agentConversationCapture.ts`, marking + `response_side: 'recorded'` (see `fixtures/data/agent/README.md` for + the capture format and backend query). Never write `graph_ops` by + hand and never relabel a synthesized response as recorded. +2. **Add the replay case.** Drive the fixture through the conversation + replay fixture (`agentConversationFixture`), asserting the + canvas-observable outcome the bug corrupted (graph end-state or + panel state - not mock call counts, not model text). +3. **Prove it bites.** Before merging, run the case once against the + fix's parent commit (red) and once at the fix (green); paste both + run lines in the PR description. A replay case that never went red + against the bug does not count as regression coverage. + +Name the case after the behavior it protects (`agent-.json`, with the fix PR cited in the spec header and the fixture's `source.note`). The exporter writes the provenance the replay keeps: `source.capture` (thread and message ids) and `source.note` (row ids and the raw capture hash), which is enough to re-export the recording. + ## Test Data & Typed API Mocks Mock data in `fixtures/data/` exports **typed** objects that conform to diff --git a/browser_tests/fixtures/agentConversationFixture.ts b/browser_tests/fixtures/agentConversationFixture.ts index 606634517c4..a70c3826161 100644 --- a/browser_tests/fixtures/agentConversationFixture.ts +++ b/browser_tests/fixtures/agentConversationFixture.ts @@ -2,7 +2,11 @@ import type { Locator, Page, WebSocketRoute } from '@playwright/test' import { expect } from '@playwright/test' import { applyOps, mint, readGraph } from '@comfyorg/comfy-multi-player' -import type { WidgetCatalog, WorkflowJSON } from '@comfyorg/comfy-multi-player' +import type { + GraphSnapshot, + WidgetCatalog, + WorkflowJSON +} from '@comfyorg/comfy-multi-player' import * as Y from 'yjs' import enMessages from '@/locales/en/main.json' with { type: 'json' } @@ -11,7 +15,6 @@ import { mintWireOps } from '@/workbench/extensions/agent/crdt/opEnvelope' import type { AgentCancelAccepted, AgentMessages, - AgentTurnAccepted, AgentWsEvent } from '@/workbench/extensions/agent/schemas/agentApiSchema' import { parseAgentWsEvent } from '@/workbench/extensions/agent/schemas/agentApiSchema' @@ -19,13 +22,21 @@ import { parseAgentWsEvent } from '@/workbench/extensions/agent/schemas/agentApi import { agentTest, bootAgentApp } from '@e2e/fixtures/agentPanelFixture' import type { AgentConversation, + AgentConversationTurn, RecordedWsEvent } from '@e2e/fixtures/data/agent/agentConversation' import { loadAgentConversation } from '@e2e/fixtures/data/agent/agentConversation' + +import { compareNodeIds, toNodeId } from '@/types/nodeId' +import { knownTool } from '@/workbench/extensions/agent/services/agent/agentToolGlyph' import { jsonRoute } from '@e2e/fixtures/utils/jsonRoute' const THREAD_ID = 'e9a2f3d1-7c44-4b2e-9a01-5f6d8c7b3a10' -const TURN_ID = '0c5b1e77-2d4a-4f9e-8b63-1a2c3d4e5f60' +// One synthetic message id per turn; the recorded ids never reach the page. +const turnId = (turn: number): string => + `0c5b1e77-2d4a-4f9e-8b63-1a2c3d4e5${turn.toString(16).padStart(3, '0')}` +// useAgentSession.ts keeps THREAD_STORAGE_KEY module-private. +const THREAD_STORAGE_KEY = 'Comfy.Agent.ThreadId' const SOCKET_SID = '7d1f2e3a-4b5c-4d6e-8f90-1a2b3c4d5e6f' const HOST_ACTOR = 'agent:comfy' const DOC_PROTOCOL_VERSION = 1 @@ -37,7 +48,7 @@ const SEND_LABEL = enMessages.agent.send const STOP_LABEL = enMessages.agent.stop interface DocFrame { - type: 'doc_subscribed' | 'doc_update' + type: 'doc_subscribed' | 'doc_update' | 'doc_ops_result' data: Record } @@ -49,12 +60,6 @@ function fromBase64(value: string): Uint8Array { return new Uint8Array(Buffer.from(value, 'base64')) } -/** - * The doc host's side of the CRDT channel, in-process: the seed workflow is - * minted with the same pinned applier the real host runs, each `graph_ops` - * entry is applied to it, and the resulting Yjs delta is what the follower - * receives as a `doc_update` frame. - */ class HostDoc { private readonly doc: Y.Doc private seq = 1 @@ -67,8 +72,8 @@ class HostDoc { this.doc = mint(seed, catalog) } - nodeIds(): Set { - return new Set(Object.keys(readGraph(this.doc).nodes)) + graph(): GraphSnapshot { + return readGraph(this.doc) } subscribed(): DocFrame { @@ -88,6 +93,21 @@ class HostDoc { return this.updateFrame(update, HOST_ACTOR, []) } + // The real host folds client batches into the same doc, so the expected graph must see them. + applyClient(ops: unknown[]): string[] { + const result = applyOps( + this.doc, + ops as Parameters[1], + this.catalog + ) + this.seq += 1 + return result.outcomes.flatMap((outcome, index) => + outcome.outcome === 'applied' + ? [String((ops[index] as { op_id?: unknown }).op_id ?? index)] + : [] + ) + } + apply(operations: GraphOperation[]): DocFrame { const before = Y.encodeStateVector(this.doc) const ops = mintWireOps(operations, { @@ -127,26 +147,51 @@ class HostDoc { } } +type NodeBody = { + id: number | string + type: string + title?: string + inputs?: Array<{ name: string }> + outputs?: Array<{ name: string }> +} + +interface RecordedToolCall { + name: string + ok: boolean +} + +interface RecordedWidgetValue { + nodeId: string + widget: string + value: string | number +} + +// The panel's row label: the known-tool table, else the humanized tool name (ToolCallCard.vue). +function toolRowLabel(name: string): string { + const known = knownTool(name)?.labelKey + const label = known + ? enMessages.agent[ + known.replace('agent.', '') as keyof typeof enMessages.agent + ] + : undefined + if (typeof label === 'string') return label + const spaced = name.replaceAll('_', ' ') + return spaced.charAt(0).toUpperCase() + spaced.slice(1) +} + interface GraphNodeSnapshot { id: string title: string - /** Connected state of each rendered input slot, in slot order. */ inputs: boolean[] - /** Connected state of each rendered output slot, in slot order. */ outputs: boolean[] } -/** - * Drives one recorded user prompt -> agent response exchange through the - * real agent panel: the composer posts the prompt, the mocked backend acks - * it, and the recorded response is replayed over the routed `/ws` socket as - * chat frames plus doc-host `doc_update` frames the CRDT follower applies to - * the canvas. - */ +// Runs one recorded prompt/response through the real panel over a routed /ws socket. class AgentConversationHarness { readonly postedMessages: string[] = [] + // Human-op minting is observable only on the client side of the socket. + readonly clientFrames: { type?: unknown; data?: unknown }[] = [] readonly panel: Locator - readonly ack: AgentTurnAccepted private readonly host: HostDoc private socket: WebSocketRoute | null = null @@ -157,24 +202,17 @@ class AgentConversationHarness { constructor( private readonly page: Page, - readonly conversation: AgentConversation + readonly conversation: AgentConversation, + readonly replayTiming: ReplayTiming ) { const { workflow } = conversation this.host = new HostDoc(workflow.id, workflow.seed, workflow.catalog) - this.ack = { - thread_id: THREAD_ID, - message_id: TURN_ID, - workflow_id: workflow.id - } this.panel = page.locator('#agent-panel-root') } async boot(agentFlag: boolean): Promise { await this.mockAgentApi() - // The app may reopen `/ws` (the connect awaits an auth token), and the - // follower only re-drives a pending subscribe on a `status` frame, which - // the real server sends on every connect. So every routed socket becomes - // the live one and gets that frame. + // The follower re-drives a pending subscribe only on a status frame, which every real connect sends. await this.page.routeWebSocket(/\/ws/, (socket) => { this.socket = socket socket.onMessage((raw) => this.onClientFrame(raw)) @@ -189,8 +227,7 @@ class AgentConversationHarness { ) }) await bootAgentApp(this.page, agentFlag, { - // Follower edits land in the ECS stores, which only the Vue node - // renderer projects onto the canvas. + // Only the Vue node renderer projects follower edits onto the canvas. settings: { 'Comfy.VueNodes.Enabled': true } }) @@ -198,28 +235,67 @@ class AgentConversationHarness { await expect(this.panel).toBeVisible({ timeout: PANEL_MOUNT_TIMEOUT }) } - async sendPrompt(): Promise { - const { content } = this.conversation.request + async sendPrompt(turn = 0): Promise { + const { content } = this.conversation.turns[turn].request const composer = this.panel.getByRole('textbox', { name: /^Describe ideas/ }) await composer.fill(content) await this.panel.getByRole('button', { name: SEND_LABEL }).click() - await expect.poll(() => this.postedMessages.length).toBeGreaterThan(0) - expect(this.postedMessages[0]).toContain(content) + await expect.poll(() => this.postedMessages.length).toBeGreaterThan(turn) + expect(this.postedMessages[turn]).toContain(content) + // Replay frames are dropped until the page has applied the ack's thread id. + await expect + .poll(() => + this.page.evaluate( + (key) => localStorage.getItem(key), + THREAD_STORAGE_KEY + ) + ) + .toBe(THREAD_ID) } - async replayResponse(): Promise { - for (const entry of this.conversation.response) { + async replayResponse( + turn = 0, + afterEntry?: (index: number) => Promise + ): Promise { + const startedAt = Date.now() + const entries = this.conversation.turns[turn].response.entries() + for (const [index, entry] of entries) { + // A timer can fire a millisecond early, so wait until the offset has really passed. + while ( + this.replayTiming === 'recorded' && + entry.at_ms !== undefined && + Date.now() - startedAt < entry.at_ms + ) + await new Promise((resolve) => + setTimeout(resolve, entry.at_ms! - (Date.now() - startedAt)) + ) if (entry.kind === 'event') { - this.send(this.stampTurn(entry.event)) + this.send(this.stampTurn(entry.event, turn)) continue } await this.waitForSubscribe() this.send(this.host.apply(entry.ops)) + await afterEntry?.(index) + } + this.replayElapsedMs = Date.now() - startedAt + } + + replayElapsedMs = 0 + + async runTurns(): Promise { + for (const turn of this.conversation.turns.keys()) { + await this.sendPrompt(turn) + await this.replayResponse(turn) + await this.waitForTurnComplete() } } + private entries(): AgentConversationTurn['response'] { + return this.conversation.turns.flatMap((turn) => turn.response) + } + async waitForTurnComplete(): Promise { await expect( this.panel.getByRole('button', { name: SEND_LABEL }) @@ -229,16 +305,156 @@ class AgentConversationHarness { ).toHaveCount(0) } - /** - * The agent's workflow document as rendered on the canvas: every node the - * host doc owns, with its slot connectivity. The tab the agent opens is - * expected to be blank (AgentPanelRoot mints it from `blankGraph`); the - * doc-id filter is defensive, so a stray template node cannot pin the - * template here. Colliding ids are the real hazard: a template link into a - * doc node survives the follower's reconcile and shows up as connectivity. - */ + // Doc-id filter: a stray template node must not pin the template here. + private nodeBodies(): NodeBody[] { + const seed = this.conversation.workflow.seed.nodes as NodeBody[] + const added = this.entries().flatMap((entry) => + entry.kind === 'graph_ops' + ? entry.ops.flatMap((op) => + op.op === 'add_node' ? [op.node as NodeBody] : [] + ) + : [] + ) + return [...seed, ...added] + } + + // The doc keeps no titles or slot names; those come from the node bodies the turn started from or added. + expectedGraph(): GraphNodeSnapshot[] { + const graph = this.host.graph() + const bodies = this.nodeBodies() + const byType = new Map(bodies.map((body) => [body.type, body])) + const byId = new Map(bodies.map((body) => [String(body.id), body])) + const catalog = this.conversation.workflow.catalog.types as Record< + string, + { widget_order: string[] } + > + const links = Object.values(graph.links) as Array< + [unknown, unknown, number, unknown, number, string] + > + return Object.entries(graph.nodes) + .map(([id, node]) => { + const type = String(node.type) + const body = byId.get(id) ?? byType.get(type) + const widgets = new Set(catalog[type]?.widget_order ?? []) + return { + id, + title: byId.get(id)?.title ?? type, + // Widget-backed inputs render as widgets, not slot rows. + inputs: (body?.inputs ?? []) + .map((slot, index) => ({ name: slot.name, index })) + .filter(({ name }) => !widgets.has(name)) + .map(({ index }) => + links.some((link) => String(link[3]) === id && link[4] === index) + ), + outputs: (body?.outputs ?? []).map((_, index) => + links.some((link) => String(link[1]) === id && link[2] === index) + ) + } + }) + .sort((a, b) => compareNodeIds(toNodeId(a.id), toNodeId(b.id))) + } + + // The panel starts a new tool group whenever thinking or text interrupts the calls. + // ToolCallGroup.vue merges consecutive calls of the same tool into one row. + // One row per run of same-tool calls; the card shows ×N for a run longer than one. + toolRowCounts(): Array<{ label: string; times: number; rows: number }> { + const rows = new Map< + string, + { label: string; times: number; rows: number } + >() + for (const group of this.toolCallGroups()) { + const runs: Array<{ name: string; times: number }> = [] + for (const call of group) { + const previous = runs.at(-1) + if (previous?.name === call.name) previous.times += 1 + else runs.push({ name: call.name, times: 1 }) + } + for (const { name, times } of runs) { + const key = `${name}/${times}` + const row = rows.get(key) ?? { + label: toolRowLabel(name), + times, + rows: 0 + } + row.rows += 1 + rows.set(key, row) + } + } + return [...rows.values()] + } + + toolCallGroups(): RecordedToolCall[][] { + const groups: RecordedToolCall[][] = [] + for (const turn of this.conversation.turns) { + let current: RecordedToolCall[] = [] + for (const entry of turn.response) { + if (entry.kind !== 'event') continue + const { type, data } = entry.event + if (type === 'agent_tool_call') { + if (data.status !== 'running') + current.push({ + name: String(data.tool_name), + ok: data.status === 'success' + }) + continue + } + if ( + (type === 'agent_thinking' || type === 'agent_message_delta') && + current.length > 0 + ) { + groups.push(current) + current = [] + } + } + if (current.length > 0) groups.push(current) + } + return groups + } + + // Last write wins per widget; the rendered control shows only the final value. + recordedWidgetValues(): RecordedWidgetValue[] { + const graph = this.host.graph() + const latest = new Map() + for (const entry of this.entries()) { + if (entry.kind !== 'graph_ops') continue + for (const op of entry.ops) { + if (op.op !== 'set_widget') continue + const nodeId = String(op.node_id) + const widget = op.widget + const widgets = graph.nodes[nodeId]?.widgets as + | Record + | undefined + const value = widgets?.[widget] + if (typeof value === 'string' || typeof value === 'number') + latest.set(`${nodeId}/${widget}`, { nodeId, widget, value }) + } + } + return [...latest.values()] + } + + addedNodeIds(): string[] { + const graph = this.host.graph() + const seedIds = new Set( + this.conversation.workflow.seed.nodes.map((node) => String(node.id)) + ) + return this.nodeBodies() + .map((body) => String(body.id)) + .filter((id) => !seedIds.has(id) && id in graph.nodes) + } + + // One update per ops entry plus the subscribe catch-up. + expectedUpdateCount(): number { + return ( + this.entries().filter((entry) => entry.kind === 'graph_ops').length + 1 + ) + } + + hostGraph(): GraphSnapshot { + return this.host.graph() + } + async graphSnapshot(): Promise { - const docNodeIds = this.host.nodeIds() + const docNodeIds = new Set(Object.keys(this.host.graph().nodes)) const snapshot = await this.page .locator('[data-node-id]') .evaluateAll((nodes) => @@ -260,7 +476,7 @@ class AgentConversationHarness { ) return snapshot .filter((node) => docNodeIds.has(node.id)) - .sort((a, b) => Number(a.id) - Number(b.id)) + .sort((a, b) => compareNodeIds(toNodeId(a.id), toNodeId(b.id))) } private async mockAgentApi(): Promise { @@ -275,7 +491,11 @@ class AgentConversationHarness { return route.fulfill({ status: 202, contentType: 'application/json', - body: JSON.stringify(this.ack) + body: JSON.stringify({ + thread_id: THREAD_ID, + message_id: turnId(this.postedMessages.length - 1), + workflow_id: this.conversation.workflow.id + }) }) } const history: AgentMessages = [] @@ -295,10 +515,10 @@ class AgentConversationHarness { ) } - private stampTurn(event: RecordedWsEvent): AgentWsEvent { + private stampTurn(event: RecordedWsEvent, turn: number): AgentWsEvent { const stamped = { type: event.type, - data: { ...event.data, message_id: TURN_ID, thread_id: THREAD_ID } + data: { ...event.data, message_id: turnId(turn), thread_id: THREAD_ID } } const parsed = parseAgentWsEvent(stamped) if (!parsed.success) @@ -313,10 +533,41 @@ class AgentConversationHarness { this.socket.send(JSON.stringify(frame)) } + outboundOps(): { op?: unknown }[] { + return this.clientFrames + .filter((frame) => frame.type === 'doc_ops') + .flatMap((frame) => { + const ops = (frame.data as { ops?: unknown } | undefined)?.ops + return Array.isArray(ops) ? (ops as { op?: unknown }[]) : [] + }) + } + private onClientFrame(raw: string | Buffer): void { const frame: unknown = JSON.parse(raw.toString()) if (typeof frame !== 'object' || frame === null) return const { type, data } = frame as { type?: unknown; data?: unknown } + this.clientFrames.push({ type, data }) + if (type === 'doc_ops' && typeof data === 'object' && data !== null) { + // The client keeps one op batch in flight until the host acks it. + const { workflow_id, ops } = data as { + workflow_id?: unknown + ops?: unknown + } + if (workflow_id === this.conversation.workflow.id && Array.isArray(ops)) { + const applied = this.host.applyClient(ops) + this.send({ + type: 'doc_ops_result', + data: { + v: DOC_PROTOCOL_VERSION, + workflow_id, + ok: true, + applied, + skipped: [] + } + }) + } + return + } if (type !== 'doc_subscribe' || typeof data !== 'object' || data === null) return const { workflow_id, state_vector_b64 } = data as { @@ -354,23 +605,37 @@ class AgentConversationHarness { } } +export type ReplayTiming = 'immediate' | 'recorded' + +function defaultReplayTiming(): ReplayTiming { + const value = process.env.AGENT_REPLAY_TIMING + if (value === undefined || value === 'immediate') return 'immediate' + if (value === 'recorded') return 'recorded' + throw new Error( + `AGENT_REPLAY_TIMING must be immediate or recorded, got ${value}` + ) +} + interface ConversationFixtures { - /** Case id of the conversation under `fixtures/data/agent/conversations`. */ conversationCase: string + // 'recorded' replays the fixture's at_ms gaps; the default follows AGENT_REPLAY_TIMING. + replayTiming: ReplayTiming agentConversation: AgentConversationHarness } export const agentConversationTest = agentTest.extend({ conversationCase: ['', { option: true }], + replayTiming: [defaultReplayTiming(), { option: true }], agentConversation: async ( - { page, agentFlagEnabled, conversationCase }, + { page, agentFlagEnabled, conversationCase, replayTiming }, use ) => { if (conversationCase.length === 0) throw new Error('test.use({ conversationCase }) names the conversation') const harness = new AgentConversationHarness( page, - loadAgentConversation(conversationCase) + loadAgentConversation(conversationCase), + replayTiming ) await harness.boot(agentFlagEnabled) await use(harness) diff --git a/browser_tests/fixtures/data/agent/agentConversation.ts b/browser_tests/fixtures/data/agent/agentConversation.ts index 2a948ab5874..b81b9ce11e0 100644 --- a/browser_tests/fixtures/data/agent/agentConversation.ts +++ b/browser_tests/fixtures/data/agent/agentConversation.ts @@ -1,4 +1,4 @@ -import { readFileSync } from 'node:fs' +import { existsSync, readFileSync, readdirSync } from 'node:fs' import { fileURLToPath } from 'node:url' import { FROZEN_OPS } from '@comfyorg/comfy-multi-player' @@ -11,19 +11,14 @@ function isRecord(value: unknown): value is Record { return typeof value === 'object' && value !== null && !Array.isArray(value) } -/** - * A realtime agent frame as recorded, minus the turn identity - * (`message_id` / `thread_id`): the replay stamps those from the ack it - * minted, then validates the result against `zAgentWsEvent` before sending. - */ -const zRecordedWsEvent = z.object({ +export const zRecordedWsEvent = z.object({ type: z.string(), - data: z.record(z.string(), z.unknown()) + data: z.record(z.string(), z.unknown()), + at_ms: z.number().int().nonnegative().optional() }) export type RecordedWsEvent = z.infer -// Payload shapes are the pinned applier's contract (it rejects a malformed -// op at replay time); the fixture only pins the vocabulary. +// The applier validates op payloads at replay time; only the vocabulary is pinned here. const zGraphOperation = z.custom( (value) => isRecord(value) && @@ -40,39 +35,95 @@ const zWidgetCatalog = z.custom( (value) => isRecord(value) && isRecord(value.types) ) +export const zAgentConversationWorkflow = z.object({ + id: z.string().uuid(), + name: z.string().min(1), + catalog: zWidgetCatalog, + seed: zWorkflowJson +}) + +export const zAgentConversationRequest = z.object({ + content: z.string().min(1) +}) + +// Offset from the turn's first frame, so replays can reproduce real gaps. +const zAtMs = z.number().int().nonnegative().optional() + const zResponseEntry = z.discriminatedUnion('kind', [ - z.object({ kind: z.literal('event'), event: zRecordedWsEvent }), + z.object({ kind: z.literal('event'), event: zRecordedWsEvent, at_ms: zAtMs }), z.object({ kind: z.literal('graph_ops'), - ops: z.array(zGraphOperation).min(1) + ops: z.array(zGraphOperation).min(1), + at_ms: zAtMs }) ]) -/** - * One user prompt and the ordered agent response it produced: chat frames - * (`event`) interleaved with the semantic graph operations (`graph_ops`) the - * doc host folds into the workflow document. - */ -const zAgentConversation = z.object({ - schema_version: z.literal('agent-conversation.v1'), - source: z.object({ - repo: z.string(), - suite: z.string(), - case_id: z.string(), - response_side: z.enum(['recorded', 'synthesized']), - note: z.string().optional() - }), - workflow: z.object({ - id: z.string().uuid(), - name: z.string().min(1), - catalog: zWidgetCatalog, - seed: zWorkflowJson - }), - request: z.object({ content: z.string().min(1) }), +const zTurn = z.object({ + message_id: z.string().min(1).optional(), + request: zAgentConversationRequest, response: z.array(zResponseEntry).min(1) }) +export type AgentConversationTurn = z.infer + +export const zAgentConversation = z + .object({ + schema_version: z.literal('agent-conversation.v2'), + source: z.object({ + repo: z.string(), + suite: z.string(), + case_id: z.string(), + response_side: z.enum(['recorded', 'synthesized']), + note: z.string().optional(), + capture: z + .object({ + backend: z.literal('Comfy-Org/cloud'), + thread_id: z.string().min(1), + exported_at: z.string().datetime() + }) + .optional() + }), + workflow: zAgentConversationWorkflow, + // One thread; each turn lands on the graph the previous turn left. + turns: z.array(zTurn).min(1) + }) + .superRefine((conversation, ctx) => { + if (conversation.source.response_side !== 'recorded') return + if (conversation.source.capture === undefined) + ctx.addIssue({ + code: 'custom', + path: ['source', 'capture'], + message: 'recorded responses require backend capture provenance' + }) + for (const [index, turn] of conversation.turns.entries()) + if (turn.message_id === undefined) + ctx.addIssue({ + code: 'custom', + path: ['turns', index, 'message_id'], + message: 'recorded turns carry the message id they were captured from' + }) + }) export type AgentConversation = z.infer +export function listRecordedConversations(): string[] { + const dir = fileURLToPath(new URL('./conversations/', import.meta.url)) + if (!existsSync(dir)) return [] + return readdirSync(dir) + .filter((file) => file.endsWith('.json')) + .map((file) => file.slice(0, -'.json'.length)) + .filter( + (caseId) => + loadAgentConversation(caseId).source.response_side === 'recorded' + ) + .sort() +} + +// Specs pinned to one recording skip on a branch that carries the code but not the data. +export function hasAgentConversation(caseId: string): boolean { + return existsSync( + fileURLToPath(new URL(`./conversations/${caseId}.json`, import.meta.url)) + ) +} + export function loadAgentConversation(caseId: string): AgentConversation { const file = fileURLToPath( new URL(`./conversations/${caseId}.json`, import.meta.url) diff --git a/browser_tests/tests/agent/agentConversationConcurrentEdits.spec.ts b/browser_tests/tests/agent/agentConversationConcurrentEdits.spec.ts new file mode 100644 index 00000000000..060ac4db564 --- /dev/null +++ b/browser_tests/tests/agent/agentConversationConcurrentEdits.spec.ts @@ -0,0 +1,64 @@ +import { expect } from '@playwright/test' + +import { agentConversationTest as test } from '@e2e/fixtures/agentConversationFixture' +import { hasAgentConversation } from '@e2e/fixtures/data/agent/agentConversation' + +const HUMAN_TEXT = 'a lighthouse at dawn, typed while the agent works' + +// The recording lands with the data PR; without it there is nothing to replay. +if (hasAgentConversation('agent-rec-three-sequential-adds')) + test.describe( + 'Agent conversation replay with concurrent human edits', + { tag: '@cloud' }, + () => { + test.use({ conversationCase: 'agent-rec-three-sequential-adds' }) + + test('keeps a human widget edit made between the agent adds', async ({ + agentConversation, + page + }) => { + test.setTimeout(60_000) + const { conversation } = agentConversation + const opsEntries = conversation.turns[0].response + .map((entry, index) => (entry.kind === 'graph_ops' ? index : -1)) + .filter((index) => index >= 0) + expect(opsEntries.length).toBeGreaterThanOrEqual(3) + const promptText = page + .locator('[data-node-id="6"]') + .getByLabel('text', { exact: true }) + + await agentConversation.sendPrompt() + await agentConversation.replayResponse(0, async (index) => { + if (index !== opsEntries[0]) return + await promptText.fill(HUMAN_TEXT) + await expect + .poll(() => + agentConversation + .outboundOps() + .some((op) => op.op === 'set_widget') + ) + .toBe(true) + }) + await agentConversation.waitForTurnComplete() + + for (const id of agentConversation.addedNodeIds()) { + await expect(page.locator(`[data-node-id="${id}"]`)).toBeVisible() + } + await expect(promptText).toHaveValue(HUMAN_TEXT) + expect( + String( + agentConversation.hostGraph().nodes['6']?.widgets && + ( + agentConversation.hostGraph().nodes['6'].widgets as Record< + string, + unknown + > + ).text + ) + ).toBe(HUMAN_TEXT) + await expect + .poll(() => agentConversation.graphSnapshot()) + .toEqual(agentConversation.expectedGraph()) + }) + } + ) diff --git a/browser_tests/tests/agent/agentConversationReplay.spec.ts b/browser_tests/tests/agent/agentConversationReplay.spec.ts index 235ec38448a..562291c38d1 100644 --- a/browser_tests/tests/agent/agentConversationReplay.spec.ts +++ b/browser_tests/tests/agent/agentConversationReplay.spec.ts @@ -1,137 +1,91 @@ import { expect } from '@playwright/test' import { agentConversationTest as test } from '@e2e/fixtures/agentConversationFixture' +import { listRecordedConversations } from '@e2e/fixtures/data/agent/agentConversation' test.describe('Agent conversation replay', { tag: '@cloud' }, () => { - test.describe('evals agent-l4-zimage-string-node-prompt', () => { - test.use({ conversationCase: 'agent-l4-zimage-string-node-prompt' }) + for (const conversationCase of listRecordedConversations()) { + test.describe(`recorded ${conversationCase}`, () => { + test.use({ conversationCase }) - test('adds a string node, sets its text, and wires it into the prompt', async ({ - agentConversation - }) => { - test.setTimeout(45_000) - const { panel } = agentConversation + test('replays the recorded turn onto the panel and the canvas', async ({ + agentConversation, + page + }) => { + test.setTimeout(60_000) + const { panel } = agentConversation - await agentConversation.sendPrompt() - await agentConversation.replayResponse() - await agentConversation.waitForTurnComplete() + await agentConversation.runTurns() - const toolGroup = panel.getByRole('button', { - name: 'Ran 3 tool calls for 0.9 seconds' - }) - await expect(toolGroup).toBeVisible() - await expect(toolGroup).toHaveAttribute('aria-expanded', 'false') - await toolGroup.click() - const toolRows = panel.getByRole('listitem') - await expect(toolRows).toHaveCount(3) - await expect(toolRows.filter({ hasText: 'Add node' })).toBeVisible() - await expect(toolRows.filter({ hasText: 'Set widget' })).toBeVisible() - await expect(toolRows.filter({ hasText: 'Connect' })).toBeVisible() - - await expect( - panel.getByRole('button', { name: 'Open Text to image' }) - ).toBeVisible() - await expect( - panel.locator('strong', { hasText: 'Prompt text' }) - ).toBeVisible() - await expect(panel.getByTestId('agent-crdt-status')).toContainText( - 'connected' - ) - await expect(panel.getByTestId('agent-crdt-status')).toContainText( - '4 updates' - ) - - await expect - .poll(() => agentConversation.graphSnapshot()) - .toEqual([ - { - id: '3', - title: 'KSampler', - inputs: [true, true, false, false], - outputs: [true] - }, - { - id: '4', - title: 'CheckpointLoaderSimple', - inputs: [], - outputs: [true, true, true] - }, - // The wired `text` input is widget-backed and renders as a widget, - // not a slot row; the link shows on the string node's output. - { - id: '6', - title: 'Positive prompt', - inputs: [true], - outputs: [true] - }, - { - id: '8', - title: 'VAEDecode', - inputs: [true, true], - outputs: [true] - }, - { id: '9', title: 'SaveImage', inputs: [true], outputs: [] }, - { id: '10', title: 'Prompt text', inputs: [], outputs: [true] } - ]) - }) - }) - - test.describe('evals agent-workflow-editing-05', () => { - test.use({ conversationCase: 'agent-workflow-editing-05' }) + const groups = agentConversation.toolCallGroups() + const groupButtons = panel.getByRole('button', { + name: /^Ran \d+ tool call/ + }) + await expect(groupButtons).toHaveCount(groups.length) + const toolRows = panel.getByRole('listitem') + for (const [index, calls] of groups.entries()) { + const button = groupButtons.nth(index) + const succeeded = calls.every((call) => call.ok) + await expect(button).toHaveText( + new RegExp(`^Ran ${calls.length} tool call`) + ) + // A failed group stays open at turn end; a clean one collapses. + await expect(button).toHaveAttribute( + 'aria-expanded', + succeeded ? 'false' : 'true' + ) + if (succeeded) await button.click() + } + for (const { + label, + times, + rows + } of agentConversation.toolRowCounts()) { + const named = toolRows.filter({ + has: page.getByText(label, { exact: true }) + }) + await expect( + named.filter( + times > 1 ? { hasText: `×${times}` } : { hasNotText: '×' } + ) + ).toHaveCount(rows) + } - test('stitches the input next to the output and previews the pair', async ({ - agentConversation - }) => { - test.setTimeout(45_000) - const { panel } = agentConversation + await expect( + panel.getByRole('button', { + name: `Open ${agentConversation.conversation.workflow.name}` + }) + ).toBeVisible() + await expect( + panel.getByTestId('markdown-stream').first() + ).not.toBeEmpty() + await expect(panel.getByTestId('agent-crdt-status')).toContainText( + 'connected' + ) + await expect(panel.getByTestId('agent-crdt-status')).toContainText( + new RegExp(`\\b${agentConversation.expectedUpdateCount()} updates`) + ) - await agentConversation.sendPrompt() - await agentConversation.replayResponse() - await agentConversation.waitForTurnComplete() + for (const id of agentConversation.addedNodeIds()) { + await expect(page.locator(`[data-node-id="${id}"]`)).toBeVisible() + } + for (const { + nodeId, + widget, + value + } of agentConversation.recordedWidgetValues()) { + const field = page + .locator(`[data-node-id="${nodeId}"]`) + .getByLabel(widget, { exact: true }) + const control = + typeof value === 'string' ? field : field.locator('input') + await expect(control).toHaveValue(String(value)) + } - const toolGroup = panel.getByRole('button', { - name: 'Ran 2 tool calls for 1.2 seconds' + await expect + .poll(() => agentConversation.graphSnapshot()) + .toEqual(agentConversation.expectedGraph()) }) - await expect(toolGroup).toBeVisible() - await expect(toolGroup).toHaveAttribute('aria-expanded', 'false') - await expect( - panel.locator('strong', { hasText: 'Image Stitch' }) - ).toBeVisible() - await expect(panel.getByTestId('agent-crdt-status')).toContainText( - '3 updates' - ) - - await expect - .poll(() => agentConversation.graphSnapshot()) - .toEqual([ - { id: '1', title: 'LoadImage', inputs: [], outputs: [true, false] }, - { - id: '2', - title: 'VAEEncode', - inputs: [true, false], - outputs: [true] - }, - { - id: '3', - title: 'KSampler', - inputs: [false, false, false, true], - outputs: [true] - }, - { - id: '8', - title: 'VAEDecode', - inputs: [true, false], - outputs: [true] - }, - { id: '9', title: 'SaveImage', inputs: [true], outputs: [] }, - { - id: '12', - title: 'Input vs output', - inputs: [true, true], - outputs: [true] - }, - { id: '13', title: 'Side by side', inputs: [true], outputs: [] } - ]) }) - }) + } }) diff --git a/browser_tests/tests/agent/agentConversationTiming.spec.ts b/browser_tests/tests/agent/agentConversationTiming.spec.ts new file mode 100644 index 00000000000..8a6494b8458 --- /dev/null +++ b/browser_tests/tests/agent/agentConversationTiming.spec.ts @@ -0,0 +1,33 @@ +import { expect } from '@playwright/test' + +import { agentConversationTest as test } from '@e2e/fixtures/agentConversationFixture' +import { hasAgentConversation } from '@e2e/fixtures/data/agent/agentConversation' + +// The recording lands with the data PR; without it there is nothing to replay. +if (hasAgentConversation('agent-rec-set-widget-existing')) + test.describe('Agent conversation replay timing', { tag: '@cloud' }, () => { + test.use({ + conversationCase: 'agent-rec-set-widget-existing', + replayTiming: 'recorded' + }) + + test('replays the frames at their recorded offsets', async ({ + agentConversation + }) => { + test.setTimeout(120_000) + const offsets = agentConversation.conversation.turns[0].response.flatMap( + (entry) => (entry.at_ms === undefined ? [] : [entry.at_ms]) + ) + const span = offsets.length ? Math.max(...offsets) : undefined + expect(span, 'the fixture carries at_ms offsets').toBeDefined() + + await agentConversation.sendPrompt() + await agentConversation.replayResponse() + await agentConversation.waitForTurnComplete() + + expect(agentConversation.replayElapsedMs).toBeGreaterThanOrEqual(span!) + await expect + .poll(() => agentConversation.graphSnapshot()) + .toEqual(agentConversation.expectedGraph()) + }) + }) diff --git a/src/workbench/extensions/agent/AgentPanelRoot.test.ts b/src/workbench/extensions/agent/AgentPanelRoot.test.ts index 1b9374100b6..5da50c3476d 100644 --- a/src/workbench/extensions/agent/AgentPanelRoot.test.ts +++ b/src/workbench/extensions/agent/AgentPanelRoot.test.ts @@ -2400,8 +2400,7 @@ describe('AgentPanelRoot workflow binding', () => { ) const minted = hostStores.workflow.tabs.get('workflows/Video test.json') expect(minted?.filename).toBe('Video test') - // Blank, not the default template: the follower reconciles onto whatever - // the tab holds and keeps template links it does not displace. + // Blank, not the default template: the follower keeps template links it does not displace. expect(minted?.activeState).toMatchObject({ nodes: [], links: [] }) // The host minted the doc server-side; the follower fills the canvas. // Nothing loads, saves, or adopts here. diff --git a/src/workbench/extensions/agent/AgentPanelRoot.vue b/src/workbench/extensions/agent/AgentPanelRoot.vue index fbc35854405..e06580d8098 100644 --- a/src/workbench/extensions/agent/AgentPanelRoot.vue +++ b/src/workbench/extensions/agent/AgentPanelRoot.vue @@ -539,12 +539,7 @@ async function onAgentActiveTab( }) return } - // A new agent workflow opens as an EMPTY tab: the host minted its doc - // server-side (seed-at-bind), and the follower fills the canvas through - // the ordinary subscribe catch-up - no snapshot fetch, no draft apply. - // `createTemporary` without data seeds the default template, whose nodes - // share ids with typical agent docs; the follower's reconcile keeps any - // template link it does not displace, so the tab must really be blank. + // The tab starts blank: the host seeds the doc at bind and the default template's node ids collide with agent docs. const creatingStartedAt = Date.now() tabActivity.setCreating(true) const remainingCreatingTime = From 6458833b99b9e4d9db41a23b4c4060f56769a685 Mon Sep 17 00:00:00 2001 From: Nathaniel Parson Koroso Date: Thu, 3 Sep 2026 09:48:49 -0700 Subject: [PATCH 05/52] test(agent): replay a cancelled turn through the panel's stop button A turn may carry the entry its cancel followed. The replay presses the panel's Stop button right after sending that entry, the existing cancel route answers it, and the recorded tail streams on as recorded, so the turn still ends on the recorded done frame. The spec derives what it asserts from the fixture: the tail the panel should show is the recorded delta text, and the graph is the ops that landed before the cut. --- .../fixtures/agentConversationFixture.ts | 18 +++++--- .../fixtures/data/agent/agentConversation.ts | 2 + .../agentConversationCancelledTurn.spec.ts | 42 +++++++++++++++++++ 3 files changed, 56 insertions(+), 6 deletions(-) create mode 100644 browser_tests/tests/agent/agentConversationCancelledTurn.spec.ts diff --git a/browser_tests/fixtures/agentConversationFixture.ts b/browser_tests/fixtures/agentConversationFixture.ts index a70c3826161..1dcc0cc357c 100644 --- a/browser_tests/fixtures/agentConversationFixture.ts +++ b/browser_tests/fixtures/agentConversationFixture.ts @@ -271,13 +271,15 @@ class AgentConversationHarness { await new Promise((resolve) => setTimeout(resolve, entry.at_ms! - (Date.now() - startedAt)) ) - if (entry.kind === 'event') { - this.send(this.stampTurn(entry.event, turn)) - continue + if (entry.kind === 'event') this.send(this.stampTurn(entry.event, turn)) + else { + await this.waitForSubscribe() + this.send(this.host.apply(entry.ops)) + await afterEntry?.(index) } - await this.waitForSubscribe() - this.send(this.host.apply(entry.ops)) - await afterEntry?.(index) + // The recorded turn was stopped here, so the panel stops here too. + if (index === this.conversation.turns[turn].cancel_after) + await this.stopTurn() } this.replayElapsedMs = Date.now() - startedAt } @@ -296,6 +298,10 @@ class AgentConversationHarness { return this.conversation.turns.flatMap((turn) => turn.response) } + async stopTurn(): Promise { + await this.panel.getByRole('button', { name: STOP_LABEL }).click() + } + async waitForTurnComplete(): Promise { await expect( this.panel.getByRole('button', { name: SEND_LABEL }) diff --git a/browser_tests/fixtures/data/agent/agentConversation.ts b/browser_tests/fixtures/data/agent/agentConversation.ts index b81b9ce11e0..6ffb3f3bb3a 100644 --- a/browser_tests/fixtures/data/agent/agentConversation.ts +++ b/browser_tests/fixtures/data/agent/agentConversation.ts @@ -61,6 +61,8 @@ const zResponseEntry = z.discriminatedUnion('kind', [ const zTurn = z.object({ message_id: z.string().min(1).optional(), request: zAgentConversationRequest, + // Response entry the recorded cancel followed; the replay stops there too. + cancel_after: z.number().int().nonnegative().optional(), response: z.array(zResponseEntry).min(1) }) export type AgentConversationTurn = z.infer diff --git a/browser_tests/tests/agent/agentConversationCancelledTurn.spec.ts b/browser_tests/tests/agent/agentConversationCancelledTurn.spec.ts new file mode 100644 index 00000000000..dceb6e7c9f5 --- /dev/null +++ b/browser_tests/tests/agent/agentConversationCancelledTurn.spec.ts @@ -0,0 +1,42 @@ +import { expect } from '@playwright/test' + +import { agentConversationTest as test } from '@e2e/fixtures/agentConversationFixture' +import { hasAgentConversation } from '@e2e/fixtures/data/agent/agentConversation' + +const CASE = 'agent-rec-cancelled-turn' + +// The recording lands with the data PR; without it there is nothing to replay. +if (hasAgentConversation(CASE)) + test.describe('Agent cancelled turn replay', { tag: '@cloud' }, () => { + test.use({ conversationCase: CASE }) + + test('stops where the recording stopped and keeps the edits that landed', async ({ + agentConversation + }) => { + const turn = agentConversation.conversation.turns[0] + expect( + turn.cancel_after, + 'the fixture records the entry the cancel followed' + ).toBeDefined() + // Whatever the recorded tail said, rather than pinning the wording here. + const tail = turn.response + .flatMap((entry) => + entry.kind === 'event' && entry.event.type === 'agent_message_delta' + ? [String(entry.event.data.delta ?? '')] + : [] + ) + .join('') + expect(tail, 'the recorded tail carries the stopped message').not.toBe('') + + await agentConversation.sendPrompt() + await agentConversation.replayResponse() + await agentConversation.waitForTurnComplete() + + await expect( + agentConversation.panel.getByTestId('markdown-stream').first() + ).toContainText(tail) + await expect + .poll(() => agentConversation.graphSnapshot()) + .toEqual(agentConversation.expectedGraph()) + }) + }) From 12ebbf217e9b48b591ed889b02cd64e2475f74fa Mon Sep 17 00:00:00 2001 From: Nathaniel Parson Koroso Date: Thu, 3 Sep 2026 10:10:38 -0700 Subject: [PATCH 06/52] test(agent): let the replay PR stand alone Drops the two synthesized v1 fixtures the carried commit brought along and un-exports the schema pieces only the exporter reads. --- .../fixtures/data/agent/agentConversation.ts | 8 +- .../agent-l4-zimage-string-node-prompt.json | 277 ------------------ .../agent-workflow-editing-05.json | 277 ------------------ 3 files changed, 4 insertions(+), 558 deletions(-) delete mode 100644 browser_tests/fixtures/data/agent/conversations/agent-l4-zimage-string-node-prompt.json delete mode 100644 browser_tests/fixtures/data/agent/conversations/agent-workflow-editing-05.json diff --git a/browser_tests/fixtures/data/agent/agentConversation.ts b/browser_tests/fixtures/data/agent/agentConversation.ts index 6ffb3f3bb3a..542fa3d5141 100644 --- a/browser_tests/fixtures/data/agent/agentConversation.ts +++ b/browser_tests/fixtures/data/agent/agentConversation.ts @@ -11,7 +11,7 @@ function isRecord(value: unknown): value is Record { return typeof value === 'object' && value !== null && !Array.isArray(value) } -export const zRecordedWsEvent = z.object({ +const zRecordedWsEvent = z.object({ type: z.string(), data: z.record(z.string(), z.unknown()), at_ms: z.number().int().nonnegative().optional() @@ -35,14 +35,14 @@ const zWidgetCatalog = z.custom( (value) => isRecord(value) && isRecord(value.types) ) -export const zAgentConversationWorkflow = z.object({ +const zAgentConversationWorkflow = z.object({ id: z.string().uuid(), name: z.string().min(1), catalog: zWidgetCatalog, seed: zWorkflowJson }) -export const zAgentConversationRequest = z.object({ +const zAgentConversationRequest = z.object({ content: z.string().min(1) }) @@ -67,7 +67,7 @@ const zTurn = z.object({ }) export type AgentConversationTurn = z.infer -export const zAgentConversation = z +const zAgentConversation = z .object({ schema_version: z.literal('agent-conversation.v2'), source: z.object({ diff --git a/browser_tests/fixtures/data/agent/conversations/agent-l4-zimage-string-node-prompt.json b/browser_tests/fixtures/data/agent/conversations/agent-l4-zimage-string-node-prompt.json deleted file mode 100644 index afad82463e7..00000000000 --- a/browser_tests/fixtures/data/agent/conversations/agent-l4-zimage-string-node-prompt.json +++ /dev/null @@ -1,277 +0,0 @@ -{ - "schema_version": "agent-conversation.v1", - "source": { - "repo": "Comfy-Org/evals", - "suite": "agent", - "case_id": "agent-l4-zimage-string-node-prompt", - "response_side": "synthesized", - "note": "Response synthesized from the case's expected outcome (string node added, text set, STRING wired into the prompt input). The eval seed is a Z-Image subgraph; this replay uses a flat text-to-image seed so the wiring lands on a plain CLIPTextEncode. The case's trailing run is not replayed." - }, - "workflow": { - "id": "6f1c2c1e-3b1c-4c88-9d9c-0d6e9b8e1a01", - "name": "Text to image", - "catalog": { - "types": { - "CheckpointLoaderSimple": { "widget_order": ["ckpt_name"] }, - "CLIPTextEncode": { "widget_order": ["text"] }, - "KSampler": { - "widget_order": [ - "seed", - "control_after_generate", - "steps", - "cfg", - "sampler_name", - "scheduler", - "denoise" - ] - }, - "VAEDecode": { "widget_order": [] }, - "SaveImage": { "widget_order": ["filename_prefix"] }, - "PrimitiveStringMultiline": { "widget_order": ["value"] } - } - }, - "seed": { - "nodes": [ - { - "id": 4, - "type": "CheckpointLoaderSimple", - "pos": [0, 0], - "size": [315, 98], - "inputs": [], - "outputs": [ - { "name": "MODEL", "type": "MODEL", "links": [3] }, - { "name": "CLIP", "type": "CLIP", "links": [1] }, - { "name": "VAE", "type": "VAE", "links": [5] } - ], - "widgets_values": ["sd_xl_base_1.0.safetensors"] - }, - { - "id": 6, - "type": "CLIPTextEncode", - "title": "Positive prompt", - "pos": [400, 0], - "size": [400, 200], - "inputs": [ - { "name": "clip", "type": "CLIP", "link": 1 }, - { - "name": "text", - "type": "STRING", - "widget": { "name": "text" }, - "link": null - } - ], - "outputs": [ - { "name": "CONDITIONING", "type": "CONDITIONING", "links": [2] } - ], - "widgets_values": ["a photo of a pier"] - }, - { - "id": 3, - "type": "KSampler", - "pos": [850, 0], - "size": [315, 262], - "inputs": [ - { "name": "model", "type": "MODEL", "link": 3 }, - { "name": "positive", "type": "CONDITIONING", "link": 2 }, - { "name": "negative", "type": "CONDITIONING", "link": null }, - { "name": "latent_image", "type": "LATENT", "link": null } - ], - "outputs": [{ "name": "LATENT", "type": "LATENT", "links": [4] }], - "widgets_values": [0, "randomize", 20, 7, "euler", "normal", 1] - }, - { - "id": 8, - "type": "VAEDecode", - "pos": [1200, 0], - "size": [210, 46], - "inputs": [ - { "name": "samples", "type": "LATENT", "link": 4 }, - { "name": "vae", "type": "VAE", "link": 5 } - ], - "outputs": [{ "name": "IMAGE", "type": "IMAGE", "links": [6] }], - "widgets_values": [] - }, - { - "id": 9, - "type": "SaveImage", - "pos": [1450, 0], - "size": [315, 270], - "inputs": [{ "name": "images", "type": "IMAGE", "link": 6 }], - "outputs": [], - "widgets_values": ["ComfyUI"] - } - ], - "links": [ - [1, 4, 1, 6, 0, "CLIP"], - [2, 6, 0, 3, 1, "CONDITIONING"], - [3, 4, 0, 3, 0, "MODEL"], - [4, 3, 0, 8, 0, "LATENT"], - [5, 4, 2, 8, 1, "VAE"], - [6, 8, 0, 9, 0, "IMAGE"] - ] - } - }, - "request": { - "content": "Add a text node that feeds the prompt of this workflow, put 'a red bicycle on a pier at dusk' in it, and run." - }, - "response": [ - { - "kind": "event", - "event": { - "type": "agent_thinking", - "data": { - "delta": "I'll add a multiline string node, set its text, and wire its STRING output into the positive prompt's text input." - } - } - }, - { - "kind": "event", - "event": { - "type": "agent_active_tab", - "data": { - "workflow_id": "6f1c2c1e-3b1c-4c88-9d9c-0d6e9b8e1a01", - "name": "Text to image" - } - } - }, - { - "kind": "event", - "event": { - "type": "agent_tool_call", - "data": { - "tool_call_id": "call-add-string-node", - "tool_name": "add_node", - "status": "running" - } - } - }, - { - "kind": "graph_ops", - "ops": [ - { - "op": "add_node", - "node_id": 10, - "class_type": "PrimitiveStringMultiline", - "pos": [0, 300], - "node": { - "id": 10, - "type": "PrimitiveStringMultiline", - "title": "Prompt text", - "pos": [0, 300], - "size": [400, 200], - "inputs": [], - "outputs": [{ "name": "STRING", "type": "STRING", "links": [] }], - "widgets_values": [""] - } - } - ] - }, - { - "kind": "event", - "event": { - "type": "agent_tool_call", - "data": { - "tool_call_id": "call-add-string-node", - "tool_name": "add_node", - "status": "success", - "duration_ms": 400 - } - } - }, - { - "kind": "event", - "event": { - "type": "agent_tool_call", - "data": { - "tool_call_id": "call-set-prompt-text", - "tool_name": "set_widget", - "status": "running" - } - } - }, - { - "kind": "graph_ops", - "ops": [ - { - "op": "set_widget", - "node_id": 10, - "widget": "value", - "value": "a red bicycle on a pier at dusk" - } - ] - }, - { - "kind": "event", - "event": { - "type": "agent_tool_call", - "data": { - "tool_call_id": "call-set-prompt-text", - "tool_name": "set_widget", - "status": "success", - "duration_ms": 200 - } - } - }, - { - "kind": "event", - "event": { - "type": "agent_tool_call", - "data": { - "tool_call_id": "call-connect-prompt", - "tool_name": "connect", - "status": "running" - } - } - }, - { - "kind": "graph_ops", - "ops": [ - { - "op": "connect", - "link_id": 7, - "from_node": 10, - "from_slot": 0, - "to_node": 6, - "to_slot": 1, - "link_type": "STRING" - } - ] - }, - { - "kind": "event", - "event": { - "type": "agent_tool_call", - "data": { - "tool_call_id": "call-connect-prompt", - "tool_name": "connect", - "status": "success", - "duration_ms": 300 - } - } - }, - { - "kind": "event", - "event": { - "type": "agent_message_delta", - "data": { - "delta": "Added a **Prompt text** node with *a red bicycle on a pier at dusk* and wired its STRING output into the positive prompt, so the prompt is now driven by that node. Say the word and I'll run it." - } - } - }, - { - "kind": "event", - "event": { - "type": "agent_message_done", - "data": { - "usage": { - "input_tokens": 5120, - "output_tokens": 310, - "total_tokens": 5430, - "cache_read_input_tokens": 0, - "cache_creation_input_tokens": 0 - } - } - } - } - ] -} diff --git a/browser_tests/fixtures/data/agent/conversations/agent-workflow-editing-05.json b/browser_tests/fixtures/data/agent/conversations/agent-workflow-editing-05.json deleted file mode 100644 index 4cdeb940f97..00000000000 --- a/browser_tests/fixtures/data/agent/conversations/agent-workflow-editing-05.json +++ /dev/null @@ -1,277 +0,0 @@ -{ - "schema_version": "agent-conversation.v1", - "source": { - "repo": "Comfy-Org/evals", - "suite": "agent", - "case_id": "agent-workflow-editing-05", - "response_side": "synthesized", - "note": "Response synthesized from the case's expected outcome: an ImageStitch node shows the generated output next to the input image. The eval case ships no seed, so a small image-to-image seed stands in." - }, - "workflow": { - "id": "2b7d9a34-5c1e-4f0a-8e6b-7d2f3a9c1b45", - "name": "Image edit", - "catalog": { - "types": { - "LoadImage": { "widget_order": ["image", "upload"] }, - "VAEEncode": { "widget_order": [] }, - "KSampler": { - "widget_order": [ - "seed", - "control_after_generate", - "steps", - "cfg", - "sampler_name", - "scheduler", - "denoise" - ] - }, - "VAEDecode": { "widget_order": [] }, - "SaveImage": { "widget_order": ["filename_prefix"] }, - "ImageStitch": { - "widget_order": [ - "direction", - "match_image_size", - "spacing_width", - "spacing_color" - ] - }, - "PreviewImage": { "widget_order": [] } - } - }, - "seed": { - "nodes": [ - { - "id": 1, - "type": "LoadImage", - "pos": [0, 0], - "size": [315, 314], - "inputs": [], - "outputs": [ - { "name": "IMAGE", "type": "IMAGE", "links": [1] }, - { "name": "MASK", "type": "MASK", "links": [] } - ], - "widgets_values": ["example.png", "image"] - }, - { - "id": 2, - "type": "VAEEncode", - "pos": [400, 0], - "size": [210, 46], - "inputs": [ - { "name": "pixels", "type": "IMAGE", "link": 1 }, - { "name": "vae", "type": "VAE", "link": null } - ], - "outputs": [{ "name": "LATENT", "type": "LATENT", "links": [2] }], - "widgets_values": [] - }, - { - "id": 3, - "type": "KSampler", - "pos": [700, 0], - "size": [315, 262], - "inputs": [ - { "name": "model", "type": "MODEL", "link": null }, - { "name": "positive", "type": "CONDITIONING", "link": null }, - { "name": "negative", "type": "CONDITIONING", "link": null }, - { "name": "latent_image", "type": "LATENT", "link": 2 } - ], - "outputs": [{ "name": "LATENT", "type": "LATENT", "links": [3] }], - "widgets_values": [0, "randomize", 20, 7, "euler", "normal", 0.6] - }, - { - "id": 8, - "type": "VAEDecode", - "pos": [1100, 0], - "size": [210, 46], - "inputs": [ - { "name": "samples", "type": "LATENT", "link": 3 }, - { "name": "vae", "type": "VAE", "link": null } - ], - "outputs": [{ "name": "IMAGE", "type": "IMAGE", "links": [4] }], - "widgets_values": [] - }, - { - "id": 9, - "type": "SaveImage", - "pos": [1400, 0], - "size": [315, 270], - "inputs": [{ "name": "images", "type": "IMAGE", "link": 4 }], - "outputs": [], - "widgets_values": ["ComfyUI"] - } - ], - "links": [ - [1, 1, 0, 2, 0, "IMAGE"], - [2, 2, 0, 3, 3, "LATENT"], - [3, 3, 0, 8, 0, "LATENT"], - [4, 8, 0, 9, 0, "IMAGE"] - ] - } - }, - "request": { - "content": "now use a stitch images node to show the output next to the input" - }, - "response": [ - { - "kind": "event", - "event": { - "type": "agent_thinking", - "data": { - "delta": "I'll stitch the loaded input and the decoded output side by side and preview the result." - } - } - }, - { - "kind": "event", - "event": { - "type": "agent_active_tab", - "data": { - "workflow_id": "2b7d9a34-5c1e-4f0a-8e6b-7d2f3a9c1b45", - "name": "Image edit" - } - } - }, - { - "kind": "event", - "event": { - "type": "agent_tool_call", - "data": { - "tool_call_id": "call-add-stitch", - "tool_name": "add_node", - "status": "running" - } - } - }, - { - "kind": "graph_ops", - "ops": [ - { - "op": "add_node", - "node_id": 12, - "class_type": "ImageStitch", - "pos": [1400, 350], - "node": { - "id": 12, - "type": "ImageStitch", - "title": "Input vs output", - "pos": [1400, 350], - "size": [315, 150], - "inputs": [ - { "name": "image1", "type": "IMAGE", "link": null }, - { "name": "image2", "type": "IMAGE", "link": null } - ], - "outputs": [{ "name": "IMAGE", "type": "IMAGE", "links": [] }], - "widgets_values": ["right", true, 0, "white"] - } - }, - { - "op": "add_node", - "node_id": 13, - "class_type": "PreviewImage", - "pos": [1800, 350], - "node": { - "id": 13, - "type": "PreviewImage", - "title": "Side by side", - "pos": [1800, 350], - "size": [315, 270], - "inputs": [{ "name": "images", "type": "IMAGE", "link": null }], - "outputs": [], - "widgets_values": [] - } - } - ] - }, - { - "kind": "event", - "event": { - "type": "agent_tool_call", - "data": { - "tool_call_id": "call-add-stitch", - "tool_name": "add_node", - "status": "success", - "duration_ms": 500 - } - } - }, - { - "kind": "event", - "event": { - "type": "agent_tool_call", - "data": { - "tool_call_id": "call-wire-stitch", - "tool_name": "connect", - "status": "running" - } - } - }, - { - "kind": "graph_ops", - "ops": [ - { - "op": "connect", - "link_id": 5, - "from_node": 1, - "from_slot": 0, - "to_node": 12, - "to_slot": 0, - "link_type": "IMAGE" - }, - { - "op": "connect", - "link_id": 6, - "from_node": 8, - "from_slot": 0, - "to_node": 12, - "to_slot": 1, - "link_type": "IMAGE" - }, - { - "op": "connect", - "link_id": 7, - "from_node": 12, - "from_slot": 0, - "to_node": 13, - "to_slot": 0, - "link_type": "IMAGE" - } - ] - }, - { - "kind": "event", - "event": { - "type": "agent_tool_call", - "data": { - "tool_call_id": "call-wire-stitch", - "tool_name": "connect", - "status": "success", - "duration_ms": 700 - } - } - }, - { - "kind": "event", - "event": { - "type": "agent_message_delta", - "data": { - "delta": "Done. An **Image Stitch** node now takes the loaded input on the left and the decoded output on the right, and a preview node shows the pair. Your save node is untouched." - } - } - }, - { - "kind": "event", - "event": { - "type": "agent_message_done", - "data": { - "usage": { - "input_tokens": 6010, - "output_tokens": 280, - "total_tokens": 6290, - "cache_read_input_tokens": 0, - "cache_creation_input_tokens": 0 - } - } - } - } - ] -} From 7e49097d80817b7850e019f8364d71e201d94084 Mon Sep 17 00:00:00 2001 From: Nathaniel Parson Koroso Date: Thu, 3 Sep 2026 09:39:07 -0700 Subject: [PATCH 07/52] test(agent): twelve conversations recorded on the local agent Nine single-turn cases and three multi-turn threads (a dependent two-turn edit, a three-turn add, set, delete chain, and a clarifying question), every frame with its recorded offset. --- .../agent-l4-zimage-string-node-prompt.json | 554 ++++++++++++++++++ .../agent-rec-add-set-delete.json | 485 +++++++++++++++ .../conversations/agent-rec-batched-ops.json | 384 ++++++++++++ .../agent-rec-clarifying-question.json | 382 ++++++++++++ .../agent-rec-refiner-between.json | 448 ++++++++++++++ .../agent-rec-replace-prompt-encoder.json | 411 +++++++++++++ .../agent-rec-set-widget-existing.json | 346 +++++++++++ .../agent-rec-text-only-answer.json | 279 +++++++++ .../agent-rec-three-sequential-adds.json | 416 +++++++++++++ .../conversations/agent-rec-tool-error.json | 280 +++++++++ .../agent-rec-two-turn-dependent-edit.json | 449 ++++++++++++++ .../agent-workflow-editing-05.json | 424 ++++++++++++++ 12 files changed, 4858 insertions(+) create mode 100644 browser_tests/fixtures/data/agent/conversations/agent-l4-zimage-string-node-prompt.json create mode 100644 browser_tests/fixtures/data/agent/conversations/agent-rec-add-set-delete.json create mode 100644 browser_tests/fixtures/data/agent/conversations/agent-rec-batched-ops.json create mode 100644 browser_tests/fixtures/data/agent/conversations/agent-rec-clarifying-question.json create mode 100644 browser_tests/fixtures/data/agent/conversations/agent-rec-refiner-between.json create mode 100644 browser_tests/fixtures/data/agent/conversations/agent-rec-replace-prompt-encoder.json create mode 100644 browser_tests/fixtures/data/agent/conversations/agent-rec-set-widget-existing.json create mode 100644 browser_tests/fixtures/data/agent/conversations/agent-rec-text-only-answer.json create mode 100644 browser_tests/fixtures/data/agent/conversations/agent-rec-three-sequential-adds.json create mode 100644 browser_tests/fixtures/data/agent/conversations/agent-rec-tool-error.json create mode 100644 browser_tests/fixtures/data/agent/conversations/agent-rec-two-turn-dependent-edit.json create mode 100644 browser_tests/fixtures/data/agent/conversations/agent-workflow-editing-05.json diff --git a/browser_tests/fixtures/data/agent/conversations/agent-l4-zimage-string-node-prompt.json b/browser_tests/fixtures/data/agent/conversations/agent-l4-zimage-string-node-prompt.json new file mode 100644 index 00000000000..55e16cb9a37 --- /dev/null +++ b/browser_tests/fixtures/data/agent/conversations/agent-l4-zimage-string-node-prompt.json @@ -0,0 +1,554 @@ +{ + "schema_version": "agent-conversation.v2", + "source": { + "repo": "Comfy-Org/ComfyUI_frontend", + "suite": "agent", + "case_id": "agent-l4-zimage-string-node-prompt", + "response_side": "recorded", + "note": "RECORDED from Comfy-Org/cloud services/agent running NON-standalone local full stack (Postgres + doc host, M2M identity headers) at http://127.0.0.1:8086 (frames: redis SUBSCRIBE channel:ws::u:); NOT a production capture. cloud commit 9dc1da7dae2a1d40a9ca1f2a1f91cd9fd9e10900; model claude-opus-5; thread 91a905f3-b619-44e3-a6e5-5a047d8d0066; message 4293701d-cd6f-41cf-b03d-ea73df6af846; workflow 891d1304-09ae-4d51-9bea-aaa4756822d4 (seeded by throwaway turn 62bbe9f8-bcb1-4a84-9275-97384a9482f2; the recorded turn opens on a fresh workflow and switches to it first because the replay subscribes only on an agent_active_tab frame, see plan Q4); agent_tool_calls parent rows ['ea9a0cdc-498e-4c8e-ba09-e487cbf02e12', '3893c0d2-605b-43bc-8d77-ff249b267087', '3ae90aa2-14e3-4001-a3c9-90eadef4ad86', '5656b627-7364-4759-8471-f0dedbf3b125', '7e4bd8e9-223d-4a79-985e-7bd262e8b5b9', 'c7f90263-0a57-4a48-8573-75bdb1746a6e', 'acc3faea-b08b-4e4d-8f4b-cb999a8cc6d5', 'a928d523-16e8-4d26-81ad-1b7cdd884c68', '42abc204-3da4-410c-bf83-1b206d567401']; rows agent-l4-zimage-string-node-prompt.t-a1.rows.json; raw capture sha256 f4a2076ae60f8e5eefc7799fd0a14d58d4c3829796ff89f88a0e4548c952b3fe", + "capture": { + "backend": "Comfy-Org/cloud", + "thread_id": "91a905f3-b619-44e3-a6e5-5a047d8d0066", + "exported_at": "2026-09-03T12:40:57Z" + } + }, + "workflow": { + "id": "891d1304-09ae-4d51-9bea-aaa4756822d4", + "name": "Text to image", + "catalog": { + "types": { + "CheckpointLoaderSimple": { + "widget_order": ["ckpt_name"] + }, + "CLIPTextEncode": { + "widget_order": ["text"] + }, + "KSampler": { + "widget_order": [ + "seed", + "control_after_generate", + "steps", + "cfg", + "sampler_name", + "scheduler", + "denoise" + ] + }, + "VAEDecode": { + "widget_order": [] + }, + "SaveImage": { + "widget_order": ["filename_prefix"] + }, + "PrimitiveStringMultiline": { + "widget_order": ["value"] + }, + "EmptyLatentImage": { + "widget_order": ["width", "height", "batch_size"] + } + } + }, + "seed": { + "nodes": [ + { + "id": 4, + "type": "CheckpointLoaderSimple", + "pos": [0, 0], + "size": [315, 98], + "inputs": [], + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "links": [3] + }, + { + "name": "CLIP", + "type": "CLIP", + "links": [1] + }, + { + "name": "VAE", + "type": "VAE", + "links": [5] + } + ], + "widgets_values": ["sd_xl_base_1.0.safetensors"] + }, + { + "id": 6, + "type": "CLIPTextEncode", + "title": "Positive prompt", + "pos": [400, 0], + "size": [400, 200], + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 1 + }, + { + "name": "text", + "type": "STRING", + "widget": { + "name": "text" + }, + "link": null + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [2] + } + ], + "widgets_values": ["a photo of a pier"] + }, + { + "id": 3, + "type": "KSampler", + "pos": [850, 0], + "size": [315, 262], + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 3 + }, + { + "name": "positive", + "type": "CONDITIONING", + "link": 2 + }, + { + "name": "negative", + "type": "CONDITIONING", + "link": null + }, + { + "name": "latent_image", + "type": "LATENT", + "link": null + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [4] + } + ], + "widgets_values": [0, "randomize", 20, 7, "euler", "normal", 1] + }, + { + "id": 8, + "type": "VAEDecode", + "pos": [1200, 0], + "size": [210, 46], + "inputs": [ + { + "name": "samples", + "type": "LATENT", + "link": 4 + }, + { + "name": "vae", + "type": "VAE", + "link": 5 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [6] + } + ], + "widgets_values": [] + }, + { + "id": 9, + "type": "SaveImage", + "pos": [1450, 0], + "size": [315, 270], + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 6 + } + ], + "outputs": [], + "widgets_values": ["ComfyUI"] + } + ], + "links": [ + [1, 4, 1, 6, 0, "CLIP"], + [2, 6, 0, 3, 1, "CONDITIONING"], + [3, 4, 0, 3, 0, "MODEL"], + [4, 3, 0, 8, 0, "LATENT"], + [5, 4, 2, 8, 1, "VAE"], + [6, 8, 0, 9, 0, "IMAGE"] + ] + } + }, + "turns": [ + { + "message_id": "4293701d-cd6f-41cf-b03d-ea73df6af846", + "request": { + "content": "Switch to the tab 'Text to image', then add a text node that feeds the prompt of this workflow, put 'a red bicycle on a pier at dusk' in it, and run." + }, + "response": [ + { + "kind": "event", + "event": { + "type": "agent_thinking", + "data": { + "delta": "I'll switch over and take a look at that workflow." + } + }, + "at_ms": 0 + }, + { + "kind": "event", + "event": { + "type": "agent_active_tab", + "data": { + "name": "Text to image", + "workflow_id": "891d1304-09ae-4d51-9bea-aaa4756822d4" + } + }, + "at_ms": 6 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 6, + "status": "success", + "tool_call_id": "toolu_01KZvQdg1MdhKgbWQsvScSpN", + "tool_name": "switch_tab" + } + }, + "at_ms": 9 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 774, + "status": "success", + "tool_call_id": "toolu_015MGXQKWWD64ZWnv7jWQNLw", + "tool_name": "print_workflow" + } + }, + "at_ms": 2809 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 308, + "status": "success", + "tool_call_id": "toolu_015ngjjFSSFFFRrsQvJwbnut", + "tool_name": "find_nodes" + } + }, + "at_ms": 7587 + }, + { + "kind": "event", + "event": { + "type": "agent_thinking", + "data": { + "delta": "The prompt node is easy — but this graph is also missing a couple of connections it needs to run, so I'll complete those too." + } + }, + "at_ms": 13907 + }, + { + "kind": "graph_ops", + "ops": [ + { + "op": "add_node", + "pos": [395, 280], + "node": { + "id": 3876406316923056, + "pos": [395, 280], + "mode": 0, + "size": [240, 86], + "type": "PrimitiveStringMultiline", + "flags": {}, + "order": 0, + "inputs": [], + "outputs": [ + { + "name": "STRING", + "type": "STRING", + "links": [] + } + ], + "properties": {}, + "widgets_values": [null] + }, + "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", + "op_id": "b41f1bc5b13f44efb10bb51847859813", + "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], + "node_id": 3876406316923056, + "class_type": "PrimitiveStringMultiline", + "base_version": 2 + }, + { + "op": "set_widget", + "old": null, + "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", + "op_id": "90d12d67f1a54617af277c333f9880be", + "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], + "value": "a red bicycle on a pier at dusk", + "widget": "value", + "node_id": 3876406316923056, + "base_version": 2 + }, + { + "op": "connect", + "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", + "op_id": "c0b8ec72e8d64de7bcf9b45125f6c207", + "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], + "link_id": 1887935066439213, + "to_node": 6, + "to_slot": 1, + "from_node": 3876406316923056, + "from_slot": 0, + "link_type": "STRING", + "base_version": 2 + }, + { + "op": "add_node", + "pos": [715, 280], + "node": { + "id": 3880387162517873, + "pos": [715, 280], + "mode": 0, + "size": [240, 86], + "type": "CLIPTextEncode", + "flags": {}, + "order": 0, + "inputs": [ + { + "link": null, + "name": "clip", + "type": "CLIP" + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [] + } + ], + "properties": {}, + "widgets_values": [null] + }, + "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", + "op_id": "a5da691f2d07486aa354c5ee7c7fb6f1", + "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], + "node_id": 3880387162517873, + "class_type": "CLIPTextEncode", + "base_version": 2 + }, + { + "op": "set_widget", + "old": null, + "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", + "op_id": "d02e085ef78d41109f09ed846715fdfa", + "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], + "value": "", + "widget": "text", + "node_id": 3880387162517873, + "base_version": 2 + }, + { + "op": "connect", + "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", + "op_id": "54508721c33e478b94db088a93568f4c", + "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], + "link_id": 2636276550287764, + "to_node": 3880387162517873, + "to_slot": 0, + "from_node": 4, + "from_slot": 1, + "link_type": "CLIP", + "base_version": 2 + }, + { + "op": "connect", + "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", + "op_id": "98f104d28a664643b45551a76f4b6733", + "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], + "link_id": 2833535472085255, + "to_node": 3, + "to_slot": 2, + "from_node": 3880387162517873, + "from_slot": 0, + "link_type": "CONDITIONING", + "base_version": 2 + }, + { + "op": "add_node", + "pos": [395, 406], + "node": { + "id": 3876084544359242, + "pos": [395, 406], + "mode": 0, + "size": [240, 134], + "type": "EmptyLatentImage", + "flags": {}, + "order": 0, + "inputs": [], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [] + } + ], + "properties": {}, + "widgets_values": [512, 512, 1] + }, + "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", + "op_id": "9e977850c86447acb7359b7a9b484a83", + "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], + "node_id": 3876084544359242, + "class_type": "EmptyLatentImage", + "base_version": 2 + }, + { + "op": "connect", + "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", + "op_id": "c9e0686dff2245fa90d9e720c0133928", + "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], + "link_id": 2211554611670965, + "to_node": 3, + "to_slot": 3, + "from_node": 3876084544359242, + "from_slot": 0, + "link_type": "LATENT", + "base_version": 2 + } + ], + "at_ms": 14347 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 447, + "status": "success", + "tool_call_id": "toolu_0126og8icdp1EUnSmtrcSZv6", + "tool_name": "apply_ops" + } + }, + "at_ms": 14347 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 249, + "status": "error", + "tool_call_id": "toolu_01RQTp9JXwFc1AdgmAKBiMYm", + "tool_name": "validate" + } + }, + "at_ms": 16172 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 232, + "status": "success", + "tool_call_id": "toolu_01Lq8eZseF7AhmTd9UuxvcNb", + "tool_name": "show_node" + } + }, + "at_ms": 19599 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 248, + "error_code": "knowledge_unavailable", + "status": "error", + "tool_call_id": "toolu_01VcWs7EVFuk18ct7nX9nEoi", + "tool_name": "list_model_picks" + } + }, + "at_ms": 24061 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 887, + "status": "success", + "tool_call_id": "toolu_01AB6XXLQrdF3EFbDRV9GtSx", + "tool_name": "list_generate_models" + } + }, + "at_ms": 28706 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 324, + "status": "success", + "tool_call_id": "toolu_01U2bR9WL8Pc5H35X2JERBwr", + "tool_name": "print_workflow" + } + }, + "at_ms": 38928 + }, + { + "kind": "event", + "event": { + "type": "agent_message_delta", + "data": { + "delta": "I'm on the \"Text to image\" tab, and the text node is in and wired: your prompt \"a red bicycle on a pier at dusk\" now feeds the positive prompt. I also connected two things the graph was missing (an empty negative prompt and the blank canvas the sampler starts from) — without those it couldn't have run at all.\n\nI couldn't run it, though. The image model this workflow is built on isn't installed on this server — the checkpoint slot reports no available files at all, so there's nothing valid to point it at, and I'd rather tell you than silently swap in a different model and hand you an image that isn't the one you set up.\n\nTwo ways forward, your call:\n- Install the checkpoint this workflow expects, then hit Run — the graph is otherwise complete and correct.\n- Let me rebuild it on one of the hosted image models that are available here (Flux, Ideogram, Stable Image and others), keeping your prompt. That's a different model than your current setup, so I'd want your OK first." + } + }, + "at_ms": 44823 + }, + { + "kind": "event", + "event": { + "type": "agent_message_done", + "data": { + "usage": { + "cache_creation_input_tokens": 4467, + "cache_read_input_tokens": 395126, + "input_tokens": 20, + "output_tokens": 2467, + "total_tokens": 2487 + } + } + }, + "at_ms": 44827 + } + ] + } + ] +} diff --git a/browser_tests/fixtures/data/agent/conversations/agent-rec-add-set-delete.json b/browser_tests/fixtures/data/agent/conversations/agent-rec-add-set-delete.json new file mode 100644 index 00000000000..37f79c77094 --- /dev/null +++ b/browser_tests/fixtures/data/agent/conversations/agent-rec-add-set-delete.json @@ -0,0 +1,485 @@ +{ + "schema_version": "agent-conversation.v2", + "source": { + "repo": "Comfy-Org/ComfyUI_frontend", + "suite": "agent", + "case_id": "agent-rec-add-set-delete", + "response_side": "recorded", + "note": "RECORDED from Comfy-Org/cloud services/agent running NON-standalone local full stack (Postgres + doc host, M2M identity headers) at http://127.0.0.1:8086 (frames: redis SUBSCRIBE channel:ws::u:); NOT a production capture. cloud commit 9dc1da7dae2a1d40a9ca1f2a1f91cd9fd9e10900; model claude-opus-5; thread 6b1502e7-a553-4d04-aa07-07786ab73223; messages 1a1dd9a7-3654-4869-beb4-7d9f1b3d8f67, 9be1516f-95b5-47b2-b939-46c60f141da7, 0b966fe0-ac97-4506-abbc-743051b5c526; workflow 79cf8c10-c40b-4f3a-8c88-c3961e3882fb (seeded by throwaway turn 2cc6c8bb-0057-4905-a4e7-acf0c50f440f; turn 1 opens on a fresh workflow and switches to it first because the replay subscribes only on an agent_active_tab frame); agent_tool_calls parent rows 573561a7-72dc-43de-a5a5-12be3d9fb403, 6d659f56-9cf1-49bb-91c8-72174fb8143a, c2370db1-c495-4c11-a4cd-4e0f80af092c, c295afbc-ff57-485c-b7ae-4ea4183b3fef, d61f5547-6761-4cb7-9f3c-f4ef8f47c3e1, ebb740d8-5eea-46c2-bc71-a4a1fb49d27f; rows agent-rec-add-set-delete.b1.rows.1.json, agent-rec-add-set-delete.b1.rows.2.json, agent-rec-add-set-delete.b1.rows.3.json; raw capture sha256 b9fad5c571ab000aa3fb30d17016756cab45774bc4ccf3231d5200d867d92aef", + "capture": { + "backend": "Comfy-Org/cloud", + "thread_id": "6b1502e7-a553-4d04-aa07-07786ab73223", + "exported_at": "2026-09-03T16:13:44.733Z" + } + }, + "workflow": { + "id": "79cf8c10-c40b-4f3a-8c88-c3961e3882fb", + "name": "Text to image", + "catalog": { + "types": { + "CheckpointLoaderSimple": { + "widget_order": ["ckpt_name"] + }, + "CLIPTextEncode": { + "widget_order": ["text"] + }, + "KSampler": { + "widget_order": [ + "seed", + "control_after_generate", + "steps", + "cfg", + "sampler_name", + "scheduler", + "denoise" + ] + }, + "VAEDecode": { + "widget_order": [] + }, + "SaveImage": { + "widget_order": ["filename_prefix"] + }, + "PrimitiveStringMultiline": { + "widget_order": ["value"] + }, + "EmptyLatentImage": { + "widget_order": ["width", "height", "batch_size"] + } + } + }, + "seed": { + "nodes": [ + { + "id": 4, + "type": "CheckpointLoaderSimple", + "pos": [0, 0], + "size": [315, 98], + "inputs": [], + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "links": [3] + }, + { + "name": "CLIP", + "type": "CLIP", + "links": [1] + }, + { + "name": "VAE", + "type": "VAE", + "links": [5] + } + ], + "widgets_values": ["sd_xl_base_1.0.safetensors"] + }, + { + "id": 6, + "type": "CLIPTextEncode", + "title": "Positive prompt", + "pos": [400, 0], + "size": [400, 200], + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 1 + }, + { + "name": "text", + "type": "STRING", + "widget": { + "name": "text" + }, + "link": null + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [2] + } + ], + "widgets_values": ["a photo of a pier"] + }, + { + "id": 3, + "type": "KSampler", + "pos": [850, 0], + "size": [315, 262], + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 3 + }, + { + "name": "positive", + "type": "CONDITIONING", + "link": 2 + }, + { + "name": "negative", + "type": "CONDITIONING", + "link": null + }, + { + "name": "latent_image", + "type": "LATENT", + "link": null + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [4] + } + ], + "widgets_values": [0, "randomize", 20, 7, "euler", "normal", 1] + }, + { + "id": 8, + "type": "VAEDecode", + "pos": [1200, 0], + "size": [210, 46], + "inputs": [ + { + "name": "samples", + "type": "LATENT", + "link": 4 + }, + { + "name": "vae", + "type": "VAE", + "link": 5 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [6] + } + ], + "widgets_values": [] + }, + { + "id": 9, + "type": "SaveImage", + "pos": [1450, 0], + "size": [315, 270], + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 6 + } + ], + "outputs": [], + "widgets_values": ["ComfyUI"] + } + ], + "links": [ + [1, 4, 1, 6, 0, "CLIP"], + [2, 6, 0, 3, 1, "CONDITIONING"], + [3, 4, 0, 3, 0, "MODEL"], + [4, 3, 0, 8, 0, "LATENT"], + [5, 4, 2, 8, 1, "VAE"], + [6, 8, 0, 9, 0, "IMAGE"] + ] + } + }, + "turns": [ + { + "message_id": "1a1dd9a7-3654-4869-beb4-7d9f1b3d8f67", + "request": { + "content": "Switch to the tab 'Text to image', then add a second CLIPTextEncode node fed from the checkpoint loader's CLIP output." + }, + "response": [ + { + "kind": "event", + "event": { + "type": "agent_thinking", + "data": { + "delta": "I'll switch to that tab and take a look at what's there." + } + }, + "at_ms": 0 + }, + { + "kind": "event", + "event": { + "type": "agent_active_tab", + "data": { + "name": "Text to image", + "workflow_id": "79cf8c10-c40b-4f3a-8c88-c3961e3882fb" + } + }, + "at_ms": 9 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 12, + "status": "success", + "tool_call_id": "toolu_0121DiG2dcAjwMFc9MmhTwmR", + "tool_name": "switch_tab" + } + }, + "at_ms": 13 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 1087, + "status": "success", + "tool_call_id": "toolu_014y3jiwHxLmhhhnNtrx1FSz", + "tool_name": "print_workflow" + } + }, + "at_ms": 3440 + }, + { + "kind": "graph_ops", + "ops": [ + { + "op": "add_node", + "pos": [715, 280], + "node": { + "id": 2785690574723683, + "pos": [715, 280], + "mode": 0, + "size": [240, 86], + "type": "CLIPTextEncode", + "flags": {}, + "order": 0, + "inputs": [ + { + "link": null, + "name": "clip", + "type": "CLIP" + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [] + } + ], + "properties": {}, + "widgets_values": [null] + }, + "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", + "op_id": "3e86cc1c94bb402ea9fbfc445f561025", + "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], + "node_id": 2785690574723683, + "class_type": "CLIPTextEncode", + "base_version": 2 + }, + { + "op": "connect", + "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", + "op_id": "6ceb8ce755854755b85f9b327d0e0963", + "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], + "link_id": 3432143374160979, + "to_node": 2785690574723683, + "to_slot": 0, + "from_node": 4, + "from_slot": 1, + "link_type": "CLIP", + "base_version": 2 + } + ], + "at_ms": 13977 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 567, + "status": "success", + "tool_call_id": "toolu_017yZpv6KmDDDbG6dxLL9YtE", + "tool_name": "apply_ops" + } + }, + "at_ms": 13977 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 552, + "status": "success", + "tool_call_id": "toolu_01C6dAj6DS4pZZCs2hqkFzeg", + "tool_name": "print_workflow" + } + }, + "at_ms": 17960 + }, + { + "kind": "event", + "event": { + "type": "agent_message_delta", + "data": { + "delta": "I'm on the \"Text to image\" tab now, and the second text encode node is in place, taking its text understanding from the same checkpoint loader as the first one.\n\nTwo things worth flagging, since I only did exactly what you asked:\n\n- Its text box is empty, and it isn't connected onward to anything yet — most likely you want it as the negative prompt into the sampler, whose negative input is currently empty.\n- That sampler is also missing its image-size input, so the workflow won't run as it stands regardless of this new node.\n\nSay the word and I'll wire the new node in as the negative prompt (with whatever text you want) and add the missing size input so it's ready to run." + } + }, + "at_ms": 22703 + }, + { + "kind": "event", + "event": { + "type": "agent_message_done", + "data": { + "usage": { + "cache_creation_input_tokens": 1934, + "cache_read_input_tokens": 192393, + "input_tokens": 10, + "output_tokens": 1057, + "total_tokens": 1067 + } + } + }, + "at_ms": 22708 + } + ] + }, + { + "message_id": "9be1516f-95b5-47b2-b939-46c60f141da7", + "request": { + "content": "Set the text on that new node to 'blurry, low quality'." + }, + "response": [ + { + "kind": "graph_ops", + "ops": [ + { + "op": "set_widget", + "old": null, + "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", + "op_id": "48d9d0f3b762483c903b80d543ef971d", + "stamp": [3, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], + "value": "blurry, low quality", + "widget": "text", + "node_id": 2785690574723683, + "base_version": 3 + } + ], + "at_ms": 0 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 687, + "status": "success", + "tool_call_id": "toolu_013VjTaSsWFeoXEkR6AUb9Gb", + "tool_name": "set_widget" + } + }, + "at_ms": 0 + }, + { + "kind": "event", + "event": { + "type": "agent_message_delta", + "data": { + "delta": "Done — the new node now reads \"blurry, low quality\". It's still not wired into the sampler, so it won't affect a render until I connect it as the negative prompt. Want me to do that?" + } + }, + "at_ms": 2300 + }, + { + "kind": "event", + "event": { + "type": "agent_message_done", + "data": { + "usage": { + "cache_creation_input_tokens": 993, + "cache_read_input_tokens": 76366, + "input_tokens": 4, + "output_tokens": 142, + "total_tokens": 146 + } + } + }, + "at_ms": 2304 + } + ] + }, + { + "message_id": "0b966fe0-ac97-4506-abbc-743051b5c526", + "request": { + "content": "Now delete that node again." + }, + "response": [ + { + "kind": "graph_ops", + "ops": [ + { + "op": "delete_node", + "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", + "op_id": "6c4742c08384414f975af16d5fbf5f91", + "stamp": [4, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], + "node_id": 2785690574723683, + "base_version": 4, + "removed_links": [3432143374160979] + } + ], + "at_ms": 0 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 561, + "status": "success", + "tool_call_id": "toolu_01VeBQyvK7MXKuSEjCGrmvK4", + "tool_name": "delete_node" + } + }, + "at_ms": 0 + }, + { + "kind": "event", + "event": { + "type": "agent_message_delta", + "data": { + "delta": "Removed — the canvas is back to the five original nodes." + } + }, + "at_ms": 2811 + }, + { + "kind": "event", + "event": { + "type": "agent_message_done", + "data": { + "usage": { + "cache_creation_input_tokens": 698, + "cache_read_input_tokens": 76763, + "input_tokens": 4, + "output_tokens": 96, + "total_tokens": 100 + } + } + }, + "at_ms": 2814 + } + ] + } + ] +} diff --git a/browser_tests/fixtures/data/agent/conversations/agent-rec-batched-ops.json b/browser_tests/fixtures/data/agent/conversations/agent-rec-batched-ops.json new file mode 100644 index 00000000000..89acc9502c7 --- /dev/null +++ b/browser_tests/fixtures/data/agent/conversations/agent-rec-batched-ops.json @@ -0,0 +1,384 @@ +{ + "schema_version": "agent-conversation.v2", + "source": { + "repo": "Comfy-Org/ComfyUI_frontend", + "suite": "agent", + "case_id": "agent-rec-batched-ops", + "response_side": "recorded", + "note": "RECORDED from Comfy-Org/cloud services/agent running NON-standalone local full stack (Postgres + doc host, M2M identity headers) at http://127.0.0.1:8086 (frames: redis SUBSCRIBE channel:ws::u:); NOT a production capture. cloud commit 9dc1da7dae2a1d40a9ca1f2a1f91cd9fd9e10900; model claude-opus-5; thread a6fd73be-e957-45b7-a5e0-5edd091670fb; message 9f88da92-5074-4091-850b-7cbc65005cd1; workflow e539bb63-bc5d-4f97-b918-d85862c0f591 (seeded by throwaway turn 365de61d-2131-4966-af0b-fe7ccda288bf; the recorded turn opens on a fresh workflow and switches to it first because the replay subscribes only on an agent_active_tab frame, see plan Q4); agent_tool_calls parent rows ['ae918468-c270-4d05-b0ef-31198a63cf0e', '069a03fa-3094-4fa4-821d-797672439db7', '044e431e-059e-45b1-b82d-45e25a92f2bf']; rows agent-rec-batched-ops.t-a1.rows.json; raw capture sha256 92757967c82950945ea1a183dbcfcb8d111ae768b3ea16a72348bb0e216b709e", + "capture": { + "backend": "Comfy-Org/cloud", + "thread_id": "a6fd73be-e957-45b7-a5e0-5edd091670fb", + "exported_at": "2026-09-03T12:40:55Z" + } + }, + "workflow": { + "id": "e539bb63-bc5d-4f97-b918-d85862c0f591", + "name": "Text to image", + "catalog": { + "types": { + "CheckpointLoaderSimple": { + "widget_order": ["ckpt_name"] + }, + "CLIPTextEncode": { + "widget_order": ["text"] + }, + "KSampler": { + "widget_order": [ + "seed", + "control_after_generate", + "steps", + "cfg", + "sampler_name", + "scheduler", + "denoise" + ] + }, + "VAEDecode": { + "widget_order": [] + }, + "SaveImage": { + "widget_order": ["filename_prefix"] + }, + "PrimitiveStringMultiline": { + "widget_order": ["value"] + }, + "EmptyLatentImage": { + "widget_order": ["width", "height", "batch_size"] + } + } + }, + "seed": { + "nodes": [ + { + "id": 4, + "type": "CheckpointLoaderSimple", + "pos": [0, 0], + "size": [315, 98], + "inputs": [], + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "links": [3] + }, + { + "name": "CLIP", + "type": "CLIP", + "links": [1] + }, + { + "name": "VAE", + "type": "VAE", + "links": [5] + } + ], + "widgets_values": ["sd_xl_base_1.0.safetensors"] + }, + { + "id": 6, + "type": "CLIPTextEncode", + "title": "Positive prompt", + "pos": [400, 0], + "size": [400, 200], + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 1 + }, + { + "name": "text", + "type": "STRING", + "widget": { + "name": "text" + }, + "link": null + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [2] + } + ], + "widgets_values": ["a photo of a pier"] + }, + { + "id": 3, + "type": "KSampler", + "pos": [850, 0], + "size": [315, 262], + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 3 + }, + { + "name": "positive", + "type": "CONDITIONING", + "link": 2 + }, + { + "name": "negative", + "type": "CONDITIONING", + "link": null + }, + { + "name": "latent_image", + "type": "LATENT", + "link": null + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [4] + } + ], + "widgets_values": [0, "randomize", 20, 7, "euler", "normal", 1] + }, + { + "id": 8, + "type": "VAEDecode", + "pos": [1200, 0], + "size": [210, 46], + "inputs": [ + { + "name": "samples", + "type": "LATENT", + "link": 4 + }, + { + "name": "vae", + "type": "VAE", + "link": 5 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [6] + } + ], + "widgets_values": [] + }, + { + "id": 9, + "type": "SaveImage", + "pos": [1450, 0], + "size": [315, 270], + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 6 + } + ], + "outputs": [], + "widgets_values": ["ComfyUI"] + } + ], + "links": [ + [1, 4, 1, 6, 0, "CLIP"], + [2, 6, 0, 3, 1, "CONDITIONING"], + [3, 4, 0, 3, 0, "MODEL"], + [4, 3, 0, 8, 0, "LATENT"], + [5, 4, 2, 8, 1, "VAE"], + [6, 8, 0, 9, 0, "IMAGE"] + ] + } + }, + "turns": [ + { + "message_id": "9f88da92-5074-4091-850b-7cbc65005cd1", + "request": { + "content": "Switch to the tab 'Text to image', then in ONE apply_ops call add two CLIPTextEncode nodes and wire both of their CLIP inputs from the checkpoint loader. Use a single batched tool call for all four operations." + }, + "response": [ + { + "kind": "event", + "event": { + "type": "agent_active_tab", + "data": { + "name": "Text to image", + "workflow_id": "e539bb63-bc5d-4f97-b918-d85862c0f591" + } + }, + "at_ms": 0 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 7, + "status": "success", + "tool_call_id": "toolu_01UJ5hWx9Rxkvwon9F7nMGaK", + "tool_name": "switch_tab" + } + }, + "at_ms": 2 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 368, + "status": "success", + "tool_call_id": "toolu_011QfP8raZRXJbK5WZYpKTkv", + "tool_name": "print_workflow" + } + }, + "at_ms": 2139 + }, + { + "kind": "graph_ops", + "ops": [ + { + "op": "add_node", + "pos": [715, 280], + "node": { + "id": 2559261621971657, + "pos": [715, 280], + "mode": 0, + "size": [240, 86], + "type": "CLIPTextEncode", + "flags": {}, + "order": 0, + "inputs": [ + { + "link": null, + "name": "clip", + "type": "CLIP" + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [] + } + ], + "properties": {}, + "widgets_values": [null] + }, + "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", + "op_id": "7a130c22fe934bc98e2ea2fed6bd10ad", + "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], + "node_id": 2559261621971657, + "class_type": "CLIPTextEncode", + "base_version": 2 + }, + { + "op": "add_node", + "pos": [715, 406], + "node": { + "id": 2214070360209981, + "pos": [715, 406], + "mode": 0, + "size": [240, 86], + "type": "CLIPTextEncode", + "flags": {}, + "order": 0, + "inputs": [ + { + "link": null, + "name": "clip", + "type": "CLIP" + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [] + } + ], + "properties": {}, + "widgets_values": [null] + }, + "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", + "op_id": "00b500c587744366b85d5c71ddbc9fdf", + "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], + "node_id": 2214070360209981, + "class_type": "CLIPTextEncode", + "base_version": 2 + }, + { + "op": "connect", + "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", + "op_id": "e9e5c529eb574496a516dd6014ffd5e6", + "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], + "link_id": 879068618000012, + "to_node": 2559261621971657, + "to_slot": 0, + "from_node": 4, + "from_slot": 1, + "link_type": "CLIP", + "base_version": 2 + }, + { + "op": "connect", + "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", + "op_id": "c7f256bd0cd34e92830062aeea907b4c", + "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], + "link_id": 3832075311322831, + "to_node": 2214070360209981, + "to_slot": 0, + "from_node": 4, + "from_slot": 1, + "link_type": "CLIP", + "base_version": 2 + } + ], + "at_ms": 5208 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 199, + "status": "success", + "tool_call_id": "toolu_01PhJ8AyewzRU6PHk7aFGfbC", + "tool_name": "apply_ops" + } + }, + "at_ms": 5208 + }, + { + "kind": "event", + "event": { + "type": "agent_message_delta", + "data": { + "delta": "Done — I'm now on your \"Text to image\" tab, and both new text prompt nodes are on the canvas with their CLIP inputs wired from the checkpoint loader. They're not connected to anything downstream yet, so tell me if you'd like one hooked up as a negative prompt." + } + }, + "at_ms": 7784 + }, + { + "kind": "event", + "event": { + "type": "agent_message_done", + "data": { + "usage": { + "cache_creation_input_tokens": 1437, + "cache_read_input_tokens": 153211, + "input_tokens": 8, + "output_tokens": 574, + "total_tokens": 582 + } + } + }, + "at_ms": 7786 + } + ] + } + ] +} diff --git a/browser_tests/fixtures/data/agent/conversations/agent-rec-clarifying-question.json b/browser_tests/fixtures/data/agent/conversations/agent-rec-clarifying-question.json new file mode 100644 index 00000000000..88f5defe19a --- /dev/null +++ b/browser_tests/fixtures/data/agent/conversations/agent-rec-clarifying-question.json @@ -0,0 +1,382 @@ +{ + "schema_version": "agent-conversation.v2", + "source": { + "repo": "Comfy-Org/ComfyUI_frontend", + "suite": "agent", + "case_id": "agent-rec-clarifying-question", + "response_side": "recorded", + "note": "RECORDED from Comfy-Org/cloud services/agent running NON-standalone local full stack (Postgres + doc host, M2M identity headers) at http://127.0.0.1:8086 (frames: redis SUBSCRIBE channel:ws::u:); NOT a production capture. cloud commit 9dc1da7dae2a1d40a9ca1f2a1f91cd9fd9e10900; model claude-opus-5; thread 381048aa-cb22-412d-bf2e-c16ad80e06fa; messages 7840b6d9-6ff2-4a68-bd13-61b3a034fa64, 27548445-c720-4c52-b70d-e91ba8e39d84; workflow b950700b-5321-4486-be99-a3183c04fdd6 (seeded by throwaway turn 21cc3da4-3ec9-4a98-9dff-078dccdc203c; turn 1 opens on a fresh workflow and switches to it first because the replay subscribes only on an agent_active_tab frame); agent_tool_calls parent rows 002c548d-a946-421a-a3a0-b07498eaf398, bb6e0c45-fee8-44ae-9cf0-f7be4a13ace1, bd0b33ed-e8f7-4e1a-9806-d4f48f646a2e, c45c5ccf-2d33-45b1-b735-3e62a8531c48, ceec4e8f-8008-4fa2-b74b-f9d9f9ef0a11, d197b92d-3788-43d9-b054-fa216de9e262; rows agent-rec-clarifying-question.f1.rows.1.json, agent-rec-clarifying-question.f1.rows.2.json; raw capture sha256 145e059591ebff7d96d0423832525d16e9492d34ed4405cebf531f2587b882bd", + "capture": { + "backend": "Comfy-Org/cloud", + "thread_id": "381048aa-cb22-412d-bf2e-c16ad80e06fa", + "exported_at": "2026-09-03T16:15:02.197Z" + } + }, + "workflow": { + "id": "b950700b-5321-4486-be99-a3183c04fdd6", + "name": "Text to image", + "catalog": { + "types": { + "CheckpointLoaderSimple": { + "widget_order": ["ckpt_name"] + }, + "CLIPTextEncode": { + "widget_order": ["text"] + }, + "KSampler": { + "widget_order": [ + "seed", + "control_after_generate", + "steps", + "cfg", + "sampler_name", + "scheduler", + "denoise" + ] + }, + "VAEDecode": { + "widget_order": [] + }, + "SaveImage": { + "widget_order": ["filename_prefix"] + }, + "PrimitiveStringMultiline": { + "widget_order": ["value"] + }, + "EmptyLatentImage": { + "widget_order": ["width", "height", "batch_size"] + } + } + }, + "seed": { + "nodes": [ + { + "id": 4, + "type": "CheckpointLoaderSimple", + "pos": [0, 0], + "size": [315, 98], + "inputs": [], + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "links": [3] + }, + { + "name": "CLIP", + "type": "CLIP", + "links": [1] + }, + { + "name": "VAE", + "type": "VAE", + "links": [5] + } + ], + "widgets_values": ["sd_xl_base_1.0.safetensors"] + }, + { + "id": 6, + "type": "CLIPTextEncode", + "title": "Positive prompt", + "pos": [400, 0], + "size": [400, 200], + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 1 + }, + { + "name": "text", + "type": "STRING", + "widget": { + "name": "text" + }, + "link": null + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [2] + } + ], + "widgets_values": ["a photo of a pier"] + }, + { + "id": 3, + "type": "KSampler", + "pos": [850, 0], + "size": [315, 262], + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 3 + }, + { + "name": "positive", + "type": "CONDITIONING", + "link": 2 + }, + { + "name": "negative", + "type": "CONDITIONING", + "link": null + }, + { + "name": "latent_image", + "type": "LATENT", + "link": null + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [4] + } + ], + "widgets_values": [0, "randomize", 20, 7, "euler", "normal", 1] + }, + { + "id": 8, + "type": "VAEDecode", + "pos": [1200, 0], + "size": [210, 46], + "inputs": [ + { + "name": "samples", + "type": "LATENT", + "link": 4 + }, + { + "name": "vae", + "type": "VAE", + "link": 5 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [6] + } + ], + "widgets_values": [] + }, + { + "id": 9, + "type": "SaveImage", + "pos": [1450, 0], + "size": [315, 270], + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 6 + } + ], + "outputs": [], + "widgets_values": ["ComfyUI"] + } + ], + "links": [ + [1, 4, 1, 6, 0, "CLIP"], + [2, 6, 0, 3, 1, "CONDITIONING"], + [3, 4, 0, 3, 0, "MODEL"], + [4, 3, 0, 8, 0, "LATENT"], + [5, 4, 2, 8, 1, "VAE"], + [6, 8, 0, 9, 0, "IMAGE"] + ] + } + }, + "turns": [ + { + "message_id": "7840b6d9-6ff2-4a68-bd13-61b3a034fa64", + "request": { + "content": "Switch to the tab 'Text to image', then change the sampler settings to what I usually use." + }, + "response": [ + { + "kind": "event", + "event": { + "type": "agent_thinking", + "data": { + "delta": "I'll switch over and take a look." + } + }, + "at_ms": 0 + }, + { + "kind": "event", + "event": { + "type": "agent_active_tab", + "data": { + "name": "Text to image", + "workflow_id": "b950700b-5321-4486-be99-a3183c04fdd6" + } + }, + "at_ms": 6 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 8, + "status": "success", + "tool_call_id": "toolu_01D7DvH5K6Le4AHND8CpE67L", + "tool_name": "switch_tab" + } + }, + "at_ms": 8 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 485, + "status": "success", + "tool_call_id": "toolu_014TjmyKK7o5K5KvknkdnyNg", + "tool_name": "list_workflows" + } + }, + "at_ms": 495 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 651, + "status": "success", + "tool_call_id": "toolu_01XmVQKJjiMPr5EKeqZAP4DV", + "tool_name": "print_workflow" + } + }, + "at_ms": 5050 + }, + { + "kind": "event", + "event": { + "type": "agent_message_delta", + "data": { + "delta": "I'm on the \"Text to image\" tab now, but I don't have any record of your usual sampler settings — nothing saved from earlier in our conversation, and this is the first workflow I've seen from you. Rather than guess and quietly change your image, tell me the values and I'll set them (and remember them for next time).\n\nRight now the sampler is on:\n\n- **Steps:** 20\n- **CFG:** 7\n- **Sampler:** euler\n- **Scheduler:** normal\n- **Denoise:** 1.0\n- **Seed:** 0, randomized each run\n\nJust say what you want them changed to — e.g. \"30 steps, cfg 4.5, dpmpp_2m karras\" — or tell me the name of a workflow where I can read them off, and I'll copy them across.\n\nOne other thing worth flagging: this graph is missing a negative prompt and an image-size input into the sampler, so it won't run as-is. I can add both while I'm in there." + } + }, + "at_ms": 15015 + }, + { + "kind": "event", + "event": { + "type": "agent_message_done", + "data": { + "usage": { + "cache_creation_input_tokens": 1107, + "cache_read_input_tokens": 114403, + "input_tokens": 6, + "output_tokens": 1188, + "total_tokens": 1194 + } + } + }, + "at_ms": 15024 + } + ] + }, + { + "message_id": "27548445-c720-4c52-b70d-e91ba8e39d84", + "request": { + "content": "I usually use 30 steps. Please set that." + }, + "response": [ + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 410, + "status": "success", + "tool_call_id": "toolu_015dGdCUUtvrvn6mmPnmJFqf", + "tool_name": "list_slots" + } + }, + "at_ms": 0 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 4, + "status": "success", + "tool_call_id": "toolu_01BWJuBc6xzadt7MaMEyRWRR", + "tool_name": "remember" + } + }, + "at_ms": 5 + }, + { + "kind": "graph_ops", + "ops": [ + { + "op": "set_widget", + "old": 20, + "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", + "op_id": "4dd001682cf84979aad990491f1eee77", + "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], + "value": 30, + "widget": "steps", + "node_id": 3, + "base_version": 2 + } + ], + "at_ms": 2167 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 200, + "status": "success", + "tool_call_id": "toolu_018mxuaGyTs3SbYEqAm7fCR1", + "tool_name": "set_widget" + } + }, + "at_ms": 2167 + }, + { + "kind": "event", + "event": { + "type": "agent_message_delta", + "data": { + "delta": "Steps are now 30, and I've noted that as your default for next time.\n\nThe graph still won't run as-is — the sampler has no negative prompt or image-size input wired in. Want me to add those?" + } + }, + "at_ms": 4544 + }, + { + "kind": "event", + "event": { + "type": "agent_message_done", + "data": { + "usage": { + "cache_creation_input_tokens": 1485, + "cache_read_input_tokens": 115445, + "input_tokens": 6, + "output_tokens": 507, + "total_tokens": 513 + } + } + }, + "at_ms": 4549 + } + ] + } + ] +} diff --git a/browser_tests/fixtures/data/agent/conversations/agent-rec-refiner-between.json b/browser_tests/fixtures/data/agent/conversations/agent-rec-refiner-between.json new file mode 100644 index 00000000000..b5ca120cf8b --- /dev/null +++ b/browser_tests/fixtures/data/agent/conversations/agent-rec-refiner-between.json @@ -0,0 +1,448 @@ +{ + "schema_version": "agent-conversation.v2", + "source": { + "repo": "Comfy-Org/ComfyUI_frontend", + "suite": "agent", + "case_id": "agent-rec-refiner-between", + "response_side": "recorded", + "note": "RECORDED from Comfy-Org/cloud services/agent running NON-standalone local full stack (Postgres + doc host, M2M identity headers) at http://127.0.0.1:8086 (frames: redis SUBSCRIBE channel:ws::u:); NOT a production capture. cloud commit 9dc1da7dae2a1d40a9ca1f2a1f91cd9fd9e10900; model claude-opus-5; thread 5208dc27-0c2c-4ff3-ad1d-bf7e9ad79e9a; message b363781f-6c9a-4087-9190-d478781bbcd2; workflow b7d1e09f-682a-48f5-a388-d74a33ad5184 (seeded by throwaway turn 52d56bcf-7eb0-4131-a287-223e0f15e2e9; the recorded turn opens on a fresh workflow and switches to it first because the replay subscribes only on an agent_active_tab frame, see plan Q4); agent_tool_calls parent rows ['2f4c246a-f0c7-4ca4-ad48-814bc2fe9ab6', '9727d8d7-19f4-48eb-98e6-5c054d3d6cf0', '22b43a2d-5fe8-49c0-8339-e2b3b52bf184', '33953182-42ff-46a6-a0d5-313c5a55d630', '349abb83-7fed-424e-8fb5-dc94e412aa90']; rows agent-rec-refiner-between.t-a1.rows.json; raw capture sha256 242b1c822b8b7697bdcdf1448030181ef0bb1049806870e9075077ca44897768", + "capture": { + "backend": "Comfy-Org/cloud", + "thread_id": "5208dc27-0c2c-4ff3-ad1d-bf7e9ad79e9a", + "exported_at": "2026-09-03T12:40:55Z" + } + }, + "workflow": { + "id": "b7d1e09f-682a-48f5-a388-d74a33ad5184", + "name": "Text to image", + "catalog": { + "types": { + "CheckpointLoaderSimple": { + "widget_order": ["ckpt_name"] + }, + "CLIPTextEncode": { + "widget_order": ["text"] + }, + "KSampler": { + "widget_order": [ + "seed", + "control_after_generate", + "steps", + "cfg", + "sampler_name", + "scheduler", + "denoise" + ] + }, + "VAEDecode": { + "widget_order": [] + }, + "SaveImage": { + "widget_order": ["filename_prefix"] + }, + "PrimitiveStringMultiline": { + "widget_order": ["value"] + }, + "EmptyLatentImage": { + "widget_order": ["width", "height", "batch_size"] + } + } + }, + "seed": { + "nodes": [ + { + "id": 4, + "type": "CheckpointLoaderSimple", + "pos": [0, 0], + "size": [315, 98], + "inputs": [], + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "links": [3] + }, + { + "name": "CLIP", + "type": "CLIP", + "links": [1] + }, + { + "name": "VAE", + "type": "VAE", + "links": [5] + } + ], + "widgets_values": ["sd_xl_base_1.0.safetensors"] + }, + { + "id": 6, + "type": "CLIPTextEncode", + "title": "Positive prompt", + "pos": [400, 0], + "size": [400, 200], + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 1 + }, + { + "name": "text", + "type": "STRING", + "widget": { + "name": "text" + }, + "link": null + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [2] + } + ], + "widgets_values": ["a photo of a pier"] + }, + { + "id": 3, + "type": "KSampler", + "pos": [850, 0], + "size": [315, 262], + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 3 + }, + { + "name": "positive", + "type": "CONDITIONING", + "link": 2 + }, + { + "name": "negative", + "type": "CONDITIONING", + "link": null + }, + { + "name": "latent_image", + "type": "LATENT", + "link": null + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [4] + } + ], + "widgets_values": [0, "randomize", 20, 7, "euler", "normal", 1] + }, + { + "id": 8, + "type": "VAEDecode", + "pos": [1200, 0], + "size": [210, 46], + "inputs": [ + { + "name": "samples", + "type": "LATENT", + "link": 4 + }, + { + "name": "vae", + "type": "VAE", + "link": 5 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [6] + } + ], + "widgets_values": [] + }, + { + "id": 9, + "type": "SaveImage", + "pos": [1450, 0], + "size": [315, 270], + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 6 + } + ], + "outputs": [], + "widgets_values": ["ComfyUI"] + } + ], + "links": [ + [1, 4, 1, 6, 0, "CLIP"], + [2, 6, 0, 3, 1, "CONDITIONING"], + [3, 4, 0, 3, 0, "MODEL"], + [4, 3, 0, 8, 0, "LATENT"], + [5, 4, 2, 8, 1, "VAE"], + [6, 8, 0, 9, 0, "IMAGE"] + ] + } + }, + "turns": [ + { + "message_id": "b363781f-6c9a-4087-9190-d478781bbcd2", + "request": { + "content": "Switch to the tab 'Text to image', then add a second KSampler as a refiner: feed it the first sampler's LATENT output, and wire its own LATENT output into the VAE decoder's samples input." + }, + "response": [ + { + "kind": "event", + "event": { + "type": "agent_thinking", + "data": { + "delta": "I'll switch to that tab and read what's there." + } + }, + "at_ms": 0 + }, + { + "kind": "event", + "event": { + "type": "agent_active_tab", + "data": { + "name": "Text to image", + "workflow_id": "b7d1e09f-682a-48f5-a388-d74a33ad5184" + } + }, + "at_ms": 5 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 5, + "status": "success", + "tool_call_id": "toolu_01Bq7cRyMamrEnmo4yHuMphE", + "tool_name": "switch_tab" + } + }, + "at_ms": 6 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 747, + "status": "success", + "tool_call_id": "toolu_01FEPdyTv3FtKtL8S6zTKj33", + "tool_name": "print_workflow" + } + }, + "at_ms": 3053 + }, + { + "kind": "graph_ops", + "ops": [ + { + "op": "add_node", + "pos": [1565, 280], + "node": { + "id": 2092962753103866, + "pos": [1565, 280], + "mode": 0, + "size": [240, 290], + "type": "KSampler", + "flags": {}, + "order": 0, + "inputs": [ + { + "link": null, + "name": "model", + "type": "MODEL" + }, + { + "link": null, + "name": "positive", + "type": "CONDITIONING" + }, + { + "link": null, + "name": "negative", + "type": "CONDITIONING" + }, + { + "link": null, + "name": "latent_image", + "type": "LATENT" + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [] + } + ], + "properties": {}, + "widgets_values": [0, "fixed", 20, 8, "euler", "simple", 1] + }, + "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", + "op_id": "a3b5b79791364f75b1d89391a7a87564", + "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], + "node_id": 2092962753103866, + "class_type": "KSampler", + "base_version": 2 + }, + { + "op": "connect", + "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", + "op_id": "a5d9733c860c40798848bf92d649988f", + "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], + "link_id": 4414751122447181, + "to_node": 2092962753103866, + "to_slot": 3, + "from_node": 3, + "from_slot": 0, + "link_type": "LATENT", + "base_version": 2 + }, + { + "op": "connect", + "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", + "op_id": "7ced254ebc4a417589c32b5a1797452d", + "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], + "link_id": 863234800411381, + "to_node": 2092962753103866, + "to_slot": 0, + "from_node": 4, + "from_slot": 0, + "link_type": "MODEL", + "base_version": 2 + }, + { + "op": "connect", + "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", + "op_id": "57585fd740934c15835cef60c216c84c", + "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], + "link_id": 3220756471207314, + "to_node": 2092962753103866, + "to_slot": 1, + "from_node": 6, + "from_slot": 0, + "link_type": "CONDITIONING", + "base_version": 2 + }, + { + "op": "connect", + "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", + "op_id": "bb113cee68314103861361151c93ad36", + "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], + "link_id": 619699595909791, + "to_node": 8, + "to_slot": 0, + "from_node": 2092962753103866, + "from_slot": 0, + "link_type": "LATENT", + "base_version": 2 + }, + { + "op": "set_widget", + "old": 1, + "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", + "op_id": "8ba837eb610e4e0db4561b789bb44953", + "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], + "value": 0.5, + "widget": "denoise", + "node_id": 2092962753103866, + "base_version": 2 + }, + { + "op": "set_widget", + "old": 20, + "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", + "op_id": "e83bac70162244fa96c7d4633dd5fccc", + "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], + "value": 20, + "widget": "steps", + "node_id": 2092962753103866, + "base_version": 2 + } + ], + "at_ms": 11793 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 198, + "status": "success", + "tool_call_id": "toolu_01LqYJ1bi41MTaeDXdzC9A9j", + "tool_name": "apply_ops" + } + }, + "at_ms": 11793 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 379, + "status": "success", + "tool_call_id": "toolu_01DAfeiUo97WETr7TRCrv4Cp", + "tool_name": "print_workflow" + } + }, + "at_ms": 14468 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 199, + "status": "error", + "tool_call_id": "toolu_01G8xCCA9NuoEur1n8RySCWK", + "tool_name": "validate" + } + }, + "at_ms": 19339 + }, + { + "kind": "event", + "event": { + "type": "agent_message_delta", + "data": { + "delta": "The refiner is in and wired: the first sampler's latent feeds it, and its own latent now drives the VAE decoder into your save node.\n\nTwo things were already unfinished in this graph before I touched it, and they'll block a run:\n\n- Neither sampler has a negative prompt connected, and there's no empty-latent node feeding the first sampler.\n- The checkpoint it points at isn't installed here, so no model file is actually available.\n\nI set the refiner to 20 steps at 0.5 denoise, which is a sensible second-pass default. Want me to add the missing negative prompt and latent-size nodes and pick an installed checkpoint so it can actually run?" + } + }, + "at_ms": 29476 + }, + { + "kind": "event", + "event": { + "type": "agent_message_done", + "data": { + "usage": { + "cache_creation_input_tokens": 2906, + "cache_read_input_tokens": 232638, + "input_tokens": 12, + "output_tokens": 1422, + "total_tokens": 1434 + } + } + }, + "at_ms": 29482 + } + ] + } + ] +} diff --git a/browser_tests/fixtures/data/agent/conversations/agent-rec-replace-prompt-encoder.json b/browser_tests/fixtures/data/agent/conversations/agent-rec-replace-prompt-encoder.json new file mode 100644 index 00000000000..964ce2952c2 --- /dev/null +++ b/browser_tests/fixtures/data/agent/conversations/agent-rec-replace-prompt-encoder.json @@ -0,0 +1,411 @@ +{ + "schema_version": "agent-conversation.v2", + "source": { + "repo": "Comfy-Org/ComfyUI_frontend", + "suite": "agent", + "case_id": "agent-rec-replace-prompt-encoder", + "response_side": "recorded", + "note": "RECORDED from Comfy-Org/cloud services/agent running NON-standalone local full stack (Postgres + doc host, M2M identity headers) at http://127.0.0.1:8086 (frames: redis SUBSCRIBE channel:ws::u:); NOT a production capture. cloud commit 9dc1da7dae2a1d40a9ca1f2a1f91cd9fd9e10900; model claude-opus-5; thread 2ce25f4b-d581-4348-ab9c-3f4170222f6f; message 37504547-e90d-4c14-91c7-b8f8fb65a0eb; workflow 5a6b35c4-8902-479d-87ab-8a9a07f08b90 (seeded by throwaway turn 3add9fbe-1dbb-4d5f-b255-d0fde410ed5e; the recorded turn opens on a fresh workflow and switches to it first because the replay subscribes only on an agent_active_tab frame, see plan Q4); agent_tool_calls parent rows ['d6e50c4a-5ef2-46bb-a48d-46473a36e13f', '6471d9bc-2e6f-41f1-b2c9-b417e7b9ecea', '3bda2337-3236-4585-9803-f8cbc1625d0a', '7cba8d9d-ebe4-481f-82e9-354377d2826e', '9d9678dd-2f0c-47eb-98da-0ec3720ff91d']; rows agent-rec-replace-prompt-encoder.t-a1.rows.json; raw capture sha256 eabe622a684331aa98da2a1a797cf0f761e3c866bcce8feaf2e1083a6fb7ff26", + "capture": { + "backend": "Comfy-Org/cloud", + "thread_id": "2ce25f4b-d581-4348-ab9c-3f4170222f6f", + "exported_at": "2026-09-03T12:40:55Z" + } + }, + "workflow": { + "id": "5a6b35c4-8902-479d-87ab-8a9a07f08b90", + "name": "Text to image", + "catalog": { + "types": { + "CheckpointLoaderSimple": { + "widget_order": ["ckpt_name"] + }, + "CLIPTextEncode": { + "widget_order": ["text"] + }, + "KSampler": { + "widget_order": [ + "seed", + "control_after_generate", + "steps", + "cfg", + "sampler_name", + "scheduler", + "denoise" + ] + }, + "VAEDecode": { + "widget_order": [] + }, + "SaveImage": { + "widget_order": ["filename_prefix"] + }, + "PrimitiveStringMultiline": { + "widget_order": ["value"] + }, + "EmptyLatentImage": { + "widget_order": ["width", "height", "batch_size"] + } + } + }, + "seed": { + "nodes": [ + { + "id": 4, + "type": "CheckpointLoaderSimple", + "pos": [0, 0], + "size": [315, 98], + "inputs": [], + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "links": [3] + }, + { + "name": "CLIP", + "type": "CLIP", + "links": [1] + }, + { + "name": "VAE", + "type": "VAE", + "links": [5] + } + ], + "widgets_values": ["sd_xl_base_1.0.safetensors"] + }, + { + "id": 6, + "type": "CLIPTextEncode", + "title": "Positive prompt", + "pos": [400, 0], + "size": [400, 200], + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 1 + }, + { + "name": "text", + "type": "STRING", + "widget": { + "name": "text" + }, + "link": null + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [2] + } + ], + "widgets_values": ["a photo of a pier"] + }, + { + "id": 3, + "type": "KSampler", + "pos": [850, 0], + "size": [315, 262], + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 3 + }, + { + "name": "positive", + "type": "CONDITIONING", + "link": 2 + }, + { + "name": "negative", + "type": "CONDITIONING", + "link": null + }, + { + "name": "latent_image", + "type": "LATENT", + "link": null + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [4] + } + ], + "widgets_values": [0, "randomize", 20, 7, "euler", "normal", 1] + }, + { + "id": 8, + "type": "VAEDecode", + "pos": [1200, 0], + "size": [210, 46], + "inputs": [ + { + "name": "samples", + "type": "LATENT", + "link": 4 + }, + { + "name": "vae", + "type": "VAE", + "link": 5 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [6] + } + ], + "widgets_values": [] + }, + { + "id": 9, + "type": "SaveImage", + "pos": [1450, 0], + "size": [315, 270], + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 6 + } + ], + "outputs": [], + "widgets_values": ["ComfyUI"] + } + ], + "links": [ + [1, 4, 1, 6, 0, "CLIP"], + [2, 6, 0, 3, 1, "CONDITIONING"], + [3, 4, 0, 3, 0, "MODEL"], + [4, 3, 0, 8, 0, "LATENT"], + [5, 4, 2, 8, 1, "VAE"], + [6, 8, 0, 9, 0, "IMAGE"] + ] + } + }, + "turns": [ + { + "message_id": "37504547-e90d-4c14-91c7-b8f8fb65a0eb", + "request": { + "content": "Switch to the tab 'Text to image', then delete the positive prompt node (node 6) and add a fresh CLIPTextEncode wired the same way: CLIP from the checkpoint loader, conditioning into the KSampler's positive input." + }, + "response": [ + { + "kind": "event", + "event": { + "type": "agent_thinking", + "data": { + "delta": "I'll switch to that tab first." + } + }, + "at_ms": 0 + }, + { + "kind": "event", + "event": { + "type": "agent_active_tab", + "data": { + "name": "Text to image", + "workflow_id": "5a6b35c4-8902-479d-87ab-8a9a07f08b90" + } + }, + "at_ms": 7 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 10, + "status": "success", + "tool_call_id": "toolu_01PbXSHPoAUnHhX2dqzJXiLB", + "tool_name": "switch_tab" + } + }, + "at_ms": 11 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 295, + "status": "success", + "tool_call_id": "toolu_01C2g2RACFUykeibS1je1Tbh", + "tool_name": "print_workflow" + } + }, + "at_ms": 3673 + }, + { + "kind": "graph_ops", + "ops": [ + { + "op": "add_node", + "pos": [715, 280], + "node": { + "id": 4181654812796082, + "pos": [715, 280], + "mode": 0, + "size": [240, 86], + "type": "CLIPTextEncode", + "flags": {}, + "order": 0, + "inputs": [ + { + "link": null, + "name": "clip", + "type": "CLIP" + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [] + } + ], + "properties": {}, + "widgets_values": [null] + }, + "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", + "op_id": "4c4d739392f14272939cf46a335652c8", + "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], + "node_id": 4181654812796082, + "class_type": "CLIPTextEncode", + "base_version": 2 + }, + { + "op": "connect", + "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", + "op_id": "f1cd3aef4b984b04a9611a53f69763ba", + "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], + "link_id": 3320191292493608, + "to_node": 4181654812796082, + "to_slot": 0, + "from_node": 4, + "from_slot": 1, + "link_type": "CLIP", + "base_version": 2 + }, + { + "op": "connect", + "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", + "op_id": "4f4de6968f124e23a3114f8c88a1a766", + "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], + "link_id": 2686273519871711, + "to_node": 3, + "to_slot": 1, + "from_node": 4181654812796082, + "from_slot": 0, + "link_type": "CONDITIONING", + "base_version": 2 + }, + { + "op": "set_widget", + "old": null, + "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", + "op_id": "279c55a82f09416f9fa68e47ee11fafc", + "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], + "value": "a photo of a pier", + "widget": "text", + "node_id": 4181654812796082, + "base_version": 2 + } + ], + "at_ms": 10451 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 223, + "status": "success", + "tool_call_id": "toolu_018Ao8cDcxmDBaz9qV7PWpGx", + "tool_name": "apply_ops" + } + }, + "at_ms": 10451 + }, + { + "kind": "graph_ops", + "ops": [ + { + "op": "delete_node", + "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", + "op_id": "b141d8503ee54cde94d3a4e3f6b5204f", + "stamp": [3, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], + "node_id": 6, + "base_version": 3, + "removed_links": [1] + } + ], + "at_ms": 15515 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 202, + "status": "success", + "tool_call_id": "toolu_01QkN5N4e8fkpBrT9aWbb4aK", + "tool_name": "delete_node" + } + }, + "at_ms": 15515 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 199, + "status": "success", + "tool_call_id": "toolu_01QUTSXXBfU7oShpWRkxtLzD", + "tool_name": "print_workflow" + } + }, + "at_ms": 18022 + }, + { + "kind": "event", + "event": { + "type": "agent_message_delta", + "data": { + "delta": "Done — I'm on the \"Text to image\" tab, the old positive prompt node is gone, and a fresh one is in its place, taking CLIP from the checkpoint loader and feeding the sampler's positive input. I carried over the same prompt text (\"a photo of a pier\").\n\nOne thing unrelated to this swap: the sampler's negative prompt and empty latent inputs were already unconnected before I started, so the graph won't run until those are filled in. Want me to add them?" + } + }, + "at_ms": 22947 + }, + { + "kind": "event", + "event": { + "type": "agent_message_done", + "data": { + "usage": { + "cache_creation_input_tokens": 2216, + "cache_read_input_tokens": 232121, + "input_tokens": 12, + "output_tokens": 885, + "total_tokens": 897 + } + } + }, + "at_ms": 22951 + } + ] + } + ] +} diff --git a/browser_tests/fixtures/data/agent/conversations/agent-rec-set-widget-existing.json b/browser_tests/fixtures/data/agent/conversations/agent-rec-set-widget-existing.json new file mode 100644 index 00000000000..695b4c38a9e --- /dev/null +++ b/browser_tests/fixtures/data/agent/conversations/agent-rec-set-widget-existing.json @@ -0,0 +1,346 @@ +{ + "schema_version": "agent-conversation.v2", + "source": { + "repo": "Comfy-Org/ComfyUI_frontend", + "suite": "agent", + "case_id": "agent-rec-set-widget-existing", + "response_side": "recorded", + "note": "RECORDED from Comfy-Org/cloud services/agent running NON-standalone local full stack (Postgres + doc host, M2M identity headers) at http://127.0.0.1:8086 (frames: redis SUBSCRIBE channel:ws::u:); NOT a production capture. cloud commit 9dc1da7dae2a1d40a9ca1f2a1f91cd9fd9e10900; model claude-opus-5; thread b5d11187-d40e-4be1-aeab-39869516773b; message 19230873-0f07-4f85-a0ae-e9f1d740cb3a; workflow 5733b17e-39f4-40f5-aa1c-468a4f355b55 (seeded by throwaway turn d00f4278-8e50-4671-a49b-8a237f1797b4; the recorded turn opens on a fresh workflow and switches to it first because the replay subscribes only on an agent_active_tab frame, see plan Q4); agent_tool_calls parent rows ['2383f8e0-be34-4bb1-88c5-bbe0fd34ee95', '2b9744df-c52a-4b45-b0e8-96b64642075d', 'c93c9e49-1d3d-4507-9c3d-481a0910d2c4', 'c2b5e940-a8f3-49eb-b043-e6f8360c686c', 'b538294c-6add-4ebe-b351-c09cce102a0f']; rows agent-rec-set-widget-existing.t3-a1.rows.json; raw capture sha256 6a5a92d256bb83cfd9fb95be1f182300da2361bb15a4325ce2365de6f79ad0a9", + "capture": { + "backend": "Comfy-Org/cloud", + "thread_id": "b5d11187-d40e-4be1-aeab-39869516773b", + "exported_at": "2026-09-03T12:38:52Z" + } + }, + "workflow": { + "id": "5733b17e-39f4-40f5-aa1c-468a4f355b55", + "name": "Text to image", + "catalog": { + "types": { + "CheckpointLoaderSimple": { + "widget_order": ["ckpt_name"] + }, + "CLIPTextEncode": { + "widget_order": ["text"] + }, + "KSampler": { + "widget_order": [ + "seed", + "control_after_generate", + "steps", + "cfg", + "sampler_name", + "scheduler", + "denoise" + ] + }, + "VAEDecode": { + "widget_order": [] + }, + "SaveImage": { + "widget_order": ["filename_prefix"] + }, + "PrimitiveStringMultiline": { + "widget_order": ["value"] + }, + "EmptyLatentImage": { + "widget_order": ["width", "height", "batch_size"] + } + } + }, + "seed": { + "nodes": [ + { + "id": 4, + "type": "CheckpointLoaderSimple", + "pos": [0, 0], + "size": [315, 98], + "inputs": [], + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "links": [3] + }, + { + "name": "CLIP", + "type": "CLIP", + "links": [1] + }, + { + "name": "VAE", + "type": "VAE", + "links": [5] + } + ], + "widgets_values": ["sd_xl_base_1.0.safetensors"] + }, + { + "id": 6, + "type": "CLIPTextEncode", + "title": "Positive prompt", + "pos": [400, 0], + "size": [400, 200], + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 1 + }, + { + "name": "text", + "type": "STRING", + "widget": { + "name": "text" + }, + "link": null + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [2] + } + ], + "widgets_values": ["a photo of a pier"] + }, + { + "id": 3, + "type": "KSampler", + "pos": [850, 0], + "size": [315, 262], + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 3 + }, + { + "name": "positive", + "type": "CONDITIONING", + "link": 2 + }, + { + "name": "negative", + "type": "CONDITIONING", + "link": null + }, + { + "name": "latent_image", + "type": "LATENT", + "link": null + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [4] + } + ], + "widgets_values": [0, "randomize", 20, 7, "euler", "normal", 1] + }, + { + "id": 8, + "type": "VAEDecode", + "pos": [1200, 0], + "size": [210, 46], + "inputs": [ + { + "name": "samples", + "type": "LATENT", + "link": 4 + }, + { + "name": "vae", + "type": "VAE", + "link": 5 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [6] + } + ], + "widgets_values": [] + }, + { + "id": 9, + "type": "SaveImage", + "pos": [1450, 0], + "size": [315, 270], + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 6 + } + ], + "outputs": [], + "widgets_values": ["ComfyUI"] + } + ], + "links": [ + [1, 4, 1, 6, 0, "CLIP"], + [2, 6, 0, 3, 1, "CONDITIONING"], + [3, 4, 0, 3, 0, "MODEL"], + [4, 3, 0, 8, 0, "LATENT"], + [5, 4, 2, 8, 1, "VAE"], + [6, 8, 0, 9, 0, "IMAGE"] + ] + } + }, + "turns": [ + { + "message_id": "19230873-0f07-4f85-a0ae-e9f1d740cb3a", + "request": { + "content": "Switch to the tab 'Text to image', then set the KSampler's steps to 30 and its cfg to 5. Change nothing else." + }, + "response": [ + { + "kind": "event", + "event": { + "type": "agent_thinking", + "data": { + "delta": "I'll switch to that tab first." + } + }, + "at_ms": 0 + }, + { + "kind": "event", + "event": { + "type": "agent_active_tab", + "data": { + "name": "Text to image", + "workflow_id": "5733b17e-39f4-40f5-aa1c-468a4f355b55" + } + }, + "at_ms": 6 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 12, + "status": "success", + "tool_call_id": "toolu_0127MABi8i6cpznwzfMSk2b6", + "tool_name": "switch_tab" + } + }, + "at_ms": 12 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 498, + "status": "success", + "tool_call_id": "toolu_01DTMkDXHKWELHfKUTXUynfK", + "tool_name": "ls_nodes" + } + }, + "at_ms": 3903 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 425, + "status": "success", + "tool_call_id": "toolu_018Ck46iqTkvLjT12cDdcyH6", + "tool_name": "list_slots" + } + }, + "at_ms": 9834 + }, + { + "kind": "graph_ops", + "ops": [ + { + "op": "set_widget", + "old": 20, + "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", + "op_id": "5ee9143999c148439b6fc848bc8d309a", + "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], + "value": 30, + "widget": "steps", + "node_id": 3, + "base_version": 2 + }, + { + "op": "set_widget", + "old": 7, + "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", + "op_id": "7ad6e06be4f84086bec999cfc5177816", + "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], + "value": 5, + "widget": "cfg", + "node_id": 3, + "base_version": 2 + } + ], + "at_ms": 16908 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 253, + "status": "success", + "tool_call_id": "toolu_01BaTP7o2iAhJbBjQ9tChoEG", + "tool_name": "apply_ops" + } + }, + "at_ms": 16908 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 199, + "status": "success", + "tool_call_id": "toolu_01MLp2wvSBojXfwPYKqT7dvB", + "tool_name": "list_slots" + } + }, + "at_ms": 21478 + }, + { + "kind": "event", + "event": { + "type": "agent_message_delta", + "data": { + "delta": "You're now on the \"Text to image\" tab, with steps at 30 and cfg at 5. Nothing else was touched." + } + }, + "at_ms": 23927 + }, + { + "kind": "event", + "event": { + "type": "agent_message_done", + "data": { + "usage": { + "cache_creation_input_tokens": 1549, + "cache_read_input_tokens": 230832, + "input_tokens": 12, + "output_tokens": 509, + "total_tokens": 521 + } + } + }, + "at_ms": 23931 + } + ] + } + ] +} diff --git a/browser_tests/fixtures/data/agent/conversations/agent-rec-text-only-answer.json b/browser_tests/fixtures/data/agent/conversations/agent-rec-text-only-answer.json new file mode 100644 index 00000000000..66fc1ca04a2 --- /dev/null +++ b/browser_tests/fixtures/data/agent/conversations/agent-rec-text-only-answer.json @@ -0,0 +1,279 @@ +{ + "schema_version": "agent-conversation.v2", + "source": { + "repo": "Comfy-Org/ComfyUI_frontend", + "suite": "agent", + "case_id": "agent-rec-text-only-answer", + "response_side": "recorded", + "note": "RECORDED from Comfy-Org/cloud services/agent running NON-standalone local full stack (Postgres + doc host, M2M identity headers) at http://127.0.0.1:8086 (frames: redis SUBSCRIBE channel:ws::u:); NOT a production capture. cloud commit 9dc1da7dae2a1d40a9ca1f2a1f91cd9fd9e10900; model claude-opus-5; thread f36ef047-82b4-4f2b-b480-6df821df46da; message 7de6039c-c1b4-437c-871c-2f1fc67e1750; workflow d762837d-c64d-4829-9aba-05e71b64adc3 (seeded by throwaway turn c3727b7b-569e-4eda-983a-7ccfffbf4496; the recorded turn opens on a fresh workflow and switches to it first because the replay subscribes only on an agent_active_tab frame, see plan Q4); agent_tool_calls parent rows ['7622ee7b-b97a-4899-8931-99488b82bee5', '5547227c-9bef-4e95-9bd1-053fb658e7b4']; rows agent-rec-text-only-answer.t-a1.rows.json; raw capture sha256 24906bcf7826bc7860dd7b109ce8d243a1c6322f56a646ea53e5645cc795c387", + "capture": { + "backend": "Comfy-Org/cloud", + "thread_id": "f36ef047-82b4-4f2b-b480-6df821df46da", + "exported_at": "2026-09-03T12:40:56Z" + } + }, + "workflow": { + "id": "d762837d-c64d-4829-9aba-05e71b64adc3", + "name": "Text to image", + "catalog": { + "types": { + "CheckpointLoaderSimple": { + "widget_order": ["ckpt_name"] + }, + "CLIPTextEncode": { + "widget_order": ["text"] + }, + "KSampler": { + "widget_order": [ + "seed", + "control_after_generate", + "steps", + "cfg", + "sampler_name", + "scheduler", + "denoise" + ] + }, + "VAEDecode": { + "widget_order": [] + }, + "SaveImage": { + "widget_order": ["filename_prefix"] + }, + "PrimitiveStringMultiline": { + "widget_order": ["value"] + }, + "EmptyLatentImage": { + "widget_order": ["width", "height", "batch_size"] + } + } + }, + "seed": { + "nodes": [ + { + "id": 4, + "type": "CheckpointLoaderSimple", + "pos": [0, 0], + "size": [315, 98], + "inputs": [], + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "links": [3] + }, + { + "name": "CLIP", + "type": "CLIP", + "links": [1] + }, + { + "name": "VAE", + "type": "VAE", + "links": [5] + } + ], + "widgets_values": ["sd_xl_base_1.0.safetensors"] + }, + { + "id": 6, + "type": "CLIPTextEncode", + "title": "Positive prompt", + "pos": [400, 0], + "size": [400, 200], + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 1 + }, + { + "name": "text", + "type": "STRING", + "widget": { + "name": "text" + }, + "link": null + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [2] + } + ], + "widgets_values": ["a photo of a pier"] + }, + { + "id": 3, + "type": "KSampler", + "pos": [850, 0], + "size": [315, 262], + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 3 + }, + { + "name": "positive", + "type": "CONDITIONING", + "link": 2 + }, + { + "name": "negative", + "type": "CONDITIONING", + "link": null + }, + { + "name": "latent_image", + "type": "LATENT", + "link": null + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [4] + } + ], + "widgets_values": [0, "randomize", 20, 7, "euler", "normal", 1] + }, + { + "id": 8, + "type": "VAEDecode", + "pos": [1200, 0], + "size": [210, 46], + "inputs": [ + { + "name": "samples", + "type": "LATENT", + "link": 4 + }, + { + "name": "vae", + "type": "VAE", + "link": 5 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [6] + } + ], + "widgets_values": [] + }, + { + "id": 9, + "type": "SaveImage", + "pos": [1450, 0], + "size": [315, 270], + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 6 + } + ], + "outputs": [], + "widgets_values": ["ComfyUI"] + } + ], + "links": [ + [1, 4, 1, 6, 0, "CLIP"], + [2, 6, 0, 3, 1, "CONDITIONING"], + [3, 4, 0, 3, 0, "MODEL"], + [4, 3, 0, 8, 0, "LATENT"], + [5, 4, 2, 8, 1, "VAE"], + [6, 8, 0, 9, 0, "IMAGE"] + ] + } + }, + "turns": [ + { + "message_id": "7de6039c-c1b4-437c-871c-2f1fc67e1750", + "request": { + "content": "Switch to the tab 'Text to image', then tell me what this workflow does." + }, + "response": [ + { + "kind": "event", + "event": { + "type": "agent_thinking", + "data": { + "delta": "I'll switch over and take a look." + } + }, + "at_ms": 0 + }, + { + "kind": "event", + "event": { + "type": "agent_active_tab", + "data": { + "name": "Text to image", + "workflow_id": "d762837d-c64d-4829-9aba-05e71b64adc3" + } + }, + "at_ms": 6 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 8, + "status": "success", + "tool_call_id": "toolu_013WLWbbrNwTqV9UguY6rEu6", + "tool_name": "switch_tab" + } + }, + "at_ms": 8 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 368, + "status": "success", + "tool_call_id": "toolu_01PjsdjzNXWZ8oDYHQAbjo5o", + "tool_name": "print_workflow" + } + }, + "at_ms": 2364 + }, + { + "kind": "event", + "event": { + "type": "agent_message_delta", + "data": { + "delta": "I'm on the \"Text to image\" tab now.\n\nIt's a standard SDXL text-to-image setup: it loads the SDXL base model, turns the prompt — currently \"a photo of a pier\" — into guidance, generates an image over 20 steps, and saves the result.\n\nOne thing to flag: it isn't runnable as-is. Two inputs on the generation step are still empty — there's no negative prompt wired in, and no blank canvas/image-size node telling it what dimensions to make. Want me to add those so you can run it?" + } + }, + "at_ms": 6244 + }, + { + "kind": "event", + "event": { + "type": "agent_message_done", + "data": { + "usage": { + "cache_creation_input_tokens": 960, + "cache_read_input_tokens": 114249, + "input_tokens": 6, + "output_tokens": 349, + "total_tokens": 355 + } + } + }, + "at_ms": 6246 + } + ] + } + ] +} diff --git a/browser_tests/fixtures/data/agent/conversations/agent-rec-three-sequential-adds.json b/browser_tests/fixtures/data/agent/conversations/agent-rec-three-sequential-adds.json new file mode 100644 index 00000000000..9b3462f2590 --- /dev/null +++ b/browser_tests/fixtures/data/agent/conversations/agent-rec-three-sequential-adds.json @@ -0,0 +1,416 @@ +{ + "schema_version": "agent-conversation.v2", + "source": { + "repo": "Comfy-Org/ComfyUI_frontend", + "suite": "agent", + "case_id": "agent-rec-three-sequential-adds", + "response_side": "recorded", + "note": "RECORDED from Comfy-Org/cloud services/agent running NON-standalone local full stack (Postgres + doc host, M2M identity headers) at http://127.0.0.1:8086 (frames: redis SUBSCRIBE channel:ws::u:); NOT a production capture. cloud commit 9dc1da7dae2a1d40a9ca1f2a1f91cd9fd9e10900; model claude-opus-5; thread 3710f44b-9941-4bc4-a806-5c15d00cd807; message d0d6b5dc-b189-491a-804e-f52fdb9495cb; workflow 7afd1f94-6cb5-4923-9388-18851b0fba5d (seeded by throwaway turn 9285739d-3bbe-475f-a681-6f9761c7a621; the recorded turn opens on a fresh workflow and switches to it first because the replay subscribes only on an agent_active_tab frame, see plan Q4); agent_tool_calls parent rows ['c27f6e4e-220a-42fc-8fd1-97c30d6d3c98', 'f020586d-9444-457f-85e9-8c96b2be6292', '3832f4c1-77c3-44a9-b890-83b82db5513a', 'df9c490c-5a9a-43b3-b6d7-931c40084eaf']; rows agent-rec-three-sequential-adds.cc-a1.rows.json; raw capture sha256 6a1dfc3c7d4961130ecc8e1b96edd76c9ec288602e38d86432b16e2ae3d342b6", + "capture": { + "backend": "Comfy-Org/cloud", + "thread_id": "3710f44b-9941-4bc4-a806-5c15d00cd807", + "exported_at": "2026-09-03T14:05:21Z" + } + }, + "workflow": { + "id": "7afd1f94-6cb5-4923-9388-18851b0fba5d", + "name": "Text to image", + "catalog": { + "types": { + "CheckpointLoaderSimple": { + "widget_order": ["ckpt_name"] + }, + "CLIPTextEncode": { + "widget_order": ["text"] + }, + "KSampler": { + "widget_order": [ + "seed", + "control_after_generate", + "steps", + "cfg", + "sampler_name", + "scheduler", + "denoise" + ] + }, + "VAEDecode": { + "widget_order": [] + }, + "SaveImage": { + "widget_order": ["filename_prefix"] + }, + "PrimitiveStringMultiline": { + "widget_order": ["value"] + }, + "EmptyLatentImage": { + "widget_order": ["width", "height", "batch_size"] + } + } + }, + "seed": { + "nodes": [ + { + "id": 4, + "type": "CheckpointLoaderSimple", + "pos": [0, 0], + "size": [315, 98], + "inputs": [], + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "links": [3] + }, + { + "name": "CLIP", + "type": "CLIP", + "links": [1] + }, + { + "name": "VAE", + "type": "VAE", + "links": [5] + } + ], + "widgets_values": ["sd_xl_base_1.0.safetensors"] + }, + { + "id": 6, + "type": "CLIPTextEncode", + "title": "Positive prompt", + "pos": [400, 0], + "size": [400, 200], + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 1 + }, + { + "name": "text", + "type": "STRING", + "widget": { + "name": "text" + }, + "link": null + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [2] + } + ], + "widgets_values": ["a photo of a pier"] + }, + { + "id": 3, + "type": "KSampler", + "pos": [850, 0], + "size": [315, 262], + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 3 + }, + { + "name": "positive", + "type": "CONDITIONING", + "link": 2 + }, + { + "name": "negative", + "type": "CONDITIONING", + "link": null + }, + { + "name": "latent_image", + "type": "LATENT", + "link": null + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [4] + } + ], + "widgets_values": [0, "randomize", 20, 7, "euler", "normal", 1] + }, + { + "id": 8, + "type": "VAEDecode", + "pos": [1200, 0], + "size": [210, 46], + "inputs": [ + { + "name": "samples", + "type": "LATENT", + "link": 4 + }, + { + "name": "vae", + "type": "VAE", + "link": 5 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [6] + } + ], + "widgets_values": [] + }, + { + "id": 9, + "type": "SaveImage", + "pos": [1450, 0], + "size": [315, 270], + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 6 + } + ], + "outputs": [], + "widgets_values": ["ComfyUI"] + } + ], + "links": [ + [1, 4, 1, 6, 0, "CLIP"], + [2, 6, 0, 3, 1, "CONDITIONING"], + [3, 4, 0, 3, 0, "MODEL"], + [4, 3, 0, 8, 0, "LATENT"], + [5, 4, 2, 8, 1, "VAE"], + [6, 8, 0, 9, 0, "IMAGE"] + ] + } + }, + "turns": [ + { + "message_id": "d0d6b5dc-b189-491a-804e-f52fdb9495cb", + "request": { + "content": "Switch to the tab 'Text to image', then add three nodes one at a time, each with its own separate tool call and nothing else in that call: first a PrimitiveStringMultiline, then an EmptyLatentImage, then a CLIPTextEncode. Do not connect or configure them." + }, + "response": [ + { + "kind": "event", + "event": { + "type": "agent_thinking", + "data": { + "delta": "I'll switch focus to that tab first." + } + }, + "at_ms": 0 + }, + { + "kind": "event", + "event": { + "type": "agent_active_tab", + "data": { + "name": "Text to image", + "workflow_id": "7afd1f94-6cb5-4923-9388-18851b0fba5d" + } + }, + "at_ms": 7 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 8, + "status": "success", + "tool_call_id": "toolu_0199bXc7oQVbgJA4aY56VcfY", + "tool_name": "switch_tab" + } + }, + "at_ms": 9 + }, + { + "kind": "graph_ops", + "ops": [ + { + "op": "add_node", + "pos": [1845, 0], + "node": { + "id": 2478057798252548, + "pos": [1845, 0], + "mode": 0, + "size": [240, 86], + "type": "PrimitiveStringMultiline", + "flags": {}, + "order": 0, + "inputs": [], + "outputs": [ + { + "name": "STRING", + "type": "STRING", + "links": [] + } + ], + "properties": {}, + "widgets_values": [null] + }, + "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", + "op_id": "cf6a6fdb84ee4f7dbec557f999d2fa8f", + "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], + "node_id": 2478057798252548, + "class_type": "PrimitiveStringMultiline", + "base_version": 2 + } + ], + "at_ms": 2686 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 964, + "status": "success", + "tool_call_id": "toolu_014VjtpNeXB9q2rBXxK9bkm9", + "tool_name": "add_node" + } + }, + "at_ms": 2686 + }, + { + "kind": "graph_ops", + "ops": [ + { + "op": "add_node", + "pos": [2165, 0], + "node": { + "id": 2772376668635982, + "pos": [2165, 0], + "mode": 0, + "size": [240, 134], + "type": "EmptyLatentImage", + "flags": {}, + "order": 0, + "inputs": [], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [] + } + ], + "properties": {}, + "widgets_values": [512, 512, 1] + }, + "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", + "op_id": "48a4c2f2ea8647d1be5b0817985bda87", + "stamp": [3, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], + "node_id": 2772376668635982, + "class_type": "EmptyLatentImage", + "base_version": 3 + } + ], + "at_ms": 4441 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 220, + "status": "success", + "tool_call_id": "toolu_01M6Jpuof94JLfgBij4etkaN", + "tool_name": "add_node" + } + }, + "at_ms": 4441 + }, + { + "kind": "graph_ops", + "ops": [ + { + "op": "add_node", + "pos": [2485, 0], + "node": { + "id": 2514973844700532, + "pos": [2485, 0], + "mode": 0, + "size": [240, 86], + "type": "CLIPTextEncode", + "flags": {}, + "order": 0, + "inputs": [ + { + "link": null, + "name": "clip", + "type": "CLIP" + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [] + } + ], + "properties": {}, + "widgets_values": [null] + }, + "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", + "op_id": "da3e136d6b224cc8838a0d9aa569ede3", + "stamp": [4, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], + "node_id": 2514973844700532, + "class_type": "CLIPTextEncode", + "base_version": 4 + } + ], + "at_ms": 7816 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 192, + "status": "success", + "tool_call_id": "toolu_01FzkN53SHp6ePAFbmX2H8oX", + "tool_name": "add_node" + } + }, + "at_ms": 7816 + }, + { + "kind": "event", + "event": { + "type": "agent_message_delta", + "data": { + "delta": "All three nodes are on the \"Text to image\" tab now — a multiline text box, an empty latent, and a text encoder — left unconnected and unconfigured as you asked." + } + }, + "at_ms": 9873 + }, + { + "kind": "event", + "event": { + "type": "agent_message_done", + "data": { + "usage": { + "cache_creation_input_tokens": 1944, + "cache_read_input_tokens": 192480, + "input_tokens": 10, + "output_tokens": 322, + "total_tokens": 332 + } + } + }, + "at_ms": 9875 + } + ] + } + ] +} diff --git a/browser_tests/fixtures/data/agent/conversations/agent-rec-tool-error.json b/browser_tests/fixtures/data/agent/conversations/agent-rec-tool-error.json new file mode 100644 index 00000000000..0508a4b8c07 --- /dev/null +++ b/browser_tests/fixtures/data/agent/conversations/agent-rec-tool-error.json @@ -0,0 +1,280 @@ +{ + "schema_version": "agent-conversation.v2", + "source": { + "repo": "Comfy-Org/ComfyUI_frontend", + "suite": "agent", + "case_id": "agent-rec-tool-error", + "response_side": "recorded", + "note": "RECORDED from Comfy-Org/cloud services/agent running NON-standalone local full stack (Postgres + doc host, M2M identity headers) at http://127.0.0.1:8086 (frames: redis SUBSCRIBE channel:ws::u:); NOT a production capture. cloud commit 9dc1da7dae2a1d40a9ca1f2a1f91cd9fd9e10900; model claude-opus-5; thread 934d7b9d-72d9-40ab-a3d9-3cdb6fa5a386; message a5ec5ead-1909-4322-9d62-edbb03a3ded9; workflow 5c1db1ce-4ca3-4db9-b559-4d3463d0c6e5 (seeded by throwaway turn 788de1fc-829b-4636-b715-2879479effbc; the recorded turn opens on a fresh workflow and switches to it first because the replay subscribes only on an agent_active_tab frame, see plan Q4); agent_tool_calls parent rows ['39a22dd2-4aaa-4d7d-9505-779ab6386ee8', 'aeb6b2f3-8d0c-4131-a913-144322ca42c8']; rows agent-rec-tool-error.t-a1.rows.json; raw capture sha256 83bd2c2c30c00883df39527e5f482deccc5e10c34a0d6554c34bbff8d725c0e6", + "capture": { + "backend": "Comfy-Org/cloud", + "thread_id": "934d7b9d-72d9-40ab-a3d9-3cdb6fa5a386", + "exported_at": "2026-09-03T12:40:56Z" + } + }, + "workflow": { + "id": "5c1db1ce-4ca3-4db9-b559-4d3463d0c6e5", + "name": "Text to image", + "catalog": { + "types": { + "CheckpointLoaderSimple": { + "widget_order": ["ckpt_name"] + }, + "CLIPTextEncode": { + "widget_order": ["text"] + }, + "KSampler": { + "widget_order": [ + "seed", + "control_after_generate", + "steps", + "cfg", + "sampler_name", + "scheduler", + "denoise" + ] + }, + "VAEDecode": { + "widget_order": [] + }, + "SaveImage": { + "widget_order": ["filename_prefix"] + }, + "PrimitiveStringMultiline": { + "widget_order": ["value"] + }, + "EmptyLatentImage": { + "widget_order": ["width", "height", "batch_size"] + } + } + }, + "seed": { + "nodes": [ + { + "id": 4, + "type": "CheckpointLoaderSimple", + "pos": [0, 0], + "size": [315, 98], + "inputs": [], + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "links": [3] + }, + { + "name": "CLIP", + "type": "CLIP", + "links": [1] + }, + { + "name": "VAE", + "type": "VAE", + "links": [5] + } + ], + "widgets_values": ["sd_xl_base_1.0.safetensors"] + }, + { + "id": 6, + "type": "CLIPTextEncode", + "title": "Positive prompt", + "pos": [400, 0], + "size": [400, 200], + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 1 + }, + { + "name": "text", + "type": "STRING", + "widget": { + "name": "text" + }, + "link": null + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [2] + } + ], + "widgets_values": ["a photo of a pier"] + }, + { + "id": 3, + "type": "KSampler", + "pos": [850, 0], + "size": [315, 262], + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 3 + }, + { + "name": "positive", + "type": "CONDITIONING", + "link": 2 + }, + { + "name": "negative", + "type": "CONDITIONING", + "link": null + }, + { + "name": "latent_image", + "type": "LATENT", + "link": null + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [4] + } + ], + "widgets_values": [0, "randomize", 20, 7, "euler", "normal", 1] + }, + { + "id": 8, + "type": "VAEDecode", + "pos": [1200, 0], + "size": [210, 46], + "inputs": [ + { + "name": "samples", + "type": "LATENT", + "link": 4 + }, + { + "name": "vae", + "type": "VAE", + "link": 5 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [6] + } + ], + "widgets_values": [] + }, + { + "id": 9, + "type": "SaveImage", + "pos": [1450, 0], + "size": [315, 270], + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 6 + } + ], + "outputs": [], + "widgets_values": ["ComfyUI"] + } + ], + "links": [ + [1, 4, 1, 6, 0, "CLIP"], + [2, 6, 0, 3, 1, "CONDITIONING"], + [3, 4, 0, 3, 0, "MODEL"], + [4, 3, 0, 8, 0, "LATENT"], + [5, 4, 2, 8, 1, "VAE"], + [6, 8, 0, 9, 0, "IMAGE"] + ] + } + }, + "turns": [ + { + "message_id": "a5ec5ead-1909-4322-9d62-edbb03a3ded9", + "request": { + "content": "Switch to the tab 'Text to image', then add a node of class DoesNotExist." + }, + "response": [ + { + "kind": "event", + "event": { + "type": "agent_thinking", + "data": { + "delta": "I'll switch to that tab first." + } + }, + "at_ms": 0 + }, + { + "kind": "event", + "event": { + "type": "agent_active_tab", + "data": { + "name": "Text to image", + "workflow_id": "5c1db1ce-4ca3-4db9-b559-4d3463d0c6e5" + } + }, + "at_ms": 9 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 8, + "status": "success", + "tool_call_id": "toolu_01YWm16Ejys8FJBofYwL7k9E", + "tool_name": "switch_tab" + } + }, + "at_ms": 12 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 346, + "error_code": "node_not_found", + "status": "error", + "tool_call_id": "toolu_01XqvtmCXKboog1UTZ3MGNJR", + "tool_name": "add_node" + } + }, + "at_ms": 2654 + }, + { + "kind": "event", + "event": { + "type": "agent_message_delta", + "data": { + "delta": "I'm now on the \"Text to image\" tab, but there's no node called \"DoesNotExist\" — nothing was added, and the canvas is unchanged.\n\nIf you tell me what you actually want that node to do (e.g. upscale, add a LoRA, save output), I'll find the real one and wire it in." + } + }, + "at_ms": 5701 + }, + { + "kind": "event", + "event": { + "type": "agent_message_done", + "data": { + "usage": { + "cache_creation_input_tokens": 752, + "cache_read_input_tokens": 114291, + "input_tokens": 6, + "output_tokens": 295, + "total_tokens": 301 + } + } + }, + "at_ms": 5703 + } + ] + } + ] +} diff --git a/browser_tests/fixtures/data/agent/conversations/agent-rec-two-turn-dependent-edit.json b/browser_tests/fixtures/data/agent/conversations/agent-rec-two-turn-dependent-edit.json new file mode 100644 index 00000000000..7cd2dbd9d7c --- /dev/null +++ b/browser_tests/fixtures/data/agent/conversations/agent-rec-two-turn-dependent-edit.json @@ -0,0 +1,449 @@ +{ + "schema_version": "agent-conversation.v2", + "source": { + "repo": "Comfy-Org/ComfyUI_frontend", + "suite": "agent", + "case_id": "agent-rec-two-turn-dependent-edit", + "response_side": "recorded", + "note": "RECORDED from Comfy-Org/cloud services/agent running NON-standalone local full stack (Postgres + doc host, M2M identity headers) at http://127.0.0.1:8086 (frames: redis SUBSCRIBE channel:ws::u:); NOT a production capture. cloud commit 9dc1da7dae2a1d40a9ca1f2a1f91cd9fd9e10900; model claude-opus-5; thread 6cafa19d-11f0-45e9-bcf1-e52529eb9ebb; messages 445f7340-ea9c-4456-8ffa-5d37ea6c7b98, 07fc770a-df43-42d8-8f2c-07bf9c2db9f8; workflow d8c3e6c4-dd9f-4e19-8c7c-8cdcbb491447 (seeded by throwaway turn af193614-a407-4987-99a5-97a04d52eb35; turn 1 opens on a fresh workflow and switches to it first because the replay subscribes only on an agent_active_tab frame); agent_tool_calls parent rows 42fbcd91-26cb-415a-b471-8daa44a8bd6c, 55c090e2-11f7-48b7-93dc-5fa9fd73e1ac, abbd53d0-2352-4d5d-bfd0-0bd2601a23ce, b5bde96e-939a-4b5b-992d-5fc9ece40a96, da2d0551-1fcb-435d-9dd1-745a451d75f9, f7084475-8dd0-4789-a14f-0a2cd47379dc; rows agent-rec-two-turn-dependent-edit.m1.rows.1.json, agent-rec-two-turn-dependent-edit.m1.rows.2.json; raw capture sha256 49a64b8ac694b4778b78b3df03a372eaed59e60baca70299ee5cee867b23be43", + "capture": { + "backend": "Comfy-Org/cloud", + "thread_id": "6cafa19d-11f0-45e9-bcf1-e52529eb9ebb", + "exported_at": "2026-09-03T16:03:42.552Z" + } + }, + "workflow": { + "id": "d8c3e6c4-dd9f-4e19-8c7c-8cdcbb491447", + "name": "Text to image", + "catalog": { + "types": { + "CheckpointLoaderSimple": { + "widget_order": ["ckpt_name"] + }, + "CLIPTextEncode": { + "widget_order": ["text"] + }, + "KSampler": { + "widget_order": [ + "seed", + "control_after_generate", + "steps", + "cfg", + "sampler_name", + "scheduler", + "denoise" + ] + }, + "VAEDecode": { + "widget_order": [] + }, + "SaveImage": { + "widget_order": ["filename_prefix"] + }, + "PrimitiveStringMultiline": { + "widget_order": ["value"] + }, + "EmptyLatentImage": { + "widget_order": ["width", "height", "batch_size"] + } + } + }, + "seed": { + "nodes": [ + { + "id": 4, + "type": "CheckpointLoaderSimple", + "pos": [0, 0], + "size": [315, 98], + "inputs": [], + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "links": [3] + }, + { + "name": "CLIP", + "type": "CLIP", + "links": [1] + }, + { + "name": "VAE", + "type": "VAE", + "links": [5] + } + ], + "widgets_values": ["sd_xl_base_1.0.safetensors"] + }, + { + "id": 6, + "type": "CLIPTextEncode", + "title": "Positive prompt", + "pos": [400, 0], + "size": [400, 200], + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 1 + }, + { + "name": "text", + "type": "STRING", + "widget": { + "name": "text" + }, + "link": null + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [2] + } + ], + "widgets_values": ["a photo of a pier"] + }, + { + "id": 3, + "type": "KSampler", + "pos": [850, 0], + "size": [315, 262], + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 3 + }, + { + "name": "positive", + "type": "CONDITIONING", + "link": 2 + }, + { + "name": "negative", + "type": "CONDITIONING", + "link": null + }, + { + "name": "latent_image", + "type": "LATENT", + "link": null + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [4] + } + ], + "widgets_values": [0, "randomize", 20, 7, "euler", "normal", 1] + }, + { + "id": 8, + "type": "VAEDecode", + "pos": [1200, 0], + "size": [210, 46], + "inputs": [ + { + "name": "samples", + "type": "LATENT", + "link": 4 + }, + { + "name": "vae", + "type": "VAE", + "link": 5 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [6] + } + ], + "widgets_values": [] + }, + { + "id": 9, + "type": "SaveImage", + "pos": [1450, 0], + "size": [315, 270], + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 6 + } + ], + "outputs": [], + "widgets_values": ["ComfyUI"] + } + ], + "links": [ + [1, 4, 1, 6, 0, "CLIP"], + [2, 6, 0, 3, 1, "CONDITIONING"], + [3, 4, 0, 3, 0, "MODEL"], + [4, 3, 0, 8, 0, "LATENT"], + [5, 4, 2, 8, 1, "VAE"], + [6, 8, 0, 9, 0, "IMAGE"] + ] + } + }, + "turns": [ + { + "message_id": "445f7340-ea9c-4456-8ffa-5d37ea6c7b98", + "request": { + "content": "Switch to the tab 'Text to image', then add a second CLIPTextEncode node fed from the checkpoint loader's CLIP output and give it the text 'blurry, low quality'." + }, + "response": [ + { + "kind": "event", + "event": { + "type": "agent_thinking", + "data": { + "delta": "I'll switch to that tab and take a look at the graph first." + } + }, + "at_ms": 0 + }, + { + "kind": "event", + "event": { + "type": "agent_active_tab", + "data": { + "name": "Text to image", + "workflow_id": "d8c3e6c4-dd9f-4e19-8c7c-8cdcbb491447" + } + }, + "at_ms": 6 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 8, + "status": "success", + "tool_call_id": "toolu_01WdrFCAxyg6dbYLfwVHfPTD", + "tool_name": "switch_tab" + } + }, + "at_ms": 8 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 752, + "status": "success", + "tool_call_id": "toolu_01E4tYHkXrhtb6ktKRki4z4r", + "tool_name": "print_workflow" + } + }, + "at_ms": 2435 + }, + { + "kind": "graph_ops", + "ops": [ + { + "op": "add_node", + "pos": [715, 280], + "node": { + "id": 3337990138003756, + "pos": [715, 280], + "mode": 0, + "size": [240, 86], + "type": "CLIPTextEncode", + "flags": {}, + "order": 0, + "inputs": [ + { + "link": null, + "name": "clip", + "type": "CLIP" + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [] + } + ], + "properties": {}, + "widgets_values": [null] + }, + "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", + "op_id": "c00397c5ac4a411bafa8c29389fb1515", + "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], + "node_id": 3337990138003756, + "class_type": "CLIPTextEncode", + "base_version": 2 + }, + { + "op": "connect", + "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", + "op_id": "720d36f953794c1a8d05c3558c8c7a0f", + "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], + "link_id": 2557345504960691, + "to_node": 3337990138003756, + "to_slot": 0, + "from_node": 4, + "from_slot": 1, + "link_type": "CLIP", + "base_version": 2 + }, + { + "op": "set_widget", + "old": null, + "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", + "op_id": "959f6c6e6cbc4dd3a39f784437208f1c", + "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], + "value": "blurry, low quality", + "widget": "text", + "node_id": 3337990138003756, + "base_version": 2 + } + ], + "at_ms": 7788 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 195, + "status": "success", + "tool_call_id": "toolu_013FPeYq4Ya1M9VJKsMPJE4j", + "tool_name": "apply_ops" + } + }, + "at_ms": 7788 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 196, + "status": "success", + "tool_call_id": "toolu_01RL1yma6QfBbL3cZQs3qsf6", + "tool_name": "print_workflow" + } + }, + "at_ms": 11731 + }, + { + "kind": "event", + "event": { + "type": "agent_message_delta", + "data": { + "delta": "I'm on the \"Text to image\" tab now, and the second text box is added with \"blurry, low quality\" and fed from the checkpoint loader.\n\nOne thing worth flagging: it isn't connected to anything downstream yet, so it has no effect on the image. The sampler's negative input is currently empty (and its latent input too) — say the word and I'll wire this new text into the negative slot." + } + }, + "at_ms": 15233 + }, + { + "kind": "event", + "event": { + "type": "agent_message_done", + "data": { + "usage": { + "cache_creation_input_tokens": 2013, + "cache_read_input_tokens": 192537, + "input_tokens": 10, + "output_tokens": 822, + "total_tokens": 832 + } + } + }, + "at_ms": 15235 + } + ] + }, + { + "message_id": "07fc770a-df43-42d8-8f2c-07bf9c2db9f8", + "request": { + "content": "Now connect that new CLIPTextEncode node to the KSampler's negative input." + }, + "response": [ + { + "kind": "graph_ops", + "ops": [ + { + "op": "connect", + "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", + "op_id": "0a73a31fd4c54bf8a2bf0746d41710cd", + "stamp": [3, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], + "link_id": 1795569972720099, + "to_node": 3, + "to_slot": 2, + "from_node": 3337990138003756, + "from_slot": 0, + "link_type": "CONDITIONING", + "base_version": 3 + } + ], + "at_ms": 0 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 298, + "status": "success", + "tool_call_id": "toolu_016EPZQoQXsKsbm5qAzKPHGD", + "tool_name": "connect" + } + }, + "at_ms": 0 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 200, + "status": "success", + "tool_call_id": "toolu_01RZH4jfk5SdpGS1xF2dMfvw", + "tool_name": "print_workflow" + } + }, + "at_ms": 4272 + }, + { + "kind": "event", + "event": { + "type": "agent_message_delta", + "data": { + "delta": "Connected — the \"blurry, low quality\" text now feeds the negative input.\n\nThe graph still won't run as-is: nothing is feeding the sampler's latent input, so it needs an empty latent (which is also where the image size gets set). Want me to add one?" + } + }, + "at_ms": 8606 + }, + { + "kind": "event", + "event": { + "type": "agent_message_done", + "data": { + "usage": { + "cache_creation_input_tokens": 1542, + "cache_read_input_tokens": 115114, + "input_tokens": 6, + "output_tokens": 376, + "total_tokens": 382 + } + } + }, + "at_ms": 8610 + } + ] + } + ] +} diff --git a/browser_tests/fixtures/data/agent/conversations/agent-workflow-editing-05.json b/browser_tests/fixtures/data/agent/conversations/agent-workflow-editing-05.json new file mode 100644 index 00000000000..7547ef59dcb --- /dev/null +++ b/browser_tests/fixtures/data/agent/conversations/agent-workflow-editing-05.json @@ -0,0 +1,424 @@ +{ + "schema_version": "agent-conversation.v2", + "source": { + "repo": "Comfy-Org/ComfyUI_frontend", + "suite": "agent", + "case_id": "agent-workflow-editing-05", + "response_side": "recorded", + "note": "RECORDED from Comfy-Org/cloud services/agent running NON-standalone local full stack (Postgres + doc host, M2M identity headers) at http://127.0.0.1:8086 (frames: redis SUBSCRIBE channel:ws::u:); NOT a production capture. cloud commit 9dc1da7dae2a1d40a9ca1f2a1f91cd9fd9e10900; model claude-opus-5; thread 8f2ed7bf-7e42-49dc-a2af-0a15e4f55db3; message b199d9ab-1800-49b2-8a43-458cda7f104d; workflow f47e55ab-2cd5-414e-90d3-23a5fc7eee22 (seeded by throwaway turn 3d61dd80-dd03-4957-8506-734392c9583c; the recorded turn opens on a fresh workflow and switches to it first because the replay subscribes only on an agent_active_tab frame, see plan Q4); agent_tool_calls parent rows ['6206d0ef-f781-41db-81bd-4138950ccd2e', 'fb873a4b-59b4-4088-ae32-f43e0a7382c5', '473ea6be-f9c3-4a75-8776-0e7823cd5054', 'e6ec2a79-8f0b-408a-b01e-f9362ae8fde4', '47d7581e-2d55-49ea-ac3e-1d6520d80454', 'abd6c054-6b5b-49a2-8633-881078e9b07c', '3f83a246-0181-4d1a-b2b5-c1fcfac38fe0']; rows agent-workflow-editing-05.t-a1.rows.json; raw capture sha256 982353ccbf5d92ca70a7857eb7da662aa2d19b0fcebb27181a71c3a95b762658", + "capture": { + "backend": "Comfy-Org/cloud", + "thread_id": "8f2ed7bf-7e42-49dc-a2af-0a15e4f55db3", + "exported_at": "2026-09-03T12:40:56Z" + } + }, + "workflow": { + "id": "f47e55ab-2cd5-414e-90d3-23a5fc7eee22", + "name": "Image edit", + "catalog": { + "types": { + "LoadImage": { + "widget_order": ["image", "upload"] + }, + "VAEEncode": { + "widget_order": [] + }, + "KSampler": { + "widget_order": [ + "seed", + "control_after_generate", + "steps", + "cfg", + "sampler_name", + "scheduler", + "denoise" + ] + }, + "VAEDecode": { + "widget_order": [] + }, + "SaveImage": { + "widget_order": ["filename_prefix"] + }, + "ImageStitch": { + "widget_order": [ + "direction", + "match_image_size", + "spacing_width", + "spacing_color" + ] + }, + "PreviewImage": { + "widget_order": [] + } + } + }, + "seed": { + "nodes": [ + { + "id": 1, + "type": "LoadImage", + "pos": [0, 0], + "size": [315, 314], + "inputs": [], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [1] + }, + { + "name": "MASK", + "type": "MASK", + "links": [] + } + ], + "widgets_values": ["example.png", "image"] + }, + { + "id": 2, + "type": "VAEEncode", + "pos": [400, 0], + "size": [210, 46], + "inputs": [ + { + "name": "pixels", + "type": "IMAGE", + "link": 1 + }, + { + "name": "vae", + "type": "VAE", + "link": null + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [2] + } + ], + "widgets_values": [] + }, + { + "id": 3, + "type": "KSampler", + "pos": [700, 0], + "size": [315, 262], + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": null + }, + { + "name": "positive", + "type": "CONDITIONING", + "link": null + }, + { + "name": "negative", + "type": "CONDITIONING", + "link": null + }, + { + "name": "latent_image", + "type": "LATENT", + "link": 2 + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [3] + } + ], + "widgets_values": [0, "randomize", 20, 7, "euler", "normal", 0.6] + }, + { + "id": 8, + "type": "VAEDecode", + "pos": [1100, 0], + "size": [210, 46], + "inputs": [ + { + "name": "samples", + "type": "LATENT", + "link": 3 + }, + { + "name": "vae", + "type": "VAE", + "link": null + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [4] + } + ], + "widgets_values": [] + }, + { + "id": 9, + "type": "SaveImage", + "pos": [1400, 0], + "size": [315, 270], + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 4 + } + ], + "outputs": [], + "widgets_values": ["ComfyUI"] + } + ], + "links": [ + [1, 1, 0, 2, 0, "IMAGE"], + [2, 2, 0, 3, 3, "LATENT"], + [3, 3, 0, 8, 0, "LATENT"], + [4, 8, 0, 9, 0, "IMAGE"] + ] + } + }, + "turns": [ + { + "message_id": "b199d9ab-1800-49b2-8a43-458cda7f104d", + "request": { + "content": "Switch to the tab 'Image edit', then use a stitch images node to show the output next to the input" + }, + "response": [ + { + "kind": "event", + "event": { + "type": "agent_thinking", + "data": { + "delta": "I'll switch to that tab and take a look at what's there." + } + }, + "at_ms": 0 + }, + { + "kind": "event", + "event": { + "type": "agent_active_tab", + "data": { + "name": "Image edit", + "workflow_id": "f47e55ab-2cd5-414e-90d3-23a5fc7eee22" + } + }, + "at_ms": 7 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 9, + "status": "success", + "tool_call_id": "toolu_01RMDkomGUUpDL8wixWq9Fhe", + "tool_name": "switch_tab" + } + }, + "at_ms": 14 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 366, + "status": "success", + "tool_call_id": "toolu_01JECLyu71YJ1niLhepMB63u", + "tool_name": "print_workflow" + } + }, + "at_ms": 2905 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 194, + "status": "success", + "tool_call_id": "toolu_01Sttwp3yTjiF6LdrL5GdmVy", + "tool_name": "find_nodes" + } + }, + "at_ms": 7034 + }, + { + "kind": "graph_ops", + "ops": [ + { + "op": "add_node", + "pos": [1710, 280], + "node": { + "id": 1177948620476144, + "pos": [1710, 280], + "mode": 0, + "size": [240, 178], + "type": "ImageStitch", + "flags": {}, + "order": 0, + "inputs": [ + { + "link": null, + "name": "image1", + "type": "IMAGE" + }, + { + "link": null, + "name": "image2", + "type": "IMAGE" + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [] + } + ], + "properties": {}, + "widgets_values": ["right", true, 0, "white"] + }, + "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", + "op_id": "8e44f8dcf31e46f6bf6d487c1bec2676", + "stamp": [1, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], + "node_id": 1177948620476144, + "class_type": "ImageStitch", + "base_version": 1 + }, + { + "op": "connect", + "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", + "op_id": "792213bf2f824cfd8866f157117795a4", + "stamp": [1, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], + "link_id": 3298141227647238, + "to_node": 1177948620476144, + "to_slot": 0, + "from_node": 1, + "from_slot": 0, + "link_type": "IMAGE", + "base_version": 1 + }, + { + "op": "connect", + "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", + "op_id": "7c91fdf62a4d437dac4ada8d3ae13661", + "stamp": [1, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], + "link_id": 2572689854678654, + "to_node": 1177948620476144, + "to_slot": 1, + "from_node": 8, + "from_slot": 0, + "link_type": "IMAGE", + "base_version": 1 + }, + { + "op": "connect", + "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", + "op_id": "3eaf0c9e52cb4f0994962ff4b1e341ff", + "stamp": [1, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], + "link_id": 3588278739910384, + "to_node": 9, + "to_slot": 0, + "from_node": 1177948620476144, + "from_slot": 0, + "link_type": "IMAGE", + "base_version": 1 + } + ], + "at_ms": 13620 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 208, + "status": "success", + "tool_call_id": "toolu_01DNrpeJQDjW2v32xme5eyDq", + "tool_name": "apply_ops" + } + }, + "at_ms": 13620 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 210, + "status": "success", + "tool_call_id": "toolu_01VFMK15TdDdT4zFK3w8bRqE", + "tool_name": "list_slots" + } + }, + "at_ms": 20740 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 206, + "error_code": "conflict", + "status": "error", + "tool_call_id": "toolu_01GZUZLG9RtoeGym25Hy5p5P", + "tool_name": "set_widget" + } + }, + "at_ms": 25170 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 216, + "status": "error", + "tool_call_id": "toolu_01FCgU1tuBtusNgYiPMRaUQL", + "tool_name": "validate" + } + }, + "at_ms": 29613 + }, + { + "kind": "event", + "event": { + "type": "agent_message_delta", + "data": { + "delta": "Done — the side-by-side comparison is on your canvas: the original image and the edited result now go into a stitch node (edited placed to the right of the original, sizes matched), and that combined image is what gets saved.\n\nTwo things worth knowing:\n\n- The gap/spacing setting on that node can't be changed from here, so the two images sit flush against each other. You can set a spacing value directly on the node if you want a divider.\n- The rest of this workflow was already incomplete before I touched it — the sampler has no model loaded and no prompt text, and the encode/decode steps have no VAE connected. It won't run until those are filled in. Want me to wire up a checkpoint and prompt boxes for you?" + } + }, + "at_ms": 38675 + }, + { + "kind": "event", + "event": { + "type": "agent_message_done", + "data": { + "usage": { + "cache_creation_input_tokens": 3425, + "cache_read_input_tokens": 313028, + "input_tokens": 16, + "output_tokens": 1658, + "total_tokens": 1674 + } + } + }, + "at_ms": 38677 + } + ] + } + ] +} From 6eb5c3b6e9a8057efe639aea05f0ac3eb5c69536 Mon Sep 17 00:00:00 2001 From: Nathaniel Parson Koroso Date: Thu, 3 Sep 2026 09:49:16 -0700 Subject: [PATCH 08/52] test(agent): record a cancelled turn whose first edit had landed The agent was asked for three nodes and stopped after the first one, so the recorded tail says one edit was made and the graph carries exactly that node. A replay that ignored the cancel would show three. --- .../agent-rec-cancelled-turn.json | 338 ++++++++++++++++++ 1 file changed, 338 insertions(+) create mode 100644 browser_tests/fixtures/data/agent/conversations/agent-rec-cancelled-turn.json diff --git a/browser_tests/fixtures/data/agent/conversations/agent-rec-cancelled-turn.json b/browser_tests/fixtures/data/agent/conversations/agent-rec-cancelled-turn.json new file mode 100644 index 00000000000..3e6ce9e31ee --- /dev/null +++ b/browser_tests/fixtures/data/agent/conversations/agent-rec-cancelled-turn.json @@ -0,0 +1,338 @@ +{ + "schema_version": "agent-conversation.v2", + "source": { + "repo": "Comfy-Org/ComfyUI_frontend", + "suite": "agent", + "case_id": "agent-rec-cancelled-turn", + "response_side": "recorded", + "note": "RECORDED from Comfy-Org/cloud services/agent running NON-standalone local full stack (Postgres + doc host, M2M identity headers) at http://127.0.0.1:8087 (frames: redis SUBSCRIBE channel:ws::u:); NOT a production capture. cloud commit 9dc1da7dae2a1d40a9ca1f2a1f91cd9fd9e10900; model claude-opus-5; thread d9e8410c-563d-43d4-be7e-d0020023d0e2; messages 54844cd9-fd59-4c46-a271-58af8bb87403; workflow 18e8fe8a-8fd3-4fa0-bf55-4437ada01f52 (seeded by throwaway turn 30151cd9-31ec-41ba-92f3-39c2dadfb6ea; turn 1 opens on a fresh workflow and switches to it first because the replay subscribes only on an agent_active_tab frame); agent_tool_calls parent rows 71f16f5f-3bb5-4cbe-95d6-59f615ad4384, 8422cdee-e5be-4899-8ad8-574900174c12, f3be238b-83f9-4f86-920f-da847b990c41; rows agent-rec-cancelled-turn.t2.rows.1.json; raw capture sha256 eb5705cde75b76dff0ba93403bc661f85d8aae7cc0a10a2d307c9bf740486cb5", + "capture": { + "backend": "Comfy-Org/cloud", + "thread_id": "d9e8410c-563d-43d4-be7e-d0020023d0e2", + "exported_at": "2026-09-03T16:42:17.010Z" + } + }, + "workflow": { + "id": "18e8fe8a-8fd3-4fa0-bf55-4437ada01f52", + "name": "Text to image", + "catalog": { + "types": { + "CheckpointLoaderSimple": { + "widget_order": ["ckpt_name"] + }, + "CLIPTextEncode": { + "widget_order": ["text"] + }, + "KSampler": { + "widget_order": [ + "seed", + "control_after_generate", + "steps", + "cfg", + "sampler_name", + "scheduler", + "denoise" + ] + }, + "VAEDecode": { + "widget_order": [] + }, + "SaveImage": { + "widget_order": ["filename_prefix"] + }, + "PrimitiveStringMultiline": { + "widget_order": ["value"] + }, + "EmptyLatentImage": { + "widget_order": ["width", "height", "batch_size"] + } + } + }, + "seed": { + "nodes": [ + { + "id": 4, + "type": "CheckpointLoaderSimple", + "pos": [0, 0], + "size": [315, 98], + "inputs": [], + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "links": [3] + }, + { + "name": "CLIP", + "type": "CLIP", + "links": [1] + }, + { + "name": "VAE", + "type": "VAE", + "links": [5] + } + ], + "widgets_values": ["sd_xl_base_1.0.safetensors"] + }, + { + "id": 6, + "type": "CLIPTextEncode", + "title": "Positive prompt", + "pos": [400, 0], + "size": [400, 200], + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 1 + }, + { + "name": "text", + "type": "STRING", + "widget": { + "name": "text" + }, + "link": null + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [2] + } + ], + "widgets_values": ["a photo of a pier"] + }, + { + "id": 3, + "type": "KSampler", + "pos": [850, 0], + "size": [315, 262], + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 3 + }, + { + "name": "positive", + "type": "CONDITIONING", + "link": 2 + }, + { + "name": "negative", + "type": "CONDITIONING", + "link": null + }, + { + "name": "latent_image", + "type": "LATENT", + "link": null + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [4] + } + ], + "widgets_values": [0, "randomize", 20, 7, "euler", "normal", 1] + }, + { + "id": 8, + "type": "VAEDecode", + "pos": [1200, 0], + "size": [210, 46], + "inputs": [ + { + "name": "samples", + "type": "LATENT", + "link": 4 + }, + { + "name": "vae", + "type": "VAE", + "link": 5 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [6] + } + ], + "widgets_values": [] + }, + { + "id": 9, + "type": "SaveImage", + "pos": [1450, 0], + "size": [315, 270], + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 6 + } + ], + "outputs": [], + "widgets_values": ["ComfyUI"] + } + ], + "links": [ + [1, 4, 1, 6, 0, "CLIP"], + [2, 6, 0, 3, 1, "CONDITIONING"], + [3, 4, 0, 3, 0, "MODEL"], + [4, 3, 0, 8, 0, "LATENT"], + [5, 4, 2, 8, 1, "VAE"], + [6, 8, 0, 9, 0, "IMAGE"] + ] + } + }, + "turns": [ + { + "message_id": "54844cd9-fd59-4c46-a271-58af8bb87403", + "request": { + "content": "Switch to the tab 'Text to image', then add three separate CLIPTextEncode nodes one at a time, wiring each one to the checkpoint loader's CLIP output as you go." + }, + "cancel_after": 6, + "response": [ + { + "kind": "event", + "event": { + "type": "agent_thinking", + "data": { + "delta": "I'll switch to that tab first, then inspect the graph to find the checkpoint loader." + } + }, + "at_ms": 0 + }, + { + "kind": "event", + "event": { + "type": "agent_active_tab", + "data": { + "name": "Text to image", + "workflow_id": "18e8fe8a-8fd3-4fa0-bf55-4437ada01f52" + } + }, + "at_ms": 10 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 6, + "status": "success", + "tool_call_id": "toolu_01Wy5EjYokiTEtfYMBWaXiSX", + "tool_name": "switch_tab" + } + }, + "at_ms": 13 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 472, + "status": "success", + "tool_call_id": "toolu_01TH5jYJncr9pdyeaTC3DNfc", + "tool_name": "ls_nodes" + } + }, + "at_ms": 3059 + }, + { + "kind": "event", + "event": { + "type": "agent_thinking", + "data": { + "delta": "The checkpoint loader is node 4. I'll add the first node node and wire it to the loader's CLIP output." + } + }, + "at_ms": 5482 + }, + { + "kind": "graph_ops", + "ops": [ + { + "op": "add_node", + "pos": [1845, 0], + "node": { + "id": 729482957923442, + "pos": [1845, 0], + "mode": 0, + "size": [240, 86], + "type": "CLIPTextEncode", + "flags": {}, + "order": 0, + "inputs": [ + { + "link": null, + "name": "clip", + "type": "CLIP" + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [] + } + ], + "properties": {}, + "widgets_values": [null] + }, + "actor": "rec-local-user", + "op_id": "634330f1b8cd4e689c353be87bf23296", + "stamp": [2, "rec-local-user"], + "node_id": 729482957923442, + "class_type": "CLIPTextEncode", + "base_version": 2 + } + ], + "at_ms": 5927 + }, + { + "kind": "event", + "event": { + "type": "agent_tool_call", + "data": { + "duration_ms": 437, + "status": "success", + "tool_call_id": "toolu_018huMdgs7tpu1NfVwYVMgNh", + "tool_name": "add_node" + } + }, + "at_ms": 5927 + }, + { + "kind": "event", + "event": { + "type": "agent_message_delta", + "data": { + "delta": "Stopped at your request. Before stopping I made 1 edit to your canvas." + } + }, + "at_ms": 6821 + }, + { + "kind": "event", + "event": { + "type": "agent_message_done", + "data": { + "usage": null + } + }, + "at_ms": 6823 + } + ] + } + ] +} From 9471647c7699ccfac43ffc9db76194e883b916f6 Mon Sep 17 00:00:00 2001 From: Nathaniel Parson Koroso Date: Thu, 3 Sep 2026 10:43:31 -0700 Subject: [PATCH 09/52] docs(browser-tests): point the capture step at the fixtures directory, not files this PR lacks --- browser_tests/README.md | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/browser_tests/README.md b/browser_tests/README.md index 85c6b4524d0..0f32387b0d7 100644 --- a/browser_tests/README.md +++ b/browser_tests/README.md @@ -624,13 +624,11 @@ fix so the bug stays fixed: the per-op audit rows (`agent_tool_calls` parent and child rows) the exporter reads. The same agent in standalone mode (SQLite, no doc host) never writes them, so it can only - yield text-only or tool-error turns. Export the turn's rows and - convert them to a conversation JSON under - `browser_tests/fixtures/data/agent/conversations/` with - `scripts/agentConversationCapture.ts`, marking - `response_side: 'recorded'` (see `fixtures/data/agent/README.md` for - the capture format and backend query). Never write `graph_ops` by - hand and never relabel a synthesized response as recorded. + yield text-only or tool-error turns. Record it with the recorder that + lives beside the fixtures under `browser_tests/fixtures/data/agent/`, + which writes the conversation JSON into `conversations/` marked + `response_side: 'recorded'`. Never write `graph_ops` by hand and never + relabel a synthesized response as recorded. 2. **Add the replay case.** Drive the fixture through the conversation replay fixture (`agentConversationFixture`), asserting the canvas-observable outcome the bug corrupted (graph end-state or From 7c6335d3f2f9fea55d684663e5686ebe6fb7bbd0 Mon Sep 17 00:00:00 2001 From: Nathaniel Parson Koroso Date: Thu, 3 Sep 2026 10:49:20 -0700 Subject: [PATCH 10/52] test(agent): move the in-process doc host out of the replay harness Pure move: HostDoc, its frame type and the protocol constants now live in agentConversationHostDoc.ts; the harness imports them. --- .../fixtures/agentConversationFixture.ts | 117 +----------------- .../fixtures/agentConversationHostDoc.ts | 114 +++++++++++++++++ 2 files changed, 120 insertions(+), 111 deletions(-) create mode 100644 browser_tests/fixtures/agentConversationHostDoc.ts diff --git a/browser_tests/fixtures/agentConversationFixture.ts b/browser_tests/fixtures/agentConversationFixture.ts index 1dcc0cc357c..fed022b514d 100644 --- a/browser_tests/fixtures/agentConversationFixture.ts +++ b/browser_tests/fixtures/agentConversationFixture.ts @@ -1,17 +1,9 @@ import type { Locator, Page, WebSocketRoute } from '@playwright/test' import { expect } from '@playwright/test' -import { applyOps, mint, readGraph } from '@comfyorg/comfy-multi-player' -import type { - GraphSnapshot, - WidgetCatalog, - WorkflowJSON -} from '@comfyorg/comfy-multi-player' -import * as Y from 'yjs' +import type { GraphSnapshot } from '@comfyorg/comfy-multi-player' import enMessages from '@/locales/en/main.json' with { type: 'json' } -import type { GraphOperation } from '@/workbench/extensions/agent/crdt/graphOperations' -import { mintWireOps } from '@/workbench/extensions/agent/crdt/opEnvelope' import type { AgentCancelAccepted, AgentMessages, @@ -20,6 +12,11 @@ import type { import { parseAgentWsEvent } from '@/workbench/extensions/agent/schemas/agentApiSchema' import { agentTest, bootAgentApp } from '@e2e/fixtures/agentPanelFixture' +import type { DocFrame } from '@e2e/fixtures/agentConversationHostDoc' +import { + DOC_PROTOCOL_VERSION, + HostDoc +} from '@e2e/fixtures/agentConversationHostDoc' import type { AgentConversation, AgentConversationTurn, @@ -38,8 +35,6 @@ const turnId = (turn: number): string => // useAgentSession.ts keeps THREAD_STORAGE_KEY module-private. const THREAD_STORAGE_KEY = 'Comfy.Agent.ThreadId' const SOCKET_SID = '7d1f2e3a-4b5c-4d6e-8f90-1a2b3c4d5e6f' -const HOST_ACTOR = 'agent:comfy' -const DOC_PROTOCOL_VERSION = 1 const PANEL_MOUNT_TIMEOUT = 30_000 const SUBSCRIBE_TIMEOUT = 15_000 @@ -47,106 +42,6 @@ const OPEN_AGENT_LABEL = enMessages.agent.askComfyAgent const SEND_LABEL = enMessages.agent.send const STOP_LABEL = enMessages.agent.stop -interface DocFrame { - type: 'doc_subscribed' | 'doc_update' | 'doc_ops_result' - data: Record -} - -function toBase64(bytes: Uint8Array): string { - return Buffer.from(bytes).toString('base64') -} - -function fromBase64(value: string): Uint8Array { - return new Uint8Array(Buffer.from(value, 'base64')) -} - -class HostDoc { - private readonly doc: Y.Doc - private seq = 1 - - constructor( - private readonly workflowId: string, - seed: WorkflowJSON, - private readonly catalog: WidgetCatalog - ) { - this.doc = mint(seed, catalog) - } - - graph(): GraphSnapshot { - return readGraph(this.doc) - } - - subscribed(): DocFrame { - return { - type: 'doc_subscribed', - data: { - v: DOC_PROTOCOL_VERSION, - workflow_id: this.workflowId, - ok: true, - seq: this.seq - } - } - } - - catchUp(stateVectorB64: string): DocFrame { - const update = Y.encodeStateAsUpdate(this.doc, fromBase64(stateVectorB64)) - return this.updateFrame(update, HOST_ACTOR, []) - } - - // The real host folds client batches into the same doc, so the expected graph must see them. - applyClient(ops: unknown[]): string[] { - const result = applyOps( - this.doc, - ops as Parameters[1], - this.catalog - ) - this.seq += 1 - return result.outcomes.flatMap((outcome, index) => - outcome.outcome === 'applied' - ? [String((ops[index] as { op_id?: unknown }).op_id ?? index)] - : [] - ) - } - - apply(operations: GraphOperation[]): DocFrame { - const before = Y.encodeStateVector(this.doc) - const ops = mintWireOps(operations, { - actor: HOST_ACTOR, - baseVersion: this.seq - }) - const result = applyOps(this.doc, ops, this.catalog) - const rejected = result.outcomes.filter((o) => o.outcome !== 'applied') - if (rejected.length > 0) - throw new Error( - `conversation graph_ops did not apply: ${JSON.stringify(rejected)}` - ) - this.seq += 1 - return this.updateFrame( - Y.encodeStateAsUpdate(this.doc, before), - HOST_ACTOR, - ops.map((op) => op.op_id) - ) - } - - private updateFrame( - update: Uint8Array, - actor: string, - opIds: string[] - ): DocFrame { - return { - type: 'doc_update', - data: { - v: DOC_PROTOCOL_VERSION, - workflow_id: this.workflowId, - seq: this.seq, - update_b64: toBase64(update), - actor, - op_ids: opIds - } - } - } -} - type NodeBody = { id: number | string type: string diff --git a/browser_tests/fixtures/agentConversationHostDoc.ts b/browser_tests/fixtures/agentConversationHostDoc.ts new file mode 100644 index 00000000000..dfad91b419e --- /dev/null +++ b/browser_tests/fixtures/agentConversationHostDoc.ts @@ -0,0 +1,114 @@ +import { applyOps, mint, readGraph } from '@comfyorg/comfy-multi-player' +import type { + GraphSnapshot, + WidgetCatalog, + WorkflowJSON +} from '@comfyorg/comfy-multi-player' +import * as Y from 'yjs' + +import type { GraphOperation } from '@/workbench/extensions/agent/crdt/graphOperations' +import { mintWireOps } from '@/workbench/extensions/agent/crdt/opEnvelope' + +const HOST_ACTOR = 'agent:comfy' +export const DOC_PROTOCOL_VERSION = 1 + +export interface DocFrame { + type: 'doc_subscribed' | 'doc_update' | 'doc_ops_result' + data: Record +} + +function toBase64(bytes: Uint8Array): string { + return Buffer.from(bytes).toString('base64') +} + +function fromBase64(value: string): Uint8Array { + return new Uint8Array(Buffer.from(value, 'base64')) +} + +// The doc host stand-in: the real library in-process, only the transport is local. +export class HostDoc { + private readonly doc: Y.Doc + private seq = 1 + + constructor( + private readonly workflowId: string, + seed: WorkflowJSON, + private readonly catalog: WidgetCatalog + ) { + this.doc = mint(seed, catalog) + } + + graph(): GraphSnapshot { + return readGraph(this.doc) + } + + subscribed(): DocFrame { + return { + type: 'doc_subscribed', + data: { + v: DOC_PROTOCOL_VERSION, + workflow_id: this.workflowId, + ok: true, + seq: this.seq + } + } + } + + catchUp(stateVectorB64: string): DocFrame { + const update = Y.encodeStateAsUpdate(this.doc, fromBase64(stateVectorB64)) + return this.updateFrame(update, HOST_ACTOR, []) + } + + // The real host folds client batches into the same doc, so the expected graph must see them. + applyClient(ops: unknown[]): string[] { + const result = applyOps( + this.doc, + ops as Parameters[1], + this.catalog + ) + this.seq += 1 + return result.outcomes.flatMap((outcome, index) => + outcome.outcome === 'applied' + ? [String((ops[index] as { op_id?: unknown }).op_id ?? index)] + : [] + ) + } + + apply(operations: GraphOperation[]): DocFrame { + const before = Y.encodeStateVector(this.doc) + const ops = mintWireOps(operations, { + actor: HOST_ACTOR, + baseVersion: this.seq + }) + const result = applyOps(this.doc, ops, this.catalog) + const rejected = result.outcomes.filter((o) => o.outcome !== 'applied') + if (rejected.length > 0) + throw new Error( + `conversation graph_ops did not apply: ${JSON.stringify(rejected)}` + ) + this.seq += 1 + return this.updateFrame( + Y.encodeStateAsUpdate(this.doc, before), + HOST_ACTOR, + ops.map((op) => op.op_id) + ) + } + + private updateFrame( + update: Uint8Array, + actor: string, + opIds: string[] + ): DocFrame { + return { + type: 'doc_update', + data: { + v: DOC_PROTOCOL_VERSION, + workflow_id: this.workflowId, + seq: this.seq, + update_b64: toBase64(update), + actor, + op_ids: opIds + } + } + } +} From e8ab9c39c848997c94ead8bfd3f1121bd6d03cd3 Mon Sep 17 00:00:00 2001 From: Nathaniel Parson Koroso Date: Thu, 3 Sep 2026 11:33:07 -0700 Subject: [PATCH 11/52] test(agent): stop asserting the CRDT status chip the panel no longer renders main removed the agent-crdt-status strip; the graph equality and the added-node checks already prove every update landed. --- browser_tests/fixtures/agentConversationFixture.ts | 7 ------- browser_tests/tests/agent/agentConversationReplay.spec.ts | 6 ------ 2 files changed, 13 deletions(-) diff --git a/browser_tests/fixtures/agentConversationFixture.ts b/browser_tests/fixtures/agentConversationFixture.ts index fed022b514d..d88e8c8d45e 100644 --- a/browser_tests/fixtures/agentConversationFixture.ts +++ b/browser_tests/fixtures/agentConversationFixture.ts @@ -343,13 +343,6 @@ class AgentConversationHarness { .filter((id) => !seedIds.has(id) && id in graph.nodes) } - // One update per ops entry plus the subscribe catch-up. - expectedUpdateCount(): number { - return ( - this.entries().filter((entry) => entry.kind === 'graph_ops').length + 1 - ) - } - hostGraph(): GraphSnapshot { return this.host.graph() } diff --git a/browser_tests/tests/agent/agentConversationReplay.spec.ts b/browser_tests/tests/agent/agentConversationReplay.spec.ts index 562291c38d1..026de03bc72 100644 --- a/browser_tests/tests/agent/agentConversationReplay.spec.ts +++ b/browser_tests/tests/agent/agentConversationReplay.spec.ts @@ -59,12 +59,6 @@ test.describe('Agent conversation replay', { tag: '@cloud' }, () => { await expect( panel.getByTestId('markdown-stream').first() ).not.toBeEmpty() - await expect(panel.getByTestId('agent-crdt-status')).toContainText( - 'connected' - ) - await expect(panel.getByTestId('agent-crdt-status')).toContainText( - new RegExp(`\\b${agentConversation.expectedUpdateCount()} updates`) - ) for (const id of agentConversation.addedNodeIds()) { await expect(page.locator(`[data-node-id="${id}"]`)).toBeVisible() From fc1fb59fcd2ddd5c82a97ed1ffae88262f962730 Mon Sep 17 00:00:00 2001 From: Nathaniel Parson Koroso Date: Thu, 3 Sep 2026 12:15:23 -0700 Subject: [PATCH 12/52] docs(browser-tests): playbook for running the agent replays --- browser_tests/README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/browser_tests/README.md b/browser_tests/README.md index 0f32387b0d7..1425b292fb3 100644 --- a/browser_tests/README.md +++ b/browser_tests/README.md @@ -614,6 +614,24 @@ only. Never commit them. ## Replay coverage for agent bug fixes +### Playbook: run the replays + +Prerequisites: a ComfyUI backend on 8188, `pnpm install`, and the recordings +(they land with the recordings PR; without them the replay specs define no +tests). + +```bash +DISTRIBUTION=cloud DEV_SERVER_COMFYUI_URL=http://127.0.0.1:8188 pnpm dev --port 6310 --strictPort +``` + +```bash +PLAYWRIGHT_LOCAL=1 PLAYWRIGHT_TEST_URL=http://localhost:6310 DISTRIBUTION=cloud pnpm exec playwright test browser_tests/tests/agent/agentConversationReplay.spec.ts browser_tests/tests/agent/agentConversationTiming.spec.ts browser_tests/tests/agent/agentConversationConcurrentEdits.spec.ts browser_tests/tests/agent/agentConversationCancelledTurn.spec.ts --project=cloud +``` + +Watch one case in a browser: add `--headed -g agent-rec-add-set-delete`. +Replay at the recorded gaps instead of back to back: add +`AGENT_REPLAY_TIMING=recorded`. + When a fix changes how the agent's turns affect the app (graph edits, CRDT frames, panel state), add a conversation replay case alongside the fix so the bug stays fixed: From cd0876c6dc0b019dc7b74844acd9a287622978b8 Mon Sep 17 00:00:00 2001 From: Nathaniel Parson Koroso Date: Thu, 3 Sep 2026 12:22:05 -0700 Subject: [PATCH 13/52] docs(browser-tests): replay playbook is commands only --- browser_tests/README.md | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/browser_tests/README.md b/browser_tests/README.md index 1425b292fb3..c32e62a2799 100644 --- a/browser_tests/README.md +++ b/browser_tests/README.md @@ -614,23 +614,17 @@ only. Never commit them. ## Replay coverage for agent bug fixes -### Playbook: run the replays - -Prerequisites: a ComfyUI backend on 8188, `pnpm install`, and the recordings -(they land with the recordings PR; without them the replay specs define no -tests). +### Playbook ```bash -DISTRIBUTION=cloud DEV_SERVER_COMFYUI_URL=http://127.0.0.1:8188 pnpm dev --port 6310 --strictPort +DISTRIBUTION=cloud DEV_SERVER_COMFYUI_URL=http://127.0.0.1:8188 pnpm dev ``` ```bash -PLAYWRIGHT_LOCAL=1 PLAYWRIGHT_TEST_URL=http://localhost:6310 DISTRIBUTION=cloud pnpm exec playwright test browser_tests/tests/agent/agentConversationReplay.spec.ts browser_tests/tests/agent/agentConversationTiming.spec.ts browser_tests/tests/agent/agentConversationConcurrentEdits.spec.ts browser_tests/tests/agent/agentConversationCancelledTurn.spec.ts --project=cloud +PLAYWRIGHT_LOCAL=1 PLAYWRIGHT_TEST_URL=http://localhost:5173 DISTRIBUTION=cloud pnpm exec playwright test agentConversation --project=cloud ``` -Watch one case in a browser: add `--headed -g agent-rec-add-set-delete`. -Replay at the recorded gaps instead of back to back: add -`AGENT_REPLAY_TIMING=recorded`. +Watch one: add `--headed -g `. Recorded gaps: `AGENT_REPLAY_TIMING=recorded`. When a fix changes how the agent's turns affect the app (graph edits, CRDT frames, panel state), add a conversation replay case alongside the From 56f3738f7a9c8574bb0a66ddb3776c2c539a18de Mon Sep 17 00:00:00 2001 From: Nathaniel Parson Koroso Date: Thu, 3 Sep 2026 12:42:30 -0700 Subject: [PATCH 14/52] test(agent): client op batches fail loud and are typed as wire ops applyClient mirrors apply: it throws when the applier rejects an op instead of acking ok, and takes the library's Op type; the one cast sits at the socket boundary. --- .../fixtures/agentConversationFixture.ts | 5 +++-- .../fixtures/agentConversationHostDoc.ts | 22 +++++++++---------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/browser_tests/fixtures/agentConversationFixture.ts b/browser_tests/fixtures/agentConversationFixture.ts index d88e8c8d45e..fd3b6f8f0b7 100644 --- a/browser_tests/fixtures/agentConversationFixture.ts +++ b/browser_tests/fixtures/agentConversationFixture.ts @@ -1,7 +1,7 @@ import type { Locator, Page, WebSocketRoute } from '@playwright/test' import { expect } from '@playwright/test' -import type { GraphSnapshot } from '@comfyorg/comfy-multi-player' +import type { GraphSnapshot, Op } from '@comfyorg/comfy-multi-player' import enMessages from '@/locales/en/main.json' with { type: 'json' } import type { @@ -448,7 +448,8 @@ class AgentConversationHarness { ops?: unknown } if (workflow_id === this.conversation.workflow.id && Array.isArray(ops)) { - const applied = this.host.applyClient(ops) + // The applier validates each payload; the wire frame only guarantees an array. + const applied = this.host.applyClient(ops as Op[]) this.send({ type: 'doc_ops_result', data: { diff --git a/browser_tests/fixtures/agentConversationHostDoc.ts b/browser_tests/fixtures/agentConversationHostDoc.ts index dfad91b419e..421e90f41ee 100644 --- a/browser_tests/fixtures/agentConversationHostDoc.ts +++ b/browser_tests/fixtures/agentConversationHostDoc.ts @@ -1,6 +1,7 @@ import { applyOps, mint, readGraph } from '@comfyorg/comfy-multi-player' import type { GraphSnapshot, + Op, WidgetCatalog, WorkflowJSON } from '@comfyorg/comfy-multi-player' @@ -59,19 +60,16 @@ export class HostDoc { return this.updateFrame(update, HOST_ACTOR, []) } - // The real host folds client batches into the same doc, so the expected graph must see them. - applyClient(ops: unknown[]): string[] { - const result = applyOps( - this.doc, - ops as Parameters[1], - this.catalog - ) + // Client batches arrive already minted; the real host folds them into the same doc. + applyClient(ops: Op[]): string[] { + const result = applyOps(this.doc, ops, this.catalog) + const rejected = result.outcomes.filter((o) => o.outcome !== 'applied') + if (rejected.length > 0) + throw new Error( + `client doc_ops did not apply: ${JSON.stringify(rejected)}` + ) this.seq += 1 - return result.outcomes.flatMap((outcome, index) => - outcome.outcome === 'applied' - ? [String((ops[index] as { op_id?: unknown }).op_id ?? index)] - : [] - ) + return ops.map((op) => op.op_id) } apply(operations: GraphOperation[]): DocFrame { From 8a75a4a7d0f700e1cdc8c10a7b91d6c843a18eeb Mon Sep 17 00:00:00 2001 From: Nathaniel Parson Koroso Date: Thu, 3 Sep 2026 13:23:36 -0700 Subject: [PATCH 15/52] test(agent): assert deleted nodes leave the canvas after replay --- browser_tests/fixtures/agentConversationFixture.ts | 7 +++++++ browser_tests/tests/agent/agentConversationReplay.spec.ts | 3 +++ 2 files changed, 10 insertions(+) diff --git a/browser_tests/fixtures/agentConversationFixture.ts b/browser_tests/fixtures/agentConversationFixture.ts index fd3b6f8f0b7..7162ebff470 100644 --- a/browser_tests/fixtures/agentConversationFixture.ts +++ b/browser_tests/fixtures/agentConversationFixture.ts @@ -343,6 +343,13 @@ class AgentConversationHarness { .filter((id) => !seedIds.has(id) && id in graph.nodes) } + removedNodeIds(): string[] { + const graph = this.host.graph() + return this.nodeBodies() + .map((body) => String(body.id)) + .filter((id) => !(id in graph.nodes)) + } + hostGraph(): GraphSnapshot { return this.host.graph() } diff --git a/browser_tests/tests/agent/agentConversationReplay.spec.ts b/browser_tests/tests/agent/agentConversationReplay.spec.ts index 026de03bc72..df63c91e36b 100644 --- a/browser_tests/tests/agent/agentConversationReplay.spec.ts +++ b/browser_tests/tests/agent/agentConversationReplay.spec.ts @@ -63,6 +63,9 @@ test.describe('Agent conversation replay', { tag: '@cloud' }, () => { for (const id of agentConversation.addedNodeIds()) { await expect(page.locator(`[data-node-id="${id}"]`)).toBeVisible() } + for (const id of agentConversation.removedNodeIds()) { + await expect(page.locator(`[data-node-id="${id}"]`)).toBeHidden() + } for (const { nodeId, widget, From 203f13c080147ee9603c71a3e551495246b360e7 Mon Sep 17 00:00:00 2001 From: Nathaniel Parson Koroso Date: Thu, 3 Sep 2026 13:44:15 -0700 Subject: [PATCH 16/52] test(agent): run conversation replays in a 2560x1440 viewport and record video at that size --- browser_tests/fixtures/agentConversationFixture.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/browser_tests/fixtures/agentConversationFixture.ts b/browser_tests/fixtures/agentConversationFixture.ts index 7162ebff470..f35016d7d61 100644 --- a/browser_tests/fixtures/agentConversationFixture.ts +++ b/browser_tests/fixtures/agentConversationFixture.ts @@ -525,9 +525,20 @@ interface ConversationFixtures { agentConversation: AgentConversationHarness } +// Wide enough to keep the whole seed graph beside the docked panel; the video follows the viewport instead of Playwright's 800px cap. +const VIEWPORT = { width: 2560, height: 1440 } + export const agentConversationTest = agentTest.extend({ conversationCase: ['', { option: true }], replayTiming: [defaultReplayTiming(), { option: true }], + viewport: VIEWPORT, + video: { + mode: + process.env.PLAYWRIGHT_LOCAL || process.env.RECORD_VIDEO === 'true' + ? 'on' + : 'off', + size: VIEWPORT + }, agentConversation: async ( { page, agentFlagEnabled, conversationCase, replayTiming }, use From 8e7cdcc7a304d550ecf446a20c3246f84e7c4226 Mon Sep 17 00:00:00 2001 From: Nathaniel Parson Koroso Date: Thu, 3 Sep 2026 15:46:55 -0700 Subject: [PATCH 17/52] test(agent): expect the registered display name for untitled replayed nodes (cherry picked from commit fab50ea7385cbb2ec48a9da10bf46b1a0f364046) --- browser_tests/fixtures/agentConversationFixture.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/browser_tests/fixtures/agentConversationFixture.ts b/browser_tests/fixtures/agentConversationFixture.ts index f35016d7d61..32138a51e01 100644 --- a/browser_tests/fixtures/agentConversationFixture.ts +++ b/browser_tests/fixtures/agentConversationFixture.ts @@ -4,6 +4,7 @@ import { expect } from '@playwright/test' import type { GraphSnapshot, Op } from '@comfyorg/comfy-multi-player' import enMessages from '@/locales/en/main.json' with { type: 'json' } +import enNodes from '@/locales/en/nodeDefs.json' with { type: 'json' } import type { AgentCancelAccepted, AgentMessages, @@ -61,6 +62,11 @@ interface RecordedWidgetValue { value: string | number } +function displayName(type: string): string { + const entry = (enNodes as Record)[type] + return entry?.display_name ?? type +} + // The panel's row label: the known-tool table, else the humanized tool name (ToolCallCard.vue). function toolRowLabel(name: string): string { const known = knownTool(name)?.labelKey @@ -239,7 +245,8 @@ class AgentConversationHarness { const widgets = new Set(catalog[type]?.widget_order ?? []) return { id, - title: byId.get(id)?.title ?? type, + // An untitled node renders its registered display name, as LiteGraph.createNode does. + title: byId.get(id)?.title ?? displayName(type), // Widget-backed inputs render as widgets, not slot rows. inputs: (body?.inputs ?? []) .map((slot, index) => ({ name: slot.name, index })) From 4db5e84e05f41a1279df2761e0e30c94db814af9 Mon Sep 17 00:00:00 2001 From: Nathaniel Parson Koroso Date: Thu, 3 Sep 2026 16:13:59 -0700 Subject: [PATCH 18/52] test(agent): replay against real node definitions and compare connected slots by name --- .../fixtures/agentConversationFixture.ts | 70 +++++++++++++------ browser_tests/fixtures/agentPanelFixture.ts | 11 ++- .../fixtures/utils/cloudBootMocks.ts | 7 +- .../agentConversationConcurrentEdits.spec.ts | 4 ++ .../agent/agentConversationReplay.spec.ts | 15 +++- 5 files changed, 79 insertions(+), 28 deletions(-) diff --git a/browser_tests/fixtures/agentConversationFixture.ts b/browser_tests/fixtures/agentConversationFixture.ts index 32138a51e01..6a744c08916 100644 --- a/browser_tests/fixtures/agentConversationFixture.ts +++ b/browser_tests/fixtures/agentConversationFixture.ts @@ -4,7 +4,6 @@ import { expect } from '@playwright/test' import type { GraphSnapshot, Op } from '@comfyorg/comfy-multi-player' import enMessages from '@/locales/en/main.json' with { type: 'json' } -import enNodes from '@/locales/en/nodeDefs.json' with { type: 'json' } import type { AgentCancelAccepted, AgentMessages, @@ -62,11 +61,6 @@ interface RecordedWidgetValue { value: string | number } -function displayName(type: string): string { - const entry = (enNodes as Record)[type] - return entry?.display_name ?? type -} - // The panel's row label: the known-tool table, else the humanized tool name (ToolCallCard.vue). function toolRowLabel(name: string): string { const known = knownTool(name)?.labelKey @@ -80,15 +74,17 @@ function toolRowLabel(name: string): string { return spaced.charAt(0).toUpperCase() + spaced.slice(1) } +// Connected link slots by name; a node definition may render slots the recording never listed. interface GraphNodeSnapshot { id: string title: string - inputs: boolean[] - outputs: boolean[] + inputs: string[] + outputs: string[] } // Runs one recorded prompt/response through the real panel over a routed /ws socket. class AgentConversationHarness { + private readonly displayNames: Record = {} readonly postedMessages: string[] = [] // Human-op minting is observable only on the client side of the socket. readonly clientFrames: { type?: unknown; data?: unknown }[] = [] @@ -129,11 +125,27 @@ class AgentConversationHarness { }) await bootAgentApp(this.page, agentFlag, { // Only the Vue node renderer projects follower edits onto the canvas. - settings: { 'Comfy.VueNodes.Enabled': true } + settings: { 'Comfy.VueNodes.Enabled': true }, + // Replayed nodes materialize from registered node types; the recordings use core nodes only. + objectInfo: 'server' }) await this.page.getByRole('button', { name: OPEN_AGENT_LABEL }).click() await expect(this.panel).toBeVisible({ timeout: PANEL_MOUNT_TIMEOUT }) + await this.loadDisplayNames() + } + + // The same definitions the app just loaded; an untitled node renders its display name. + private async loadDisplayNames(): Promise { + const response = await this.page.request.get( + new URL('/api/object_info', this.page.url()).href + ) + const defs = (await response.json()) as Record< + string, + { display_name?: string } + > + for (const [type, def] of Object.entries(defs)) + if (def.display_name) this.displayNames[type] = def.display_name } async sendPrompt(turn = 0): Promise { @@ -243,20 +255,30 @@ class AgentConversationHarness { const type = String(node.type) const body = byId.get(id) ?? byType.get(type) const widgets = new Set(catalog[type]?.widget_order ?? []) + const inputNames = (body?.inputs ?? []).map((slot) => slot.name) + const outputNames = (body?.outputs ?? []).map((slot) => slot.name) return { id, // An untitled node renders its registered display name, as LiteGraph.createNode does. - title: byId.get(id)?.title ?? displayName(type), + title: byId.get(id)?.title ?? this.displayNames[type] ?? type, // Widget-backed inputs render as widgets, not slot rows. - inputs: (body?.inputs ?? []) - .map((slot, index) => ({ name: slot.name, index })) - .filter(({ name }) => !widgets.has(name)) - .map(({ index }) => - links.some((link) => String(link[3]) === id && link[4] === index) - ), - outputs: (body?.outputs ?? []).map((_, index) => - links.some((link) => String(link[1]) === id && link[2] === index) - ) + inputs: [ + ...new Set( + links + .filter((link) => String(link[3]) === id) + .map((link) => inputNames[link[4]]) + .filter((name) => name !== undefined && !widgets.has(name)) + ) + ].sort(), + // One slot can feed several links. + outputs: [ + ...new Set( + links + .filter((link) => String(link[1]) === id) + .map((link) => outputNames[link[2]]) + .filter((name) => name !== undefined) + ) + ].sort() } }) .sort((a, b) => compareNodeIds(toNodeId(a.id), toNodeId(b.id))) @@ -367,10 +389,16 @@ class AgentConversationHarness { .locator('[data-node-id]') .evaluateAll((nodes) => nodes.map((node) => { + // Widget sockets are dot-only and carry no name. const connected = (selector: string) => - Array.from(node.querySelectorAll(selector)).map((slot) => - slot.classList.contains('lg-slot--connected') + Array.from( + node.querySelectorAll( + `${selector}.lg-slot--connected:not(.lg-slot--dot-only)` + ) ) + .map((slot) => slot.textContent?.trim() ?? '') + .filter((name) => name !== '') + .sort() return { id: node.getAttribute('data-node-id') ?? '', title: diff --git a/browser_tests/fixtures/agentPanelFixture.ts b/browser_tests/fixtures/agentPanelFixture.ts index 4ee0352f537..58badbfb828 100644 --- a/browser_tests/fixtures/agentPanelFixture.ts +++ b/browser_tests/fixtures/agentPanelFixture.ts @@ -26,11 +26,17 @@ function agentFeatures(agentFlag: boolean): RemoteConfig { interface BootAgentAppOptions { /** Extra `/api/settings` entries layered over the panel defaults. */ settings?: Record + /** `'server'` loads real node definitions instead of the empty catalog. */ + objectInfo?: 'server' } async function mockAgentBoot( page: Page, - { agentFlag, settings }: { agentFlag: boolean } & BootAgentAppOptions + { + agentFlag, + settings, + objectInfo + }: { agentFlag: boolean } & BootAgentAppOptions ): Promise { await mockCloudBoot(page, { features: agentFeatures(agentFlag), @@ -38,7 +44,8 @@ async function mockAgentBoot( 'Comfy.TutorialCompleted': true, 'Comfy.RightSidePanel.ShowErrorsTab': false, ...settings - } + }, + objectInfo }) await mockBilling(page) const emptyAssets: ListAssetsResponse = { diff --git a/browser_tests/fixtures/utils/cloudBootMocks.ts b/browser_tests/fixtures/utils/cloudBootMocks.ts index f6970bf3a33..5a038484a6a 100644 --- a/browser_tests/fixtures/utils/cloudBootMocks.ts +++ b/browser_tests/fixtures/utils/cloudBootMocks.ts @@ -12,6 +12,8 @@ interface CloudBootOptions { features: RemoteConfig /** Body for `/api/settings` (defaults to `{}`). */ settings?: unknown + /** `'server'` lets `/api/object_info` reach the backend so real node definitions load. */ + objectInfo?: 'server' } /** @@ -21,7 +23,7 @@ interface CloudBootOptions { */ export async function mockCloudBoot( page: Page, - { features, settings = {} }: CloudBootOptions + { features, settings = {}, objectInfo }: CloudBootOptions ) { await page.route('**/api/features', (r) => r.fulfill(jsonRoute(features))) await page.route('**/api/system_stats', (r) => @@ -42,7 +44,8 @@ export async function mockCloudBoot( await page.route('**/api/settings', (r) => r.fulfill(jsonRoute(settings))) await page.route('**/api/userdata**', (r) => r.fulfill(jsonRoute([]))) await page.route('**/api/extensions', (r) => r.fulfill(jsonRoute([]))) - await page.route('**/api/object_info', (r) => r.fulfill(jsonRoute({}))) + if (objectInfo !== 'server') + await page.route('**/api/object_info', (r) => r.fulfill(jsonRoute({}))) await page.route('**/api/global_subgraphs', (r) => r.fulfill(jsonRoute({}))) await page.route('**/api/i18n', (r) => r.fulfill(jsonRoute({}))) await page.route('**/api/auth/session', (r) => diff --git a/browser_tests/tests/agent/agentConversationConcurrentEdits.spec.ts b/browser_tests/tests/agent/agentConversationConcurrentEdits.spec.ts index 060ac4db564..a8dcc956ecc 100644 --- a/browser_tests/tests/agent/agentConversationConcurrentEdits.spec.ts +++ b/browser_tests/tests/agent/agentConversationConcurrentEdits.spec.ts @@ -18,6 +18,10 @@ if (hasAgentConversation('agent-rec-three-sequential-adds')) page }) => { test.setTimeout(60_000) + test.fixme( + true, + 'main re-projects the human-edited node without its widgets, see #16870' + ) const { conversation } = agentConversation const opsEntries = conversation.turns[0].response .map((entry, index) => (entry.kind === 'graph_ops' ? index : -1)) diff --git a/browser_tests/tests/agent/agentConversationReplay.spec.ts b/browser_tests/tests/agent/agentConversationReplay.spec.ts index df63c91e36b..30fb6acd149 100644 --- a/browser_tests/tests/agent/agentConversationReplay.spec.ts +++ b/browser_tests/tests/agent/agentConversationReplay.spec.ts @@ -74,9 +74,18 @@ test.describe('Agent conversation replay', { tag: '@cloud' }, () => { const field = page .locator(`[data-node-id="${nodeId}"]`) .getByLabel(widget, { exact: true }) - const control = - typeof value === 'string' ? field : field.locator('input') - await expect(control).toHaveValue(String(value)) + if (typeof value === 'number') { + // Number widgets format their input (0.5 renders as 0.50), so compare the number. + await expect + .poll(async () => + Number(await field.locator('input').first().inputValue()) + ) + .toBe(value) + continue + } + const tag = await field.evaluate((el) => el.tagName.toLowerCase()) + if (tag === 'button') await expect(field).toContainText(value) + else await expect(field).toHaveValue(value) } await expect From 05e52f623e668ad23c5bb55a8a3cd78b8ca4245c Mon Sep 17 00:00:00 2001 From: Nathaniel Parson Koroso Date: Thu, 3 Sep 2026 17:27:52 -0700 Subject: [PATCH 19/52] test(agent): compare replayed graphs without node titles and drop the disabled concurrent-edit spec --- .../fixtures/agentConversationFixture.ts | 22 ------ .../agentConversationConcurrentEdits.spec.ts | 68 ------------------- 2 files changed, 90 deletions(-) delete mode 100644 browser_tests/tests/agent/agentConversationConcurrentEdits.spec.ts diff --git a/browser_tests/fixtures/agentConversationFixture.ts b/browser_tests/fixtures/agentConversationFixture.ts index 6a744c08916..e797d828a35 100644 --- a/browser_tests/fixtures/agentConversationFixture.ts +++ b/browser_tests/fixtures/agentConversationFixture.ts @@ -77,14 +77,12 @@ function toolRowLabel(name: string): string { // Connected link slots by name; a node definition may render slots the recording never listed. interface GraphNodeSnapshot { id: string - title: string inputs: string[] outputs: string[] } // Runs one recorded prompt/response through the real panel over a routed /ws socket. class AgentConversationHarness { - private readonly displayNames: Record = {} readonly postedMessages: string[] = [] // Human-op minting is observable only on the client side of the socket. readonly clientFrames: { type?: unknown; data?: unknown }[] = [] @@ -132,20 +130,6 @@ class AgentConversationHarness { await this.page.getByRole('button', { name: OPEN_AGENT_LABEL }).click() await expect(this.panel).toBeVisible({ timeout: PANEL_MOUNT_TIMEOUT }) - await this.loadDisplayNames() - } - - // The same definitions the app just loaded; an untitled node renders its display name. - private async loadDisplayNames(): Promise { - const response = await this.page.request.get( - new URL('/api/object_info', this.page.url()).href - ) - const defs = (await response.json()) as Record< - string, - { display_name?: string } - > - for (const [type, def] of Object.entries(defs)) - if (def.display_name) this.displayNames[type] = def.display_name } async sendPrompt(turn = 0): Promise { @@ -259,8 +243,6 @@ class AgentConversationHarness { const outputNames = (body?.outputs ?? []).map((slot) => slot.name) return { id, - // An untitled node renders its registered display name, as LiteGraph.createNode does. - title: byId.get(id)?.title ?? this.displayNames[type] ?? type, // Widget-backed inputs render as widgets, not slot rows. inputs: [ ...new Set( @@ -401,10 +383,6 @@ class AgentConversationHarness { .sort() return { id: node.getAttribute('data-node-id') ?? '', - title: - node - .querySelector('[data-testid="node-title"]') - ?.textContent?.trim() ?? '', inputs: connected('.lg-slot--input'), outputs: connected('.lg-slot--output') } diff --git a/browser_tests/tests/agent/agentConversationConcurrentEdits.spec.ts b/browser_tests/tests/agent/agentConversationConcurrentEdits.spec.ts deleted file mode 100644 index a8dcc956ecc..00000000000 --- a/browser_tests/tests/agent/agentConversationConcurrentEdits.spec.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { expect } from '@playwright/test' - -import { agentConversationTest as test } from '@e2e/fixtures/agentConversationFixture' -import { hasAgentConversation } from '@e2e/fixtures/data/agent/agentConversation' - -const HUMAN_TEXT = 'a lighthouse at dawn, typed while the agent works' - -// The recording lands with the data PR; without it there is nothing to replay. -if (hasAgentConversation('agent-rec-three-sequential-adds')) - test.describe( - 'Agent conversation replay with concurrent human edits', - { tag: '@cloud' }, - () => { - test.use({ conversationCase: 'agent-rec-three-sequential-adds' }) - - test('keeps a human widget edit made between the agent adds', async ({ - agentConversation, - page - }) => { - test.setTimeout(60_000) - test.fixme( - true, - 'main re-projects the human-edited node without its widgets, see #16870' - ) - const { conversation } = agentConversation - const opsEntries = conversation.turns[0].response - .map((entry, index) => (entry.kind === 'graph_ops' ? index : -1)) - .filter((index) => index >= 0) - expect(opsEntries.length).toBeGreaterThanOrEqual(3) - const promptText = page - .locator('[data-node-id="6"]') - .getByLabel('text', { exact: true }) - - await agentConversation.sendPrompt() - await agentConversation.replayResponse(0, async (index) => { - if (index !== opsEntries[0]) return - await promptText.fill(HUMAN_TEXT) - await expect - .poll(() => - agentConversation - .outboundOps() - .some((op) => op.op === 'set_widget') - ) - .toBe(true) - }) - await agentConversation.waitForTurnComplete() - - for (const id of agentConversation.addedNodeIds()) { - await expect(page.locator(`[data-node-id="${id}"]`)).toBeVisible() - } - await expect(promptText).toHaveValue(HUMAN_TEXT) - expect( - String( - agentConversation.hostGraph().nodes['6']?.widgets && - ( - agentConversation.hostGraph().nodes['6'].widgets as Record< - string, - unknown - > - ).text - ) - ).toBe(HUMAN_TEXT) - await expect - .poll(() => agentConversation.graphSnapshot()) - .toEqual(agentConversation.expectedGraph()) - }) - } - ) From dda02ddaf5fe87cd66bfb5c98a70bc4f02ed4229 Mon Sep 17 00:00:00 2001 From: Nathaniel Parson Koroso Date: Fri, 4 Sep 2026 10:41:54 -0700 Subject: [PATCH 20/52] test(agent): share the cloud boot routes between the fixture helpers The cloud boot route setup was cloned between cloudBootMocks and CloudWorkspaceMockHelper, and PR 16776 grew one copy with the objectInfo option. Extract the eleven identical routes into mockCloudBootRoutes and have both call it, so the option lives in one place. CloudWorkspaceMockHelper also carried its own jsonRoute clone of the shared util; drop it for the import. Route sets and bodies are unchanged. Per-helper extras stay registered after the shared block, and no extra overlaps a shared pattern, so handler precedence is identical. --- .../helpers/CloudWorkspaceMockHelper.ts | 55 +++++-------------- .../fixtures/utils/cloudBootMocks.ts | 25 ++++++--- 2 files changed, 30 insertions(+), 50 deletions(-) diff --git a/browser_tests/fixtures/helpers/CloudWorkspaceMockHelper.ts b/browser_tests/fixtures/helpers/CloudWorkspaceMockHelper.ts index d5d5473a894..8de7f84921a 100644 --- a/browser_tests/fixtures/helpers/CloudWorkspaceMockHelper.ts +++ b/browser_tests/fixtures/helpers/CloudWorkspaceMockHelper.ts @@ -11,7 +11,6 @@ import type { } from '@/platform/workspace/api/workspaceApi' import { createWorkspaceBillingCapabilities } from '@e2e/fixtures/data/billingCapabilities' -import { mockSystemStats } from '@e2e/fixtures/data/systemStats' import { CLOUD_REMOTE_CONFIG, DEFAULT_TEAM_MEMBERS, @@ -21,6 +20,8 @@ import { } from '@e2e/fixtures/data/cloudWorkspace' import { CloudAuthHelper } from '@e2e/fixtures/helpers/CloudAuthHelper' import { TestIds } from '@e2e/fixtures/selectors' +import { mockCloudBootRoutes } from '@e2e/fixtures/utils/cloudBootMocks' +import { jsonRoute } from '@e2e/fixtures/utils/jsonRoute' import { mockWorkspaceTokenMint } from '@e2e/fixtures/utils/workspaceMocks' interface RoleChangeRequest { @@ -33,12 +34,6 @@ interface MemberMockState { patches: RoleChangeRequest[] } -const jsonRoute = (body: unknown) => ({ - status: 200, - contentType: 'application/json', - body: JSON.stringify(body) -}) - /** * Boots the cloud app against fully mocked workspace + billing endpoints so * member/role specs can drive a raw `page` (the `comfyPage` fixture would try @@ -106,42 +101,18 @@ export class CloudWorkspaceMockHelper { } const { page } = this - await page.route('**/api/features', (r) => - r.fulfill(jsonRoute(CLOUD_REMOTE_CONFIG)) - ) - await page.route('**/api/system_stats', (r) => - r.fulfill(jsonRoute(mockSystemStats)) - ) - await page.route('**/api/users', (r) => - r.fulfill( - jsonRoute({ - storage: 'server', - migrated: true, - users: { 'test-user-e2e': 'E2E Test User' } - }) - ) - ) - // A non-empty settings payload with TutorialCompleted marks the user as - // returning, so the new-user Templates dialog never auto-opens to block the - // Settings button. Errors tab off suppresses the model-folder 401 toast. - await page.route('**/api/settings', (r) => - r.fulfill( - jsonRoute({ - 'Comfy.TutorialCompleted': true, - 'Comfy.RightSidePanel.ShowErrorsTab': false - }) - ) - ) - await page.route('**/api/userdata**', (r) => r.fulfill(jsonRoute([]))) - await page.route('**/api/extensions', (r) => r.fulfill(jsonRoute([]))) - await page.route('**/api/object_info', (r) => r.fulfill(jsonRoute({}))) - await page.route('**/api/global_subgraphs', (r) => r.fulfill(jsonRoute({}))) - await page.route('**/api/i18n', (r) => r.fulfill(jsonRoute({}))) - await page.route('**/api/auth/session', (r) => - r.fulfill(jsonRoute({ token: 'mock-workspace-token' })) - ) + await mockCloudBootRoutes(page, { + features: CLOUD_REMOTE_CONFIG, + // A non-empty settings payload with TutorialCompleted marks the user as + // returning, so the new-user Templates dialog never auto-opens to block + // the Settings button. Errors tab off suppresses the model-folder 401 + // toast. + settings: { + 'Comfy.TutorialCompleted': true, + 'Comfy.RightSidePanel.ShowErrorsTab': false + } + }) await mockWorkspaceTokenMint(page, activeWorkspace) - await page.route('**/releases**', (r) => r.fulfill(jsonRoute([]))) await page.route('**/api/workspaces', (r) => r.fulfill(jsonRoute({ workspaces: [activeWorkspace] })) diff --git a/browser_tests/fixtures/utils/cloudBootMocks.ts b/browser_tests/fixtures/utils/cloudBootMocks.ts index 5a038484a6a..ab0b38e1bbf 100644 --- a/browser_tests/fixtures/utils/cloudBootMocks.ts +++ b/browser_tests/fixtures/utils/cloudBootMocks.ts @@ -17,11 +17,11 @@ interface CloudBootOptions { } /** - * Stub the core endpoints the cloud app hits on boot so a raw `page` reaches the - * working app without falling through to the OSS devtools backend. Specs layer - * their own feature- or flow-specific routes on top. + * Stub the endpoints every cloud boot path mocks the same way. Callers layer + * their own workspace, billing or flow routes on top; Playwright matches the + * most recently registered handler first, so those overrides still win. */ -export async function mockCloudBoot( +export async function mockCloudBootRoutes( page: Page, { features, settings = {}, objectInfo }: CloudBootOptions ) { @@ -38,9 +38,6 @@ export async function mockCloudBoot( }) ) ) - await page.route('**/api/user', (r) => - r.fulfill(jsonRoute({ status: 'active' })) - ) await page.route('**/api/settings', (r) => r.fulfill(jsonRoute(settings))) await page.route('**/api/userdata**', (r) => r.fulfill(jsonRoute([]))) await page.route('**/api/extensions', (r) => r.fulfill(jsonRoute([]))) @@ -51,10 +48,22 @@ export async function mockCloudBoot( await page.route('**/api/auth/session', (r) => r.fulfill(jsonRoute({ token: 'mock-workspace-token' })) ) - await mockWorkspace(page, workspace('personal', 'owner'), []) await page.route('**/releases**', (r) => r.fulfill(jsonRoute([]))) } +/** + * Stub the core endpoints the cloud app hits on boot so a raw `page` reaches the + * working app without falling through to the OSS devtools backend. Specs layer + * their own feature- or flow-specific routes on top. + */ +export async function mockCloudBoot(page: Page, options: CloudBootOptions) { + await mockCloudBootRoutes(page, options) + await page.route('**/api/user', (r) => + r.fulfill(jsonRoute({ status: 'active' })) + ) + await mockWorkspace(page, workspace('personal', 'owner'), []) +} + /** * Mock Firebase auth and pre-select the e2e user so the cloud app boots * signed-in. The signed-in email (`CLOUD_SELF_EMAIL`) is what the From 2d83d18c520a70fbf2f8583878df9f6fc3cdadde Mon Sep 17 00:00:00 2001 From: Nathaniel Parson Koroso Date: Fri, 4 Sep 2026 10:50:22 -0700 Subject: [PATCH 21/52] test(agent): fold the agent panel mocks onto the shared cloud boot routes The third clone of the cloud boot route setup lived in the agent panel fixture. Replace it with the mockCloudBootRoutes call the other two helpers already use, so all three share one definition. The agent-specific routes stay registered after the shared block and in their existing order: the workspace token mint and workspace list keep their agent-only bodies, and the thread cancel route still registers after the thread messages route. Route set and bodies are unchanged. --- browser_tests/tests/agent/agentPanelMocks.ts | 41 ++++---------------- 1 file changed, 8 insertions(+), 33 deletions(-) diff --git a/browser_tests/tests/agent/agentPanelMocks.ts b/browser_tests/tests/agent/agentPanelMocks.ts index b4a431926e3..7439832231c 100644 --- a/browser_tests/tests/agent/agentPanelMocks.ts +++ b/browser_tests/tests/agent/agentPanelMocks.ts @@ -9,8 +9,8 @@ import type { AgentWsEvent } from '@/workbench/extensions/agent/schemas/agentApiSchema' -import { mockSystemStats } from '@e2e/fixtures/data/systemStats' import { mockBilling } from '@e2e/fixtures/utils/cloudBillingMocks' +import { mockCloudBootRoutes } from '@e2e/fixtures/utils/cloudBootMocks' import { jsonRoute } from '@e2e/fixtures/utils/jsonRoute' const THREAD_ID = 'd4c016c4-3b8c-44cf-97de-1ae27e43e718' @@ -146,37 +146,13 @@ async function mockAgentBoot( r.fulfill(jsonRoute({ assets: [] })) ) - await page.route('**/api/features', (r) => - r.fulfill(jsonRoute(agentFeatures(agentFlag))) - ) - await page.route('**/api/system_stats', (r) => - r.fulfill(jsonRoute(mockSystemStats)) - ) - await page.route('**/api/users', (r) => - r.fulfill( - jsonRoute({ - storage: 'server', - migrated: true, - users: { 'test-user-e2e': 'E2E Test User' } - }) - ) - ) - await page.route('**/api/settings', (r) => - r.fulfill( - jsonRoute({ - 'Comfy.TutorialCompleted': true, - 'Comfy.RightSidePanel.ShowErrorsTab': false - }) - ) - ) - await page.route('**/api/userdata**', (r) => r.fulfill(jsonRoute([]))) - await page.route('**/api/extensions', (r) => r.fulfill(jsonRoute([]))) - await page.route('**/api/object_info', (r) => r.fulfill(jsonRoute({}))) - await page.route('**/api/global_subgraphs', (r) => r.fulfill(jsonRoute({}))) - await page.route('**/api/i18n', (r) => r.fulfill(jsonRoute({}))) - await page.route('**/api/auth/session', (r) => - r.fulfill(jsonRoute({ token: 'mock-workspace-token' })) - ) + await mockCloudBootRoutes(page, { + features: agentFeatures(agentFlag), + settings: { + 'Comfy.TutorialCompleted': true, + 'Comfy.RightSidePanel.ShowErrorsTab': false + } + }) await page.route('**/api/auth/token', (r) => r.fulfill( jsonRoute({ @@ -188,7 +164,6 @@ async function mockAgentBoot( }) ) ) - await page.route('**/releases**', (r) => r.fulfill(jsonRoute([]))) await page.route('**/api/workspaces', (r) => r.fulfill( jsonRoute({ From 38068ae8500084df09ba0b7470e9f9c51569df88 Mon Sep 17 00:00:00 2001 From: Nathaniel Parson Koroso Date: Fri, 4 Sep 2026 16:14:17 -0700 Subject: [PATCH 22/52] test(agent): type recorded events and doc frames from the production schemas The fixture asserted production types it never validated and the fake host retyped the document protocol. The catalog and workflow schemas now validate the contract they claim, and the protocol version and wire frame come from docFrameClient. --- .../fixtures/agentConversationFixture.ts | 15 +++---- .../fixtures/agentConversationHostDoc.ts | 16 +++---- .../fixtures/data/agent/agentConversation.ts | 43 +++++++++++++++---- .../extensions/agent/crdt/docFrameClient.ts | 8 +++- 4 files changed, 53 insertions(+), 29 deletions(-) diff --git a/browser_tests/fixtures/agentConversationFixture.ts b/browser_tests/fixtures/agentConversationFixture.ts index e797d828a35..79d1167dcac 100644 --- a/browser_tests/fixtures/agentConversationFixture.ts +++ b/browser_tests/fixtures/agentConversationFixture.ts @@ -9,14 +9,12 @@ import type { AgentMessages, AgentWsEvent } from '@/workbench/extensions/agent/schemas/agentApiSchema' +import type { ServerDocWireFrame } from '@/workbench/extensions/agent/crdt/docFrameClient' +import { DOC_PROTOCOL_VERSION } from '@/workbench/extensions/agent/crdt/docFrameClient' import { parseAgentWsEvent } from '@/workbench/extensions/agent/schemas/agentApiSchema' import { agentTest, bootAgentApp } from '@e2e/fixtures/agentPanelFixture' -import type { DocFrame } from '@e2e/fixtures/agentConversationHostDoc' -import { - DOC_PROTOCOL_VERSION, - HostDoc -} from '@e2e/fixtures/agentConversationHostDoc' +import { HostDoc } from '@e2e/fixtures/agentConversationHostDoc' import type { AgentConversation, AgentConversationTurn, @@ -227,10 +225,7 @@ class AgentConversationHarness { const bodies = this.nodeBodies() const byType = new Map(bodies.map((body) => [body.type, body])) const byId = new Map(bodies.map((body) => [String(body.id), body])) - const catalog = this.conversation.workflow.catalog.types as Record< - string, - { widget_order: string[] } - > + const catalog = this.conversation.workflow.catalog.types const links = Object.values(graph.links) as Array< [unknown, unknown, number, unknown, number, string] > @@ -442,7 +437,7 @@ class AgentConversationHarness { return parsed.data } - private send(frame: AgentWsEvent | DocFrame): void { + private send(frame: AgentWsEvent | ServerDocWireFrame): void { if (!this.socket) throw new Error('the app has not opened /ws yet') this.socket.send(JSON.stringify(frame)) } diff --git a/browser_tests/fixtures/agentConversationHostDoc.ts b/browser_tests/fixtures/agentConversationHostDoc.ts index 421e90f41ee..39e7bed4375 100644 --- a/browser_tests/fixtures/agentConversationHostDoc.ts +++ b/browser_tests/fixtures/agentConversationHostDoc.ts @@ -7,16 +7,12 @@ import type { } from '@comfyorg/comfy-multi-player' import * as Y from 'yjs' +import type { ServerDocWireFrame } from '@/workbench/extensions/agent/crdt/docFrameClient' +import { DOC_PROTOCOL_VERSION } from '@/workbench/extensions/agent/crdt/docFrameClient' import type { GraphOperation } from '@/workbench/extensions/agent/crdt/graphOperations' import { mintWireOps } from '@/workbench/extensions/agent/crdt/opEnvelope' const HOST_ACTOR = 'agent:comfy' -export const DOC_PROTOCOL_VERSION = 1 - -export interface DocFrame { - type: 'doc_subscribed' | 'doc_update' | 'doc_ops_result' - data: Record -} function toBase64(bytes: Uint8Array): string { return Buffer.from(bytes).toString('base64') @@ -43,7 +39,7 @@ export class HostDoc { return readGraph(this.doc) } - subscribed(): DocFrame { + subscribed(): ServerDocWireFrame { return { type: 'doc_subscribed', data: { @@ -55,7 +51,7 @@ export class HostDoc { } } - catchUp(stateVectorB64: string): DocFrame { + catchUp(stateVectorB64: string): ServerDocWireFrame { const update = Y.encodeStateAsUpdate(this.doc, fromBase64(stateVectorB64)) return this.updateFrame(update, HOST_ACTOR, []) } @@ -72,7 +68,7 @@ export class HostDoc { return ops.map((op) => op.op_id) } - apply(operations: GraphOperation[]): DocFrame { + apply(operations: GraphOperation[]): ServerDocWireFrame { const before = Y.encodeStateVector(this.doc) const ops = mintWireOps(operations, { actor: HOST_ACTOR, @@ -96,7 +92,7 @@ export class HostDoc { update: Uint8Array, actor: string, opIds: string[] - ): DocFrame { + ): ServerDocWireFrame { return { type: 'doc_update', data: { diff --git a/browser_tests/fixtures/data/agent/agentConversation.ts b/browser_tests/fixtures/data/agent/agentConversation.ts index 542fa3d5141..bd1329bfcd1 100644 --- a/browser_tests/fixtures/data/agent/agentConversation.ts +++ b/browser_tests/fixtures/data/agent/agentConversation.ts @@ -2,7 +2,6 @@ import { existsSync, readFileSync, readdirSync } from 'node:fs' import { fileURLToPath } from 'node:url' import { FROZEN_OPS } from '@comfyorg/comfy-multi-player' -import type { WidgetCatalog, WorkflowJSON } from '@comfyorg/comfy-multi-player' import { z } from 'zod' import type { GraphOperation } from '@/workbench/extensions/agent/crdt/graphOperations' @@ -26,14 +25,42 @@ const zGraphOperation = z.custom( (FROZEN_OPS as readonly string[]).includes(value.op) ) -const zWorkflowJson = z.custom( - (value) => - isRecord(value) && Array.isArray(value.nodes) && Array.isArray(value.links) -) +// The package types these loosely and passes unknown keys through, so the +// schema validates the guaranteed fields and keeps the rest. +const zWorkflowJson = z + .object({ + nodes: z.array( + z + .object({ id: z.union([z.string(), z.number()]), type: z.string() }) + .passthrough() + ), + links: z.array(z.unknown()) + }) + .passthrough() -const zWidgetCatalog = z.custom( - (value) => isRecord(value) && isRecord(value.types) -) +const zWidgetCatalogEntry = z + .object({ + widget_order: z.array(z.string()), + autogrow_templates: z + .record( + z.string(), + z + .object({ + prefix: z.string().optional(), + names: z.array(z.string()).optional() + }) + .passthrough() + ) + .optional() + }) + .passthrough() + +const zWidgetCatalog = z + .object({ + comment: z.string().optional(), + types: z.record(z.string(), zWidgetCatalogEntry) + }) + .passthrough() const zAgentConversationWorkflow = z.object({ id: z.string().uuid(), diff --git a/src/workbench/extensions/agent/crdt/docFrameClient.ts b/src/workbench/extensions/agent/crdt/docFrameClient.ts index 9917b4a4254..5df4c6d6830 100644 --- a/src/workbench/extensions/agent/crdt/docFrameClient.ts +++ b/src/workbench/extensions/agent/crdt/docFrameClient.ts @@ -1,6 +1,6 @@ import type { Op } from '@comfyorg/comfy-multi-player' -const DOC_PROTOCOL_VERSION = 1 +export const DOC_PROTOCOL_VERSION = 1 const MAX_AWARENESS_STATE_BYTES = 8 * 1024 export interface DocOp { @@ -67,6 +67,12 @@ export type ServerDocFrame = | { type: 'doc_reset'; data: DocReset } | { type: 'awareness'; data: DocAwareness } +/** A frame as it travels the wire, before {@link parseServerDocFrame} reads it. */ +export interface ServerDocWireFrame { + type: ServerDocFrame['type'] + data: WireData +} + export interface DocFrameTransport { /** * Best-effort send. Returns `true` when the frame left the transport and From d05a3c3dfd54fd00c56b4b44d2ad5e25aaa000df Mon Sep 17 00:00:00 2001 From: Nathaniel Parson Koroso Date: Fri, 4 Sep 2026 16:14:51 -0700 Subject: [PATCH 23/52] test(agent): type the replay fixtures from the production schemas The fixture schema is derived from zAgentWsEvent minus the two ids the replay mints, the catalog and workflow payloads validate their real shapes, DOC_PROTOCOL_VERSION and ServerDocWireFrame come from docFrameClient.ts, and a corpus test parses every committed recording and round-trips each workflow. Folds the typed-fixture follow-up into this PR. --- .../data/agent/agentConversation.test.ts | 116 ++++++++++++++++++ .../fixtures/data/agent/agentConversation.ts | 38 ++++-- 2 files changed, 142 insertions(+), 12 deletions(-) create mode 100644 browser_tests/fixtures/data/agent/agentConversation.test.ts diff --git a/browser_tests/fixtures/data/agent/agentConversation.test.ts b/browser_tests/fixtures/data/agent/agentConversation.test.ts new file mode 100644 index 00000000000..7a0bbde6bfe --- /dev/null +++ b/browser_tests/fixtures/data/agent/agentConversation.test.ts @@ -0,0 +1,116 @@ +import { describe, expect, it } from 'vitest' + +import { readFileSync, readdirSync } from 'node:fs' +import { join } from 'node:path' + +import { + zAgentConversation, + zRecordedWsEvent +} from '@e2e/fixtures/data/agent/agentConversation' +import { zAgentWsEvent } from '@/workbench/extensions/agent/schemas/agentApiSchema' + +const recorded = { + schema_version: 'agent-conversation.v2', + source: { + repo: 'Comfy-Org/evals', + suite: 'agent', + case_id: 'recorded-case', + response_side: 'recorded', + capture: { + backend: 'Comfy-Org/cloud', + thread_id: 'thread-1', + exported_at: '2026-09-02T16:00:00.000Z' + } + }, + workflow: { + id: '6f1c2c1e-3b1c-4c88-9d9c-0d6e9b8e1a01', + name: 'Captured workflow', + catalog: { types: {} }, + seed: { nodes: [], links: [] } + }, + turns: [ + { + message_id: 'message-1', + request: { content: 'Add a node' }, + response: [ + { kind: 'event', event: { type: 'agent_message_done', data: {} } } + ] + } + ] +} + +describe('zAgentConversation', () => { + it('accepts a recorded conversation with provenance and message ids', () => { + expect(zAgentConversation.parse(recorded)).toEqual(recorded) + }) + + it('refuses a recorded turn without the message id it came from', () => { + const { message_id: _messageId, ...anonymous } = recorded.turns[0] + expect(() => + zAgentConversation.parse({ ...recorded, turns: [anonymous] }) + ).toThrow('recorded turns carry the message id') + }) + + it('refuses a recorded label without backend provenance', () => { + const { capture: _capture, ...source } = recorded.source + expect(() => zAgentConversation.parse({ ...recorded, source })).toThrow( + 'recorded responses require backend capture provenance' + ) + }) +}) + +describe('zRecordedWsEvent', () => { + const discriminators = ( + union: typeof zAgentWsEvent | typeof zRecordedWsEvent + ) => union.options.map((option) => option.shape.type.value) + + it('mirrors every production event type', () => { + expect(discriminators(zRecordedWsEvent)).toEqual( + discriminators(zAgentWsEvent) + ) + }) + + it('validates the production fields without the ids the replay mints', () => { + const frame = { + type: 'agent_tool_call', + data: { + tool_call_id: 'toolu_1', + tool_name: 'apply_ops', + status: 'success', + duration_ms: 12 + } + } + expect(zRecordedWsEvent.parse(frame)).toEqual(frame) + expect(() => + zRecordedWsEvent.parse({ + ...frame, + data: { ...frame.data, status: 'done' } + }) + ).toThrow() + expect(() => + zRecordedWsEvent.parse({ type: 'agent_done', data: {} }) + ).toThrow() + }) +}) + +describe('committed recordings', () => { + // import.meta.url is not a file URL under vitest, so the loaders are bypassed. + const dir = join( + process.cwd(), + 'browser_tests/fixtures/data/agent/conversations' + ) + + it('every recording parses against the production event union', () => { + const files = readdirSync(dir).filter((file) => file.endsWith('.json')) + expect(files.length).toBeGreaterThan(0) + for (const file of files) { + const raw = JSON.parse(readFileSync(join(dir, file), 'utf8')) + const conversation = zAgentConversation.parse(raw) + expect(conversation.workflow, file).toEqual(raw.workflow) + const frames = conversation.turns + .flatMap((turn) => turn.response) + .filter((entry) => entry.kind === 'event') + expect(frames.length, file).toBeGreaterThan(0) + } + }) +}) diff --git a/browser_tests/fixtures/data/agent/agentConversation.ts b/browser_tests/fixtures/data/agent/agentConversation.ts index bd1329bfcd1..76606352151 100644 --- a/browser_tests/fixtures/data/agent/agentConversation.ts +++ b/browser_tests/fixtures/data/agent/agentConversation.ts @@ -5,16 +5,29 @@ import { FROZEN_OPS } from '@comfyorg/comfy-multi-player' import { z } from 'zod' import type { GraphOperation } from '@/workbench/extensions/agent/crdt/graphOperations' +import { zAgentWsEvent } from '@/workbench/extensions/agent/schemas/agentApiSchema' function isRecord(value: unknown): value is Record { return typeof value === 'object' && value !== null && !Array.isArray(value) } -const zRecordedWsEvent = z.object({ - type: z.string(), - data: z.record(z.string(), z.unknown()), - at_ms: z.number().int().nonnegative().optional() -}) +// A recording keeps every production field except the two ids the replay +// mints per run (agentConversationFixture stampTurn). +export const mintedIds: { thread_id: true; message_id: true } = { + thread_id: true, + message_id: true +} +// Every member gets the same transform, so the slot order only names them. +const [thinking, toolCall, messageDelta, messageDone, activeTab] = + zAgentWsEvent.options + +export const zRecordedWsEvent = z.discriminatedUnion('type', [ + thinking.extend({ data: thinking.shape.data.omit(mintedIds) }), + toolCall.extend({ data: toolCall.shape.data.omit(mintedIds) }), + messageDelta.extend({ data: messageDelta.shape.data.omit(mintedIds) }), + messageDone.extend({ data: messageDone.shape.data.omit(mintedIds) }), + activeTab.extend({ data: activeTab.shape.data.omit(mintedIds) }) +]) export type RecordedWsEvent = z.infer // The applier validates op payloads at replay time; only the vocabulary is pinned here. @@ -25,8 +38,8 @@ const zGraphOperation = z.custom( (FROZEN_OPS as readonly string[]).includes(value.op) ) -// The package types these loosely and passes unknown keys through, so the -// schema validates the guaranteed fields and keeps the rest. +// WorkflowJSON and WorkflowNode declare an index signature, so the schema +// validates the guaranteed fields and keeps the rest. const zWorkflowJson = z .object({ nodes: z.array( @@ -53,23 +66,24 @@ const zWidgetCatalogEntry = z ) .optional() }) - .passthrough() + .strict() +// WidgetCatalog and WidgetCatalogEntry declare no index signature. const zWidgetCatalog = z .object({ comment: z.string().optional(), types: z.record(z.string(), zWidgetCatalogEntry) }) - .passthrough() + .strict() -const zAgentConversationWorkflow = z.object({ +export const zAgentConversationWorkflow = z.object({ id: z.string().uuid(), name: z.string().min(1), catalog: zWidgetCatalog, seed: zWorkflowJson }) -const zAgentConversationRequest = z.object({ +export const zAgentConversationRequest = z.object({ content: z.string().min(1) }) @@ -94,7 +108,7 @@ const zTurn = z.object({ }) export type AgentConversationTurn = z.infer -const zAgentConversation = z +export const zAgentConversation = z .object({ schema_version: z.literal('agent-conversation.v2'), source: z.object({ From b94cb46f58fcbcee60b7bc10b1d74038f06c5434 Mon Sep 17 00:00:00 2001 From: Nathaniel Parson Koroso Date: Fri, 4 Sep 2026 16:15:11 -0700 Subject: [PATCH 24/52] test(agent): assert the replay against the panel and the document Closes the review items on the replay harness: the fake host broadcasts the doc_update an accepted client batch produces, the cancel route records the request and the cancelled-turn test asserts its target, every replayed turn's assistant text is asserted, recorded connects are asserted through the shared slot-row helpers, the private storage key is no longer read, expectedGraph and the tool-row grouping re-implementations are gone with the timing spec and afterEntry, and exported operations carry no wire envelope (the 13 recordings are cleaned accordingly). Folds the assertion follow-up into this PR. --- .../fixtures/agentConversationFixture.ts | 249 +++++++----------- .../fixtures/agentConversationHostDoc.ts | 16 +- .../fixtures/data/agent/agentConversation.ts | 49 ++-- .../agent-l4-zimage-string-node-prompt.json | 54 +--- .../agent-rec-add-set-delete.json | 22 +- .../conversations/agent-rec-batched-ops.json | 24 +- .../agent-rec-cancelled-turn.json | 6 +- .../agent-rec-clarifying-question.json | 6 +- .../agent-rec-refiner-between.json | 42 +-- .../agent-rec-replace-prompt-encoder.json | 28 +- .../agent-rec-set-widget-existing.json | 12 +- .../agent-rec-three-sequential-adds.json | 18 +- .../agent-rec-two-turn-dependent-edit.json | 24 +- .../agent-workflow-editing-05.json | 24 +- .../agentConversationCancelledTurn.spec.ts | 73 ++--- .../agent/agentConversationReplay.spec.ts | 88 ++++--- .../agent/agentConversationTiming.spec.ts | 33 --- 17 files changed, 280 insertions(+), 488 deletions(-) delete mode 100644 browser_tests/tests/agent/agentConversationTiming.spec.ts diff --git a/browser_tests/fixtures/agentConversationFixture.ts b/browser_tests/fixtures/agentConversationFixture.ts index 79d1167dcac..982ddfddd17 100644 --- a/browser_tests/fixtures/agentConversationFixture.ts +++ b/browser_tests/fixtures/agentConversationFixture.ts @@ -15,6 +15,7 @@ import { parseAgentWsEvent } from '@/workbench/extensions/agent/schemas/agentApi import { agentTest, bootAgentApp } from '@e2e/fixtures/agentPanelFixture' import { HostDoc } from '@e2e/fixtures/agentConversationHostDoc' +import { VueNodeHelpers } from '@e2e/fixtures/VueNodeHelpers' import type { AgentConversation, AgentConversationTurn, @@ -30,8 +31,6 @@ const THREAD_ID = 'e9a2f3d1-7c44-4b2e-9a01-5f6d8c7b3a10' // One synthetic message id per turn; the recorded ids never reach the page. const turnId = (turn: number): string => `0c5b1e77-2d4a-4f9e-8b63-1a2c3d4e5${turn.toString(16).padStart(3, '0')}` -// useAgentSession.ts keeps THREAD_STORAGE_KEY module-private. -const THREAD_STORAGE_KEY = 'Comfy.Agent.ThreadId' const SOCKET_SID = '7d1f2e3a-4b5c-4d6e-8f90-1a2b3c4d5e6f' const PANEL_MOUNT_TIMEOUT = 30_000 const SUBSCRIBE_TIMEOUT = 15_000 @@ -49,7 +48,8 @@ type NodeBody = { } interface RecordedToolCall { - name: string + // The row label the panel renders for this tool (ToolCallCard.vue). + label: string ok: boolean } @@ -72,19 +72,15 @@ function toolRowLabel(name: string): string { return spaced.charAt(0).toUpperCase() + spaced.slice(1) } -// Connected link slots by name; a node definition may render slots the recording never listed. -interface GraphNodeSnapshot { - id: string - inputs: string[] - outputs: string[] -} - // Runs one recorded prompt/response through the real panel over a routed /ws socket. class AgentConversationHarness { readonly postedMessages: string[] = [] + // Every cancel the panel issued, so a missing one cannot pass unnoticed. + readonly cancelRequests: { threadId: string; messageId: string }[] = [] // Human-op minting is observable only on the client side of the socket. readonly clientFrames: { type?: unknown; data?: unknown }[] = [] readonly panel: Locator + readonly vueNodes: VueNodeHelpers private readonly host: HostDoc private socket: WebSocketRoute | null = null @@ -101,6 +97,7 @@ class AgentConversationHarness { const { workflow } = conversation this.host = new HostDoc(workflow.id, workflow.seed, workflow.catalog) this.panel = page.locator('#agent-panel-root') + this.vueNodes = new VueNodeHelpers(page) } async boot(agentFlag: boolean): Promise { @@ -140,20 +137,12 @@ class AgentConversationHarness { await expect.poll(() => this.postedMessages.length).toBeGreaterThan(turn) expect(this.postedMessages[turn]).toContain(content) // Replay frames are dropped until the page has applied the ack's thread id. - await expect - .poll(() => - this.page.evaluate( - (key) => localStorage.getItem(key), - THREAD_STORAGE_KEY - ) - ) - .toBe(THREAD_ID) + // useAgentSession records the user turn straight after storing that id, so + // the rendered turn says the ack landed without reading private storage. + await expect(this.panel.getByText(content).first()).toBeVisible() } - async replayResponse( - turn = 0, - afterEntry?: (index: number) => Promise - ): Promise { + async replayResponse(turn = 0): Promise { const startedAt = Date.now() const entries = this.conversation.turns[turn].response.entries() for (const [index, entry] of entries) { @@ -170,17 +159,13 @@ class AgentConversationHarness { else { await this.waitForSubscribe() this.send(this.host.apply(entry.ops)) - await afterEntry?.(index) } // The recorded turn was stopped here, so the panel stops here too. if (index === this.conversation.turns[turn].cancel_after) await this.stopTurn() } - this.replayElapsedMs = Date.now() - startedAt } - replayElapsedMs = 0 - async runTurns(): Promise { for (const turn of this.conversation.turns.keys()) { await this.sendPrompt(turn) @@ -193,6 +178,11 @@ class AgentConversationHarness { return this.conversation.turns.flatMap((turn) => turn.response) } + // The thread and message the ack handed the panel for this turn. + cancelTarget(turn = 0): { threadId: string; messageId: string } { + return { threadId: THREAD_ID, messageId: turnId(turn) } + } + async stopTurn(): Promise { await this.panel.getByRole('button', { name: STOP_LABEL }).click() } @@ -219,103 +209,22 @@ class AgentConversationHarness { return [...seed, ...added] } - // The doc keeps no titles or slot names; those come from the node bodies the turn started from or added. - expectedGraph(): GraphNodeSnapshot[] { - const graph = this.host.graph() - const bodies = this.nodeBodies() - const byType = new Map(bodies.map((body) => [body.type, body])) - const byId = new Map(bodies.map((body) => [String(body.id), body])) - const catalog = this.conversation.workflow.catalog.types - const links = Object.values(graph.links) as Array< - [unknown, unknown, number, unknown, number, string] - > - return Object.entries(graph.nodes) - .map(([id, node]) => { - const type = String(node.type) - const body = byId.get(id) ?? byType.get(type) - const widgets = new Set(catalog[type]?.widget_order ?? []) - const inputNames = (body?.inputs ?? []).map((slot) => slot.name) - const outputNames = (body?.outputs ?? []).map((slot) => slot.name) - return { - id, - // Widget-backed inputs render as widgets, not slot rows. - inputs: [ - ...new Set( - links - .filter((link) => String(link[3]) === id) - .map((link) => inputNames[link[4]]) - .filter((name) => name !== undefined && !widgets.has(name)) - ) - ].sort(), - // One slot can feed several links. - outputs: [ - ...new Set( - links - .filter((link) => String(link[1]) === id) - .map((link) => outputNames[link[2]]) - .filter((name) => name !== undefined) - ) - ].sort() - } - }) - .sort((a, b) => compareNodeIds(toNodeId(a.id), toNodeId(b.id))) - } - - // The panel starts a new tool group whenever thinking or text interrupts the calls. - // ToolCallGroup.vue merges consecutive calls of the same tool into one row. - // One row per run of same-tool calls; the card shows ×N for a run longer than one. - toolRowCounts(): Array<{ label: string; times: number; rows: number }> { - const rows = new Map< - string, - { label: string; times: number; rows: number } - >() - for (const group of this.toolCallGroups()) { - const runs: Array<{ name: string; times: number }> = [] - for (const call of group) { - const previous = runs.at(-1) - if (previous?.name === call.name) previous.times += 1 - else runs.push({ name: call.name, times: 1 }) - } - for (const { name, times } of runs) { - const key = `${name}/${times}` - const row = rows.get(key) ?? { - label: toolRowLabel(name), - times, - rows: 0 - } - row.rows += 1 - rows.set(key, row) - } - } - return [...rows.values()] - } - - toolCallGroups(): RecordedToolCall[][] { - const groups: RecordedToolCall[][] = [] - for (const turn of this.conversation.turns) { - let current: RecordedToolCall[] = [] - for (const entry of turn.response) { - if (entry.kind !== 'event') continue - const { type, data } = entry.event - if (type === 'agent_tool_call') { - if (data.status !== 'running') - current.push({ - name: String(data.tool_name), - ok: data.status === 'success' - }) - continue - } - if ( - (type === 'agent_thinking' || type === 'agent_message_delta') && - current.length > 0 - ) { - groups.push(current) - current = [] - } - } - if (current.length > 0) groups.push(current) - } - return groups + // Every terminal tool call the recording carried, in order. The panel's own + // grouping and coalescing rules are the thing under test, so they are not + // reproduced here; the spec asserts what the rendered rows show. + recordedToolCalls(): RecordedToolCall[] { + return this.entries().flatMap((entry) => + entry.kind === 'event' && + entry.event.type === 'agent_tool_call' && + entry.event.data.status !== 'running' + ? [ + { + label: toolRowLabel(entry.event.data.tool_name), + ok: entry.event.data.status === 'success' + } + ] + : [] + ) } // Last write wins per widget; the rendered control shows only the final value. @@ -360,32 +269,65 @@ class AgentConversationHarness { return this.host.graph() } - async graphSnapshot(): Promise { - const docNodeIds = new Set(Object.keys(this.host.graph().nodes)) - const snapshot = await this.page + documentNodeIds(): string[] { + return Object.keys(this.host.graph().nodes).sort((a, b) => + compareNodeIds(toNodeId(a), toNodeId(b)) + ) + } + + // The assistant text a turn recorded, concatenated as the panel streams it. + recordedAssistantText(turn: number): string { + return this.conversation.turns[turn].response + .flatMap((entry) => + entry.kind === 'event' && entry.event.type === 'agent_message_delta' + ? [entry.event.data.delta] + : [] + ) + .join('') + } + + // Every concrete connect the recording asked for, limited to the ones whose + // endpoints survive: a deleted node renders no slot row to assert. A grown + // connect names no to_slot, so it carries no index either. + recordedConnects(): Array<{ + fromNode: string + fromSlot: number + toNode: string + toSlot: number + }> { + const present = new Set(Object.keys(this.host.graph().nodes)) + return this.entries() + .flatMap((entry) => + entry.kind === 'graph_ops' + ? entry.ops.flatMap((op) => + op.op === 'connect' && op.grow == null + ? [ + { + fromNode: String(op.from_node), + fromSlot: op.from_slot, + toNode: String(op.to_node), + toSlot: op.to_slot + } + ] + : [] + ) + : [] + ) + .filter( + (connect) => + present.has(connect.fromNode) && present.has(connect.toNode) + ) + } + + async renderedNodeIds(): Promise { + const ids = await this.page .locator('[data-node-id]') .evaluateAll((nodes) => - nodes.map((node) => { - // Widget sockets are dot-only and carry no name. - const connected = (selector: string) => - Array.from( - node.querySelectorAll( - `${selector}.lg-slot--connected:not(.lg-slot--dot-only)` - ) - ) - .map((slot) => slot.textContent?.trim() ?? '') - .filter((name) => name !== '') - .sort() - return { - id: node.getAttribute('data-node-id') ?? '', - inputs: connected('.lg-slot--input'), - outputs: connected('.lg-slot--output') - } - }) + nodes.map((node) => node.getAttribute('data-node-id') ?? '') ) - return snapshot - .filter((node) => docNodeIds.has(node.id)) - .sort((a, b) => compareNodeIds(toNodeId(a.id), toNodeId(b.id))) + return ids + .filter((id) => id !== '') + .sort((a, b) => compareNodeIds(toNodeId(a), toNodeId(b))) } private async mockAgentApi(): Promise { @@ -411,6 +353,14 @@ class AgentConversationHarness { return route.fulfill(jsonRoute(history)) }) await page.route('**/api/agent/threads/*/messages/*/cancel', (route) => { + const target = /\/threads\/([^/]+)\/messages\/([^/]+)\/cancel/.exec( + route.request().url() + ) + if (target) + this.cancelRequests.push({ + threadId: target[1], + messageId: target[2] + }) const cancelled: AgentCancelAccepted = { status: 'cancelling' } return route.fulfill(jsonRoute(cancelled)) }) @@ -464,7 +414,7 @@ class AgentConversationHarness { } if (workflow_id === this.conversation.workflow.id && Array.isArray(ops)) { // The applier validates each payload; the wire frame only guarantees an array. - const applied = this.host.applyClient(ops as Op[]) + const { applied, update } = this.host.applyClient(ops as Op[]) this.send({ type: 'doc_ops_result', data: { @@ -475,6 +425,11 @@ class AgentConversationHarness { skipped: [] } }) + // An accepted batch also reaches subscribers as an authoritative + // doc_update. Without it the follower never sees its own ops come back, + // and later host deltas cannot fill the gap because they are encoded + // from a state vector that already includes them. + this.send(update) } return } diff --git a/browser_tests/fixtures/agentConversationHostDoc.ts b/browser_tests/fixtures/agentConversationHostDoc.ts index 39e7bed4375..055d946120c 100644 --- a/browser_tests/fixtures/agentConversationHostDoc.ts +++ b/browser_tests/fixtures/agentConversationHostDoc.ts @@ -56,8 +56,10 @@ export class HostDoc { return this.updateFrame(update, HOST_ACTOR, []) } - // Client batches arrive already minted; the real host folds them into the same doc. - applyClient(ops: Op[]): string[] { + // Client batches arrive already minted; the real host folds them into the same + // doc and broadcasts the result, so every subscriber converges on them. + applyClient(ops: Op[]): { applied: string[]; update: ServerDocWireFrame } { + const before = Y.encodeStateVector(this.doc) const result = applyOps(this.doc, ops, this.catalog) const rejected = result.outcomes.filter((o) => o.outcome !== 'applied') if (rejected.length > 0) @@ -65,7 +67,15 @@ export class HostDoc { `client doc_ops did not apply: ${JSON.stringify(rejected)}` ) this.seq += 1 - return ops.map((op) => op.op_id) + const applied = ops.map((op) => op.op_id) + return { + applied, + update: this.updateFrame( + Y.encodeStateAsUpdate(this.doc, before), + String(ops[0]?.actor ?? HOST_ACTOR), + applied + ) + } } apply(operations: GraphOperation[]): ServerDocWireFrame { diff --git a/browser_tests/fixtures/data/agent/agentConversation.ts b/browser_tests/fixtures/data/agent/agentConversation.ts index 76606352151..dd3fb9f5756 100644 --- a/browser_tests/fixtures/data/agent/agentConversation.ts +++ b/browser_tests/fixtures/data/agent/agentConversation.ts @@ -1,19 +1,16 @@ -import { existsSync, readFileSync, readdirSync } from 'node:fs' +import { readFileSync, readdirSync } from 'node:fs' import { fileURLToPath } from 'node:url' import { FROZEN_OPS } from '@comfyorg/comfy-multi-player' +import type { OpBase } from '@comfyorg/comfy-multi-player' import { z } from 'zod' import type { GraphOperation } from '@/workbench/extensions/agent/crdt/graphOperations' import { zAgentWsEvent } from '@/workbench/extensions/agent/schemas/agentApiSchema' -function isRecord(value: unknown): value is Record { - return typeof value === 'object' && value !== null && !Array.isArray(value) -} - // A recording keeps every production field except the two ids the replay // mints per run (agentConversationFixture stampTurn). -export const mintedIds: { thread_id: true; message_id: true } = { +const mintedIds: { thread_id: true; message_id: true } = { thread_id: true, message_id: true } @@ -30,13 +27,27 @@ export const zRecordedWsEvent = z.discriminatedUnion('type', [ ]) export type RecordedWsEvent = z.infer -// The applier validates op payloads at replay time; only the vocabulary is pinned here. -const zGraphOperation = z.custom( - (value) => - isRecord(value) && - typeof value.op === 'string' && - (FROZEN_OPS as readonly string[]).includes(value.op) -) +// GraphOperation is the wire op minus this envelope, which the replay remints +// through mintWireOps. Exhaustive by construction: a new OpBase field fails to +// typecheck here rather than slipping into a recording. +const OP_ENVELOPE: Record = { + op_id: true, + actor: true, + base_version: true, + stamp: true +} +const OP_ENVELOPE_KEYS = Object.keys(OP_ENVELOPE) + +// The vocabulary and the absence of the envelope are checked here; the applier +// validates each payload at replay time, which is the rest of GraphOperation. +const zGraphOperation = z + .object({ op: z.enum(FROZEN_OPS) }) + .passthrough() + .refine( + (op) => OP_ENVELOPE_KEYS.every((key) => !(key in op)), + 'a recorded op carries the semantic operation only; the wire envelope is minted at replay' + ) + .transform((op): GraphOperation => op as GraphOperation) // WorkflowJSON and WorkflowNode declare an index signature, so the schema // validates the guaranteed fields and keeps the rest. @@ -76,14 +87,14 @@ const zWidgetCatalog = z }) .strict() -export const zAgentConversationWorkflow = z.object({ +const zAgentConversationWorkflow = z.object({ id: z.string().uuid(), name: z.string().min(1), catalog: zWidgetCatalog, seed: zWorkflowJson }) -export const zAgentConversationRequest = z.object({ +const zAgentConversationRequest = z.object({ content: z.string().min(1) }) @@ -149,7 +160,6 @@ export type AgentConversation = z.infer export function listRecordedConversations(): string[] { const dir = fileURLToPath(new URL('./conversations/', import.meta.url)) - if (!existsSync(dir)) return [] return readdirSync(dir) .filter((file) => file.endsWith('.json')) .map((file) => file.slice(0, -'.json'.length)) @@ -160,13 +170,6 @@ export function listRecordedConversations(): string[] { .sort() } -// Specs pinned to one recording skip on a branch that carries the code but not the data. -export function hasAgentConversation(caseId: string): boolean { - return existsSync( - fileURLToPath(new URL(`./conversations/${caseId}.json`, import.meta.url)) - ) -} - export function loadAgentConversation(caseId: string): AgentConversation { const file = fileURLToPath( new URL(`./conversations/${caseId}.json`, import.meta.url) diff --git a/browser_tests/fixtures/data/agent/conversations/agent-l4-zimage-string-node-prompt.json b/browser_tests/fixtures/data/agent/conversations/agent-l4-zimage-string-node-prompt.json index 55e16cb9a37..1db1de5620b 100644 --- a/browser_tests/fixtures/data/agent/conversations/agent-l4-zimage-string-node-prompt.json +++ b/browser_tests/fixtures/data/agent/conversations/agent-l4-zimage-string-node-prompt.json @@ -295,36 +295,24 @@ "properties": {}, "widgets_values": [null] }, - "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", - "op_id": "b41f1bc5b13f44efb10bb51847859813", - "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], "node_id": 3876406316923056, - "class_type": "PrimitiveStringMultiline", - "base_version": 2 + "class_type": "PrimitiveStringMultiline" }, { "op": "set_widget", "old": null, - "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", - "op_id": "90d12d67f1a54617af277c333f9880be", - "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], "value": "a red bicycle on a pier at dusk", "widget": "value", - "node_id": 3876406316923056, - "base_version": 2 + "node_id": 3876406316923056 }, { "op": "connect", - "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", - "op_id": "c0b8ec72e8d64de7bcf9b45125f6c207", - "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], "link_id": 1887935066439213, "to_node": 6, "to_slot": 1, "from_node": 3876406316923056, "from_slot": 0, - "link_type": "STRING", - "base_version": 2 + "link_type": "STRING" }, { "op": "add_node", @@ -354,49 +342,33 @@ "properties": {}, "widgets_values": [null] }, - "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", - "op_id": "a5da691f2d07486aa354c5ee7c7fb6f1", - "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], "node_id": 3880387162517873, - "class_type": "CLIPTextEncode", - "base_version": 2 + "class_type": "CLIPTextEncode" }, { "op": "set_widget", "old": null, - "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", - "op_id": "d02e085ef78d41109f09ed846715fdfa", - "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], "value": "", "widget": "text", - "node_id": 3880387162517873, - "base_version": 2 + "node_id": 3880387162517873 }, { "op": "connect", - "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", - "op_id": "54508721c33e478b94db088a93568f4c", - "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], "link_id": 2636276550287764, "to_node": 3880387162517873, "to_slot": 0, "from_node": 4, "from_slot": 1, - "link_type": "CLIP", - "base_version": 2 + "link_type": "CLIP" }, { "op": "connect", - "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", - "op_id": "98f104d28a664643b45551a76f4b6733", - "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], "link_id": 2833535472085255, "to_node": 3, "to_slot": 2, "from_node": 3880387162517873, "from_slot": 0, - "link_type": "CONDITIONING", - "base_version": 2 + "link_type": "CONDITIONING" }, { "op": "add_node", @@ -420,25 +392,17 @@ "properties": {}, "widgets_values": [512, 512, 1] }, - "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", - "op_id": "9e977850c86447acb7359b7a9b484a83", - "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], "node_id": 3876084544359242, - "class_type": "EmptyLatentImage", - "base_version": 2 + "class_type": "EmptyLatentImage" }, { "op": "connect", - "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", - "op_id": "c9e0686dff2245fa90d9e720c0133928", - "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], "link_id": 2211554611670965, "to_node": 3, "to_slot": 3, "from_node": 3876084544359242, "from_slot": 0, - "link_type": "LATENT", - "base_version": 2 + "link_type": "LATENT" } ], "at_ms": 14347 diff --git a/browser_tests/fixtures/data/agent/conversations/agent-rec-add-set-delete.json b/browser_tests/fixtures/data/agent/conversations/agent-rec-add-set-delete.json index 37f79c77094..85cf2ea2966 100644 --- a/browser_tests/fixtures/data/agent/conversations/agent-rec-add-set-delete.json +++ b/browser_tests/fixtures/data/agent/conversations/agent-rec-add-set-delete.json @@ -278,25 +278,17 @@ "properties": {}, "widgets_values": [null] }, - "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", - "op_id": "3e86cc1c94bb402ea9fbfc445f561025", - "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], "node_id": 2785690574723683, - "class_type": "CLIPTextEncode", - "base_version": 2 + "class_type": "CLIPTextEncode" }, { "op": "connect", - "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", - "op_id": "6ceb8ce755854755b85f9b327d0e0963", - "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], "link_id": 3432143374160979, "to_node": 2785690574723683, "to_slot": 0, "from_node": 4, "from_slot": 1, - "link_type": "CLIP", - "base_version": 2 + "link_type": "CLIP" } ], "at_ms": 13977 @@ -367,13 +359,9 @@ { "op": "set_widget", "old": null, - "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", - "op_id": "48d9d0f3b762483c903b80d543ef971d", - "stamp": [3, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], "value": "blurry, low quality", "widget": "text", - "node_id": 2785690574723683, - "base_version": 3 + "node_id": 2785690574723683 } ], "at_ms": 0 @@ -430,11 +418,7 @@ "ops": [ { "op": "delete_node", - "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", - "op_id": "6c4742c08384414f975af16d5fbf5f91", - "stamp": [4, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], "node_id": 2785690574723683, - "base_version": 4, "removed_links": [3432143374160979] } ], diff --git a/browser_tests/fixtures/data/agent/conversations/agent-rec-batched-ops.json b/browser_tests/fixtures/data/agent/conversations/agent-rec-batched-ops.json index 89acc9502c7..afc63d41698 100644 --- a/browser_tests/fixtures/data/agent/conversations/agent-rec-batched-ops.json +++ b/browser_tests/fixtures/data/agent/conversations/agent-rec-batched-ops.json @@ -268,12 +268,8 @@ "properties": {}, "widgets_values": [null] }, - "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", - "op_id": "7a130c22fe934bc98e2ea2fed6bd10ad", - "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], "node_id": 2559261621971657, - "class_type": "CLIPTextEncode", - "base_version": 2 + "class_type": "CLIPTextEncode" }, { "op": "add_node", @@ -303,38 +299,26 @@ "properties": {}, "widgets_values": [null] }, - "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", - "op_id": "00b500c587744366b85d5c71ddbc9fdf", - "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], "node_id": 2214070360209981, - "class_type": "CLIPTextEncode", - "base_version": 2 + "class_type": "CLIPTextEncode" }, { "op": "connect", - "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", - "op_id": "e9e5c529eb574496a516dd6014ffd5e6", - "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], "link_id": 879068618000012, "to_node": 2559261621971657, "to_slot": 0, "from_node": 4, "from_slot": 1, - "link_type": "CLIP", - "base_version": 2 + "link_type": "CLIP" }, { "op": "connect", - "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", - "op_id": "c7f256bd0cd34e92830062aeea907b4c", - "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], "link_id": 3832075311322831, "to_node": 2214070360209981, "to_slot": 0, "from_node": 4, "from_slot": 1, - "link_type": "CLIP", - "base_version": 2 + "link_type": "CLIP" } ], "at_ms": 5208 diff --git a/browser_tests/fixtures/data/agent/conversations/agent-rec-cancelled-turn.json b/browser_tests/fixtures/data/agent/conversations/agent-rec-cancelled-turn.json index 3e6ce9e31ee..2bfee054f00 100644 --- a/browser_tests/fixtures/data/agent/conversations/agent-rec-cancelled-turn.json +++ b/browser_tests/fixtures/data/agent/conversations/agent-rec-cancelled-turn.json @@ -289,12 +289,8 @@ "properties": {}, "widgets_values": [null] }, - "actor": "rec-local-user", - "op_id": "634330f1b8cd4e689c353be87bf23296", - "stamp": [2, "rec-local-user"], "node_id": 729482957923442, - "class_type": "CLIPTextEncode", - "base_version": 2 + "class_type": "CLIPTextEncode" } ], "at_ms": 5927 diff --git a/browser_tests/fixtures/data/agent/conversations/agent-rec-clarifying-question.json b/browser_tests/fixtures/data/agent/conversations/agent-rec-clarifying-question.json index 88f5defe19a..b957db9d6d4 100644 --- a/browser_tests/fixtures/data/agent/conversations/agent-rec-clarifying-question.json +++ b/browser_tests/fixtures/data/agent/conversations/agent-rec-clarifying-question.json @@ -326,13 +326,9 @@ { "op": "set_widget", "old": 20, - "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", - "op_id": "4dd001682cf84979aad990491f1eee77", - "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], "value": 30, "widget": "steps", - "node_id": 3, - "base_version": 2 + "node_id": 3 } ], "at_ms": 2167 diff --git a/browser_tests/fixtures/data/agent/conversations/agent-rec-refiner-between.json b/browser_tests/fixtures/data/agent/conversations/agent-rec-refiner-between.json index b5ca120cf8b..2cfd5baf674 100644 --- a/browser_tests/fixtures/data/agent/conversations/agent-rec-refiner-between.json +++ b/browser_tests/fixtures/data/agent/conversations/agent-rec-refiner-between.json @@ -293,86 +293,58 @@ "properties": {}, "widgets_values": [0, "fixed", 20, 8, "euler", "simple", 1] }, - "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", - "op_id": "a3b5b79791364f75b1d89391a7a87564", - "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], "node_id": 2092962753103866, - "class_type": "KSampler", - "base_version": 2 + "class_type": "KSampler" }, { "op": "connect", - "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", - "op_id": "a5d9733c860c40798848bf92d649988f", - "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], "link_id": 4414751122447181, "to_node": 2092962753103866, "to_slot": 3, "from_node": 3, "from_slot": 0, - "link_type": "LATENT", - "base_version": 2 + "link_type": "LATENT" }, { "op": "connect", - "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", - "op_id": "7ced254ebc4a417589c32b5a1797452d", - "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], "link_id": 863234800411381, "to_node": 2092962753103866, "to_slot": 0, "from_node": 4, "from_slot": 0, - "link_type": "MODEL", - "base_version": 2 + "link_type": "MODEL" }, { "op": "connect", - "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", - "op_id": "57585fd740934c15835cef60c216c84c", - "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], "link_id": 3220756471207314, "to_node": 2092962753103866, "to_slot": 1, "from_node": 6, "from_slot": 0, - "link_type": "CONDITIONING", - "base_version": 2 + "link_type": "CONDITIONING" }, { "op": "connect", - "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", - "op_id": "bb113cee68314103861361151c93ad36", - "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], "link_id": 619699595909791, "to_node": 8, "to_slot": 0, "from_node": 2092962753103866, "from_slot": 0, - "link_type": "LATENT", - "base_version": 2 + "link_type": "LATENT" }, { "op": "set_widget", "old": 1, - "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", - "op_id": "8ba837eb610e4e0db4561b789bb44953", - "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], "value": 0.5, "widget": "denoise", - "node_id": 2092962753103866, - "base_version": 2 + "node_id": 2092962753103866 }, { "op": "set_widget", "old": 20, - "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", - "op_id": "e83bac70162244fa96c7d4633dd5fccc", - "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], "value": 20, "widget": "steps", - "node_id": 2092962753103866, - "base_version": 2 + "node_id": 2092962753103866 } ], "at_ms": 11793 diff --git a/browser_tests/fixtures/data/agent/conversations/agent-rec-replace-prompt-encoder.json b/browser_tests/fixtures/data/agent/conversations/agent-rec-replace-prompt-encoder.json index 964ce2952c2..7e669851e28 100644 --- a/browser_tests/fixtures/data/agent/conversations/agent-rec-replace-prompt-encoder.json +++ b/browser_tests/fixtures/data/agent/conversations/agent-rec-replace-prompt-encoder.json @@ -278,49 +278,33 @@ "properties": {}, "widgets_values": [null] }, - "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", - "op_id": "4c4d739392f14272939cf46a335652c8", - "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], "node_id": 4181654812796082, - "class_type": "CLIPTextEncode", - "base_version": 2 + "class_type": "CLIPTextEncode" }, { "op": "connect", - "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", - "op_id": "f1cd3aef4b984b04a9611a53f69763ba", - "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], "link_id": 3320191292493608, "to_node": 4181654812796082, "to_slot": 0, "from_node": 4, "from_slot": 1, - "link_type": "CLIP", - "base_version": 2 + "link_type": "CLIP" }, { "op": "connect", - "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", - "op_id": "4f4de6968f124e23a3114f8c88a1a766", - "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], "link_id": 2686273519871711, "to_node": 3, "to_slot": 1, "from_node": 4181654812796082, "from_slot": 0, - "link_type": "CONDITIONING", - "base_version": 2 + "link_type": "CONDITIONING" }, { "op": "set_widget", "old": null, - "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", - "op_id": "279c55a82f09416f9fa68e47ee11fafc", - "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], "value": "a photo of a pier", "widget": "text", - "node_id": 4181654812796082, - "base_version": 2 + "node_id": 4181654812796082 } ], "at_ms": 10451 @@ -343,11 +327,7 @@ "ops": [ { "op": "delete_node", - "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", - "op_id": "b141d8503ee54cde94d3a4e3f6b5204f", - "stamp": [3, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], "node_id": 6, - "base_version": 3, "removed_links": [1] } ], diff --git a/browser_tests/fixtures/data/agent/conversations/agent-rec-set-widget-existing.json b/browser_tests/fixtures/data/agent/conversations/agent-rec-set-widget-existing.json index 695b4c38a9e..3c900f8532a 100644 --- a/browser_tests/fixtures/data/agent/conversations/agent-rec-set-widget-existing.json +++ b/browser_tests/fixtures/data/agent/conversations/agent-rec-set-widget-existing.json @@ -266,24 +266,16 @@ { "op": "set_widget", "old": 20, - "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", - "op_id": "5ee9143999c148439b6fc848bc8d309a", - "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], "value": 30, "widget": "steps", - "node_id": 3, - "base_version": 2 + "node_id": 3 }, { "op": "set_widget", "old": 7, - "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", - "op_id": "7ad6e06be4f84086bec999cfc5177816", - "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], "value": 5, "widget": "cfg", - "node_id": 3, - "base_version": 2 + "node_id": 3 } ], "at_ms": 16908 diff --git a/browser_tests/fixtures/data/agent/conversations/agent-rec-three-sequential-adds.json b/browser_tests/fixtures/data/agent/conversations/agent-rec-three-sequential-adds.json index 9b3462f2590..3e536d53c65 100644 --- a/browser_tests/fixtures/data/agent/conversations/agent-rec-three-sequential-adds.json +++ b/browser_tests/fixtures/data/agent/conversations/agent-rec-three-sequential-adds.json @@ -259,12 +259,8 @@ "properties": {}, "widgets_values": [null] }, - "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", - "op_id": "cf6a6fdb84ee4f7dbec557f999d2fa8f", - "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], "node_id": 2478057798252548, - "class_type": "PrimitiveStringMultiline", - "base_version": 2 + "class_type": "PrimitiveStringMultiline" } ], "at_ms": 2686 @@ -307,12 +303,8 @@ "properties": {}, "widgets_values": [512, 512, 1] }, - "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", - "op_id": "48a4c2f2ea8647d1be5b0817985bda87", - "stamp": [3, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], "node_id": 2772376668635982, - "class_type": "EmptyLatentImage", - "base_version": 3 + "class_type": "EmptyLatentImage" } ], "at_ms": 4441 @@ -361,12 +353,8 @@ "properties": {}, "widgets_values": [null] }, - "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", - "op_id": "da3e136d6b224cc8838a0d9aa569ede3", - "stamp": [4, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], "node_id": 2514973844700532, - "class_type": "CLIPTextEncode", - "base_version": 4 + "class_type": "CLIPTextEncode" } ], "at_ms": 7816 diff --git a/browser_tests/fixtures/data/agent/conversations/agent-rec-two-turn-dependent-edit.json b/browser_tests/fixtures/data/agent/conversations/agent-rec-two-turn-dependent-edit.json index 7cd2dbd9d7c..ca9c3198759 100644 --- a/browser_tests/fixtures/data/agent/conversations/agent-rec-two-turn-dependent-edit.json +++ b/browser_tests/fixtures/data/agent/conversations/agent-rec-two-turn-dependent-edit.json @@ -278,36 +278,24 @@ "properties": {}, "widgets_values": [null] }, - "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", - "op_id": "c00397c5ac4a411bafa8c29389fb1515", - "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], "node_id": 3337990138003756, - "class_type": "CLIPTextEncode", - "base_version": 2 + "class_type": "CLIPTextEncode" }, { "op": "connect", - "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", - "op_id": "720d36f953794c1a8d05c3558c8c7a0f", - "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], "link_id": 2557345504960691, "to_node": 3337990138003756, "to_slot": 0, "from_node": 4, "from_slot": 1, - "link_type": "CLIP", - "base_version": 2 + "link_type": "CLIP" }, { "op": "set_widget", "old": null, - "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", - "op_id": "959f6c6e6cbc4dd3a39f784437208f1c", - "stamp": [2, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], "value": "blurry, low quality", "widget": "text", - "node_id": 3337990138003756, - "base_version": 2 + "node_id": 3337990138003756 } ], "at_ms": 7788 @@ -377,16 +365,12 @@ "ops": [ { "op": "connect", - "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", - "op_id": "0a73a31fd4c54bf8a2bf0746d41710cd", - "stamp": [3, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], "link_id": 1795569972720099, "to_node": 3, "to_slot": 2, "from_node": 3337990138003756, "from_slot": 0, - "link_type": "CONDITIONING", - "base_version": 3 + "link_type": "CONDITIONING" } ], "at_ms": 0 diff --git a/browser_tests/fixtures/data/agent/conversations/agent-workflow-editing-05.json b/browser_tests/fixtures/data/agent/conversations/agent-workflow-editing-05.json index 7547ef59dcb..0319b22d23b 100644 --- a/browser_tests/fixtures/data/agent/conversations/agent-workflow-editing-05.json +++ b/browser_tests/fixtures/data/agent/conversations/agent-workflow-editing-05.json @@ -290,51 +290,35 @@ "properties": {}, "widgets_values": ["right", true, 0, "white"] }, - "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", - "op_id": "8e44f8dcf31e46f6bf6d487c1bec2676", - "stamp": [1, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], "node_id": 1177948620476144, - "class_type": "ImageStitch", - "base_version": 1 + "class_type": "ImageStitch" }, { "op": "connect", - "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", - "op_id": "792213bf2f824cfd8866f157117795a4", - "stamp": [1, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], "link_id": 3298141227647238, "to_node": 1177948620476144, "to_slot": 0, "from_node": 1, "from_slot": 0, - "link_type": "IMAGE", - "base_version": 1 + "link_type": "IMAGE" }, { "op": "connect", - "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", - "op_id": "7c91fdf62a4d437dac4ada8d3ae13661", - "stamp": [1, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], "link_id": 2572689854678654, "to_node": 1177948620476144, "to_slot": 1, "from_node": 8, "from_slot": 0, - "link_type": "IMAGE", - "base_version": 1 + "link_type": "IMAGE" }, { "op": "connect", - "actor": "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4", - "op_id": "3eaf0c9e52cb4f0994962ff4b1e341ff", - "stamp": [1, "u-a02b5a87-26d8-451a-a5fc-07b54cbe6db4"], "link_id": 3588278739910384, "to_node": 9, "to_slot": 0, "from_node": 1177948620476144, "from_slot": 0, - "link_type": "IMAGE", - "base_version": 1 + "link_type": "IMAGE" } ], "at_ms": 13620 diff --git a/browser_tests/tests/agent/agentConversationCancelledTurn.spec.ts b/browser_tests/tests/agent/agentConversationCancelledTurn.spec.ts index dceb6e7c9f5..fcbd0e56437 100644 --- a/browser_tests/tests/agent/agentConversationCancelledTurn.spec.ts +++ b/browser_tests/tests/agent/agentConversationCancelledTurn.spec.ts @@ -1,42 +1,53 @@ import { expect } from '@playwright/test' import { agentConversationTest as test } from '@e2e/fixtures/agentConversationFixture' -import { hasAgentConversation } from '@e2e/fixtures/data/agent/agentConversation' const CASE = 'agent-rec-cancelled-turn' -// The recording lands with the data PR; without it there is nothing to replay. -if (hasAgentConversation(CASE)) - test.describe('Agent cancelled turn replay', { tag: '@cloud' }, () => { - test.use({ conversationCase: CASE }) +test.describe('Agent cancelled turn replay', { tag: '@cloud' }, () => { + test.use({ conversationCase: CASE }) - test('stops where the recording stopped and keeps the edits that landed', async ({ - agentConversation - }) => { - const turn = agentConversation.conversation.turns[0] - expect( - turn.cancel_after, - 'the fixture records the entry the cancel followed' - ).toBeDefined() - // Whatever the recorded tail said, rather than pinning the wording here. - const tail = turn.response - .flatMap((entry) => - entry.kind === 'event' && entry.event.type === 'agent_message_delta' - ? [String(entry.event.data.delta ?? '')] - : [] - ) - .join('') - expect(tail, 'the recorded tail carries the stopped message').not.toBe('') + test('stops where the recording stopped and keeps the edits that landed', async ({ + agentConversation + }) => { + const turn = agentConversation.conversation.turns[0] + expect( + turn.cancel_after, + 'the fixture records the entry the cancel followed' + ).toBeDefined() + // Whatever the recorded tail said, rather than pinning the wording here. + const tail = agentConversation.recordedAssistantText(0) + expect(tail, 'the recorded tail carries the stopped message').not.toBe('') - await agentConversation.sendPrompt() - await agentConversation.replayResponse() - await agentConversation.waitForTurnComplete() + await agentConversation.sendPrompt() + await agentConversation.replayResponse() + await agentConversation.waitForTurnComplete() + await expect( + agentConversation.panel.getByTestId('markdown-stream').first() + ).toContainText(tail) + // The recorded frames keep arriving either way, so without this the test + // stays green when the panel never issues the cancel at all. + expect(agentConversation.cancelRequests).toEqual([ + agentConversation.cancelTarget(0) + ]) + await expect + .poll(() => agentConversation.renderedNodeIds()) + .toEqual(expect.arrayContaining(agentConversation.documentNodeIds())) + // Each connect the recording asked for must render as two connected slot + // rows, addressed by node id and slot index through the shared helpers. + for (const { + fromNode, + fromSlot, + toNode, + toSlot + } of agentConversation.recordedConnects()) { await expect( - agentConversation.panel.getByTestId('markdown-stream').first() - ).toContainText(tail) - await expect - .poll(() => agentConversation.graphSnapshot()) - .toEqual(agentConversation.expectedGraph()) - }) + agentConversation.vueNodes.getOutputSlotRow(fromNode, fromSlot) + ).toHaveClass(/lg-slot--connected/) + await expect( + agentConversation.vueNodes.getInputSlotRow(toNode, toSlot) + ).toHaveClass(/lg-slot--connected/) + } }) +}) diff --git a/browser_tests/tests/agent/agentConversationReplay.spec.ts b/browser_tests/tests/agent/agentConversationReplay.spec.ts index 30fb6acd149..ebb1bbe615a 100644 --- a/browser_tests/tests/agent/agentConversationReplay.spec.ts +++ b/browser_tests/tests/agent/agentConversationReplay.spec.ts @@ -17,48 +17,53 @@ test.describe('Agent conversation replay', { tag: '@cloud' }, () => { await agentConversation.runTurns() - const groups = agentConversation.toolCallGroups() + const calls = agentConversation.recordedToolCalls() const groupButtons = panel.getByRole('button', { name: /^Ran \d+ tool call/ }) - await expect(groupButtons).toHaveCount(groups.length) - const toolRows = panel.getByRole('listitem') - for (const [index, calls] of groups.entries()) { - const button = groupButtons.nth(index) - const succeeded = calls.every((call) => call.ok) - await expect(button).toHaveText( - new RegExp(`^Ran ${calls.length} tool call`) - ) - // A failed group stays open at turn end; a clean one collapses. - await expect(button).toHaveAttribute( - 'aria-expanded', - succeeded ? 'false' : 'true' + if (calls.length > 0) await expect(groupButtons.first()).toBeVisible() + // A group holding a failed call stays open at turn end; a clean one collapses. + await expect + .poll(async () => + ( + await groupButtons.evaluateAll((buttons) => + buttons.map((button) => button.getAttribute('aria-expanded')) + ) + ).includes('true') ) - if (succeeded) await button.click() - } - for (const { - label, - times, - rows - } of agentConversation.toolRowCounts()) { - const named = toolRows.filter({ - has: page.getByText(label, { exact: true }) - }) + .toBe(calls.some((call) => !call.ok)) + for (const button of await groupButtons.all()) + if ((await button.getAttribute('aria-expanded')) === 'false') + await button.click() + const toolRows = panel.getByRole('listitem') + for (const label of new Set(calls.map((call) => call.label))) await expect( - named.filter( - times > 1 ? { hasText: `×${times}` } : { hasNotText: '×' } - ) - ).toHaveCount(rows) - } + toolRows + .filter({ has: page.getByText(label, { exact: true }) }) + .first() + ).toBeVisible() await expect( panel.getByRole('button', { name: `Open ${agentConversation.conversation.workflow.name}` }) ).toBeVisible() - await expect( - panel.getByTestId('markdown-stream').first() - ).not.toBeEmpty() + // MarkdownStream renders once per text group, so one turn can own + // several; counting streams per turn would not be well defined. Every + // turn that recorded assistant text must still have rendered some. + const turnsWithText = [ + ...agentConversation.conversation.turns.keys() + ].filter( + (turn) => agentConversation.recordedAssistantText(turn).trim() !== '' + ).length + await expect + .poll( + async () => + ( + await panel.getByTestId('markdown-stream').allInnerTexts() + ).filter((text) => text.trim() !== '').length + ) + .toBeGreaterThanOrEqual(turnsWithText) for (const id of agentConversation.addedNodeIds()) { await expect(page.locator(`[data-node-id="${id}"]`)).toBeVisible() @@ -88,9 +93,26 @@ test.describe('Agent conversation replay', { tag: '@cloud' }, () => { else await expect(field).toHaveValue(value) } + // The canvas must show what the multi-player document holds, which is + // the library's own output rather than a second projection of the ops. await expect - .poll(() => agentConversation.graphSnapshot()) - .toEqual(agentConversation.expectedGraph()) + .poll(() => agentConversation.renderedNodeIds()) + .toEqual(expect.arrayContaining(agentConversation.documentNodeIds())) + // Each connect the recording asked for must render as two connected slot + // rows, addressed by node id and slot index through the shared helpers. + for (const { + fromNode, + fromSlot, + toNode, + toSlot + } of agentConversation.recordedConnects()) { + await expect( + agentConversation.vueNodes.getOutputSlotRow(fromNode, fromSlot) + ).toHaveClass(/lg-slot--connected/) + await expect( + agentConversation.vueNodes.getInputSlotRow(toNode, toSlot) + ).toHaveClass(/lg-slot--connected/) + } }) }) } diff --git a/browser_tests/tests/agent/agentConversationTiming.spec.ts b/browser_tests/tests/agent/agentConversationTiming.spec.ts deleted file mode 100644 index 8a6494b8458..00000000000 --- a/browser_tests/tests/agent/agentConversationTiming.spec.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { expect } from '@playwright/test' - -import { agentConversationTest as test } from '@e2e/fixtures/agentConversationFixture' -import { hasAgentConversation } from '@e2e/fixtures/data/agent/agentConversation' - -// The recording lands with the data PR; without it there is nothing to replay. -if (hasAgentConversation('agent-rec-set-widget-existing')) - test.describe('Agent conversation replay timing', { tag: '@cloud' }, () => { - test.use({ - conversationCase: 'agent-rec-set-widget-existing', - replayTiming: 'recorded' - }) - - test('replays the frames at their recorded offsets', async ({ - agentConversation - }) => { - test.setTimeout(120_000) - const offsets = agentConversation.conversation.turns[0].response.flatMap( - (entry) => (entry.at_ms === undefined ? [] : [entry.at_ms]) - ) - const span = offsets.length ? Math.max(...offsets) : undefined - expect(span, 'the fixture carries at_ms offsets').toBeDefined() - - await agentConversation.sendPrompt() - await agentConversation.replayResponse() - await agentConversation.waitForTurnComplete() - - expect(agentConversation.replayElapsedMs).toBeGreaterThanOrEqual(span!) - await expect - .poll(() => agentConversation.graphSnapshot()) - .toEqual(agentConversation.expectedGraph()) - }) - }) From ef51de4e52ec4773d5502b18cb3ebe1ae37f0043 Mon Sep 17 00:00:00 2001 From: Nathaniel Parson Koroso Date: Fri, 4 Sep 2026 16:29:07 -0700 Subject: [PATCH 25/52] test(agent): assert connects on the origin slot only and drop the tool row label oracle A widget-backed input renders no slot row on a non-collapsed node, so the input side of the connect assertion could never pass for agent-l4-zimage-string-node-prompt; connects are now asserted on the origin slot, filtered by document presence. The tool row label re-derived ToolCallCard's fallback and is gone. Group expansion is asserted per recording so it cannot pass vacuously. --- .../fixtures/agentConversationFixture.ts | 40 +++----------- .../agentConversationCancelledTurn.spec.ts | 16 ++---- .../agent/agentConversationReplay.spec.ts | 55 +++++++++---------- 3 files changed, 36 insertions(+), 75 deletions(-) diff --git a/browser_tests/fixtures/agentConversationFixture.ts b/browser_tests/fixtures/agentConversationFixture.ts index 982ddfddd17..6b33266975c 100644 --- a/browser_tests/fixtures/agentConversationFixture.ts +++ b/browser_tests/fixtures/agentConversationFixture.ts @@ -24,7 +24,6 @@ import type { import { loadAgentConversation } from '@e2e/fixtures/data/agent/agentConversation' import { compareNodeIds, toNodeId } from '@/types/nodeId' -import { knownTool } from '@/workbench/extensions/agent/services/agent/agentToolGlyph' import { jsonRoute } from '@e2e/fixtures/utils/jsonRoute' const THREAD_ID = 'e9a2f3d1-7c44-4b2e-9a01-5f6d8c7b3a10' @@ -48,8 +47,6 @@ type NodeBody = { } interface RecordedToolCall { - // The row label the panel renders for this tool (ToolCallCard.vue). - label: string ok: boolean } @@ -59,19 +56,6 @@ interface RecordedWidgetValue { value: string | number } -// The panel's row label: the known-tool table, else the humanized tool name (ToolCallCard.vue). -function toolRowLabel(name: string): string { - const known = knownTool(name)?.labelKey - const label = known - ? enMessages.agent[ - known.replace('agent.', '') as keyof typeof enMessages.agent - ] - : undefined - if (typeof label === 'string') return label - const spaced = name.replaceAll('_', ' ') - return spaced.charAt(0).toUpperCase() + spaced.slice(1) -} - // Runs one recorded prompt/response through the real panel over a routed /ws socket. class AgentConversationHarness { readonly postedMessages: string[] = [] @@ -217,12 +201,7 @@ class AgentConversationHarness { entry.kind === 'event' && entry.event.type === 'agent_tool_call' && entry.event.data.status !== 'running' - ? [ - { - label: toolRowLabel(entry.event.data.tool_name), - ok: entry.event.data.status === 'success' - } - ] + ? [{ ok: entry.event.data.status === 'success' }] : [] ) } @@ -286,15 +265,11 @@ class AgentConversationHarness { .join('') } - // Every concrete connect the recording asked for, limited to the ones whose - // endpoints survive: a deleted node renders no slot row to assert. A grown - // connect names no to_slot, so it carries no index either. - recordedConnects(): Array<{ - fromNode: string - fromSlot: number - toNode: string - toSlot: number - }> { + // The origin side of every concrete connect whose endpoints survive. Only the + // origin is asserted: outputs always render (NodeSlots.vue), while a + // widget-backed input renders no slot dot at all, so a target row can be + // legitimately absent. A grown connect names no to_slot either. + recordedConnects(): Array<{ fromNode: string; fromSlot: number }> { const present = new Set(Object.keys(this.host.graph().nodes)) return this.entries() .flatMap((entry) => @@ -305,8 +280,7 @@ class AgentConversationHarness { { fromNode: String(op.from_node), fromSlot: op.from_slot, - toNode: String(op.to_node), - toSlot: op.to_slot + toNode: String(op.to_node) } ] : [] diff --git a/browser_tests/tests/agent/agentConversationCancelledTurn.spec.ts b/browser_tests/tests/agent/agentConversationCancelledTurn.spec.ts index fcbd0e56437..9bdde3cd269 100644 --- a/browser_tests/tests/agent/agentConversationCancelledTurn.spec.ts +++ b/browser_tests/tests/agent/agentConversationCancelledTurn.spec.ts @@ -34,20 +34,12 @@ test.describe('Agent cancelled turn replay', { tag: '@cloud' }, () => { await expect .poll(() => agentConversation.renderedNodeIds()) .toEqual(expect.arrayContaining(agentConversation.documentNodeIds())) - // Each connect the recording asked for must render as two connected slot - // rows, addressed by node id and slot index through the shared helpers. - for (const { - fromNode, - fromSlot, - toNode, - toSlot - } of agentConversation.recordedConnects()) { + // Each connect the recording asked for must leave its ORIGIN slot row + // connected. Only the origin: outputs always render, while a + // widget-backed input renders no slot dot to assert. + for (const { fromNode, fromSlot } of agentConversation.recordedConnects()) await expect( agentConversation.vueNodes.getOutputSlotRow(fromNode, fromSlot) ).toHaveClass(/lg-slot--connected/) - await expect( - agentConversation.vueNodes.getInputSlotRow(toNode, toSlot) - ).toHaveClass(/lg-slot--connected/) - } }) }) diff --git a/browser_tests/tests/agent/agentConversationReplay.spec.ts b/browser_tests/tests/agent/agentConversationReplay.spec.ts index ebb1bbe615a..1707b005fd8 100644 --- a/browser_tests/tests/agent/agentConversationReplay.spec.ts +++ b/browser_tests/tests/agent/agentConversationReplay.spec.ts @@ -21,27 +21,27 @@ test.describe('Agent conversation replay', { tag: '@cloud' }, () => { const groupButtons = panel.getByRole('button', { name: /^Ran \d+ tool call/ }) - if (calls.length > 0) await expect(groupButtons.first()).toBeVisible() - // A group holding a failed call stays open at turn end; a clean one collapses. - await expect - .poll(async () => - ( - await groupButtons.evaluateAll((buttons) => - buttons.map((button) => button.getAttribute('aria-expanded')) + if (calls.length > 0) { + // Groups exist for this recording, so the expansion check below + // cannot pass by there being nothing to expand. + await expect(groupButtons.first()).toBeVisible() + const expansion = async () => + groupButtons.evaluateAll((buttons) => + buttons.map((button) => button.getAttribute('aria-expanded')) + ) + if (calls.some((call) => !call.ok)) + // A group holding a failed call stays open at turn end. + await expect + .poll(async () => (await expansion()).includes('true')) + .toBe(true) + // A clean run collapses every one of them. + else + await expect + .poll(async () => + (await expansion()).every((state) => state === 'false') ) - ).includes('true') - ) - .toBe(calls.some((call) => !call.ok)) - for (const button of await groupButtons.all()) - if ((await button.getAttribute('aria-expanded')) === 'false') - await button.click() - const toolRows = panel.getByRole('listitem') - for (const label of new Set(calls.map((call) => call.label))) - await expect( - toolRows - .filter({ has: page.getByText(label, { exact: true }) }) - .first() - ).toBeVisible() + .toBe(true) + } await expect( panel.getByRole('button', { @@ -98,21 +98,16 @@ test.describe('Agent conversation replay', { tag: '@cloud' }, () => { await expect .poll(() => agentConversation.renderedNodeIds()) .toEqual(expect.arrayContaining(agentConversation.documentNodeIds())) - // Each connect the recording asked for must render as two connected slot - // rows, addressed by node id and slot index through the shared helpers. + // Each connect the recording asked for must leave its ORIGIN slot row + // connected. Only the origin: outputs always render, while a + // widget-backed input renders no slot dot to assert. for (const { fromNode, - fromSlot, - toNode, - toSlot - } of agentConversation.recordedConnects()) { + fromSlot + } of agentConversation.recordedConnects()) await expect( agentConversation.vueNodes.getOutputSlotRow(fromNode, fromSlot) ).toHaveClass(/lg-slot--connected/) - await expect( - agentConversation.vueNodes.getInputSlotRow(toNode, toSlot) - ).toHaveClass(/lg-slot--connected/) - } }) }) } From f7a1363a8a1fd558481cc8956777671ba5326ef3 Mon Sep 17 00:00:00 2001 From: Nathaniel Parson Koroso Date: Fri, 4 Sep 2026 16:39:46 -0700 Subject: [PATCH 26/52] test(agent): drop a redundant string conversion and single-argument expects --- browser_tests/fixtures/agentConversationHostDoc.ts | 2 +- .../fixtures/data/agent/agentConversation.test.ts | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/browser_tests/fixtures/agentConversationHostDoc.ts b/browser_tests/fixtures/agentConversationHostDoc.ts index 055d946120c..5f278653804 100644 --- a/browser_tests/fixtures/agentConversationHostDoc.ts +++ b/browser_tests/fixtures/agentConversationHostDoc.ts @@ -72,7 +72,7 @@ export class HostDoc { applied, update: this.updateFrame( Y.encodeStateAsUpdate(this.doc, before), - String(ops[0]?.actor ?? HOST_ACTOR), + ops[0]?.actor ?? HOST_ACTOR, applied ) } diff --git a/browser_tests/fixtures/data/agent/agentConversation.test.ts b/browser_tests/fixtures/data/agent/agentConversation.test.ts index 7a0bbde6bfe..88c9b7529e6 100644 --- a/browser_tests/fixtures/data/agent/agentConversation.test.ts +++ b/browser_tests/fixtures/data/agent/agentConversation.test.ts @@ -106,11 +106,14 @@ describe('committed recordings', () => { for (const file of files) { const raw = JSON.parse(readFileSync(join(dir, file), 'utf8')) const conversation = zAgentConversation.parse(raw) - expect(conversation.workflow, file).toEqual(raw.workflow) + expect({ file, workflow: conversation.workflow }).toEqual({ + file, + workflow: raw.workflow + }) const frames = conversation.turns .flatMap((turn) => turn.response) .filter((entry) => entry.kind === 'event') - expect(frames.length, file).toBeGreaterThan(0) + expect({ file, frames: frames.length }).not.toEqual({ file, frames: 0 }) } }) }) From 41e7a20d88d686f3193c8227f762e2c44a598f1d Mon Sep 17 00:00:00 2001 From: Nathaniel Parson Koroso Date: Fri, 4 Sep 2026 16:58:51 -0700 Subject: [PATCH 27/52] style(agent): drop the comments that restate the blank tab change --- src/workbench/extensions/agent/AgentPanelRoot.test.ts | 1 - src/workbench/extensions/agent/AgentPanelRoot.vue | 1 - 2 files changed, 2 deletions(-) diff --git a/src/workbench/extensions/agent/AgentPanelRoot.test.ts b/src/workbench/extensions/agent/AgentPanelRoot.test.ts index d8447435a4e..ce77f4d95b4 100644 --- a/src/workbench/extensions/agent/AgentPanelRoot.test.ts +++ b/src/workbench/extensions/agent/AgentPanelRoot.test.ts @@ -2411,7 +2411,6 @@ describe('AgentPanelRoot workflow binding', () => { ) const minted = hostStores.workflow.tabs.get('workflows/Video test.json') expect(minted?.filename).toBe('Video test') - // Blank, not the default template: the follower keeps template links it does not displace. expect(minted?.activeState).toMatchObject({ nodes: [], links: [] }) // The host minted the doc server-side; the follower fills the canvas. // Nothing loads, saves, or adopts here. diff --git a/src/workbench/extensions/agent/AgentPanelRoot.vue b/src/workbench/extensions/agent/AgentPanelRoot.vue index 71d26828a82..ccdc7ccba38 100644 --- a/src/workbench/extensions/agent/AgentPanelRoot.vue +++ b/src/workbench/extensions/agent/AgentPanelRoot.vue @@ -552,7 +552,6 @@ async function onAgentActiveTab( }) return } - // The tab starts blank: the host seeds the doc at bind and the default template's node ids collide with agent docs. const creatingStartedAt = Date.now() tabActivity.setCreating(true) const remainingCreatingTime = From c08c4a8de1596fabdd7f03d01a620c749363699d Mon Sep 17 00:00:00 2001 From: Nathaniel Parson Koroso Date: Fri, 4 Sep 2026 17:04:50 -0700 Subject: [PATCH 28/52] fix(agent): never reuse an open workflow for the agent's new tab createTemporary with a payload can hand back an already open workflow whose filename matches and reset its change tracker; the agent's tab must always be new, so it uses createNewTemporary. The test asserts the empty node and link lists directly. --- src/workbench/extensions/agent/AgentPanelRoot.test.ts | 3 ++- src/workbench/extensions/agent/AgentPanelRoot.vue | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/workbench/extensions/agent/AgentPanelRoot.test.ts b/src/workbench/extensions/agent/AgentPanelRoot.test.ts index ce77f4d95b4..4ebc02c7802 100644 --- a/src/workbench/extensions/agent/AgentPanelRoot.test.ts +++ b/src/workbench/extensions/agent/AgentPanelRoot.test.ts @@ -2411,7 +2411,8 @@ describe('AgentPanelRoot workflow binding', () => { ) const minted = hostStores.workflow.tabs.get('workflows/Video test.json') expect(minted?.filename).toBe('Video test') - expect(minted?.activeState).toMatchObject({ nodes: [], links: [] }) + expect(minted?.activeState?.nodes).toHaveLength(0) + expect(minted?.activeState?.links).toHaveLength(0) // The host minted the doc server-side; the follower fills the canvas. // Nothing loads, saves, or adopts here. expect(workflowService.saveWorkflowAs).not.toHaveBeenCalled() diff --git a/src/workbench/extensions/agent/AgentPanelRoot.vue b/src/workbench/extensions/agent/AgentPanelRoot.vue index ccdc7ccba38..9b103fd6306 100644 --- a/src/workbench/extensions/agent/AgentPanelRoot.vue +++ b/src/workbench/extensions/agent/AgentPanelRoot.vue @@ -559,7 +559,7 @@ async function onAgentActiveTab( if (remainingCreatingTime > 0) await new Promise((resolve) => setTimeout(resolve, remainingCreatingTime)) if (stale()) return - const tab = workflowStore.createTemporary( + const tab = workflowStore.createNewTemporary( agentTabFilename(data.name), blankGraph ) From 634c4628528c49a870d2aaeef8d719bf2c1edcb9 Mon Sep 17 00:00:00 2001 From: Nathaniel Parson Koroso Date: Fri, 4 Sep 2026 17:14:25 -0700 Subject: [PATCH 29/52] test(agent): give the workflow store fake the no-reuse constructor --- src/workbench/extensions/agent/AgentPanelRoot.test.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/workbench/extensions/agent/AgentPanelRoot.test.ts b/src/workbench/extensions/agent/AgentPanelRoot.test.ts index 4ebc02c7802..a2dbbd3374a 100644 --- a/src/workbench/extensions/agent/AgentPanelRoot.test.ts +++ b/src/workbench/extensions/agent/AgentPanelRoot.test.ts @@ -182,6 +182,9 @@ vi.mock('@/platform/workflow/management/stores/workflowStore', async () => { } tabs.set(tab.path, tab) return tab + }, + createNewTemporary(path?: string, data?: ComfyWorkflowJSON) { + return this.createTemporary(path, data) } }) hostStores.workflow = store From 780ccb5590d6e7bab4858d051a0e6ac114a7bed2 Mon Sep 17 00:00:00 2001 From: Nathaniel Parson Koroso Date: Fri, 4 Sep 2026 17:31:37 -0700 Subject: [PATCH 30/52] test(agent): assert every replayed turn as it lands and pin the no-reuse tab The replay spec now asserts after each turn rather than once at the end, so a node the recording adds and later deletes is checked while it exists; each connect is asserted on both slot rows unless the target is a widget-backed input, which renders no row; each turn's assistant text must appear in a rendered bubble; the canvas node list must equal the document's, not merely contain it; open tool-call groups are bounded by the failed calls; the cancel request is polled instead of read once; a mis-marked recording throws instead of vanishing from the suite; and the agent tab test pins that the no-reuse constructor was called. The README names the recorder PR. --- browser_tests/README.md | 12 +- .../fixtures/agentConversationFixture.ts | 82 ++++++--- .../fixtures/data/agent/agentConversation.ts | 11 +- .../agentConversationCancelledTurn.spec.ts | 26 ++- .../agent/agentConversationReplay.spec.ts | 172 +++++++++--------- .../extensions/agent/AgentPanelRoot.test.ts | 41 +++-- 6 files changed, 194 insertions(+), 150 deletions(-) diff --git a/browser_tests/README.md b/browser_tests/README.md index c32e62a2799..81d2397d54f 100644 --- a/browser_tests/README.md +++ b/browser_tests/README.md @@ -636,11 +636,11 @@ fix so the bug stays fixed: the per-op audit rows (`agent_tool_calls` parent and child rows) the exporter reads. The same agent in standalone mode (SQLite, no doc host) never writes them, so it can only - yield text-only or tool-error turns. Record it with the recorder that - lives beside the fixtures under `browser_tests/fixtures/data/agent/`, - which writes the conversation JSON into `conversations/` marked - `response_side: 'recorded'`. Never write `graph_ops` by hand and never - relabel a synthesized response as recorded. + yield text-only or tool-error turns. Record it with the recorder + (`scripts/agentConversationRecord.ts`, landing in #16782; until it merges, + record from that PR's branch), which writes the conversation JSON into + `conversations/` marked `response_side: 'recorded'`. Never write + `graph_ops` by hand and never relabel a synthesized response as recorded. 2. **Add the replay case.** Drive the fixture through the conversation replay fixture (`agentConversationFixture`), asserting the canvas-observable outcome the bug corrupted (graph end-state or @@ -650,7 +650,7 @@ fix so the bug stays fixed: run lines in the PR description. A replay case that never went red against the bug does not count as regression coverage. -Name the case after the behavior it protects (`agent-.json`, with the fix PR cited in the spec header and the fixture's `source.note`). The exporter writes the provenance the replay keeps: `source.capture` (thread and message ids) and `source.note` (row ids and the raw capture hash), which is enough to re-export the recording. +Name the case after the behavior it protects (`agent-.json`, with the fix PR cited in the fixture's `source.note`). The exporter writes the provenance the replay keeps: `source.capture` (thread and message ids) and `source.note` (row ids and the raw capture hash), which is enough to re-export the recording. ## Test Data & Typed API Mocks diff --git a/browser_tests/fixtures/agentConversationFixture.ts b/browser_tests/fixtures/agentConversationFixture.ts index 6b33266975c..0caf6bfecef 100644 --- a/browser_tests/fixtures/agentConversationFixture.ts +++ b/browser_tests/fixtures/agentConversationFixture.ts @@ -42,12 +42,21 @@ type NodeBody = { id: number | string type: string title?: string - inputs?: Array<{ name: string }> + inputs?: Array<{ name: string; widget?: unknown }> outputs?: Array<{ name: string }> } interface RecordedToolCall { - ok: boolean + callId: string + failed: boolean +} + +interface RecordedConnect { + fromNode: string + fromSlot: number + toNode: string + toSlot: number + targetWidgetBacked: boolean } interface RecordedWidgetValue { @@ -158,8 +167,12 @@ class AgentConversationHarness { } } - private entries(): AgentConversationTurn['response'] { - return this.conversation.turns.flatMap((turn) => turn.response) + // Everything the recording played through the given turn (all turns by default). + private entries(throughTurn?: number): AgentConversationTurn['response'] { + const last = throughTurn === undefined ? undefined : throughTurn + 1 + return this.conversation.turns + .slice(0, last) + .flatMap((turn) => turn.response) } // The thread and message the ack handed the panel for this turn. @@ -181,9 +194,9 @@ class AgentConversationHarness { } // Doc-id filter: a stray template node must not pin the template here. - private nodeBodies(): NodeBody[] { + private nodeBodies(throughTurn?: number): NodeBody[] { const seed = this.conversation.workflow.seed.nodes as NodeBody[] - const added = this.entries().flatMap((entry) => + const added = this.entries(throughTurn).flatMap((entry) => entry.kind === 'graph_ops' ? entry.ops.flatMap((op) => op.op === 'add_node' ? [op.node as NodeBody] : [] @@ -193,24 +206,27 @@ class AgentConversationHarness { return [...seed, ...added] } - // Every terminal tool call the recording carried, in order. The panel's own - // grouping and coalescing rules are the thing under test, so they are not - // reproduced here; the spec asserts what the rendered rows show. - recordedToolCalls(): RecordedToolCall[] { - return this.entries().flatMap((entry) => - entry.kind === 'event' && - entry.event.type === 'agent_tool_call' && - entry.event.data.status !== 'running' - ? [{ ok: entry.event.data.status === 'success' }] - : [] - ) + // One row per recorded tool call; failed when the recording reported an + // error status for it. The panel's own grouping and coalescing rules are the + // thing under test, so they are not reproduced here. + recordedToolCalls(throughTurn?: number): RecordedToolCall[] { + const calls = new Map() + for (const entry of this.entries(throughTurn)) { + if (entry.kind !== 'event' || entry.event.type !== 'agent_tool_call') + continue + const { tool_call_id: callId, status } = entry.event.data + const call = calls.get(callId) ?? { callId, failed: false } + if (status === 'error') call.failed = true + calls.set(callId, call) + } + return [...calls.values()] } // Last write wins per widget; the rendered control shows only the final value. - recordedWidgetValues(): RecordedWidgetValue[] { + recordedWidgetValues(throughTurn?: number): RecordedWidgetValue[] { const graph = this.host.graph() const latest = new Map() - for (const entry of this.entries()) { + for (const entry of this.entries(throughTurn)) { if (entry.kind !== 'graph_ops') continue for (const op of entry.ops) { if (op.op !== 'set_widget') continue @@ -227,19 +243,19 @@ class AgentConversationHarness { return [...latest.values()] } - addedNodeIds(): string[] { + addedNodeIds(throughTurn?: number): string[] { const graph = this.host.graph() const seedIds = new Set( this.conversation.workflow.seed.nodes.map((node) => String(node.id)) ) - return this.nodeBodies() + return this.nodeBodies(throughTurn) .map((body) => String(body.id)) .filter((id) => !seedIds.has(id) && id in graph.nodes) } - removedNodeIds(): string[] { + removedNodeIds(throughTurn?: number): string[] { const graph = this.host.graph() - return this.nodeBodies() + return this.nodeBodies(throughTurn) .map((body) => String(body.id)) .filter((id) => !(id in graph.nodes)) } @@ -265,13 +281,14 @@ class AgentConversationHarness { .join('') } - // The origin side of every concrete connect whose endpoints survive. Only the - // origin is asserted: outputs always render (NodeSlots.vue), while a - // widget-backed input renders no slot dot at all, so a target row can be - // legitimately absent. A grown connect names no to_slot either. - recordedConnects(): Array<{ fromNode: string; fromSlot: number }> { + // Every concrete connect whose endpoints survive in the document, with the + // target marked when it is a widget-backed input: those render no slot row + // on an uncollapsed node (NodeSlots.vue), so only the origin can be asserted + // for them. A grown connect names no to_slot and is skipped. + recordedConnects(throughTurn?: number): RecordedConnect[] { const present = new Set(Object.keys(this.host.graph().nodes)) - return this.entries() + const bodies = this.nodeBodies(throughTurn) + return this.entries(throughTurn) .flatMap((entry) => entry.kind === 'graph_ops' ? entry.ops.flatMap((op) => @@ -280,7 +297,12 @@ class AgentConversationHarness { { fromNode: String(op.from_node), fromSlot: op.from_slot, - toNode: String(op.to_node) + toNode: String(op.to_node), + toSlot: op.to_slot, + targetWidgetBacked: + bodies.find( + (body) => String(body.id) === String(op.to_node) + )?.inputs?.[op.to_slot]?.widget != null } ] : [] diff --git a/browser_tests/fixtures/data/agent/agentConversation.ts b/browser_tests/fixtures/data/agent/agentConversation.ts index 871d06541b6..73e3996c299 100644 --- a/browser_tests/fixtures/data/agent/agentConversation.ts +++ b/browser_tests/fixtures/data/agent/agentConversation.ts @@ -172,10 +172,13 @@ export function listRecordedConversations(): string[] { return readdirSync(dir) .filter((file) => file.endsWith('.json')) .map((file) => file.slice(0, -'.json'.length)) - .filter( - (caseId) => - loadAgentConversation(caseId).source.response_side === 'recorded' - ) + .map((caseId) => { + if (loadAgentConversation(caseId).source.response_side !== 'recorded') + throw new Error( + `${caseId} is not marked response_side: recorded; the replay suite only carries recordings` + ) + return caseId + }) .sort() } diff --git a/browser_tests/tests/agent/agentConversationCancelledTurn.spec.ts b/browser_tests/tests/agent/agentConversationCancelledTurn.spec.ts index 9bdde3cd269..1163715bd51 100644 --- a/browser_tests/tests/agent/agentConversationCancelledTurn.spec.ts +++ b/browser_tests/tests/agent/agentConversationCancelledTurn.spec.ts @@ -28,18 +28,26 @@ test.describe('Agent cancelled turn replay', { tag: '@cloud' }, () => { ).toContainText(tail) // The recorded frames keep arriving either way, so without this the test // stays green when the panel never issues the cancel at all. - expect(agentConversation.cancelRequests).toEqual([ - agentConversation.cancelTarget(0) - ]) + await expect + .poll(() => agentConversation.cancelRequests) + .toEqual([agentConversation.cancelTarget(0)]) await expect .poll(() => agentConversation.renderedNodeIds()) - .toEqual(expect.arrayContaining(agentConversation.documentNodeIds())) - // Each connect the recording asked for must leave its ORIGIN slot row - // connected. Only the origin: outputs always render, while a - // widget-backed input renders no slot dot to assert. - for (const { fromNode, fromSlot } of agentConversation.recordedConnects()) + .toEqual(agentConversation.documentNodeIds()) + for (const connect of agentConversation.recordedConnects()) { await expect( - agentConversation.vueNodes.getOutputSlotRow(fromNode, fromSlot) + agentConversation.vueNodes.getOutputSlotRow( + connect.fromNode, + connect.fromSlot + ) ).toHaveClass(/lg-slot--connected/) + if (!connect.targetWidgetBacked) + await expect( + agentConversation.vueNodes.getInputSlotRow( + connect.toNode, + connect.toSlot + ) + ).toHaveClass(/lg-slot--connected/) + } }) }) diff --git a/browser_tests/tests/agent/agentConversationReplay.spec.ts b/browser_tests/tests/agent/agentConversationReplay.spec.ts index 1707b005fd8..b3967d02812 100644 --- a/browser_tests/tests/agent/agentConversationReplay.spec.ts +++ b/browser_tests/tests/agent/agentConversationReplay.spec.ts @@ -3,44 +3,114 @@ import { expect } from '@playwright/test' import { agentConversationTest as test } from '@e2e/fixtures/agentConversationFixture' import { listRecordedConversations } from '@e2e/fixtures/data/agent/agentConversation' +// A probe the rendered markdown must contain: the first line of the recorded +// text with the markup characters the renderer consumes removed. +function textProbe(text: string): string { + return text + .replace(/[*_`#>]/g, '') + .split('\n')[0] + .trim() + .slice(0, 60) +} + test.describe('Agent conversation replay', { tag: '@cloud' }, () => { for (const conversationCase of listRecordedConversations()) { test.describe(`recorded ${conversationCase}`, () => { test.use({ conversationCase }) - test('replays the recorded turn onto the panel and the canvas', async ({ + test('replays every recorded turn onto the panel and the canvas', async ({ agentConversation, page }) => { - test.setTimeout(60_000) - const { panel } = agentConversation + test.setTimeout(90_000) + const { panel, vueNodes } = agentConversation + const streams = panel.getByTestId('markdown-stream') + let turnsWithText = 0 + + for (const turn of agentConversation.conversation.turns.keys()) { + await agentConversation.sendPrompt(turn) + await agentConversation.replayResponse(turn) + await agentConversation.waitForTurnComplete() + + const text = agentConversation.recordedAssistantText(turn).trim() + if (text !== '') { + turnsWithText += 1 + await expect( + streams.filter({ hasText: textProbe(text) }) + ).not.toHaveCount(0) + // MarkdownStream renders once per text group, so a turn can own + // several; every turn with text still owns at least one. + await expect + .poll( + async () => + (await streams.allInnerTexts()).filter((t) => t.trim() !== '') + .length + ) + .toBeGreaterThanOrEqual(turnsWithText) + } - await agentConversation.runTurns() + // The state after this turn, not only the end state: a node added + // now and deleted later must be on the canvas now. + for (const id of agentConversation.addedNodeIds(turn)) + await expect(page.locator(`[data-node-id="${id}"]`)).toBeVisible() + for (const id of agentConversation.removedNodeIds(turn)) + await expect(page.locator(`[data-node-id="${id}"]`)).toHaveCount(0) + for (const { + nodeId, + widget, + value + } of agentConversation.recordedWidgetValues(turn)) { + const field = page + .locator(`[data-node-id="${nodeId}"]`) + .getByLabel(widget, { exact: true }) + if (typeof value === 'number') { + // Number widgets format their input (0.5 renders as 0.50), so compare the number. + await expect + .poll(async () => + Number(await field.locator('input').first().inputValue()) + ) + .toBe(value) + continue + } + const tag = await field.evaluate((el) => el.tagName.toLowerCase()) + if (tag === 'button') await expect(field).toContainText(value) + else await expect(field).toHaveValue(value) + } + // The canvas shows exactly what the multi-player document holds. + await expect + .poll(() => agentConversation.renderedNodeIds()) + .toEqual(agentConversation.documentNodeIds()) + for (const connect of agentConversation.recordedConnects(turn)) { + await expect( + vueNodes.getOutputSlotRow(connect.fromNode, connect.fromSlot) + ).toHaveClass(/lg-slot--connected/) + if (!connect.targetWidgetBacked) + await expect( + vueNodes.getInputSlotRow(connect.toNode, connect.toSlot) + ).toHaveClass(/lg-slot--connected/) + } + } const calls = agentConversation.recordedToolCalls() const groupButtons = panel.getByRole('button', { name: /^Ran \d+ tool call/ }) if (calls.length > 0) { - // Groups exist for this recording, so the expansion check below - // cannot pass by there being nothing to expand. await expect(groupButtons.first()).toBeVisible() - const expansion = async () => - groupButtons.evaluateAll((buttons) => - buttons.map((button) => button.getAttribute('aria-expanded')) - ) - if (calls.some((call) => !call.ok)) - // A group holding a failed call stays open at turn end. - await expect - .poll(async () => (await expansion()).includes('true')) - .toBe(true) - // A clean run collapses every one of them. - else - await expect - .poll(async () => - (await expansion()).every((state) => state === 'false') + const expandedCount = async () => + ( + await groupButtons.evaluateAll((buttons) => + buttons.map((button) => button.getAttribute('aria-expanded')) ) - .toBe(true) + ).filter((state) => state === 'true').length + const failed = calls.filter((call) => call.failed).length + if (failed > 0) { + // A group holding a failed call stays open, and only those do. + await expect.poll(expandedCount).toBeGreaterThan(0) + await expect.poll(expandedCount).toBeLessThanOrEqual(failed) + } else { + await expect.poll(expandedCount).toBe(0) + } } await expect( @@ -48,66 +118,6 @@ test.describe('Agent conversation replay', { tag: '@cloud' }, () => { name: `Open ${agentConversation.conversation.workflow.name}` }) ).toBeVisible() - // MarkdownStream renders once per text group, so one turn can own - // several; counting streams per turn would not be well defined. Every - // turn that recorded assistant text must still have rendered some. - const turnsWithText = [ - ...agentConversation.conversation.turns.keys() - ].filter( - (turn) => agentConversation.recordedAssistantText(turn).trim() !== '' - ).length - await expect - .poll( - async () => - ( - await panel.getByTestId('markdown-stream').allInnerTexts() - ).filter((text) => text.trim() !== '').length - ) - .toBeGreaterThanOrEqual(turnsWithText) - - for (const id of agentConversation.addedNodeIds()) { - await expect(page.locator(`[data-node-id="${id}"]`)).toBeVisible() - } - for (const id of agentConversation.removedNodeIds()) { - await expect(page.locator(`[data-node-id="${id}"]`)).toBeHidden() - } - for (const { - nodeId, - widget, - value - } of agentConversation.recordedWidgetValues()) { - const field = page - .locator(`[data-node-id="${nodeId}"]`) - .getByLabel(widget, { exact: true }) - if (typeof value === 'number') { - // Number widgets format their input (0.5 renders as 0.50), so compare the number. - await expect - .poll(async () => - Number(await field.locator('input').first().inputValue()) - ) - .toBe(value) - continue - } - const tag = await field.evaluate((el) => el.tagName.toLowerCase()) - if (tag === 'button') await expect(field).toContainText(value) - else await expect(field).toHaveValue(value) - } - - // The canvas must show what the multi-player document holds, which is - // the library's own output rather than a second projection of the ops. - await expect - .poll(() => agentConversation.renderedNodeIds()) - .toEqual(expect.arrayContaining(agentConversation.documentNodeIds())) - // Each connect the recording asked for must leave its ORIGIN slot row - // connected. Only the origin: outputs always render, while a - // widget-backed input renders no slot dot to assert. - for (const { - fromNode, - fromSlot - } of agentConversation.recordedConnects()) - await expect( - agentConversation.vueNodes.getOutputSlotRow(fromNode, fromSlot) - ).toHaveClass(/lg-slot--connected/) }) }) } diff --git a/src/workbench/extensions/agent/AgentPanelRoot.test.ts b/src/workbench/extensions/agent/AgentPanelRoot.test.ts index a2dbbd3374a..e29c31ff371 100644 --- a/src/workbench/extensions/agent/AgentPanelRoot.test.ts +++ b/src/workbench/extensions/agent/AgentPanelRoot.test.ts @@ -140,6 +140,7 @@ const hostStores = vi.hoisted(() => ({ graph?: { id?: string } id: string | number }) => string + createNewTemporary: ReturnType }, canvas: null as unknown as { selectedItems: unknown[] @@ -152,6 +153,23 @@ const hostStores = vi.hoisted(() => ({ vi.mock('@/platform/workflow/management/stores/workflowStore', async () => { const { reactive } = await import('vue') const tabs = new Map() + const createTab = (path?: string, data?: ComfyWorkflowJSON) => { + const requested = (path ?? 'Unsaved Workflow.json').replace(/\.json$/, '') + let stem = requested + let counter = 2 + while (tabs.has(`workflows/${stem}.json`)) + stem = `${requested} (${counter++})` + const tab: FakeTab = { + path: `workflows/${stem}.json`, + directory: 'workflows', + filename: stem, + isTemporary: true, + isModified: false, + activeState: data ?? null + } + tabs.set(tab.path, tab) + return tab + } const store = reactive({ activeWorkflow: null as FakeTab | null, get openWorkflows() { @@ -166,26 +184,8 @@ vi.mock('@/platform/workflow/management/stores/workflowStore', async () => { closeWorkflow: vi.fn(async (tab: FakeTab) => { tabs.delete(tab.path) }), - createTemporary: (path?: string, data?: ComfyWorkflowJSON) => { - const requested = (path ?? 'Unsaved Workflow.json').replace(/\.json$/, '') - let stem = requested - let counter = 2 - while (tabs.has(`workflows/${stem}.json`)) - stem = `${requested} (${counter++})` - const tab: FakeTab = { - path: `workflows/${stem}.json`, - directory: 'workflows', - filename: stem, - isTemporary: true, - isModified: false, - activeState: data ?? null - } - tabs.set(tab.path, tab) - return tab - }, - createNewTemporary(path?: string, data?: ComfyWorkflowJSON) { - return this.createTemporary(path, data) - } + createTemporary: createTab, + createNewTemporary: vi.fn(createTab) }) hostStores.workflow = store return { useWorkflowStore: () => store } @@ -2413,6 +2413,7 @@ describe('AgentPanelRoot workflow binding', () => { expect(workflowService.openWorkflow).toHaveBeenCalled() ) const minted = hostStores.workflow.tabs.get('workflows/Video test.json') + expect(hostStores.workflow.createNewTemporary).toHaveBeenCalled() expect(minted?.filename).toBe('Video test') expect(minted?.activeState?.nodes).toHaveLength(0) expect(minted?.activeState?.links).toHaveLength(0) From 47b37722bcd8da6643f60f905279adbd16e07bc4 Mon Sep 17 00:00:00 2001 From: Nathaniel Parson Koroso Date: Fri, 4 Sep 2026 17:48:20 -0700 Subject: [PATCH 31/52] test(agent): validate every host frame with the production parser The fake host's frames now go through parseServerDocFrame before they reach the socket, so a host that stopped emitting a required field fails at send time; the test-only ServerDocWireFrame export is gone (DOC_PROTOCOL_VERSION stays, the parser checks it). The host actor follows the three-segment grammar so the frames exercise the accept path, and rendered node ids are de-duplicated before the strict comparison since three components emit data-node-id. --- .../fixtures/agentConversationFixture.ts | 23 ++++++++++++++----- .../fixtures/agentConversationHostDoc.ts | 21 +++++++++++------ .../extensions/agent/crdt/docFrameClient.ts | 5 ---- 3 files changed, 31 insertions(+), 18 deletions(-) diff --git a/browser_tests/fixtures/agentConversationFixture.ts b/browser_tests/fixtures/agentConversationFixture.ts index 0caf6bfecef..a9e00c7fde2 100644 --- a/browser_tests/fixtures/agentConversationFixture.ts +++ b/browser_tests/fixtures/agentConversationFixture.ts @@ -9,12 +9,15 @@ import type { AgentMessages, AgentWsEvent } from '@/workbench/extensions/agent/schemas/agentApiSchema' -import type { ServerDocWireFrame } from '@/workbench/extensions/agent/crdt/docFrameClient' -import { DOC_PROTOCOL_VERSION } from '@/workbench/extensions/agent/crdt/docFrameClient' +import { + DOC_PROTOCOL_VERSION, + parseServerDocFrame +} from '@/workbench/extensions/agent/crdt/docFrameClient' import { parseAgentWsEvent } from '@/workbench/extensions/agent/schemas/agentApiSchema' import { agentTest, bootAgentApp } from '@e2e/fixtures/agentPanelFixture' import { HostDoc } from '@e2e/fixtures/agentConversationHostDoc' +import type { HostFrame } from '@e2e/fixtures/agentConversationHostDoc' import { VueNodeHelpers } from '@e2e/fixtures/VueNodeHelpers' import type { AgentConversation, @@ -321,9 +324,10 @@ class AgentConversationHarness { .evaluateAll((nodes) => nodes.map((node) => node.getAttribute('data-node-id') ?? '') ) - return ids - .filter((id) => id !== '') - .sort((a, b) => compareNodeIds(toNodeId(a), toNodeId(b))) + // Three components emit data-node-id, so one node can appear twice. + return [...new Set(ids.filter((id) => id !== ''))].sort((a, b) => + compareNodeIds(toNodeId(a), toNodeId(b)) + ) } private async mockAgentApi(): Promise { @@ -383,7 +387,14 @@ class AgentConversationHarness { return parsed.data } - private send(frame: AgentWsEvent | ServerDocWireFrame): void { + private send(frame: AgentWsEvent | HostFrame): void { + // Every host frame must satisfy production's own parser, so a host that + // stopped emitting a required field fails here, not silently on the client. + if ( + (frame.type.startsWith('doc_') || frame.type === 'awareness') && + parseServerDocFrame(frame) === null + ) + throw new Error(`host frame ${frame.type} is not a valid doc frame`) if (!this.socket) throw new Error('the app has not opened /ws yet') this.socket.send(JSON.stringify(frame)) } diff --git a/browser_tests/fixtures/agentConversationHostDoc.ts b/browser_tests/fixtures/agentConversationHostDoc.ts index 5f278653804..9d278ce1cd3 100644 --- a/browser_tests/fixtures/agentConversationHostDoc.ts +++ b/browser_tests/fixtures/agentConversationHostDoc.ts @@ -7,12 +7,19 @@ import type { } from '@comfyorg/comfy-multi-player' import * as Y from 'yjs' -import type { ServerDocWireFrame } from '@/workbench/extensions/agent/crdt/docFrameClient' +import type { ServerDocFrame } from '@/workbench/extensions/agent/crdt/docFrameClient' import { DOC_PROTOCOL_VERSION } from '@/workbench/extensions/agent/crdt/docFrameClient' import type { GraphOperation } from '@/workbench/extensions/agent/crdt/graphOperations' import { mintWireOps } from '@/workbench/extensions/agent/crdt/opEnvelope' -const HOST_ACTOR = 'agent:comfy' +const HOST_ACTOR = 'agent:comfy:host' + +// The shape the fake host puts on the wire; production's parseServerDocFrame +// validates each one at send time. +export interface HostFrame { + type: ServerDocFrame['type'] + data: Record +} function toBase64(bytes: Uint8Array): string { return Buffer.from(bytes).toString('base64') @@ -39,7 +46,7 @@ export class HostDoc { return readGraph(this.doc) } - subscribed(): ServerDocWireFrame { + subscribed(): HostFrame { return { type: 'doc_subscribed', data: { @@ -51,14 +58,14 @@ export class HostDoc { } } - catchUp(stateVectorB64: string): ServerDocWireFrame { + catchUp(stateVectorB64: string): HostFrame { const update = Y.encodeStateAsUpdate(this.doc, fromBase64(stateVectorB64)) return this.updateFrame(update, HOST_ACTOR, []) } // Client batches arrive already minted; the real host folds them into the same // doc and broadcasts the result, so every subscriber converges on them. - applyClient(ops: Op[]): { applied: string[]; update: ServerDocWireFrame } { + applyClient(ops: Op[]): { applied: string[]; update: HostFrame } { const before = Y.encodeStateVector(this.doc) const result = applyOps(this.doc, ops, this.catalog) const rejected = result.outcomes.filter((o) => o.outcome !== 'applied') @@ -78,7 +85,7 @@ export class HostDoc { } } - apply(operations: GraphOperation[]): ServerDocWireFrame { + apply(operations: GraphOperation[]): HostFrame { const before = Y.encodeStateVector(this.doc) const ops = mintWireOps(operations, { actor: HOST_ACTOR, @@ -102,7 +109,7 @@ export class HostDoc { update: Uint8Array, actor: string, opIds: string[] - ): ServerDocWireFrame { + ): HostFrame { return { type: 'doc_update', data: { diff --git a/src/workbench/extensions/agent/crdt/docFrameClient.ts b/src/workbench/extensions/agent/crdt/docFrameClient.ts index 3edd7c24c82..53d8d995e56 100644 --- a/src/workbench/extensions/agent/crdt/docFrameClient.ts +++ b/src/workbench/extensions/agent/crdt/docFrameClient.ts @@ -86,11 +86,6 @@ export type ServerDocFrame = | { type: 'awareness'; data: DocAwareness } /** A frame as it travels the wire, before {@link parseServerDocFrame} reads it. */ -export interface ServerDocWireFrame { - type: ServerDocFrame['type'] - data: WireData -} - export interface DocFrameTransport { /** * Best-effort send. Returns `true` when the frame left the transport and From 03801ab84b3ff3ab53d538bc4acb15bb624c74d3 Mon Sep 17 00:00:00 2001 From: Nathaniel Parson Koroso Date: Fri, 4 Sep 2026 17:58:12 -0700 Subject: [PATCH 32/52] test(agent): probe rendered text by words, not by the recording's markup A reply that is only a markdown link renders no text the raw recording contains, so the probe now drops images, keeps link labels, removes bare URLs and markup, and asks for six words; a turn with fewer than three words is covered by the per-turn stream floor alone. --- .../agent/agentConversationReplay.spec.ts | 28 +++++++++++-------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/browser_tests/tests/agent/agentConversationReplay.spec.ts b/browser_tests/tests/agent/agentConversationReplay.spec.ts index b3967d02812..aeb76b80b19 100644 --- a/browser_tests/tests/agent/agentConversationReplay.spec.ts +++ b/browser_tests/tests/agent/agentConversationReplay.spec.ts @@ -3,14 +3,18 @@ import { expect } from '@playwright/test' import { agentConversationTest as test } from '@e2e/fixtures/agentConversationFixture' import { listRecordedConversations } from '@e2e/fixtures/data/agent/agentConversation' -// A probe the rendered markdown must contain: the first line of the recorded -// text with the markup characters the renderer consumes removed. -function textProbe(text: string): string { - return text - .replace(/[*_`#>]/g, '') - .split('\n')[0] - .trim() - .slice(0, 60) +// A run of words the rendered markdown must contain: images dropped, links +// reduced to their label, bare URLs and markup characters removed. A turn +// whose text is only a link yields no probe and is covered by the count floor. +function textProbe(text: string): string | null { + const words = text + .replace(/!\[[^\]]*\]\([^)]*\)/g, '') + .replace(/\[([^\]]*)\]\([^)]*\)/g, '$1') + .replace(/https?:\/\/\S+/g, '') + .replace(/[*_`#>|]/g, '') + .split(/\s+/) + .filter((word) => word.length > 0) + return words.length >= 3 ? words.slice(0, 6).join(' ') : null } test.describe('Agent conversation replay', { tag: '@cloud' }, () => { @@ -35,9 +39,11 @@ test.describe('Agent conversation replay', { tag: '@cloud' }, () => { const text = agentConversation.recordedAssistantText(turn).trim() if (text !== '') { turnsWithText += 1 - await expect( - streams.filter({ hasText: textProbe(text) }) - ).not.toHaveCount(0) + const probe = textProbe(text) + if (probe !== null) + await expect(streams.filter({ hasText: probe })).not.toHaveCount( + 0 + ) // MarkdownStream renders once per text group, so a turn can own // several; every turn with text still owns at least one. await expect From 4e3fd3dab620aea9915433ac53f5f98dcbf10bf8 Mon Sep 17 00:00:00 2001 From: Nathaniel Parson Koroso Date: Tue, 8 Sep 2026 11:07:10 -0700 Subject: [PATCH 33/52] test(agent): judge the replay by what the user sees The harness no longer answers client op batches: no spec makes a human edit, and the scenario that did is blocked on the follower dropping the edited node's widgets (#16870), so the ack and echoed doc_update went with it. Sending a prompt is proven by the rendered user turn, not by the intercepted POST. The stopped turn's recorded tail is held back until the panel's cancel for that message reaches the server, so the completed conversation is the evidence that Stop worked. The canvas is checked against the recording itself: every expected node visible under its recorded title or the server's display name, no extra node, the widget values, and the exact wire set read from the renderer's link map, widget-backed targets included. --- .../fixtures/agentConversationFixture.ts | 356 ++++++++++-------- .../fixtures/agentConversationHostDoc.ts | 23 -- .../agentConversationCancelledTurn.spec.ts | 31 +- .../agent/agentConversationReplay.spec.ts | 44 +-- 4 files changed, 208 insertions(+), 246 deletions(-) diff --git a/browser_tests/fixtures/agentConversationFixture.ts b/browser_tests/fixtures/agentConversationFixture.ts index a9e00c7fde2..f668129fb94 100644 --- a/browser_tests/fixtures/agentConversationFixture.ts +++ b/browser_tests/fixtures/agentConversationFixture.ts @@ -1,18 +1,15 @@ import type { Locator, Page, WebSocketRoute } from '@playwright/test' import { expect } from '@playwright/test' - -import type { GraphSnapshot, Op } from '@comfyorg/comfy-multi-player' +import { z } from 'zod' import enMessages from '@/locales/en/main.json' with { type: 'json' } +import type { ObjectInfoResponse } from '@/schemas/nodeDefSchema' import type { AgentCancelAccepted, AgentMessages, AgentWsEvent } from '@/workbench/extensions/agent/schemas/agentApiSchema' -import { - DOC_PROTOCOL_VERSION, - parseServerDocFrame -} from '@/workbench/extensions/agent/crdt/docFrameClient' +import { parseServerDocFrame } from '@/workbench/extensions/agent/crdt/docFrameClient' import { parseAgentWsEvent } from '@/workbench/extensions/agent/schemas/agentApiSchema' import { agentTest, bootAgentApp } from '@e2e/fixtures/agentPanelFixture' @@ -26,7 +23,6 @@ import type { } from '@e2e/fixtures/data/agent/agentConversation' import { loadAgentConversation } from '@e2e/fixtures/data/agent/agentConversation' -import { compareNodeIds, toNodeId } from '@/types/nodeId' import { jsonRoute } from '@e2e/fixtures/utils/jsonRoute' const THREAD_ID = 'e9a2f3d1-7c44-4b2e-9a01-5f6d8c7b3a10' @@ -36,6 +32,7 @@ const turnId = (turn: number): string => const SOCKET_SID = '7d1f2e3a-4b5c-4d6e-8f90-1a2b3c4d5e6f' const PANEL_MOUNT_TIMEOUT = 30_000 const SUBSCRIBE_TIMEOUT = 15_000 +const CANCEL_TIMEOUT = 10_000 const OPEN_AGENT_LABEL = enMessages.agent.askComfyAgent const SEND_LABEL = enMessages.agent.send @@ -46,7 +43,6 @@ type NodeBody = { type: string title?: string inputs?: Array<{ name: string; widget?: unknown }> - outputs?: Array<{ name: string }> } interface RecordedToolCall { @@ -54,12 +50,11 @@ interface RecordedToolCall { failed: boolean } -interface RecordedConnect { +interface RecordedLink { fromNode: string fromSlot: number toNode: string toSlot: number - targetWidgetBacked: boolean } interface RecordedWidgetValue { @@ -68,18 +63,52 @@ interface RecordedWidgetValue { value: string | number } +// [id, from, from_slot, to, to_slot, type], as a workflow file stores a link. +const zSeedLink = z + .tuple([ + z.unknown(), + z.union([z.string(), z.number()]), + z.number(), + z.union([z.string(), z.number()]), + z.number() + ]) + .rest(z.unknown()) + +function linkKey(link: RecordedLink): string { + return `${link.fromNode}:${link.fromSlot}->${link.toNode}:${link.toSlot}` +} + +function byLinkKey(a: RecordedLink, b: RecordedLink): number { + return linkKey(a).localeCompare(linkKey(b)) +} + +async function withTimeout( + promise: Promise, + ms: number, + message: string +): Promise { + let timer: ReturnType | undefined + const timeout = new Promise((_, reject) => { + timer = setTimeout(() => reject(new Error(message)), ms) + }) + try { + await Promise.race([promise, timeout]) + } finally { + clearTimeout(timer) + } +} + // Runs one recorded prompt/response through the real panel over a routed /ws socket. class AgentConversationHarness { - readonly postedMessages: string[] = [] - // Every cancel the panel issued, so a missing one cannot pass unnoticed. - readonly cancelRequests: { threadId: string; messageId: string }[] = [] - // Human-op minting is observable only on the client side of the socket. - readonly clientFrames: { type?: unknown; data?: unknown }[] = [] readonly panel: Locator readonly vueNodes: VueNodeHelpers private readonly host: HostDoc private socket: WebSocketRoute | null = null + private postedTurns = 0 + private readonly displayNames = new Map() + // Resolved when the panel cancels the turn the recording stopped. + private readonly cancelWaiters = new Map void>() private resolveSubscribed: (() => void) | null = null private readonly subscribed = new Promise((resolve) => { this.resolveSubscribed = resolve @@ -112,12 +141,19 @@ class AgentConversationHarness { }) ) }) + // The canvas titles untitled nodes from the server's node definitions. + const objectInfo = this.page.waitForResponse((response) => + new URL(response.url()).pathname.endsWith('/api/object_info') + ) await bootAgentApp(this.page, agentFlag, { // Only the Vue node renderer projects follower edits onto the canvas. settings: { 'Comfy.VueNodes.Enabled': true }, // Replayed nodes materialize from registered node types; the recordings use core nodes only. objectInfo: 'server' }) + const definitions = (await (await objectInfo).json()) as ObjectInfoResponse + for (const [type, definition] of Object.entries(definitions)) + this.displayNames.set(type, definition.display_name || definition.name) await this.page.getByRole('button', { name: OPEN_AGENT_LABEL }).click() await expect(this.panel).toBeVisible({ timeout: PANEL_MOUNT_TIMEOUT }) @@ -130,8 +166,6 @@ class AgentConversationHarness { }) await composer.fill(content) await this.panel.getByRole('button', { name: SEND_LABEL }).click() - await expect.poll(() => this.postedMessages.length).toBeGreaterThan(turn) - expect(this.postedMessages[turn]).toContain(content) // Replay frames are dropped until the page has applied the ack's thread id. // useAgentSession records the user turn straight after storing that id, so // the rendered turn says the ack landed without reading private storage. @@ -158,7 +192,7 @@ class AgentConversationHarness { } // The recorded turn was stopped here, so the panel stops here too. if (index === this.conversation.turns[turn].cancel_after) - await this.stopTurn() + await this.stopTurn(turn) } } @@ -178,13 +212,19 @@ class AgentConversationHarness { .flatMap((turn) => turn.response) } - // The thread and message the ack handed the panel for this turn. - cancelTarget(turn = 0): { threadId: string; messageId: string } { - return { threadId: THREAD_ID, messageId: turnId(turn) } - } - - async stopTurn(): Promise { + // Clicks Stop, then holds the recorded tail until the panel's cancel for this + // turn reaches the server: the completed conversation is reachable only + // through that request. + private async stopTurn(turn: number): Promise { + const accepted = new Promise((resolve) => + this.cancelWaiters.set(turnId(turn), resolve) + ) await this.panel.getByRole('button', { name: STOP_LABEL }).click() + await withTimeout( + accepted, + CANCEL_TIMEOUT, + 'the panel never cancelled the stopped turn' + ) } async waitForTurnComplete(): Promise { @@ -196,7 +236,7 @@ class AgentConversationHarness { ).toHaveCount(0) } - // Doc-id filter: a stray template node must not pin the template here. + // Every node the recording ever placed through the given turn, deleted or not. private nodeBodies(throughTurn?: number): NodeBody[] { const seed = this.conversation.workflow.seed.nodes as NodeBody[] const added = this.entries(throughTurn).flatMap((entry) => @@ -209,6 +249,51 @@ class AgentConversationHarness { return [...seed, ...added] } + // The graph the recording promises through the given turn: the seed, then + // every add, delete and connect in order. An input holds one link, so a + // later connect to it replaces the earlier one. + private expectedGraph(throughTurn?: number): { + nodes: Map + links: Map + } { + const { seed } = this.conversation.workflow + const nodes = new Map( + (seed.nodes as NodeBody[]).map((node) => [String(node.id), node]) + ) + const links = new Map() + const connect = (link: RecordedLink) => + links.set(`${link.toNode}:${link.toSlot}`, link) + for (const raw of seed.links) { + const [, fromNode, fromSlot, toNode, toSlot] = zSeedLink.parse(raw) + connect({ + fromNode: String(fromNode), + fromSlot, + toNode: String(toNode), + toSlot + }) + } + for (const entry of this.entries(throughTurn)) { + if (entry.kind !== 'graph_ops') continue + for (const op of entry.ops) { + if (op.op === 'add_node') + nodes.set(String(op.node.id), op.node as NodeBody) + else if (op.op === 'delete_node') { + const id = String(op.node_id) + nodes.delete(id) + for (const [key, link] of links) + if (link.fromNode === id || link.toNode === id) links.delete(key) + } else if (op.op === 'connect' && op.grow == null) + connect({ + fromNode: String(op.from_node), + fromSlot: op.from_slot, + toNode: String(op.to_node), + toSlot: op.to_slot + }) + } + } + return { nodes, links } + } + // One row per recorded tool call; failed when the recording reported an // error status for it. The panel's own grouping and coalescing rules are the // thing under test, so they are not reproduced here. @@ -226,7 +311,7 @@ class AgentConversationHarness { } // Last write wins per widget; the rendered control shows only the final value. - recordedWidgetValues(throughTurn?: number): RecordedWidgetValue[] { + private recordedWidgetValues(throughTurn?: number): RecordedWidgetValue[] { const graph = this.host.graph() const latest = new Map() for (const entry of this.entries(throughTurn)) { @@ -246,33 +331,6 @@ class AgentConversationHarness { return [...latest.values()] } - addedNodeIds(throughTurn?: number): string[] { - const graph = this.host.graph() - const seedIds = new Set( - this.conversation.workflow.seed.nodes.map((node) => String(node.id)) - ) - return this.nodeBodies(throughTurn) - .map((body) => String(body.id)) - .filter((id) => !seedIds.has(id) && id in graph.nodes) - } - - removedNodeIds(throughTurn?: number): string[] { - const graph = this.host.graph() - return this.nodeBodies(throughTurn) - .map((body) => String(body.id)) - .filter((id) => !(id in graph.nodes)) - } - - hostGraph(): GraphSnapshot { - return this.host.graph() - } - - documentNodeIds(): string[] { - return Object.keys(this.host.graph().nodes).sort((a, b) => - compareNodeIds(toNodeId(a), toNodeId(b)) - ) - } - // The assistant text a turn recorded, concatenated as the panel streams it. recordedAssistantText(turn: number): string { return this.conversation.turns[turn].response @@ -284,50 +342,83 @@ class AgentConversationHarness { .join('') } - // Every concrete connect whose endpoints survive in the document, with the - // target marked when it is a widget-backed input: those render no slot row - // on an uncollapsed node (NodeSlots.vue), so only the origin can be asserted - // for them. A grown connect names no to_slot and is skipped. - recordedConnects(throughTurn?: number): RecordedConnect[] { - const present = new Set(Object.keys(this.host.graph().nodes)) - const bodies = this.nodeBodies(throughTurn) - return this.entries(throughTurn) - .flatMap((entry) => - entry.kind === 'graph_ops' - ? entry.ops.flatMap((op) => - op.op === 'connect' && op.grow == null - ? [ - { - fromNode: String(op.from_node), - fromSlot: op.from_slot, - toNode: String(op.to_node), - toSlot: op.to_slot, - targetWidgetBacked: - bodies.find( - (body) => String(body.id) === String(op.to_node) - )?.inputs?.[op.to_slot]?.widget != null - } - ] - : [] - ) - : [] - ) - .filter( - (connect) => - present.has(connect.fromNode) && present.has(connect.toNode) - ) + private displayName(type: string): string { + const name = this.displayNames.get(type) + if (name === undefined) + throw new Error(`the server registers no node type ${type}`) + return name } - async renderedNodeIds(): Promise { - const ids = await this.page - .locator('[data-node-id]') - .evaluateAll((nodes) => - nodes.map((node) => node.getAttribute('data-node-id') ?? '') - ) - // Three components emit data-node-id, so one node can appear twice. - return [...new Set(ids.filter((id) => id !== ''))].sort((a, b) => - compareNodeIds(toNodeId(a), toNodeId(b)) + private async renderedLinks(): Promise { + const links = await this.page.evaluate(() => + [...window.app!.graph.links.values()].map((link) => ({ + fromNode: String(link.origin_id), + fromSlot: link.origin_slot, + toNode: String(link.target_id), + toSlot: link.target_slot + })) ) + return links.sort(byLinkKey) + } + + // What the canvas shows after the given turn (the end state by default), + // judged the way a user would: which nodes are there and what they are + // called, what their widgets say, and which wires join them. + async expectCanvasReplayed(throughTurn?: number): Promise { + const { nodes, links } = this.expectedGraph(throughTurn) + const bodies = this.nodeBodies(throughTurn) + for (const body of bodies) + if (!nodes.has(String(body.id))) + await expect(this.vueNodes.getNodeLocator(String(body.id))).toHaveCount( + 0 + ) + for (const [id, body] of nodes) { + const node = this.vueNodes.getNodeLocator(id) + await expect(node).toBeVisible() + await expect(node.getByTestId('node-title')).toHaveText( + body.title ?? this.displayName(body.type) + ) + } + await expect(this.page.getByTestId('node-title')).toHaveCount(nodes.size) + + for (const { nodeId, widget, value } of this.recordedWidgetValues( + throughTurn + )) { + const field = this.vueNodes + .getNodeLocator(nodeId) + .getByLabel(widget, { exact: true }) + if (typeof value === 'number') { + // Number widgets format their input (0.5 renders as 0.50), so compare the number. + await expect + .poll(async () => + Number(await field.locator('input').first().inputValue()) + ) + .toBe(value) + continue + } + const tag = await field.evaluate((el) => el.tagName.toLowerCase()) + if (tag === 'button') await expect(field).toContainText(value) + else await expect(field).toHaveValue(value) + } + + await expect + .poll(() => this.renderedLinks()) + .toEqual([...links.values()].sort(byLinkKey)) + // A widget-backed input renders no slot row on an uncollapsed node + // (NodeSlots.vue); the wire above already covers that end. + for (const link of links.values()) { + await expect( + this.vueNodes.getOutputSlotRow(link.fromNode, link.fromSlot) + ).toHaveClass(/lg-slot--connected/) + const widgetBacked = + bodies.find((body) => String(body.id) === link.toNode)?.inputs?.[ + link.toSlot + ]?.widget != null + if (!widgetBacked) + await expect( + this.vueNodes.getInputSlotRow(link.toNode, link.toSlot) + ).toHaveClass(/lg-slot--connected/) + } } private async mockAgentApi(): Promise { @@ -338,13 +429,13 @@ class AgentConversationHarness { await page.route('**/api/agent/threads/*/messages', (route) => { const request = route.request() if (request.method() === 'POST') { - this.postedMessages.push(request.postData() ?? '') + this.postedTurns += 1 return route.fulfill({ status: 202, contentType: 'application/json', body: JSON.stringify({ thread_id: THREAD_ID, - message_id: turnId(this.postedMessages.length - 1), + message_id: turnId(this.postedTurns - 1), workflow_id: this.conversation.workflow.id }) }) @@ -356,11 +447,13 @@ class AgentConversationHarness { const target = /\/threads\/([^/]+)\/messages\/([^/]+)\/cancel/.exec( route.request().url() ) - if (target) - this.cancelRequests.push({ - threadId: target[1], - messageId: target[2] - }) + const release = + target === null || target[1] !== THREAD_ID + ? undefined + : this.cancelWaiters.get(target[2]) + // A real server knows nothing about any other message. + if (release === undefined) return route.fulfill({ status: 404 }) + release() const cancelled: AgentCancelAccepted = { status: 'cancelling' } return route.fulfill(jsonRoute(cancelled)) }) @@ -399,47 +492,10 @@ class AgentConversationHarness { this.socket.send(JSON.stringify(frame)) } - outboundOps(): { op?: unknown }[] { - return this.clientFrames - .filter((frame) => frame.type === 'doc_ops') - .flatMap((frame) => { - const ops = (frame.data as { ops?: unknown } | undefined)?.ops - return Array.isArray(ops) ? (ops as { op?: unknown }[]) : [] - }) - } - private onClientFrame(raw: string | Buffer): void { const frame: unknown = JSON.parse(raw.toString()) if (typeof frame !== 'object' || frame === null) return const { type, data } = frame as { type?: unknown; data?: unknown } - this.clientFrames.push({ type, data }) - if (type === 'doc_ops' && typeof data === 'object' && data !== null) { - // The client keeps one op batch in flight until the host acks it. - const { workflow_id, ops } = data as { - workflow_id?: unknown - ops?: unknown - } - if (workflow_id === this.conversation.workflow.id && Array.isArray(ops)) { - // The applier validates each payload; the wire frame only guarantees an array. - const { applied, update } = this.host.applyClient(ops as Op[]) - this.send({ - type: 'doc_ops_result', - data: { - v: DOC_PROTOCOL_VERSION, - workflow_id, - ok: true, - applied, - skipped: [] - } - }) - // An accepted batch also reaches subscribers as an authoritative - // doc_update. Without it the follower never sees its own ops come back, - // and later host deltas cannot fill the gap because they are encoded - // from a state vector that already includes them. - this.send(update) - } - return - } if (type !== 'doc_subscribe' || typeof data !== 'object' || data === null) return const { workflow_id, state_vector_b64 } = data as { @@ -456,24 +512,12 @@ class AgentConversationHarness { this.resolveSubscribed?.() } - private async waitForSubscribe(): Promise { - let timer: ReturnType | undefined - const timeout = new Promise((_, reject) => { - timer = setTimeout( - () => - reject( - new Error( - 'the follower never subscribed to the conversation workflow; graph_ops need an agent_active_tab (or a bound tab) first' - ) - ), - SUBSCRIBE_TIMEOUT - ) - }) - try { - await Promise.race([this.subscribed, timeout]) - } finally { - clearTimeout(timer) - } + private waitForSubscribe(): Promise { + return withTimeout( + this.subscribed, + SUBSCRIBE_TIMEOUT, + 'the follower never subscribed to the conversation workflow; graph_ops need an agent_active_tab (or a bound tab) first' + ) } } diff --git a/browser_tests/fixtures/agentConversationHostDoc.ts b/browser_tests/fixtures/agentConversationHostDoc.ts index 9d278ce1cd3..aa9ff551e3d 100644 --- a/browser_tests/fixtures/agentConversationHostDoc.ts +++ b/browser_tests/fixtures/agentConversationHostDoc.ts @@ -1,7 +1,6 @@ import { applyOps, mint, readGraph } from '@comfyorg/comfy-multi-player' import type { GraphSnapshot, - Op, WidgetCatalog, WorkflowJSON } from '@comfyorg/comfy-multi-player' @@ -63,28 +62,6 @@ export class HostDoc { return this.updateFrame(update, HOST_ACTOR, []) } - // Client batches arrive already minted; the real host folds them into the same - // doc and broadcasts the result, so every subscriber converges on them. - applyClient(ops: Op[]): { applied: string[]; update: HostFrame } { - const before = Y.encodeStateVector(this.doc) - const result = applyOps(this.doc, ops, this.catalog) - const rejected = result.outcomes.filter((o) => o.outcome !== 'applied') - if (rejected.length > 0) - throw new Error( - `client doc_ops did not apply: ${JSON.stringify(rejected)}` - ) - this.seq += 1 - const applied = ops.map((op) => op.op_id) - return { - applied, - update: this.updateFrame( - Y.encodeStateAsUpdate(this.doc, before), - ops[0]?.actor ?? HOST_ACTOR, - applied - ) - } - } - apply(operations: GraphOperation[]): HostFrame { const before = Y.encodeStateVector(this.doc) const ops = mintWireOps(operations, { diff --git a/browser_tests/tests/agent/agentConversationCancelledTurn.spec.ts b/browser_tests/tests/agent/agentConversationCancelledTurn.spec.ts index 1163715bd51..6664d4baf61 100644 --- a/browser_tests/tests/agent/agentConversationCancelledTurn.spec.ts +++ b/browser_tests/tests/agent/agentConversationCancelledTurn.spec.ts @@ -19,35 +19,14 @@ test.describe('Agent cancelled turn replay', { tag: '@cloud' }, () => { const tail = agentConversation.recordedAssistantText(0) expect(tail, 'the recorded tail carries the stopped message').not.toBe('') - await agentConversation.sendPrompt() - await agentConversation.replayResponse() - await agentConversation.waitForTurnComplete() + // The harness releases the recorded tail only once the panel's cancel has + // reached the server, so a turn that completes and shows the tail is the + // user-visible proof that Stop did its job. + await agentConversation.runTurns() await expect( agentConversation.panel.getByTestId('markdown-stream').first() ).toContainText(tail) - // The recorded frames keep arriving either way, so without this the test - // stays green when the panel never issues the cancel at all. - await expect - .poll(() => agentConversation.cancelRequests) - .toEqual([agentConversation.cancelTarget(0)]) - await expect - .poll(() => agentConversation.renderedNodeIds()) - .toEqual(agentConversation.documentNodeIds()) - for (const connect of agentConversation.recordedConnects()) { - await expect( - agentConversation.vueNodes.getOutputSlotRow( - connect.fromNode, - connect.fromSlot - ) - ).toHaveClass(/lg-slot--connected/) - if (!connect.targetWidgetBacked) - await expect( - agentConversation.vueNodes.getInputSlotRow( - connect.toNode, - connect.toSlot - ) - ).toHaveClass(/lg-slot--connected/) - } + await agentConversation.expectCanvasReplayed() }) }) diff --git a/browser_tests/tests/agent/agentConversationReplay.spec.ts b/browser_tests/tests/agent/agentConversationReplay.spec.ts index aeb76b80b19..ba914e8b856 100644 --- a/browser_tests/tests/agent/agentConversationReplay.spec.ts +++ b/browser_tests/tests/agent/agentConversationReplay.spec.ts @@ -23,11 +23,10 @@ test.describe('Agent conversation replay', { tag: '@cloud' }, () => { test.use({ conversationCase }) test('replays every recorded turn onto the panel and the canvas', async ({ - agentConversation, - page + agentConversation }) => { test.setTimeout(90_000) - const { panel, vueNodes } = agentConversation + const { panel } = agentConversation const streams = panel.getByTestId('markdown-stream') let turnsWithText = 0 @@ -57,44 +56,7 @@ test.describe('Agent conversation replay', { tag: '@cloud' }, () => { // The state after this turn, not only the end state: a node added // now and deleted later must be on the canvas now. - for (const id of agentConversation.addedNodeIds(turn)) - await expect(page.locator(`[data-node-id="${id}"]`)).toBeVisible() - for (const id of agentConversation.removedNodeIds(turn)) - await expect(page.locator(`[data-node-id="${id}"]`)).toHaveCount(0) - for (const { - nodeId, - widget, - value - } of agentConversation.recordedWidgetValues(turn)) { - const field = page - .locator(`[data-node-id="${nodeId}"]`) - .getByLabel(widget, { exact: true }) - if (typeof value === 'number') { - // Number widgets format their input (0.5 renders as 0.50), so compare the number. - await expect - .poll(async () => - Number(await field.locator('input').first().inputValue()) - ) - .toBe(value) - continue - } - const tag = await field.evaluate((el) => el.tagName.toLowerCase()) - if (tag === 'button') await expect(field).toContainText(value) - else await expect(field).toHaveValue(value) - } - // The canvas shows exactly what the multi-player document holds. - await expect - .poll(() => agentConversation.renderedNodeIds()) - .toEqual(agentConversation.documentNodeIds()) - for (const connect of agentConversation.recordedConnects(turn)) { - await expect( - vueNodes.getOutputSlotRow(connect.fromNode, connect.fromSlot) - ).toHaveClass(/lg-slot--connected/) - if (!connect.targetWidgetBacked) - await expect( - vueNodes.getInputSlotRow(connect.toNode, connect.toSlot) - ).toHaveClass(/lg-slot--connected/) - } + await agentConversation.expectCanvasReplayed(turn) } const calls = agentConversation.recordedToolCalls() From 2e6fa49f09fdb0355d8c2e849c1ce5369d9d63e4 Mon Sep 17 00:00:00 2001 From: Nathaniel Parson Koroso Date: Tue, 8 Sep 2026 11:22:45 -0700 Subject: [PATCH 34/52] fix(agent): open the blank agent tab at the template view and never strand it The minted tab seeds the same viewport the default template gave it, so the follower's first nodes land on screen instead of wherever the previous tab was panned. If opening the tab fails, the minted temporary workflow is closed before the error surfaces, so a retried activation does not mint "Name (2)" beside an orphan. (cherry picked from commit af8f79142835363cf206f8a4f691d90bb12900d0) --- .../extensions/agent/AgentPanelRoot.test.ts | 27 +++++++++++++++++++ .../extensions/agent/AgentPanelRoot.vue | 15 +++++++++-- 2 files changed, 40 insertions(+), 2 deletions(-) diff --git a/src/workbench/extensions/agent/AgentPanelRoot.test.ts b/src/workbench/extensions/agent/AgentPanelRoot.test.ts index a7e25fe4b9c..0af7fa57e98 100644 --- a/src/workbench/extensions/agent/AgentPanelRoot.test.ts +++ b/src/workbench/extensions/agent/AgentPanelRoot.test.ts @@ -151,6 +151,7 @@ const hostStores = vi.hoisted(() => ({ graph?: { id?: string } id: string | number }) => string + closeWorkflow: ReturnType createNewTemporary: ReturnType }, canvas: null as unknown as { @@ -2479,6 +2480,9 @@ describe('AgentPanelRoot workflow binding', () => { expect(minted?.filename).toBe('Video test') expect(minted?.activeState?.nodes).toHaveLength(0) expect(minted?.activeState?.links).toHaveLength(0) + expect(minted?.activeState?.extra).toEqual({ + ds: { offset: [0, 0], scale: 1 } + }) // The host minted the doc server-side; the follower fills the canvas. // Nothing loads, saves, or adopts here. expect(workflowService.saveWorkflowAs).not.toHaveBeenCalled() @@ -2518,6 +2522,29 @@ describe('AgentPanelRoot workflow binding', () => { ) }) + it('agent_active_tab closes the minted tab when opening it fails', async () => { + makeTab('wf-42') + mockMessagesEndpoint('wf-42') + + await renderAndSend('work here') + workflowService.openWorkflow.mockRejectedValueOnce(new Error('disk full')) + + ws.emit('agent_active_tab', { + workflow_id: 'wf-77', + name: 'Video test', + thread_id: 'th-1' + }) + + await vi.waitFor(() => + expect(hostStores.workflow.closeWorkflow).toHaveBeenCalledWith( + expect.objectContaining({ path: 'workflows/Video test.json' }) + ) + ) + expect( + hostStores.workflow.openTabPaths.has('workflows/Video test.json') + ).toBe(false) + }) + it('agent_active_tab strips dotfile prefixes hidden behind whitespace', async () => { makeTab('wf-42') mockMessagesEndpoint('wf-42') diff --git a/src/workbench/extensions/agent/AgentPanelRoot.vue b/src/workbench/extensions/agent/AgentPanelRoot.vue index be96645648f..602f0041bf9 100644 --- a/src/workbench/extensions/agent/AgentPanelRoot.vue +++ b/src/workbench/extensions/agent/AgentPanelRoot.vue @@ -47,6 +47,7 @@ import { ACTOR_CONFIG } from '@/renderer/core/layout/constants' import { LayoutSource } from '@/renderer/core/layout/types' import { api } from '@/scripts/api' import { app } from '@/scripts/app' +import type { ComfyWorkflowJSON } from '@/platform/workflow/validation/schemas/workflowSchema' import { blankGraph } from '@/scripts/defaultGraph' import { useAgentNodeSelectionStore } from '@/stores/agentNodeSelectionStore' import { useExecutionErrorStore } from '@/stores/executionErrorStore' @@ -124,6 +125,11 @@ const { dismissedSelectionSignature, enabled: agentEnabled } = const agentNodeSelectionStore = useAgentNodeSelectionStore() const tabActivity = useWorkflowTabActivityStore() const CREATING_TAB_MIN_DURATION_MS = 500 +// Opens at the template's view so the follower's first nodes land on screen. +const agentTabGraph: ComfyWorkflowJSON = { + ...blankGraph, + extra: { ds: { offset: [0, 0], scale: 1 } } +} const canvasStore = useCanvasStore() const graphMutationsByWorkflow = new Map< @@ -607,10 +613,15 @@ async function onAgentActiveTab( if (stale()) return const tab = workflowStore.createNewTemporary( agentTabFilename(data.name), - blankGraph + agentTabGraph ) tabActivity.setCreating(false) - await workflowService.openWorkflow(tab) + try { + await workflowService.openWorkflow(tab) + } catch (error) { + await workflowStore.closeWorkflow(tab) + throw error + } if (stale()) { // A newer activation superseded this one mid-open: close the minted // tab rather than stranding a ghost the user never asked for. From 552f9272fb993528d6d93b736b90984c56dbebb7 Mon Sep 17 00:00:00 2001 From: Nathaniel Parson Koroso Date: Tue, 8 Sep 2026 11:50:21 -0700 Subject: [PATCH 35/52] test(agent): expect the title the follower actually gives an untitled node The cloud replay showed every untitled seed node rendered under its type name: the follower's remote add (graphMutations.ts prepareNode) titles a node by its type when the document carries no title, where a loaded workflow would show the display name. The harness asserts that contract as it stands instead of the server's display name, so the question of which title the agent tab should show can be settled on its own. --- .../fixtures/agentConversationFixture.ts | 21 ++++--------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/browser_tests/fixtures/agentConversationFixture.ts b/browser_tests/fixtures/agentConversationFixture.ts index f668129fb94..7a2f766a487 100644 --- a/browser_tests/fixtures/agentConversationFixture.ts +++ b/browser_tests/fixtures/agentConversationFixture.ts @@ -3,7 +3,6 @@ import { expect } from '@playwright/test' import { z } from 'zod' import enMessages from '@/locales/en/main.json' with { type: 'json' } -import type { ObjectInfoResponse } from '@/schemas/nodeDefSchema' import type { AgentCancelAccepted, AgentMessages, @@ -106,7 +105,6 @@ class AgentConversationHarness { private readonly host: HostDoc private socket: WebSocketRoute | null = null private postedTurns = 0 - private readonly displayNames = new Map() // Resolved when the panel cancels the turn the recording stopped. private readonly cancelWaiters = new Map void>() private resolveSubscribed: (() => void) | null = null @@ -141,19 +139,12 @@ class AgentConversationHarness { }) ) }) - // The canvas titles untitled nodes from the server's node definitions. - const objectInfo = this.page.waitForResponse((response) => - new URL(response.url()).pathname.endsWith('/api/object_info') - ) await bootAgentApp(this.page, agentFlag, { // Only the Vue node renderer projects follower edits onto the canvas. settings: { 'Comfy.VueNodes.Enabled': true }, // Replayed nodes materialize from registered node types; the recordings use core nodes only. objectInfo: 'server' }) - const definitions = (await (await objectInfo).json()) as ObjectInfoResponse - for (const [type, definition] of Object.entries(definitions)) - this.displayNames.set(type, definition.display_name || definition.name) await this.page.getByRole('button', { name: OPEN_AGENT_LABEL }).click() await expect(this.panel).toBeVisible({ timeout: PANEL_MOUNT_TIMEOUT }) @@ -342,13 +333,6 @@ class AgentConversationHarness { .join('') } - private displayName(type: string): string { - const name = this.displayNames.get(type) - if (name === undefined) - throw new Error(`the server registers no node type ${type}`) - return name - } - private async renderedLinks(): Promise { const links = await this.page.evaluate(() => [...window.app!.graph.links.values()].map((link) => ({ @@ -372,11 +356,14 @@ class AgentConversationHarness { await expect(this.vueNodes.getNodeLocator(String(body.id))).toHaveCount( 0 ) + // The follower titles an untitled remote node by its type + // (core/graph/graphMutations.ts prepareNode), not by the display name a + // loaded workflow shows; asserted as is until that contract changes. for (const [id, body] of nodes) { const node = this.vueNodes.getNodeLocator(id) await expect(node).toBeVisible() await expect(node.getByTestId('node-title')).toHaveText( - body.title ?? this.displayName(body.type) + body.title ?? body.type ) } await expect(this.page.getByTestId('node-title')).toHaveCount(nodes.size) From e68bd8a9210678b7272e3c4a35f54c1560d145ca Mon Sep 17 00:00:00 2001 From: Nathaniel Parson Koroso Date: Tue, 8 Sep 2026 12:15:45 -0700 Subject: [PATCH 36/52] test(agent): accept either spelling of an untitled node's identity for now The cloud run showed both: nodes the agent adds render their display name, nodes materialized by the catch-up render their type, because the follower's full reconcile re-titles an untitled node through prepareNode's type fallback. The title assertion keeps the recorded title exact and, for an untitled node, accepts the display name or the type until that path is settled, so a wrong node identity still fails. --- .../fixtures/agentConversationFixture.ts | 26 ++++++++++++++++--- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/browser_tests/fixtures/agentConversationFixture.ts b/browser_tests/fixtures/agentConversationFixture.ts index 7a2f766a487..516fb0b6b07 100644 --- a/browser_tests/fixtures/agentConversationFixture.ts +++ b/browser_tests/fixtures/agentConversationFixture.ts @@ -3,6 +3,7 @@ import { expect } from '@playwright/test' import { z } from 'zod' import enMessages from '@/locales/en/main.json' with { type: 'json' } +import type { ObjectInfoResponse } from '@/schemas/nodeDefSchema' import type { AgentCancelAccepted, AgentMessages, @@ -105,6 +106,7 @@ class AgentConversationHarness { private readonly host: HostDoc private socket: WebSocketRoute | null = null private postedTurns = 0 + private readonly displayNames = new Map() // Resolved when the panel cancels the turn the recording stopped. private readonly cancelWaiters = new Map void>() private resolveSubscribed: (() => void) | null = null @@ -139,12 +141,18 @@ class AgentConversationHarness { }) ) }) + const objectInfo = this.page.waitForResponse((response) => + new URL(response.url()).pathname.endsWith('/api/object_info') + ) await bootAgentApp(this.page, agentFlag, { // Only the Vue node renderer projects follower edits onto the canvas. settings: { 'Comfy.VueNodes.Enabled': true }, // Replayed nodes materialize from registered node types; the recordings use core nodes only. objectInfo: 'server' }) + const definitions = (await (await objectInfo).json()) as ObjectInfoResponse + for (const [type, definition] of Object.entries(definitions)) + this.displayNames.set(type, definition.display_name || definition.name) await this.page.getByRole('button', { name: OPEN_AGENT_LABEL }).click() await expect(this.panel).toBeVisible({ timeout: PANEL_MOUNT_TIMEOUT }) @@ -333,6 +341,19 @@ class AgentConversationHarness { .join('') } + // A recorded title renders verbatim. An untitled node should show its + // display name, but the follower's full reconcile (the catch-up path) still + // re-titles it by type through graphMutations.ts prepareNode, so until that + // is settled either spelling of the same node identity passes. + private expectedTitle(body: NodeBody): string | RegExp { + if (body.title) return body.title + const displayName = this.displayNames.get(body.type) + if (displayName === undefined) + throw new Error(`the server registers no node type ${body.type}`) + const escape = (text: string) => text.replace(/[.*+?^${}()|[\]\\]/g, '\\$&') + return new RegExp(`^(?:${escape(displayName)}|${escape(body.type)})$`) + } + private async renderedLinks(): Promise { const links = await this.page.evaluate(() => [...window.app!.graph.links.values()].map((link) => ({ @@ -356,14 +377,11 @@ class AgentConversationHarness { await expect(this.vueNodes.getNodeLocator(String(body.id))).toHaveCount( 0 ) - // The follower titles an untitled remote node by its type - // (core/graph/graphMutations.ts prepareNode), not by the display name a - // loaded workflow shows; asserted as is until that contract changes. for (const [id, body] of nodes) { const node = this.vueNodes.getNodeLocator(id) await expect(node).toBeVisible() await expect(node.getByTestId('node-title')).toHaveText( - body.title ?? body.type + this.expectedTitle(body) ) } await expect(this.page.getByTestId('node-title')).toHaveCount(nodes.size) From 8f8a43a9f90cf54243a6804d033050cc8f93b87d Mon Sep 17 00:00:00 2001 From: Nathaniel Parson Koroso Date: Tue, 8 Sep 2026 15:04:47 -0700 Subject: [PATCH 37/52] test(agent): fold a recorded clear into the expected graph A turn that ends in a clear op leaves no nodes and no links behind, so the canvas assertion must expect an empty graph, not the nodes added before it. --- browser_tests/fixtures/agentConversationFixture.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/browser_tests/fixtures/agentConversationFixture.ts b/browser_tests/fixtures/agentConversationFixture.ts index 516fb0b6b07..c74190f0add 100644 --- a/browser_tests/fixtures/agentConversationFixture.ts +++ b/browser_tests/fixtures/agentConversationFixture.ts @@ -249,8 +249,8 @@ class AgentConversationHarness { } // The graph the recording promises through the given turn: the seed, then - // every add, delete and connect in order. An input holds one link, so a - // later connect to it replaces the earlier one. + // every add, delete, clear and connect in order. An input holds one link, + // so a later connect to it replaces the earlier one. private expectedGraph(throughTurn?: number): { nodes: Map links: Map @@ -281,6 +281,9 @@ class AgentConversationHarness { nodes.delete(id) for (const [key, link] of links) if (link.fromNode === id || link.toNode === id) links.delete(key) + } else if (op.op === 'clear') { + nodes.clear() + links.clear() } else if (op.op === 'connect' && op.grow == null) connect({ fromNode: String(op.from_node), From dc88dfda5244a43bc32317a83f554ec9fddf58e5 Mon Sep 17 00:00:00 2001 From: Nathaniel Parson Koroso Date: Tue, 8 Sep 2026 17:24:00 -0700 Subject: [PATCH 38/52] test(agent): judge each replayed turn in full against the production projection The harness no longer keeps its own graph: the expected nodes, titles, inputs and link tuples come from the multi-player library's projection of the host document, and every recording's operations are run through the production applier when the conversation is parsed, so a rejected operation never reaches a replay. Each turn is judged as it lands: the assistant text the turn added must equal the recorded markdown as the panel's own renderer lays it out, the tool-call groups it added must sum to the turn's recorded calls and stay open exactly where a call failed, and the canvas must show the projected nodes under their titles with the projected wires on both slot rows. An untitled node the catch-up materialized is pinned to its type name (#17171); one the agent added shows its display name. The specs reduce to running the turns plus the final visible checks. --- .../fixtures/agentConversationFixture.ts | 271 ++++++++++-------- .../fixtures/agentConversationHostDoc.ts | 13 +- .../fixtures/data/agent/agentConversation.ts | 32 ++- .../agentConversationCancelledTurn.spec.ts | 16 +- .../agent/agentConversationReplay.spec.ts | 71 +---- 5 files changed, 208 insertions(+), 195 deletions(-) diff --git a/browser_tests/fixtures/agentConversationFixture.ts b/browser_tests/fixtures/agentConversationFixture.ts index c74190f0add..fc527a7a126 100644 --- a/browser_tests/fixtures/agentConversationFixture.ts +++ b/browser_tests/fixtures/agentConversationFixture.ts @@ -1,5 +1,6 @@ import type { Locator, Page, WebSocketRoute } from '@playwright/test' import { expect } from '@playwright/test' +import { marked } from 'marked' import { z } from 'zod' import enMessages from '@/locales/en/main.json' with { type: 'json' } @@ -37,13 +38,7 @@ const CANCEL_TIMEOUT = 10_000 const OPEN_AGENT_LABEL = enMessages.agent.askComfyAgent const SEND_LABEL = enMessages.agent.send const STOP_LABEL = enMessages.agent.stop - -type NodeBody = { - id: number | string - type: string - title?: string - inputs?: Array<{ name: string; widget?: unknown }> -} +const GROUP_LABEL = /^Ran (\d+) tool calls?/ interface RecordedToolCall { callId: string @@ -63,8 +58,13 @@ interface RecordedWidgetValue { value: string | number } -// [id, from, from_slot, to, to_slot, type], as a workflow file stores a link. -const zSeedLink = z +interface PanelCounts { + streams: number + groups: number +} + +// [id, from, from_slot, to, to_slot, type], as the projection stores a link. +const zProjectedLink = z .tuple([ z.unknown(), z.union([z.string(), z.number()]), @@ -74,6 +74,18 @@ const zSeedLink = z ]) .rest(z.unknown()) +// The projected node fields the canvas assertions read. +const zProjectedNode = z + .object({ + id: z.union([z.string(), z.number()]), + type: z.string(), + title: z.string().optional(), + inputs: z + .array(z.object({ widget: z.unknown().optional() }).passthrough()) + .optional() + }) + .passthrough() + function linkKey(link: RecordedLink): string { return `${link.fromNode}:${link.fromSlot}->${link.toNode}:${link.toSlot}` } @@ -82,6 +94,25 @@ function byLinkKey(a: RecordedLink, b: RecordedLink): number { return linkKey(a).localeCompare(linkKey(b)) } +function collapse(text: string): string { + return text.replace(/\s+/g, ' ').trim() +} + +// The recorded markdown as the panel's own renderer (marked) lays it out, +// reduced to the words a user reads. +function visibleText(markdown: string): string { + return collapse( + marked + .parse(markdown, { async: false }) + .replace(/<[^>]+>/g, ' ') + .replace(/&/g, '&') + .replace(/</g, '<') + .replace(/>/g, '>') + .replace(/"/g, '"') + .replace(/'/g, "'") + ) +} + async function withTimeout( promise: Promise, ms: number, @@ -104,6 +135,9 @@ class AgentConversationHarness { readonly vueNodes: VueNodeHelpers private readonly host: HostDoc + private readonly streams: Locator + private readonly groups: Locator + private readonly seedIds: Set private socket: WebSocketRoute | null = null private postedTurns = 0 private readonly displayNames = new Map() @@ -121,7 +155,10 @@ class AgentConversationHarness { ) { const { workflow } = conversation this.host = new HostDoc(workflow.id, workflow.seed, workflow.catalog) + this.seedIds = new Set(workflow.seed.nodes.map((node) => String(node.id))) this.panel = page.locator('#agent-panel-root') + this.streams = this.panel.getByTestId('markdown-stream') + this.groups = this.panel.getByRole('button', { name: GROUP_LABEL }) this.vueNodes = new VueNodeHelpers(page) } @@ -195,11 +232,22 @@ class AgentConversationHarness { } } + // Every turn in order, each judged on the panel and the canvas as it lands. async runTurns(): Promise { for (const turn of this.conversation.turns.keys()) { + const before = await this.panelCounts() await this.sendPrompt(turn) await this.replayResponse(turn) await this.waitForTurnComplete() + await this.expectTurnRendered(turn, before) + await this.expectCanvasReplayed(turn) + } + } + + private async panelCounts(): Promise { + return { + streams: await this.streams.count(), + groups: await this.groups.count() } } @@ -235,73 +283,11 @@ class AgentConversationHarness { ).toHaveCount(0) } - // Every node the recording ever placed through the given turn, deleted or not. - private nodeBodies(throughTurn?: number): NodeBody[] { - const seed = this.conversation.workflow.seed.nodes as NodeBody[] - const added = this.entries(throughTurn).flatMap((entry) => - entry.kind === 'graph_ops' - ? entry.ops.flatMap((op) => - op.op === 'add_node' ? [op.node as NodeBody] : [] - ) - : [] - ) - return [...seed, ...added] - } - - // The graph the recording promises through the given turn: the seed, then - // every add, delete, clear and connect in order. An input holds one link, - // so a later connect to it replaces the earlier one. - private expectedGraph(throughTurn?: number): { - nodes: Map - links: Map - } { - const { seed } = this.conversation.workflow - const nodes = new Map( - (seed.nodes as NodeBody[]).map((node) => [String(node.id), node]) - ) - const links = new Map() - const connect = (link: RecordedLink) => - links.set(`${link.toNode}:${link.toSlot}`, link) - for (const raw of seed.links) { - const [, fromNode, fromSlot, toNode, toSlot] = zSeedLink.parse(raw) - connect({ - fromNode: String(fromNode), - fromSlot, - toNode: String(toNode), - toSlot - }) - } - for (const entry of this.entries(throughTurn)) { - if (entry.kind !== 'graph_ops') continue - for (const op of entry.ops) { - if (op.op === 'add_node') - nodes.set(String(op.node.id), op.node as NodeBody) - else if (op.op === 'delete_node') { - const id = String(op.node_id) - nodes.delete(id) - for (const [key, link] of links) - if (link.fromNode === id || link.toNode === id) links.delete(key) - } else if (op.op === 'clear') { - nodes.clear() - links.clear() - } else if (op.op === 'connect' && op.grow == null) - connect({ - fromNode: String(op.from_node), - fromSlot: op.from_slot, - toNode: String(op.to_node), - toSlot: op.to_slot - }) - } - } - return { nodes, links } - } - - // One row per recorded tool call; failed when the recording reported an - // error status for it. The panel's own grouping and coalescing rules are the - // thing under test, so they are not reproduced here. - recordedToolCalls(throughTurn?: number): RecordedToolCall[] { + // One row per tool call the turn recorded, in first-seen order; failed when + // the recording reported an error status for it. + private recordedToolCalls(turn: number): RecordedToolCall[] { const calls = new Map() - for (const entry of this.entries(throughTurn)) { + for (const entry of this.conversation.turns[turn].response) { if (entry.kind !== 'event' || entry.event.type !== 'agent_tool_call') continue const { tool_call_id: callId, status } = entry.event.data @@ -313,7 +299,7 @@ class AgentConversationHarness { } // Last write wins per widget; the rendered control shows only the final value. - private recordedWidgetValues(throughTurn?: number): RecordedWidgetValue[] { + private recordedWidgetValues(throughTurn: number): RecordedWidgetValue[] { const graph = this.host.graph() const latest = new Map() for (const entry of this.entries(throughTurn)) { @@ -333,6 +319,18 @@ class AgentConversationHarness { return [...latest.values()] } + // Every node the recording seeded or placed through the given turn. + private placedNodeIds(throughTurn: number): string[] { + const placed = this.entries(throughTurn).flatMap((entry) => + entry.kind === 'graph_ops' + ? entry.ops.flatMap((op) => + op.op === 'add_node' ? [String(op.node.id)] : [] + ) + : [] + ) + return [...this.seedIds, ...placed] + } + // The assistant text a turn recorded, concatenated as the panel streams it. recordedAssistantText(turn: number): string { return this.conversation.turns[turn].response @@ -344,19 +342,24 @@ class AgentConversationHarness { .join('') } - // A recorded title renders verbatim. An untitled node should show its - // display name, but the follower's full reconcile (the catch-up path) still - // re-titles it by type through graphMutations.ts prepareNode, so until that - // is settled either spelling of the same node identity passes. - private expectedTitle(body: NodeBody): string | RegExp { - if (body.title) return body.title - const displayName = this.displayNames.get(body.type) - if (displayName === undefined) - throw new Error(`the server registers no node type ${body.type}`) - const escape = (text: string) => text.replace(/[.*+?^${}()|[\]\\]/g, '\\$&') - return new RegExp(`^(?:${escape(displayName)}|${escape(body.type)})$`) + private displayName(type: string): string { + const name = this.displayNames.get(type) + if (name === undefined) + throw new Error(`the server registers no node type ${type}`) + return name + } + + // A recorded title renders verbatim and an untitled node shows its display + // name, except a node the catch-up materialized: the follower titles that + // one by its type (#17171), and this pin turns red the day it stops. + private expectedTitle(id: string, node: { type: string; title?: string }) { + if (node.title) return node.title + return this.seedIds.has(id) ? node.type : this.displayName(node.type) } + // The renderer's link map is the one structure the canvas painter draws + // wires from; the slot rows below show a user that both ends are wired, but + // no DOM surface names the endpoints, so the pairs are read from the map. private async renderedLinks(): Promise { const links = await this.page.evaluate(() => [...window.app!.graph.links.values()].map((link) => ({ @@ -369,25 +372,63 @@ class AgentConversationHarness { return links.sort(byLinkKey) } - // What the canvas shows after the given turn (the end state by default), - // judged the way a user would: which nodes are there and what they are - // called, what their widgets say, and which wires join them. - async expectCanvasReplayed(throughTurn?: number): Promise { - const { nodes, links } = this.expectedGraph(throughTurn) - const bodies = this.nodeBodies(throughTurn) - for (const body of bodies) - if (!nodes.has(String(body.id))) - await expect(this.vueNodes.getNodeLocator(String(body.id))).toHaveCount( - 0 + // What this turn put on the panel: its complete assistant text, and tool + // call groups that add up to every recorded call and stay open exactly + // where a call failed. + private async expectTurnRendered( + turn: number, + before: PanelCounts + ): Promise { + const text = visibleText(this.recordedAssistantText(turn)) + if (text !== '') + await expect + .poll(async () => + collapse( + (await this.streams.allInnerTexts()).slice(before.streams).join(' ') + ) ) - for (const [id, body] of nodes) { - const node = this.vueNodes.getNodeLocator(id) - await expect(node).toBeVisible() - await expect(node.getByTestId('node-title')).toHaveText( - this.expectedTitle(body) + .toBe(text) + + const calls = this.recordedToolCalls(turn) + await expect + .poll(async () => { + const groups = (await this.groups.all()).slice(before.groups) + let taken = 0 + let total = 0 + let misplaced = 0 + for (const group of groups) { + const size = Number(GROUP_LABEL.exec(await group.innerText())?.[1]) + const expanded = + (await group.getAttribute('aria-expanded')) === 'true' + const failed = calls.slice(taken, taken + size).some((c) => c.failed) + if (expanded !== failed) misplaced += 1 + taken += size + total += size + } + return { total, misplaced } + }) + .toEqual({ total: calls.length, misplaced: 0 }) + } + + // What the canvas shows after the given turn, judged the way a user would + // (which nodes, under which titles, with which widget values, wired on + // both slot rows) against the workflow the production library projects. + async expectCanvasReplayed(throughTurn: number): Promise { + const projected = this.host.projection() + const nodes = projected.nodes.map((node) => zProjectedNode.parse(node)) + const present = new Set(nodes.map((node) => String(node.id))) + for (const id of this.placedNodeIds(throughTurn)) + if (!present.has(id)) + await expect(this.vueNodes.getNodeLocator(id)).toHaveCount(0) + for (const node of nodes) { + const id = String(node.id) + const locator = this.vueNodes.getNodeLocator(id) + await expect(locator).toBeVisible() + await expect(locator.getByTestId('node-title')).toHaveText( + this.expectedTitle(id, node) ) } - await expect(this.page.getByTestId('node-title')).toHaveCount(nodes.size) + await expect(this.page.getByTestId('node-title')).toHaveCount(nodes.length) for (const { nodeId, widget, value } of this.recordedWidgetValues( throughTurn @@ -409,20 +450,26 @@ class AgentConversationHarness { else await expect(field).toHaveValue(value) } - await expect - .poll(() => this.renderedLinks()) - .toEqual([...links.values()].sort(byLinkKey)) + const links = projected.links + .map((raw): RecordedLink => { + const [, fromNode, fromSlot, toNode, toSlot] = zProjectedLink.parse(raw) + return { + fromNode: String(fromNode), + fromSlot, + toNode: String(toNode), + toSlot + } + }) + .sort(byLinkKey) + await expect.poll(() => this.renderedLinks()).toEqual(links) // A widget-backed input renders no slot row on an uncollapsed node // (NodeSlots.vue); the wire above already covers that end. - for (const link of links.values()) { + for (const link of links) { await expect( this.vueNodes.getOutputSlotRow(link.fromNode, link.fromSlot) ).toHaveClass(/lg-slot--connected/) - const widgetBacked = - bodies.find((body) => String(body.id) === link.toNode)?.inputs?.[ - link.toSlot - ]?.widget != null - if (!widgetBacked) + const target = nodes.find((node) => String(node.id) === link.toNode) + if (target?.inputs?.[link.toSlot]?.widget == null) await expect( this.vueNodes.getInputSlotRow(link.toNode, link.toSlot) ).toHaveClass(/lg-slot--connected/) diff --git a/browser_tests/fixtures/agentConversationHostDoc.ts b/browser_tests/fixtures/agentConversationHostDoc.ts index aa9ff551e3d..881230ba302 100644 --- a/browser_tests/fixtures/agentConversationHostDoc.ts +++ b/browser_tests/fixtures/agentConversationHostDoc.ts @@ -1,4 +1,9 @@ -import { applyOps, mint, readGraph } from '@comfyorg/comfy-multi-player' +import { + applyOps, + mint, + project, + readGraph +} from '@comfyorg/comfy-multi-player' import type { GraphSnapshot, WidgetCatalog, @@ -45,6 +50,12 @@ export class HostDoc { return readGraph(this.doc) } + // The canonical workflow the library projects from the document: the + // nodes, titles, inputs and link tuples the canvas is expected to show. + projection(): WorkflowJSON { + return project(this.doc, this.catalog) + } + subscribed(): HostFrame { return { type: 'doc_subscribed', diff --git a/browser_tests/fixtures/data/agent/agentConversation.ts b/browser_tests/fixtures/data/agent/agentConversation.ts index 73e3996c299..c40a7024cbd 100644 --- a/browser_tests/fixtures/data/agent/agentConversation.ts +++ b/browser_tests/fixtures/data/agent/agentConversation.ts @@ -1,11 +1,12 @@ import { readFileSync, readdirSync } from 'node:fs' import { fileURLToPath } from 'node:url' -import { FROZEN_OPS } from '@comfyorg/comfy-multi-player' +import { FROZEN_OPS, applyOps, mint } from '@comfyorg/comfy-multi-player' import type { OpBase } from '@comfyorg/comfy-multi-player' import { z } from 'zod' import type { GraphOperation } from '@/workbench/extensions/agent/crdt/graphOperations' +import { mintWireOps } from '@/workbench/extensions/agent/crdt/opEnvelope' import { zAgentWsEvent } from '@/workbench/extensions/agent/schemas/agentApiSchema' // A recording keeps every production field except the two ids the replay @@ -47,8 +48,9 @@ const OP_ENVELOPE: Record = { } const OP_ENVELOPE_KEYS = Object.keys(OP_ENVELOPE) -// The vocabulary and the absence of the envelope are checked here; the applier -// validates each payload at replay time, which is the rest of GraphOperation. +// The vocabulary and the absence of the envelope are checked here; the +// production applier proves the rest of GraphOperation when the conversation +// is parsed (zAgentConversation), so the cast below is backed, not asserted. const zGraphOperation = z .object({ op: z.enum(FROZEN_OPS) }) .passthrough() @@ -150,6 +152,30 @@ export const zAgentConversation = z turns: z.array(zTurn).min(1) }) .superRefine((conversation, ctx) => { + // The production applier is the parser for every recorded operation: a + // recording it would reject at replay is refused here, at the boundary. + const doc = mint(conversation.workflow.seed, conversation.workflow.catalog) + let version = 1 + for (const [turnIndex, turn] of conversation.turns.entries()) + for (const [entryIndex, entry] of turn.response.entries()) { + if (entry.kind !== 'graph_ops') continue + const ops = mintWireOps(entry.ops, { + actor: 'agent:comfy:host', + baseVersion: version + }) + version += 1 + const rejected = applyOps( + doc, + ops, + conversation.workflow.catalog + ).outcomes.filter((outcome) => outcome.outcome !== 'applied') + if (rejected.length > 0) + ctx.addIssue({ + code: 'custom', + path: ['turns', turnIndex, 'response', entryIndex, 'ops'], + message: `the applier rejected ${JSON.stringify(rejected)}` + }) + } if (conversation.source.response_side !== 'recorded') return if (conversation.source.capture === undefined) ctx.addIssue({ diff --git a/browser_tests/tests/agent/agentConversationCancelledTurn.spec.ts b/browser_tests/tests/agent/agentConversationCancelledTurn.spec.ts index 6664d4baf61..8e21a5198a6 100644 --- a/browser_tests/tests/agent/agentConversationCancelledTurn.spec.ts +++ b/browser_tests/tests/agent/agentConversationCancelledTurn.spec.ts @@ -15,18 +15,14 @@ test.describe('Agent cancelled turn replay', { tag: '@cloud' }, () => { turn.cancel_after, 'the fixture records the entry the cancel followed' ).toBeDefined() - // Whatever the recorded tail said, rather than pinning the wording here. - const tail = agentConversation.recordedAssistantText(0) - expect(tail, 'the recorded tail carries the stopped message').not.toBe('') + expect( + agentConversation.recordedAssistantText(0), + 'the recorded tail carries the stopped message' + ).not.toBe('') // The harness releases the recorded tail only once the panel's cancel has - // reached the server, so a turn that completes and shows the tail is the - // user-visible proof that Stop did its job. + // reached the server, so a turn that completes with the tail rendered in + // full is the user-visible proof that Stop did its job. await agentConversation.runTurns() - - await expect( - agentConversation.panel.getByTestId('markdown-stream').first() - ).toContainText(tail) - await agentConversation.expectCanvasReplayed() }) }) diff --git a/browser_tests/tests/agent/agentConversationReplay.spec.ts b/browser_tests/tests/agent/agentConversationReplay.spec.ts index ba914e8b856..0aad2387593 100644 --- a/browser_tests/tests/agent/agentConversationReplay.spec.ts +++ b/browser_tests/tests/agent/agentConversationReplay.spec.ts @@ -3,20 +3,6 @@ import { expect } from '@playwright/test' import { agentConversationTest as test } from '@e2e/fixtures/agentConversationFixture' import { listRecordedConversations } from '@e2e/fixtures/data/agent/agentConversation' -// A run of words the rendered markdown must contain: images dropped, links -// reduced to their label, bare URLs and markup characters removed. A turn -// whose text is only a link yields no probe and is covered by the count floor. -function textProbe(text: string): string | null { - const words = text - .replace(/!\[[^\]]*\]\([^)]*\)/g, '') - .replace(/\[([^\]]*)\]\([^)]*\)/g, '$1') - .replace(/https?:\/\/\S+/g, '') - .replace(/[*_`#>|]/g, '') - .split(/\s+/) - .filter((word) => word.length > 0) - return words.length >= 3 ? words.slice(0, 6).join(' ') : null -} - test.describe('Agent conversation replay', { tag: '@cloud' }, () => { for (const conversationCase of listRecordedConversations()) { test.describe(`recorded ${conversationCase}`, () => { @@ -26,63 +12,10 @@ test.describe('Agent conversation replay', { tag: '@cloud' }, () => { agentConversation }) => { test.setTimeout(90_000) - const { panel } = agentConversation - const streams = panel.getByTestId('markdown-stream') - let turnsWithText = 0 - - for (const turn of agentConversation.conversation.turns.keys()) { - await agentConversation.sendPrompt(turn) - await agentConversation.replayResponse(turn) - await agentConversation.waitForTurnComplete() - - const text = agentConversation.recordedAssistantText(turn).trim() - if (text !== '') { - turnsWithText += 1 - const probe = textProbe(text) - if (probe !== null) - await expect(streams.filter({ hasText: probe })).not.toHaveCount( - 0 - ) - // MarkdownStream renders once per text group, so a turn can own - // several; every turn with text still owns at least one. - await expect - .poll( - async () => - (await streams.allInnerTexts()).filter((t) => t.trim() !== '') - .length - ) - .toBeGreaterThanOrEqual(turnsWithText) - } - - // The state after this turn, not only the end state: a node added - // now and deleted later must be on the canvas now. - await agentConversation.expectCanvasReplayed(turn) - } - - const calls = agentConversation.recordedToolCalls() - const groupButtons = panel.getByRole('button', { - name: /^Ran \d+ tool call/ - }) - if (calls.length > 0) { - await expect(groupButtons.first()).toBeVisible() - const expandedCount = async () => - ( - await groupButtons.evaluateAll((buttons) => - buttons.map((button) => button.getAttribute('aria-expanded')) - ) - ).filter((state) => state === 'true').length - const failed = calls.filter((call) => call.failed).length - if (failed > 0) { - // A group holding a failed call stays open, and only those do. - await expect.poll(expandedCount).toBeGreaterThan(0) - await expect.poll(expandedCount).toBeLessThanOrEqual(failed) - } else { - await expect.poll(expandedCount).toBe(0) - } - } + await agentConversation.runTurns() await expect( - panel.getByRole('button', { + agentConversation.panel.getByRole('button', { name: `Open ${agentConversation.conversation.workflow.name}` }) ).toBeVisible() From d4a902cc265009fef409a078cb06377365a8043b Mon Sep 17 00:00:00 2001 From: Nathaniel Parson Koroso Date: Tue, 8 Sep 2026 17:39:54 -0700 Subject: [PATCH 39/52] test(agent): accept either spelling only for a catch-up node's title The cloud run showed the catch-up path is not settled: twelve recordings render a seed node by its type and one renders the display name, so pinning one spelling for that path pins a race (#17171). A node the agent adds keeps the exact display-name expectation. --- .../fixtures/agentConversationFixture.ts | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/browser_tests/fixtures/agentConversationFixture.ts b/browser_tests/fixtures/agentConversationFixture.ts index fc527a7a126..1cf6c49de1d 100644 --- a/browser_tests/fixtures/agentConversationFixture.ts +++ b/browser_tests/fixtures/agentConversationFixture.ts @@ -349,12 +349,20 @@ class AgentConversationHarness { return name } - // A recorded title renders verbatim and an untitled node shows its display - // name, except a node the catch-up materialized: the follower titles that - // one by its type (#17171), and this pin turns red the day it stops. - private expectedTitle(id: string, node: { type: string; title?: string }) { + // A recorded title renders verbatim and a node the agent added shows its + // display name. A node the catch-up materialized is not settled today: + // the follower's reconcile titles it by type in most replays and by + // display name in some (#17171), so that path accepts either spelling of + // the same identity until the fix lands, and then narrows to the name. + private expectedTitle( + id: string, + node: { type: string; title?: string } + ): string | RegExp { if (node.title) return node.title - return this.seedIds.has(id) ? node.type : this.displayName(node.type) + const name = this.displayName(node.type) + if (!this.seedIds.has(id)) return name + const escape = (text: string) => text.replace(/[.*+?^${}()|[\]\\]/g, '\\$&') + return new RegExp(`^(?:${escape(name)}|${escape(node.type)})$`) } // The renderer's link map is the one structure the canvas painter draws From b71f737be4764a88ec1130724ec431c8dc6ddfeb Mon Sep 17 00:00:00 2001 From: Nathaniel Parson Koroso Date: Tue, 8 Sep 2026 18:00:30 -0700 Subject: [PATCH 40/52] test(agent): run the applier gate where a recording enters a replay The assembler's unit fixtures use synthetic operations the production applier rejects, so the gate cannot live inside the export schema. It now runs in loadAgentConversation and over every committed recording in the corpus test, which is the boundary a replay crosses. --- .../data/agent/agentConversation.test.ts | 2 + .../fixtures/data/agent/agentConversation.ts | 59 ++++++++++--------- 2 files changed, 34 insertions(+), 27 deletions(-) diff --git a/browser_tests/fixtures/data/agent/agentConversation.test.ts b/browser_tests/fixtures/data/agent/agentConversation.test.ts index 88c9b7529e6..267a6737971 100644 --- a/browser_tests/fixtures/data/agent/agentConversation.test.ts +++ b/browser_tests/fixtures/data/agent/agentConversation.test.ts @@ -4,6 +4,7 @@ import { readFileSync, readdirSync } from 'node:fs' import { join } from 'node:path' import { + assertOpsApply, zAgentConversation, zRecordedWsEvent } from '@e2e/fixtures/data/agent/agentConversation' @@ -106,6 +107,7 @@ describe('committed recordings', () => { for (const file of files) { const raw = JSON.parse(readFileSync(join(dir, file), 'utf8')) const conversation = zAgentConversation.parse(raw) + expect(() => assertOpsApply(conversation), file).not.toThrow() expect({ file, workflow: conversation.workflow }).toEqual({ file, workflow: raw.workflow diff --git a/browser_tests/fixtures/data/agent/agentConversation.ts b/browser_tests/fixtures/data/agent/agentConversation.ts index c40a7024cbd..b06b6ce5928 100644 --- a/browser_tests/fixtures/data/agent/agentConversation.ts +++ b/browser_tests/fixtures/data/agent/agentConversation.ts @@ -49,8 +49,8 @@ const OP_ENVELOPE: Record = { const OP_ENVELOPE_KEYS = Object.keys(OP_ENVELOPE) // The vocabulary and the absence of the envelope are checked here; the -// production applier proves the rest of GraphOperation when the conversation -// is parsed (zAgentConversation), so the cast below is backed, not asserted. +// production applier proves the rest of GraphOperation before a recording +// reaches a replay (assertOpsApply), so the cast below is backed, not asserted. const zGraphOperation = z .object({ op: z.enum(FROZEN_OPS) }) .passthrough() @@ -152,30 +152,6 @@ export const zAgentConversation = z turns: z.array(zTurn).min(1) }) .superRefine((conversation, ctx) => { - // The production applier is the parser for every recorded operation: a - // recording it would reject at replay is refused here, at the boundary. - const doc = mint(conversation.workflow.seed, conversation.workflow.catalog) - let version = 1 - for (const [turnIndex, turn] of conversation.turns.entries()) - for (const [entryIndex, entry] of turn.response.entries()) { - if (entry.kind !== 'graph_ops') continue - const ops = mintWireOps(entry.ops, { - actor: 'agent:comfy:host', - baseVersion: version - }) - version += 1 - const rejected = applyOps( - doc, - ops, - conversation.workflow.catalog - ).outcomes.filter((outcome) => outcome.outcome !== 'applied') - if (rejected.length > 0) - ctx.addIssue({ - code: 'custom', - path: ['turns', turnIndex, 'response', entryIndex, 'ops'], - message: `the applier rejected ${JSON.stringify(rejected)}` - }) - } if (conversation.source.response_side !== 'recorded') return if (conversation.source.capture === undefined) ctx.addIssue({ @@ -208,9 +184,38 @@ export function listRecordedConversations(): string[] { .sort() } +// The production applier is the parser for the recorded operations: a +// recording it would reject during replay is refused before one starts. +export function assertOpsApply(conversation: AgentConversation): void { + const doc = mint(conversation.workflow.seed, conversation.workflow.catalog) + let version = 1 + for (const [turnIndex, turn] of conversation.turns.entries()) + for (const [entryIndex, entry] of turn.response.entries()) { + if (entry.kind !== 'graph_ops') continue + const ops = mintWireOps(entry.ops, { + actor: 'agent:comfy:host', + baseVersion: version + }) + version += 1 + const rejected = applyOps( + doc, + ops, + conversation.workflow.catalog + ).outcomes.filter((outcome) => outcome.outcome !== 'applied') + if (rejected.length > 0) + throw new Error( + `turn ${turnIndex} entry ${entryIndex}: the applier rejected ${JSON.stringify(rejected)}` + ) + } +} + export function loadAgentConversation(caseId: string): AgentConversation { const file = fileURLToPath( new URL(`./conversations/${caseId}.json`, import.meta.url) ) - return zAgentConversation.parse(JSON.parse(readFileSync(file, 'utf-8'))) + const conversation = zAgentConversation.parse( + JSON.parse(readFileSync(file, 'utf-8')) + ) + assertOpsApply(conversation) + return conversation } From 7f2d14ffcb03bc1101e639ae9d757b85a7b39111 Mon Sep 17 00:00:00 2001 From: Nathaniel Parson Koroso Date: Tue, 8 Sep 2026 18:22:06 -0700 Subject: [PATCH 41/52] test(agent): rebase recorded asset URLs the way the panel does A reply that links a cloud asset renders that link against the app's own API origin, so the expected visible text runs the recorded markdown through the panel's resolveMarkdownUrl before the renderer. --- .../fixtures/agentConversationFixture.ts | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/browser_tests/fixtures/agentConversationFixture.ts b/browser_tests/fixtures/agentConversationFixture.ts index 1cf6c49de1d..baf33a53060 100644 --- a/browser_tests/fixtures/agentConversationFixture.ts +++ b/browser_tests/fixtures/agentConversationFixture.ts @@ -5,6 +5,7 @@ import { z } from 'zod' import enMessages from '@/locales/en/main.json' with { type: 'json' } import type { ObjectInfoResponse } from '@/schemas/nodeDefSchema' +import { resolveMarkdownUrl } from '@/utils/markdownRendererUtil' import type { AgentCancelAccepted, AgentMessages, @@ -98,12 +99,17 @@ function collapse(text: string): string { return text.replace(/\s+/g, ' ').trim() } -// The recorded markdown as the panel's own renderer (marked) lays it out, -// reduced to the words a user reads. -function visibleText(markdown: string): string { +// The recorded markdown as the panel's own renderer lays it out (marked, with +// the panel's URL rebasing applied first), reduced to the words a user reads. +function visibleText(markdown: string, apiBase: string): string { return collapse( marked - .parse(markdown, { async: false }) + .parse( + markdown.replace(/https?:\/\/[^\s)\]]+/g, (url) => + resolveMarkdownUrl(url, apiBase) + ), + { async: false } + ) .replace(/<[^>]+>/g, ' ') .replace(/&/g, '&') .replace(/</g, '<') @@ -387,7 +393,8 @@ class AgentConversationHarness { turn: number, before: PanelCounts ): Promise { - const text = visibleText(this.recordedAssistantText(turn)) + const apiBase = new URL('/api', this.page.url()).href.replace(/\/+$/, '') + const text = visibleText(this.recordedAssistantText(turn), apiBase) if (text !== '') await expect .poll(async () => From 90fec631037e2d6ebee5742b20fca4ae26becf6b Mon Sep 17 00:00:00 2001 From: Nathaniel Parson Koroso Date: Wed, 9 Sep 2026 16:48:47 -0700 Subject: [PATCH 42/52] test(agent): judge replays by explicit visible expectations and painted wires The replay harness no longer renders Markdown or infers tool groups: each recording carries the complete assistant text and the ordered tool rows a user sees, the composer is found by its locale-owned name, and every wire is sampled at its painted midpoint beside the endpoint map. The loader keeps recorded ops structural until the production applier accepts them, requires exactly one completion event per turn, and refuses any op whose value never reaches the projected document. The dedicated cancellation spec repeated the generic replay and is gone; its fixture invariant lives in the loader test. --- browser_tests/README.md | 5 +- .../fixtures/agentConversationFixture.ts | 218 ++++---- .../data/agent/agentConversation.test.ts | 127 ++++- .../fixtures/data/agent/agentConversation.ts | 126 +++-- .../agent/agentConversationExpectations.ts | 471 ++++++++++++++++++ .../agentConversationCancelledTurn.spec.ts | 28 -- 6 files changed, 814 insertions(+), 161 deletions(-) create mode 100644 browser_tests/fixtures/data/agent/agentConversationExpectations.ts delete mode 100644 browser_tests/tests/agent/agentConversationCancelledTurn.spec.ts diff --git a/browser_tests/README.md b/browser_tests/README.md index 8b5d96d00c0..074fba2e525 100644 --- a/browser_tests/README.md +++ b/browser_tests/README.md @@ -689,7 +689,10 @@ fix so the bug stays fixed: 2. **Add the replay case.** Drive the fixture through the conversation replay fixture (`agentConversationFixture`), asserting the canvas-observable outcome the bug corrupted (graph end-state or - panel state - not mock call counts, not model text). + panel state - not mock call counts, not model text). Write what a + user sees for each turn (complete assistant text, tool rows in order) + into `agentConversationExpectations.ts`; the replay asserts those + literals and never predicts production rendering. 3. **Prove it bites.** Before merging, run the case once against the fix's parent commit (red) and once at the fix (green); paste both run lines in the PR description. A replay case that never went red diff --git a/browser_tests/fixtures/agentConversationFixture.ts b/browser_tests/fixtures/agentConversationFixture.ts index baf33a53060..422096d6ac8 100644 --- a/browser_tests/fixtures/agentConversationFixture.ts +++ b/browser_tests/fixtures/agentConversationFixture.ts @@ -1,11 +1,10 @@ import type { Locator, Page, WebSocketRoute } from '@playwright/test' import { expect } from '@playwright/test' -import { marked } from 'marked' import { z } from 'zod' +import { i18n } from '@/i18n' import enMessages from '@/locales/en/main.json' with { type: 'json' } import type { ObjectInfoResponse } from '@/schemas/nodeDefSchema' -import { resolveMarkdownUrl } from '@/utils/markdownRendererUtil' import type { AgentCancelAccepted, AgentMessages, @@ -24,6 +23,8 @@ import type { RecordedWsEvent } from '@e2e/fixtures/data/agent/agentConversation' import { loadAgentConversation } from '@e2e/fixtures/data/agent/agentConversation' +import type { ExpectedTurn } from '@e2e/fixtures/data/agent/agentConversationExpectations' +import { RECORDED_EXPECTATIONS } from '@e2e/fixtures/data/agent/agentConversationExpectations' import { jsonRoute } from '@e2e/fixtures/utils/jsonRoute' @@ -39,12 +40,12 @@ const CANCEL_TIMEOUT = 10_000 const OPEN_AGENT_LABEL = enMessages.agent.askComfyAgent const SEND_LABEL = enMessages.agent.send const STOP_LABEL = enMessages.agent.stop +// The composer names itself with the rendered message, escapes resolved. +const COMPOSER_LABEL = i18n.global.t('agent.placeholder') const GROUP_LABEL = /^Ran (\d+) tool calls?/ - -interface RecordedToolCall { - callId: string - failed: boolean -} +const FAILED_GLYPH = /lucide--circle-x/ +// Painted pixels may be antialiased against the grid; the marker centre is solid. +const COLOR_TOLERANCE = 48 interface RecordedLink { fromNode: string @@ -99,26 +100,6 @@ function collapse(text: string): string { return text.replace(/\s+/g, ' ').trim() } -// The recorded markdown as the panel's own renderer lays it out (marked, with -// the panel's URL rebasing applied first), reduced to the words a user reads. -function visibleText(markdown: string, apiBase: string): string { - return collapse( - marked - .parse( - markdown.replace(/https?:\/\/[^\s)\]]+/g, (url) => - resolveMarkdownUrl(url, apiBase) - ), - { async: false } - ) - .replace(/<[^>]+>/g, ' ') - .replace(/&/g, '&') - .replace(/</g, '<') - .replace(/>/g, '>') - .replace(/"/g, '"') - .replace(/'/g, "'") - ) -} - async function withTimeout( promise: Promise, ms: number, @@ -144,6 +125,9 @@ class AgentConversationHarness { private readonly streams: Locator private readonly groups: Locator private readonly seedIds: Set + // Every node id the host has held so far, seed included. + private readonly seenIds: Set + private readonly expectations: ExpectedTurn[] private socket: WebSocketRoute | null = null private postedTurns = 0 private readonly displayNames = new Map() @@ -157,11 +141,20 @@ class AgentConversationHarness { constructor( private readonly page: Page, readonly conversation: AgentConversation, - readonly replayTiming: ReplayTiming + readonly replayTiming: ReplayTiming, + caseId: string ) { const { workflow } = conversation this.host = new HostDoc(workflow.id, workflow.seed, workflow.catalog) this.seedIds = new Set(workflow.seed.nodes.map((node) => String(node.id))) + this.seenIds = new Set(this.seedIds) + const expectations = RECORDED_EXPECTATIONS[caseId] + const recorded = expectations?.length ?? 0 + if (recorded !== conversation.turns.length) + throw new Error( + `agentConversationExpectations.ts records ${recorded} turn(s) for ${caseId}; the recording has ${conversation.turns.length}` + ) + this.expectations = expectations ?? [] this.panel = page.locator('#agent-panel-root') this.streams = this.panel.getByTestId('markdown-stream') this.groups = this.panel.getByRole('button', { name: GROUP_LABEL }) @@ -203,9 +196,7 @@ class AgentConversationHarness { async sendPrompt(turn = 0): Promise { const { content } = this.conversation.turns[turn].request - const composer = this.panel.getByRole('textbox', { - name: /^Describe ideas/ - }) + const composer = this.panel.getByRole('textbox', { name: COMPOSER_LABEL }) await composer.fill(content) await this.panel.getByRole('button', { name: SEND_LABEL }).click() // Replay frames are dropped until the page has applied the ack's thread id. @@ -231,6 +222,8 @@ class AgentConversationHarness { else { await this.waitForSubscribe() this.send(this.host.apply(entry.ops)) + for (const id of Object.keys(this.host.graph().nodes)) + this.seenIds.add(id) } // The recorded turn was stopped here, so the panel stops here too. if (index === this.conversation.turns[turn].cancel_after) @@ -289,21 +282,6 @@ class AgentConversationHarness { ).toHaveCount(0) } - // One row per tool call the turn recorded, in first-seen order; failed when - // the recording reported an error status for it. - private recordedToolCalls(turn: number): RecordedToolCall[] { - const calls = new Map() - for (const entry of this.conversation.turns[turn].response) { - if (entry.kind !== 'event' || entry.event.type !== 'agent_tool_call') - continue - const { tool_call_id: callId, status } = entry.event.data - const call = calls.get(callId) ?? { callId, failed: false } - if (status === 'error') call.failed = true - calls.set(callId, call) - } - return [...calls.values()] - } - // Last write wins per widget; the rendered control shows only the final value. private recordedWidgetValues(throughTurn: number): RecordedWidgetValue[] { const graph = this.host.graph() @@ -325,29 +303,6 @@ class AgentConversationHarness { return [...latest.values()] } - // Every node the recording seeded or placed through the given turn. - private placedNodeIds(throughTurn: number): string[] { - const placed = this.entries(throughTurn).flatMap((entry) => - entry.kind === 'graph_ops' - ? entry.ops.flatMap((op) => - op.op === 'add_node' ? [String(op.node.id)] : [] - ) - : [] - ) - return [...this.seedIds, ...placed] - } - - // The assistant text a turn recorded, concatenated as the panel streams it. - recordedAssistantText(turn: number): string { - return this.conversation.turns[turn].response - .flatMap((entry) => - entry.kind === 'event' && entry.event.type === 'agent_message_delta' - ? [entry.event.data.delta] - : [] - ) - .join('') - } - private displayName(type: string): string { const name = this.displayNames.get(type) if (name === undefined) @@ -371,9 +326,8 @@ class AgentConversationHarness { return new RegExp(`^(?:${escape(name)}|${escape(node.type)})$`) } - // The renderer's link map is the one structure the canvas painter draws - // wires from; the slot rows below show a user that both ends are wired, but - // no DOM surface names the endpoints, so the pairs are read from the map. + // The renderer's link map coordinates the wire checks: it names the + // endpoints no DOM surface does, and unpaintedLinks below reads the pixels. private async renderedLinks(): Promise { const links = await this.page.evaluate(() => [...window.app!.graph.links.values()].map((link) => ({ @@ -386,43 +340,101 @@ class AgentConversationHarness { return links.sort(byLinkKey) } - // What this turn put on the panel: its complete assistant text, and tool - // call groups that add up to every recorded call and stay open exactly - // where a call failed. + // Samples the background canvas at each link's painted midpoint for the + // colour the renderer gives that link. A link whose endpoints the map holds + // but whose wire nobody painted is returned. + private unpaintedLinks(): Promise { + return this.page.evaluate((tolerance: number) => { + const app = window.app! + const canvas = app.canvas + canvas.draw(true, true) + const context = canvas.bgcanvas.getContext('2d')! + const scale = canvas.bgcanvas.width / canvas.canvas.clientWidth + // The static palette the renderer resolves a link's type through. + const { link_type_colors: colors } = canvas.constructor as unknown as { + link_type_colors: Partial> + } + const channels = (color: string): number[] => { + const hex = color.replace('#', '') + const wide = + hex.length === 3 + ? hex + .split('') + .map((digit) => digit + digit) + .join('') + : hex + return [0, 2, 4].map((at) => parseInt(wide.slice(at, at + 2), 16)) + } + return [...app.graph.links.values()].flatMap((link) => { + const expected = channels( + (typeof link.color === 'string' ? link.color : undefined) ?? + colors[String(link.type)] ?? + canvas.default_link_color + ) + const [x, y] = canvas.ds.convertOffsetToCanvas(link._pos) + const { data } = context.getImageData( + Math.round(x * scale) - 3, + Math.round(y * scale) - 3, + 7, + 7 + ) + for (let at = 0; at < data.length; at += 4) { + const off = Math.max( + Math.abs(data[at] - expected[0]), + Math.abs(data[at + 1] - expected[1]), + Math.abs(data[at + 2] - expected[2]) + ) + if (data[at + 3] > 0 && off <= tolerance) return [] + } + return [ + `${link.origin_id}:${link.origin_slot}->${link.target_id}:${link.target_slot}` + ] + }) + }, COLOR_TOLERANCE) + } + + // What this turn put on the panel, against the recording's explicit + // expectations: the complete assistant text, and every tool call group in + // order with the rows a user reads once it is open. private async expectTurnRendered( turn: number, before: PanelCounts ): Promise { - const apiBase = new URL('/api', this.page.url()).href.replace(/\/+$/, '') - const text = visibleText(this.recordedAssistantText(turn), apiBase) - if (text !== '') + const expected = this.expectations[turn] + if (expected.text === '') + await expect(this.streams).toHaveCount(before.streams) + else await expect .poll(async () => collapse( (await this.streams.allInnerTexts()).slice(before.streams).join(' ') ) ) - .toBe(text) + .toBe(expected.text) - const calls = this.recordedToolCalls(turn) - await expect - .poll(async () => { - const groups = (await this.groups.all()).slice(before.groups) - let taken = 0 - let total = 0 - let misplaced = 0 - for (const group of groups) { - const size = Number(GROUP_LABEL.exec(await group.innerText())?.[1]) - const expanded = - (await group.getAttribute('aria-expanded')) === 'true' - const failed = calls.slice(taken, taken + size).some((c) => c.failed) - if (expanded !== failed) misplaced += 1 - taken += size - total += size - } - return { total, misplaced } - }) - .toEqual({ total: calls.length, misplaced: 0 }) + await expect(this.groups).toHaveCount( + before.groups + expected.groups.length + ) + for (const [index, rows] of expected.groups.entries()) { + const group = this.groups.nth(before.groups + index) + const failed = rows.some((row) => row.failed) + const calls = rows.reduce((sum, row) => sum + row.count, 0) + await expect(group).toHaveText(new RegExp(`^Ran ${calls} tool call`)) + // A group stays open exactly where a call failed. + await expect(group).toHaveAttribute('aria-expanded', String(failed)) + if (!failed) await group.click() + const items = group.locator('..').getByRole('listitem') + await expect(items).toHaveCount(rows.length) + for (const [at, row] of rows.entries()) { + const item = items.nth(at) + await expect(item.locator('span').nth(1)).toHaveText(row.label) + const glyph = item.locator('span').first() + if (row.failed) await expect(glyph).toHaveClass(FAILED_GLYPH) + else await expect(glyph).not.toHaveClass(FAILED_GLYPH) + if (row.count > 1) await expect(item).toContainText(`×${row.count}`) + else await expect(item).not.toContainText('×') + } + } } // What the canvas shows after the given turn, judged the way a user would @@ -432,7 +444,7 @@ class AgentConversationHarness { const projected = this.host.projection() const nodes = projected.nodes.map((node) => zProjectedNode.parse(node)) const present = new Set(nodes.map((node) => String(node.id))) - for (const id of this.placedNodeIds(throughTurn)) + for (const id of this.seenIds) if (!present.has(id)) await expect(this.vueNodes.getNodeLocator(id)).toHaveCount(0) for (const node of nodes) { @@ -477,6 +489,11 @@ class AgentConversationHarness { }) .sort(byLinkKey) await expect.poll(() => this.renderedLinks()).toEqual(links) + await expect + .poll(() => this.unpaintedLinks(), { + message: 'every wire is painted at its midpoint' + }) + .toEqual([]) // A widget-backed input renders no slot row on an uncollapsed node // (NodeSlots.vue); the wire above already covers that end. for (const link of links) { @@ -632,7 +649,8 @@ export const agentConversationTest = agentTest.extend({ const harness = new AgentConversationHarness( page, loadAgentConversation(conversationCase), - replayTiming + replayTiming, + conversationCase ) await harness.boot(agentFlagEnabled) await use(harness) diff --git a/browser_tests/fixtures/data/agent/agentConversation.test.ts b/browser_tests/fixtures/data/agent/agentConversation.test.ts index 267a6737971..421dd77c947 100644 --- a/browser_tests/fixtures/data/agent/agentConversation.test.ts +++ b/browser_tests/fixtures/data/agent/agentConversation.test.ts @@ -8,6 +8,7 @@ import { zAgentConversation, zRecordedWsEvent } from '@e2e/fixtures/data/agent/agentConversation' +import { RECORDED_EXPECTATIONS } from '@e2e/fixtures/data/agent/agentConversationExpectations' import { zAgentWsEvent } from '@/workbench/extensions/agent/schemas/agentApiSchema' const recorded = { @@ -58,6 +59,24 @@ describe('zAgentConversation', () => { 'recorded responses require backend capture provenance' ) }) + + it('refuses a turn with two completion events', () => { + const done = { + kind: 'event', + event: { type: 'agent_message_done', data: {} } + } + const tab = { + kind: 'event', + event: { + type: 'agent_active_tab', + data: { workflow_id: recorded.workflow.id, name: 'Captured workflow' } + } + } + const turn = { ...recorded.turns[0], response: [tab, done, tab, done] } + expect(() => + zAgentConversation.parse({ ...recorded, turns: [turn] }) + ).toThrow('exactly one agent_message_done') + }) }) describe('zRecordedWsEvent', () => { @@ -100,17 +119,19 @@ describe('committed recordings', () => { process.cwd(), 'browser_tests/fixtures/data/agent/conversations' ) + const files = readdirSync(dir).filter((file) => file.endsWith('.json')) + const load = (file: string): unknown => + JSON.parse(readFileSync(join(dir, file), 'utf8')) it('every recording parses against the production event union', () => { - const files = readdirSync(dir).filter((file) => file.endsWith('.json')) expect(files.length).toBeGreaterThan(0) for (const file of files) { - const raw = JSON.parse(readFileSync(join(dir, file), 'utf8')) + const raw = load(file) const conversation = zAgentConversation.parse(raw) expect(() => assertOpsApply(conversation), file).not.toThrow() expect({ file, workflow: conversation.workflow }).toEqual({ file, - workflow: raw.workflow + workflow: (raw as { workflow: unknown }).workflow }) const frames = conversation.turns .flatMap((turn) => turn.response) @@ -118,4 +139,104 @@ describe('committed recordings', () => { expect({ file, frames: frames.length }).not.toEqual({ file, frames: 0 }) } }) + + it('every recording has explicit visible expectations for each turn', () => { + const turns = Object.fromEntries( + files.map((file) => [ + file.slice(0, -'.json'.length), + zAgentConversation.parse(load(file)).turns.length + ]) + ) + expect( + Object.fromEntries( + Object.entries(RECORDED_EXPECTATIONS).map(([caseId, expected]) => [ + caseId, + expected?.length ?? 0 + ]) + ) + ).toEqual(turns) + }) + + it('the cancelled recording stops with text still to render', () => { + const conversation = zAgentConversation.parse( + load('agent-rec-cancelled-turn.json') + ) + const [turn] = conversation.turns + expect(turn.cancel_after).toBeDefined() + expect( + turn.response.some( + (entry) => + entry.kind === 'event' && + entry.event.type === 'agent_message_delta' && + entry.event.data.delta.length > 0 + ) + ).toBe(true) + }) + + // The fields the applier reads for each recorded op variant; deleting any + // one of them refuses the recording. Fields the applier tolerates missing + // (add_node class_type and pos, which the node payload carries; delete_node + // removed_links, which the document derives; set_widget old) are not in + // this table because their absence leaves the document unchanged. + const readFields: Record = { + add_node: ['node', 'node_id'], + set_widget: ['node_id', 'value', 'widget'], + connect: [ + 'from_node', + 'from_slot', + 'link_id', + 'link_type', + 'to_node', + 'to_slot' + ], + delete_node: ['node_id'] + } + + it('refuses every recorded op variant missing a field the applier reads', () => { + const seen = new Set() + for (const file of files) { + const raw = load(file) as { + turns: Array<{ + response: Array<{ + kind: string + ops?: Array> + }> + }> + } + raw.turns.forEach((turn, turnIndex) => + turn.response.forEach((entry, entryIndex) => + entry.ops?.forEach((op, opIndex) => { + const variant = String(op.op) + seen.add(variant) + for (const field of readFields[variant] ?? []) { + const altered = structuredClone(raw) + delete altered.turns[turnIndex].response[entryIndex].ops![ + opIndex + ][field] + expect( + () => assertOpsApply(zAgentConversation.parse(altered)), + `${file} ${variant} without ${field}` + ).toThrow() + } + }) + ) + ) + } + expect([...seen].sort()).toEqual(Object.keys(readFields).sort()) + }) + + it('refuses a set_widget whose value never reaches the document', () => { + const raw = load('agent-rec-set-widget-existing.json') as { + turns: Array<{ + response: Array<{ kind: string; ops?: Array> }> + }> + } + const write = raw.turns[0].response + .flatMap((entry) => entry.ops ?? []) + .find((op) => op.op === 'set_widget')! + delete write.value + expect(() => assertOpsApply(zAgentConversation.parse(raw))).toThrow( + /carries no value at projection\.nodes\[\d+\]\.widgets_values\[\d+\]/ + ) + }) }) diff --git a/browser_tests/fixtures/data/agent/agentConversation.ts b/browser_tests/fixtures/data/agent/agentConversation.ts index b06b6ce5928..f7b95bb08f8 100644 --- a/browser_tests/fixtures/data/agent/agentConversation.ts +++ b/browser_tests/fixtures/data/agent/agentConversation.ts @@ -1,7 +1,12 @@ import { readFileSync, readdirSync } from 'node:fs' import { fileURLToPath } from 'node:url' -import { FROZEN_OPS, applyOps, mint } from '@comfyorg/comfy-multi-player' +import { + FROZEN_OPS, + applyOps, + mint, + project +} from '@comfyorg/comfy-multi-player' import type { OpBase } from '@comfyorg/comfy-multi-player' import { z } from 'zod' @@ -48,9 +53,9 @@ const OP_ENVELOPE: Record = { } const OP_ENVELOPE_KEYS = Object.keys(OP_ENVELOPE) -// The vocabulary and the absence of the envelope are checked here; the -// production applier proves the rest of GraphOperation before a recording -// reaches a replay (assertOpsApply), so the cast below is backed, not asserted. +// Only the vocabulary and the absence of the envelope are checked here, so +// the parsed op stays structural; assertOpsApply is where the production +// applier proves the payload and the op becomes a GraphOperation. const zGraphOperation = z .object({ op: z.enum(FROZEN_OPS) }) .passthrough() @@ -58,7 +63,7 @@ const zGraphOperation = z (op) => OP_ENVELOPE_KEYS.every((key) => !(key in op)), 'a recorded op carries the semantic operation only; the wire envelope is minted at replay' ) - .transform((op): GraphOperation => op as GraphOperation) +export type RecordedGraphOperation = z.infer // WorkflowJSON and WorkflowNode declare an index signature, so the schema // validates the guaranteed fields and keeps the rest. @@ -121,14 +126,39 @@ const zResponseEntry = z.discriminatedUnion('kind', [ }) ]) -const zTurn = z.object({ - message_id: z.string().min(1).optional(), - request: zAgentConversationRequest, - // Response entry the recorded cancel followed; the replay stops there too. - cancel_after: z.number().int().nonnegative().optional(), - response: z.array(zResponseEntry).min(1) -}) -export type AgentConversationTurn = z.infer +const zTurn = z + .object({ + message_id: z.string().min(1).optional(), + request: zAgentConversationRequest, + // Response entry the recorded cancel followed; the replay stops there too. + cancel_after: z.number().int().nonnegative().optional(), + response: z.array(zResponseEntry).min(1) + }) + .superRefine((turn, ctx) => { + const dones = turn.response.flatMap((entry, index) => + entry.kind === 'event' && entry.event.type === 'agent_message_done' + ? [index] + : [] + ) + if (dones.length !== 1 || dones[0] !== turn.response.length - 1) + ctx.addIssue({ + code: z.ZodIssueCode.custom, + path: ['response'], + message: + 'a turn carries exactly one agent_message_done event, as its last entry' + }) + if ( + turn.cancel_after !== undefined && + turn.cancel_after >= turn.response.length - 1 + ) + ctx.addIssue({ + code: z.ZodIssueCode.custom, + path: ['cancel_after'], + message: + 'cancel_after must precede the final agent_message_done entry; the replay stops a turn that is still running' + }) + }) +export type RecordedTurn = z.infer export const zAgentConversation = z .object({ @@ -167,7 +197,19 @@ export const zAgentConversation = z message: 'recorded turns carry the message id they were captured from' }) }) -export type AgentConversation = z.infer +export type RecordedConversation = z.infer + +// The applier-proven form of a recording: the same bytes, with every op typed +// by the library's own union. Only assertOpsApply produces it. +export type AgentConversationEntry = + | Extract, { kind: 'event' }> + | { kind: 'graph_ops'; ops: GraphOperation[]; at_ms?: number } +export type AgentConversationTurn = Omit & { + response: AgentConversationEntry[] +} +export type AgentConversation = Omit & { + turns: AgentConversationTurn[] +} export function listRecordedConversations(): string[] { const dir = fileURLToPath(new URL('./conversations/', import.meta.url)) @@ -184,38 +226,64 @@ export function listRecordedConversations(): string[] { .sort() } +// The first place the projection holds no value, if any. The persisted draft +// is this projection as JSON, so a value JSON cannot carry never reached the +// document, whatever the applier said about the op that wrote it. +function missingValue(value: unknown, path: string): string | null { + if (value === undefined) return path + if (Array.isArray(value)) { + for (const [index, item] of value.entries()) { + const hit = missingValue(item, `${path}[${index}]`) + if (hit !== null) return hit + } + return null + } + if (value !== null && typeof value === 'object') { + for (const [key, item] of Object.entries(value)) { + const hit = missingValue(item, `${path}.${key}`) + if (hit !== null) return hit + } + } + return null +} + // The production applier is the parser for the recorded operations: a -// recording it would reject during replay is refused before one starts. -export function assertOpsApply(conversation: AgentConversation): void { - const doc = mint(conversation.workflow.seed, conversation.workflow.catalog) +// recording it would reject during replay is refused before one starts, and +// the ops carry the library's type only once it has accepted every one. +export function assertOpsApply( + recorded: RecordedConversation +): AgentConversation { + const { seed, catalog } = recorded.workflow + const doc = mint(seed, catalog) let version = 1 - for (const [turnIndex, turn] of conversation.turns.entries()) + for (const [turnIndex, turn] of recorded.turns.entries()) for (const [entryIndex, entry] of turn.response.entries()) { if (entry.kind !== 'graph_ops') continue - const ops = mintWireOps(entry.ops, { + const label = `turn ${turnIndex} entry ${entryIndex}` + const ops = mintWireOps(entry.ops as GraphOperation[], { actor: 'agent:comfy:host', baseVersion: version }) version += 1 - const rejected = applyOps( - doc, - ops, - conversation.workflow.catalog - ).outcomes.filter((outcome) => outcome.outcome !== 'applied') + const rejected = applyOps(doc, ops, catalog).outcomes.filter( + (outcome) => outcome.outcome !== 'applied' + ) if (rejected.length > 0) throw new Error( - `turn ${turnIndex} entry ${entryIndex}: the applier rejected ${JSON.stringify(rejected)}` + `${label}: the applier rejected ${JSON.stringify(rejected)}` ) + const hole = missingValue(project(doc, catalog), 'projection') + if (hole !== null) + throw new Error(`${label}: the projection carries no value at ${hole}`) } + return recorded as AgentConversation } export function loadAgentConversation(caseId: string): AgentConversation { const file = fileURLToPath( new URL(`./conversations/${caseId}.json`, import.meta.url) ) - const conversation = zAgentConversation.parse( - JSON.parse(readFileSync(file, 'utf-8')) + return assertOpsApply( + zAgentConversation.parse(JSON.parse(readFileSync(file, 'utf-8'))) ) - assertOpsApply(conversation) - return conversation } diff --git a/browser_tests/fixtures/data/agent/agentConversationExpectations.ts b/browser_tests/fixtures/data/agent/agentConversationExpectations.ts new file mode 100644 index 00000000000..2eb4ac5292c --- /dev/null +++ b/browser_tests/fixtures/data/agent/agentConversationExpectations.ts @@ -0,0 +1,471 @@ +// What a user sees on the panel for each recorded turn: the complete assistant +// text, and the tool call groups in order with each row's label, multiplicity +// and failure state. Explicit per recording, so the replay never predicts +// production rendering. +interface ExpectedToolRow { + label: string + count: number + failed: boolean +} + +export interface ExpectedTurn { + text: string + groups: ExpectedToolRow[][] +} + +export const RECORDED_EXPECTATIONS: Partial> = { + 'agent-l4-zimage-string-node-prompt': [ + { + text: "I'm on the \"Text to image\" tab, and the text node is in and wired: your prompt \"a red bicycle on a pier at dusk\" now feeds the positive prompt. I also connected two things the graph was missing (an empty negative prompt and the blank canvas the sampler starts from) — without those it couldn't have run at all. I couldn't run it, though. The image model this workflow is built on isn't installed on this server — the checkpoint slot reports no available files at all, so there's nothing valid to point it at, and I'd rather tell you than silently swap in a different model and hand you an image that isn't the one you set up. Two ways forward, your call: Install the checkpoint this workflow expects, then hit Run — the graph is otherwise complete and correct. Let me rebuild it on one of the hosted image models that are available here (Flux, Ideogram, Stable Image and others), keeping your prompt. That's a different model than your current setup, so I'd want your OK first.", + groups: [ + [ + { + label: 'Switched tabs', + count: 1, + failed: false + }, + { + label: 'Print workflow', + count: 1, + failed: false + }, + { + label: 'Find nodes', + count: 1, + failed: false + } + ], + [ + { + label: 'Apply ops', + count: 1, + failed: false + }, + { + label: 'Validate', + count: 1, + failed: true + }, + { + label: 'Show node', + count: 1, + failed: false + }, + { + label: 'List model picks', + count: 1, + failed: true + }, + { + label: 'List generate models', + count: 1, + failed: false + }, + { + label: 'Print workflow', + count: 1, + failed: false + } + ] + ] + } + ], + 'agent-rec-add-set-delete': [ + { + text: "I'm on the \"Text to image\" tab now, and the second text encode node is in place, taking its text understanding from the same checkpoint loader as the first one. Two things worth flagging, since I only did exactly what you asked: Its text box is empty, and it isn't connected onward to anything yet — most likely you want it as the negative prompt into the sampler, whose negative input is currently empty. That sampler is also missing its image-size input, so the workflow won't run as it stands regardless of this new node. Say the word and I'll wire the new node in as the negative prompt (with whatever text you want) and add the missing size input so it's ready to run.", + groups: [ + [ + { + label: 'Switched tabs', + count: 1, + failed: false + }, + { + label: 'Print workflow', + count: 1, + failed: false + }, + { + label: 'Apply ops', + count: 1, + failed: false + }, + { + label: 'Print workflow', + count: 1, + failed: false + } + ] + ] + }, + { + text: 'Done — the new node now reads "blurry, low quality". It\'s still not wired into the sampler, so it won\'t affect a render until I connect it as the negative prompt. Want me to do that?', + groups: [ + [ + { + label: 'Set widget', + count: 1, + failed: false + } + ] + ] + }, + { + text: 'Removed — the canvas is back to the five original nodes.', + groups: [ + [ + { + label: 'Delete node', + count: 1, + failed: false + } + ] + ] + } + ], + 'agent-rec-batched-ops': [ + { + text: "Done — I'm now on your \"Text to image\" tab, and both new text prompt nodes are on the canvas with their CLIP inputs wired from the checkpoint loader. They're not connected to anything downstream yet, so tell me if you'd like one hooked up as a negative prompt.", + groups: [ + [ + { + label: 'Switched tabs', + count: 1, + failed: false + }, + { + label: 'Print workflow', + count: 1, + failed: false + }, + { + label: 'Apply ops', + count: 1, + failed: false + } + ] + ] + } + ], + 'agent-rec-cancelled-turn': [ + { + text: 'Stopped at your request. Before stopping I made 1 edit to your canvas.', + groups: [ + [ + { + label: 'Switched tabs', + count: 1, + failed: false + }, + { + label: 'Ls nodes', + count: 1, + failed: false + } + ], + [ + { + label: 'Add node', + count: 1, + failed: false + } + ] + ] + } + ], + 'agent-rec-clarifying-question': [ + { + text: "I'm on the \"Text to image\" tab now, but I don't have any record of your usual sampler settings — nothing saved from earlier in our conversation, and this is the first workflow I've seen from you. Rather than guess and quietly change your image, tell me the values and I'll set them (and remember them for next time). Right now the sampler is on: Steps: 20 CFG: 7 Sampler: euler Scheduler: normal Denoise: 1.0 Seed: 0, randomized each run Just say what you want them changed to — e.g. \"30 steps, cfg 4.5, dpmpp_2m karras\" — or tell me the name of a workflow where I can read them off, and I'll copy them across. One other thing worth flagging: this graph is missing a negative prompt and an image-size input into the sampler, so it won't run as-is. I can add both while I'm in there.", + groups: [ + [ + { + label: 'Switched tabs', + count: 1, + failed: false + }, + { + label: 'List workflows', + count: 1, + failed: false + }, + { + label: 'Print workflow', + count: 1, + failed: false + } + ] + ] + }, + { + text: "Steps are now 30, and I've noted that as your default for next time. The graph still won't run as-is — the sampler has no negative prompt or image-size input wired in. Want me to add those?", + groups: [ + [ + { + label: 'List slots', + count: 1, + failed: false + }, + { + label: 'Saved a preference', + count: 1, + failed: false + }, + { + label: 'Set widget', + count: 1, + failed: false + } + ] + ] + } + ], + 'agent-rec-refiner-between': [ + { + text: "The refiner is in and wired: the first sampler's latent feeds it, and its own latent now drives the VAE decoder into your save node. Two things were already unfinished in this graph before I touched it, and they'll block a run: Neither sampler has a negative prompt connected, and there's no empty-latent node feeding the first sampler. The checkpoint it points at isn't installed here, so no model file is actually available. I set the refiner to 20 steps at 0.5 denoise, which is a sensible second-pass default. Want me to add the missing negative prompt and latent-size nodes and pick an installed checkpoint so it can actually run?", + groups: [ + [ + { + label: 'Switched tabs', + count: 1, + failed: false + }, + { + label: 'Print workflow', + count: 1, + failed: false + }, + { + label: 'Apply ops', + count: 1, + failed: false + }, + { + label: 'Print workflow', + count: 1, + failed: false + }, + { + label: 'Validate', + count: 1, + failed: true + } + ] + ] + } + ], + 'agent-rec-replace-prompt-encoder': [ + { + text: 'Done — I\'m on the "Text to image" tab, the old positive prompt node is gone, and a fresh one is in its place, taking CLIP from the checkpoint loader and feeding the sampler\'s positive input. I carried over the same prompt text ("a photo of a pier"). One thing unrelated to this swap: the sampler\'s negative prompt and empty latent inputs were already unconnected before I started, so the graph won\'t run until those are filled in. Want me to add them?', + groups: [ + [ + { + label: 'Switched tabs', + count: 1, + failed: false + }, + { + label: 'Print workflow', + count: 1, + failed: false + }, + { + label: 'Apply ops', + count: 1, + failed: false + }, + { + label: 'Delete node', + count: 1, + failed: false + }, + { + label: 'Print workflow', + count: 1, + failed: false + } + ] + ] + } + ], + 'agent-rec-set-widget-existing': [ + { + text: 'You\'re now on the "Text to image" tab, with steps at 30 and cfg at 5. Nothing else was touched.', + groups: [ + [ + { + label: 'Switched tabs', + count: 1, + failed: false + }, + { + label: 'Ls nodes', + count: 1, + failed: false + }, + { + label: 'List slots', + count: 1, + failed: false + }, + { + label: 'Apply ops', + count: 1, + failed: false + }, + { + label: 'List slots', + count: 1, + failed: false + } + ] + ] + } + ], + 'agent-rec-text-only-answer': [ + { + text: 'I\'m on the "Text to image" tab now. It\'s a standard SDXL text-to-image setup: it loads the SDXL base model, turns the prompt — currently "a photo of a pier" — into guidance, generates an image over 20 steps, and saves the result. One thing to flag: it isn\'t runnable as-is. Two inputs on the generation step are still empty — there\'s no negative prompt wired in, and no blank canvas/image-size node telling it what dimensions to make. Want me to add those so you can run it?', + groups: [ + [ + { + label: 'Switched tabs', + count: 1, + failed: false + }, + { + label: 'Print workflow', + count: 1, + failed: false + } + ] + ] + } + ], + 'agent-rec-three-sequential-adds': [ + { + text: 'All three nodes are on the "Text to image" tab now — a multiline text box, an empty latent, and a text encoder — left unconnected and unconfigured as you asked.', + groups: [ + [ + { + label: 'Switched tabs', + count: 1, + failed: false + }, + { + label: 'Add node', + count: 3, + failed: false + } + ] + ] + } + ], + 'agent-rec-tool-error': [ + { + text: 'I\'m now on the "Text to image" tab, but there\'s no node called "DoesNotExist" — nothing was added, and the canvas is unchanged. If you tell me what you actually want that node to do (e.g. upscale, add a LoRA, save output), I\'ll find the real one and wire it in.', + groups: [ + [ + { + label: 'Switched tabs', + count: 1, + failed: false + }, + { + label: 'Add node', + count: 1, + failed: true + } + ] + ] + } + ], + 'agent-rec-two-turn-dependent-edit': [ + { + text: 'I\'m on the "Text to image" tab now, and the second text box is added with "blurry, low quality" and fed from the checkpoint loader. One thing worth flagging: it isn\'t connected to anything downstream yet, so it has no effect on the image. The sampler\'s negative input is currently empty (and its latent input too) — say the word and I\'ll wire this new text into the negative slot.', + groups: [ + [ + { + label: 'Switched tabs', + count: 1, + failed: false + }, + { + label: 'Print workflow', + count: 1, + failed: false + }, + { + label: 'Apply ops', + count: 1, + failed: false + }, + { + label: 'Print workflow', + count: 1, + failed: false + } + ] + ] + }, + { + text: 'Connected — the "blurry, low quality" text now feeds the negative input. The graph still won\'t run as-is: nothing is feeding the sampler\'s latent input, so it needs an empty latent (which is also where the image size gets set). Want me to add one?', + groups: [ + [ + { + label: 'Connect', + count: 1, + failed: false + }, + { + label: 'Print workflow', + count: 1, + failed: false + } + ] + ] + } + ], + 'agent-workflow-editing-05': [ + { + text: "Done — the side-by-side comparison is on your canvas: the original image and the edited result now go into a stitch node (edited placed to the right of the original, sizes matched), and that combined image is what gets saved. Two things worth knowing: The gap/spacing setting on that node can't be changed from here, so the two images sit flush against each other. You can set a spacing value directly on the node if you want a divider. The rest of this workflow was already incomplete before I touched it — the sampler has no model loaded and no prompt text, and the encode/decode steps have no VAE connected. It won't run until those are filled in. Want me to wire up a checkpoint and prompt boxes for you?", + groups: [ + [ + { + label: 'Switched tabs', + count: 1, + failed: false + }, + { + label: 'Print workflow', + count: 1, + failed: false + }, + { + label: 'Find nodes', + count: 1, + failed: false + }, + { + label: 'Apply ops', + count: 1, + failed: false + }, + { + label: 'List slots', + count: 1, + failed: false + }, + { + label: 'Set widget', + count: 1, + failed: true + }, + { + label: 'Validate', + count: 1, + failed: true + } + ] + ] + } + ] +} diff --git a/browser_tests/tests/agent/agentConversationCancelledTurn.spec.ts b/browser_tests/tests/agent/agentConversationCancelledTurn.spec.ts deleted file mode 100644 index 8e21a5198a6..00000000000 --- a/browser_tests/tests/agent/agentConversationCancelledTurn.spec.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { expect } from '@playwright/test' - -import { agentConversationTest as test } from '@e2e/fixtures/agentConversationFixture' - -const CASE = 'agent-rec-cancelled-turn' - -test.describe('Agent cancelled turn replay', { tag: '@cloud' }, () => { - test.use({ conversationCase: CASE }) - - test('stops where the recording stopped and keeps the edits that landed', async ({ - agentConversation - }) => { - const turn = agentConversation.conversation.turns[0] - expect( - turn.cancel_after, - 'the fixture records the entry the cancel followed' - ).toBeDefined() - expect( - agentConversation.recordedAssistantText(0), - 'the recorded tail carries the stopped message' - ).not.toBe('') - - // The harness releases the recorded tail only once the panel's cancel has - // reached the server, so a turn that completes with the tail rendered in - // full is the user-visible proof that Stop did its job. - await agentConversation.runTurns() - }) -}) From 7f13c414d7bca1b2022021b4e2f58618ade63c16 Mon Sep 17 00:00:00 2001 From: Nathaniel Parson Koroso Date: Wed, 9 Sep 2026 17:10:16 -0700 Subject: [PATCH 43/52] test(agent): render the composer label without the app's i18n build The fixture renders the locale message with vue-i18n over the same locale file instead of importing the app's i18n module, whose locale loader is a Vite-only glob that Playwright's loader cannot evaluate. The wire sample takes the palette's empty sentinel as the default colour, the way the painter does, and no longer reads a link colour the painter never paints. An unreachable empty-text branch and an unused exported type are gone. --- .../fixtures/agentConversationFixture.ts | 44 +++++++++++-------- .../fixtures/data/agent/agentConversation.ts | 1 - 2 files changed, 25 insertions(+), 20 deletions(-) diff --git a/browser_tests/fixtures/agentConversationFixture.ts b/browser_tests/fixtures/agentConversationFixture.ts index 422096d6ac8..491383966fa 100644 --- a/browser_tests/fixtures/agentConversationFixture.ts +++ b/browser_tests/fixtures/agentConversationFixture.ts @@ -2,7 +2,8 @@ import type { Locator, Page, WebSocketRoute } from '@playwright/test' import { expect } from '@playwright/test' import { z } from 'zod' -import { i18n } from '@/i18n' +import { createI18n } from 'vue-i18n' + import enMessages from '@/locales/en/main.json' with { type: 'json' } import type { ObjectInfoResponse } from '@/schemas/nodeDefSchema' import type { @@ -40,11 +41,18 @@ const CANCEL_TIMEOUT = 10_000 const OPEN_AGENT_LABEL = enMessages.agent.askComfyAgent const SEND_LABEL = enMessages.agent.send const STOP_LABEL = enMessages.agent.stop -// The composer names itself with the rendered message, escapes resolved. -const COMPOSER_LABEL = i18n.global.t('agent.placeholder') +// The composer names itself with the rendered message, escapes resolved; the +// app's own i18n module is a Vite build, so the fixture renders the message +// with the same library over the same locale file. +const COMPOSER_LABEL = createI18n({ + legacy: false, + locale: 'en', + messages: { en: enMessages } +}).global.t('agent.placeholder') const GROUP_LABEL = /^Ran (\d+) tool calls?/ const FAILED_GLYPH = /lucide--circle-x/ -// Painted pixels may be antialiased against the grid; the marker centre is solid. +// How far a sampled channel may sit from the link colour: the stroke is +// antialiased against the grid, and the midpoint marker is solid. const COLOR_TOLERANCE = 48 interface RecordedLink { @@ -340,9 +348,10 @@ class AgentConversationHarness { return links.sort(byLinkKey) } - // Samples the background canvas at each link's painted midpoint for the - // colour the renderer gives that link. A link whose endpoints the map holds - // but whose wire nobody painted is returned. + // Samples the background canvas around each link's painted midpoint for the + // colour the renderer paints that link's type in. A link whose endpoints the + // map holds but whose midpoint carries no such pixel is returned; this is a + // colour-proximity sample, not a trace of the whole wire. private unpaintedLinks(): Promise { return this.page.evaluate((tolerance: number) => { const app = window.app! @@ -366,10 +375,10 @@ class AgentConversationHarness { return [0, 2, 4].map((at) => parseInt(wide.slice(at, at + 2), 16)) } return [...app.graph.links.values()].flatMap((link) => { + // The palette seeds every data type with '' before it colours the + // ones it names, and the painter treats that as the default colour. const expected = channels( - (typeof link.color === 'string' ? link.color : undefined) ?? - colors[String(link.type)] ?? - canvas.default_link_color + colors[String(link.type)] || canvas.default_link_color ) const [x, y] = canvas.ds.convertOffsetToCanvas(link._pos) const { data } = context.getImageData( @@ -401,16 +410,13 @@ class AgentConversationHarness { before: PanelCounts ): Promise { const expected = this.expectations[turn] - if (expected.text === '') - await expect(this.streams).toHaveCount(before.streams) - else - await expect - .poll(async () => - collapse( - (await this.streams.allInnerTexts()).slice(before.streams).join(' ') - ) + await expect + .poll(async () => + collapse( + (await this.streams.allInnerTexts()).slice(before.streams).join(' ') ) - .toBe(expected.text) + ) + .toBe(expected.text) await expect(this.groups).toHaveCount( before.groups + expected.groups.length diff --git a/browser_tests/fixtures/data/agent/agentConversation.ts b/browser_tests/fixtures/data/agent/agentConversation.ts index f7b95bb08f8..10faa190d90 100644 --- a/browser_tests/fixtures/data/agent/agentConversation.ts +++ b/browser_tests/fixtures/data/agent/agentConversation.ts @@ -63,7 +63,6 @@ const zGraphOperation = z (op) => OP_ENVELOPE_KEYS.every((key) => !(key in op)), 'a recorded op carries the semantic operation only; the wire envelope is minted at replay' ) -export type RecordedGraphOperation = z.infer // WorkflowJSON and WorkflowNode declare an index signature, so the schema // validates the guaranteed fields and keeps the rest. From c9da51aea5f8db5054c43b59c74fdc0973f8efe6 Mon Sep 17 00:00:00 2001 From: Nathaniel Parson Koroso Date: Wed, 9 Sep 2026 17:11:38 -0700 Subject: [PATCH 44/52] test(agent): keep the loader's intermediate types internal --- browser_tests/fixtures/data/agent/agentConversation.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/browser_tests/fixtures/data/agent/agentConversation.ts b/browser_tests/fixtures/data/agent/agentConversation.ts index 10faa190d90..78892433958 100644 --- a/browser_tests/fixtures/data/agent/agentConversation.ts +++ b/browser_tests/fixtures/data/agent/agentConversation.ts @@ -157,7 +157,7 @@ const zTurn = z 'cancel_after must precede the final agent_message_done entry; the replay stops a turn that is still running' }) }) -export type RecordedTurn = z.infer +type RecordedTurn = z.infer export const zAgentConversation = z .object({ @@ -200,7 +200,7 @@ export type RecordedConversation = z.infer // The applier-proven form of a recording: the same bytes, with every op typed // by the library's own union. Only assertOpsApply produces it. -export type AgentConversationEntry = +type AgentConversationEntry = | Extract, { kind: 'event' }> | { kind: 'graph_ops'; ops: GraphOperation[]; at_ms?: number } export type AgentConversationTurn = Omit & { From 7c6b5c7b17aa5185a721f72849b0ed759c4a4ac5 Mon Sep 17 00:00:00 2001 From: Nathaniel Parson Koroso Date: Wed, 9 Sep 2026 18:10:12 -0700 Subject: [PATCH 45/52] test(agent): judge painted wires by the app's own render loop The wire check no longer forces a repaint before sampling; it reads the background canvas as the render loop left it, so a missed invalidation shows up as an unpainted wire instead of being repaired by the assertion. A replay test suppresses the background pass after the first turn and requires the second turn's wire to be reported. --- .../fixtures/agentConversationFixture.ts | 10 ++-- .../agent/agentConversationReplay.spec.ts | 47 +++++++++++++++++++ 2 files changed, 52 insertions(+), 5 deletions(-) diff --git a/browser_tests/fixtures/agentConversationFixture.ts b/browser_tests/fixtures/agentConversationFixture.ts index 491383966fa..b92bce272c2 100644 --- a/browser_tests/fixtures/agentConversationFixture.ts +++ b/browser_tests/fixtures/agentConversationFixture.ts @@ -349,14 +349,14 @@ class AgentConversationHarness { } // Samples the background canvas around each link's painted midpoint for the - // colour the renderer paints that link's type in. A link whose endpoints the - // map holds but whose midpoint carries no such pixel is returned; this is a - // colour-proximity sample, not a trace of the whole wire. - private unpaintedLinks(): Promise { + // colour the renderer paints that link's type in, as the app's own render + // loop left it: nothing here asks the canvas to repaint. A link whose + // endpoints the map holds but whose midpoint carries no such pixel is + // returned; this is a colour-proximity sample, not a trace of the wire. + unpaintedLinks(): Promise { return this.page.evaluate((tolerance: number) => { const app = window.app! const canvas = app.canvas - canvas.draw(true, true) const context = canvas.bgcanvas.getContext('2d')! const scale = canvas.bgcanvas.width / canvas.canvas.clientWidth // The static palette the renderer resolves a link's type through. diff --git a/browser_tests/tests/agent/agentConversationReplay.spec.ts b/browser_tests/tests/agent/agentConversationReplay.spec.ts index 0aad2387593..dc1198326b5 100644 --- a/browser_tests/tests/agent/agentConversationReplay.spec.ts +++ b/browser_tests/tests/agent/agentConversationReplay.spec.ts @@ -3,7 +3,54 @@ import { expect } from '@playwright/test' import { agentConversationTest as test } from '@e2e/fixtures/agentConversationFixture' import { listRecordedConversations } from '@e2e/fixtures/data/agent/agentConversation' +// A recording whose second turn wires two nodes; the first turn only adds. +const WIRING_CASE = 'agent-rec-two-turn-dependent-edit' + test.describe('Agent conversation replay', { tag: '@cloud' }, () => { + test.describe('wire evidence', () => { + test.use({ conversationCase: WIRING_CASE }) + + // The wire check reads pixels the app's own render loop painted, so a + // canvas that never repaints after a connect must fail it. + test('reports a wire the canvas never painted', async ({ + agentConversation + }) => { + test.setTimeout(90_000) + const [first, second] = agentConversation.conversation.turns + const wired = second.response.flatMap((entry) => + entry.kind === 'graph_ops' + ? entry.ops.flatMap((op) => + op.op === 'connect' + ? [ + `${op.from_node}:${op.from_slot}->${op.to_node}:${op.to_slot}` + ] + : [] + ) + : [] + ) + expect(wired.length, 'the second turn connects').toBeGreaterThan(0) + expect(first.response.some((entry) => entry.kind === 'graph_ops')).toBe( + true + ) + + await agentConversation.sendPrompt(0) + await agentConversation.replayResponse(0) + await agentConversation.waitForTurnComplete() + await agentConversation.expectCanvasReplayed(0) + + await agentConversation.panel.page().evaluate(() => { + window.app!.canvas.drawBackCanvas = () => {} + }) + await agentConversation.sendPrompt(1) + await agentConversation.replayResponse(1) + await agentConversation.waitForTurnComplete() + + await expect + .poll(() => agentConversation.unpaintedLinks()) + .toEqual(expect.arrayContaining(wired)) + }) + }) + for (const conversationCase of listRecordedConversations()) { test.describe(`recorded ${conversationCase}`, () => { test.use({ conversationCase }) From 05913a4714fbafb1baf3f110853c86d90978f29d Mon Sep 17 00:00:00 2001 From: Nathaniel Parson Koroso Date: Wed, 9 Sep 2026 18:45:05 -0700 Subject: [PATCH 46/52] fix(agent): repaint the canvas after every reconciled remote frame A remote frame that only connects nodes moves no layout, so nothing asked the canvas to paint the new wire until the user panned; the replay of agent-rec-two-turn-dependent-edit showed the second turn's wire unpainted once the check stopped forcing a repaint. The follower now marks both canvases dirty after each reconciled frame. The browser-test guide names Postgres, not the doc host, as the writer of the audit rows. --- browser_tests/README.md | 11 ++++++----- .../extensions/agent/crdt/agentNodeMaterializer.ts | 8 +++++++- .../agent/crdt/useAgentCrdtFollower.test.ts | 9 +++++++-- .../extensions/agent/crdt/useAgentCrdtFollower.ts | 3 +++ 4 files changed, 23 insertions(+), 8 deletions(-) diff --git a/browser_tests/README.md b/browser_tests/README.md index 074fba2e525..83f67ba52be 100644 --- a/browser_tests/README.md +++ b/browser_tests/README.md @@ -677,11 +677,12 @@ fix so the bug stays fixed: 1. **Capture the conversation.** Reproduce the bug's turn against the cloud agent run locally in its non-standalone mode, with Postgres, - Redis and the doc host beside it: that is the only mode that writes - the per-op audit rows (`agent_tool_calls` parent and child rows) the - exporter reads. The same agent in standalone mode - (SQLite, no doc host) never writes them, so it can only - yield text-only or tool-error turns. Record it with the recorder + Redis and the doc host beside it. In that mode the agent writes the + per-op audit rows (`agent_tool_calls` parent and child rows) to + Postgres, which is what the exporter reads; the doc host is a separate + required service and writes none of them. The same agent in + standalone mode (SQLite, no doc host) never writes them, so it can + only yield text-only or tool-error turns. Record it with the recorder (`scripts/agentConversationRecord.ts`, landing in #16782; until it merges, record from that PR's branch), which writes the conversation JSON into `conversations/` marked `response_side: 'recorded'`. Never write diff --git a/src/workbench/extensions/agent/crdt/agentNodeMaterializer.ts b/src/workbench/extensions/agent/crdt/agentNodeMaterializer.ts index 24991fed87a..faf04f2247c 100644 --- a/src/workbench/extensions/agent/crdt/agentNodeMaterializer.ts +++ b/src/workbench/extensions/agent/crdt/agentNodeMaterializer.ts @@ -22,7 +22,13 @@ import { runMintPortsSuppressed } from './mintPortWiring' export type MaterializableGraph = Pick< LGraph, - 'id' | 'rootGraph' | '_nodes' | '_nodes_by_id' | 'add' | 'remove' + | 'id' + | 'rootGraph' + | '_nodes' + | '_nodes_by_id' + | 'add' + | 'remove' + | 'setDirtyCanvas' > /** diff --git a/src/workbench/extensions/agent/crdt/useAgentCrdtFollower.test.ts b/src/workbench/extensions/agent/crdt/useAgentCrdtFollower.test.ts index 6e805620ef1..1d366139f48 100644 --- a/src/workbench/extensions/agent/crdt/useAgentCrdtFollower.test.ts +++ b/src/workbench/extensions/agent/crdt/useAgentCrdtFollower.test.ts @@ -686,7 +686,8 @@ describe('useAgentCrdtFollower', () => { // distinct reference the composable hands through. const { fakeDefinitions } = definitionsState const fakeGraph = { - rootGraph: { subgraphs: new Map() } + rootGraph: { subgraphs: new Map() }, + setDirtyCanvas: vi.fn() } as unknown as MaterializableGraph it('reconciles the live graph after every applied frame', () => { @@ -699,6 +700,9 @@ describe('useAgentCrdtFollower', () => { fakeGraph, fakeDefinitions ) + // A frame that only connects nodes changes no layout, so the repaint + // has to come from here or the new wire stays invisible until a pan. + expect(fakeGraph.setDirtyCanvas).toHaveBeenCalledWith(true, true) // Definitions come from the doc the bridge currently follows, so a // doc_reset remint (which swaps the FollowerDoc) is read fresh. expect(definitionsState.readSubgraphDefinitions).toHaveBeenCalledWith( @@ -711,7 +715,8 @@ describe('useAgentCrdtFollower', () => { const registeredGraph = { rootGraph: { subgraphs: new Map([[fakeDefinitions[0].id, {}]]) - } + }, + setDirtyCanvas: vi.fn() } as unknown as MaterializableGraph const { unmount } = mountFollower('wf-1', true, () => registeredGraph) diff --git a/src/workbench/extensions/agent/crdt/useAgentCrdtFollower.ts b/src/workbench/extensions/agent/crdt/useAgentCrdtFollower.ts index 2926a4089b5..e76af459ef3 100644 --- a/src/workbench/extensions/agent/crdt/useAgentCrdtFollower.ts +++ b/src/workbench/extensions/agent/crdt/useAgentCrdtFollower.ts @@ -594,6 +594,9 @@ export function useAgentCrdtFollower( ? readSubgraphDefinitions(bridge.follower.doc) : [] const nodeIds = reconcileAgentAdapters(graph, definitions) + // A frame that only wires or rewires nodes moves no layout, so nothing + // else asks the canvas to paint the new links. + graph.setDirtyCanvas(true, true) if (nodeIds.length > 0) { recordDevEvent('agent_node_adapters_materialized', { workflowId: docId, From 7361951d322e8a3fb4ed601df4abe37ce2e3412a Mon Sep 17 00:00:00 2001 From: Nathaniel Parson Koroso Date: Wed, 9 Sep 2026 20:29:49 -0700 Subject: [PATCH 47/52] test(agent): keep recorded ops structural and judge the wire by a screenshot The loader no longer returns a recording under the package's operation type after applying it: recorded ops stay structural, the host's apply is where the applier judges them, and the parallel required-field matrix is gone with the claim it propped up. The pixel sampler and its falsifier are replaced by a screenshot expectation of the canvas after the two-turn wiring case, masked to the panel, so the visible result is the picture the app's own render loop painted. The corpus application check and the missing-value regression stay. --- .../fixtures/agentConversationFixture.ts | 68 +------------------ .../fixtures/agentConversationHostDoc.ts | 8 ++- .../data/agent/agentConversation.test.ts | 52 -------------- .../fixtures/data/agent/agentConversation.ts | 46 +++++-------- .../agent/agentConversationReplay.spec.ts | 46 +++---------- 5 files changed, 38 insertions(+), 182 deletions(-) diff --git a/browser_tests/fixtures/agentConversationFixture.ts b/browser_tests/fixtures/agentConversationFixture.ts index b92bce272c2..ad8e17306da 100644 --- a/browser_tests/fixtures/agentConversationFixture.ts +++ b/browser_tests/fixtures/agentConversationFixture.ts @@ -51,9 +51,6 @@ const COMPOSER_LABEL = createI18n({ }).global.t('agent.placeholder') const GROUP_LABEL = /^Ran (\d+) tool calls?/ const FAILED_GLYPH = /lucide--circle-x/ -// How far a sampled channel may sit from the link colour: the stroke is -// antialiased against the grid, and the midpoint marker is solid. -const COLOR_TOLERANCE = 48 interface RecordedLink { fromNode: string @@ -297,7 +294,7 @@ class AgentConversationHarness { for (const entry of this.entries(throughTurn)) { if (entry.kind !== 'graph_ops') continue for (const op of entry.ops) { - if (op.op !== 'set_widget') continue + if (op.op !== 'set_widget' || typeof op.widget !== 'string') continue const nodeId = String(op.node_id) const widget = op.widget const widgets = graph.nodes[nodeId]?.widgets as @@ -334,8 +331,8 @@ class AgentConversationHarness { return new RegExp(`^(?:${escape(name)}|${escape(node.type)})$`) } - // The renderer's link map coordinates the wire checks: it names the - // endpoints no DOM surface does, and unpaintedLinks below reads the pixels. + // The renderer's link map names the endpoints no DOM surface does; the + // painted result is a screenshot expectation in the replay spec. private async renderedLinks(): Promise { const links = await this.page.evaluate(() => [...window.app!.graph.links.values()].map((link) => ({ @@ -348,60 +345,6 @@ class AgentConversationHarness { return links.sort(byLinkKey) } - // Samples the background canvas around each link's painted midpoint for the - // colour the renderer paints that link's type in, as the app's own render - // loop left it: nothing here asks the canvas to repaint. A link whose - // endpoints the map holds but whose midpoint carries no such pixel is - // returned; this is a colour-proximity sample, not a trace of the wire. - unpaintedLinks(): Promise { - return this.page.evaluate((tolerance: number) => { - const app = window.app! - const canvas = app.canvas - const context = canvas.bgcanvas.getContext('2d')! - const scale = canvas.bgcanvas.width / canvas.canvas.clientWidth - // The static palette the renderer resolves a link's type through. - const { link_type_colors: colors } = canvas.constructor as unknown as { - link_type_colors: Partial> - } - const channels = (color: string): number[] => { - const hex = color.replace('#', '') - const wide = - hex.length === 3 - ? hex - .split('') - .map((digit) => digit + digit) - .join('') - : hex - return [0, 2, 4].map((at) => parseInt(wide.slice(at, at + 2), 16)) - } - return [...app.graph.links.values()].flatMap((link) => { - // The palette seeds every data type with '' before it colours the - // ones it names, and the painter treats that as the default colour. - const expected = channels( - colors[String(link.type)] || canvas.default_link_color - ) - const [x, y] = canvas.ds.convertOffsetToCanvas(link._pos) - const { data } = context.getImageData( - Math.round(x * scale) - 3, - Math.round(y * scale) - 3, - 7, - 7 - ) - for (let at = 0; at < data.length; at += 4) { - const off = Math.max( - Math.abs(data[at] - expected[0]), - Math.abs(data[at + 1] - expected[1]), - Math.abs(data[at + 2] - expected[2]) - ) - if (data[at + 3] > 0 && off <= tolerance) return [] - } - return [ - `${link.origin_id}:${link.origin_slot}->${link.target_id}:${link.target_slot}` - ] - }) - }, COLOR_TOLERANCE) - } - // What this turn put on the panel, against the recording's explicit // expectations: the complete assistant text, and every tool call group in // order with the rows a user reads once it is open. @@ -495,11 +438,6 @@ class AgentConversationHarness { }) .sort(byLinkKey) await expect.poll(() => this.renderedLinks()).toEqual(links) - await expect - .poll(() => this.unpaintedLinks(), { - message: 'every wire is painted at its midpoint' - }) - .toEqual([]) // A widget-backed input renders no slot row on an uncollapsed node // (NodeSlots.vue); the wire above already covers that end. for (const link of links) { diff --git a/browser_tests/fixtures/agentConversationHostDoc.ts b/browser_tests/fixtures/agentConversationHostDoc.ts index 881230ba302..9ebd18a0aa6 100644 --- a/browser_tests/fixtures/agentConversationHostDoc.ts +++ b/browser_tests/fixtures/agentConversationHostDoc.ts @@ -14,6 +14,8 @@ import * as Y from 'yjs' import type { ServerDocFrame } from '@/workbench/extensions/agent/crdt/docFrameClient' import { DOC_PROTOCOL_VERSION } from '@/workbench/extensions/agent/crdt/docFrameClient' import type { GraphOperation } from '@/workbench/extensions/agent/crdt/graphOperations' + +import type { RecordedGraphOperation } from '@e2e/fixtures/data/agent/agentConversation' import { mintWireOps } from '@/workbench/extensions/agent/crdt/opEnvelope' const HOST_ACTOR = 'agent:comfy:host' @@ -73,9 +75,11 @@ export class HostDoc { return this.updateFrame(update, HOST_ACTOR, []) } - apply(operations: GraphOperation[]): HostFrame { + // The applier below is the only judge of a recorded op; the cast hands it + // the structural record and nothing reads the ops as typed before it runs. + apply(operations: RecordedGraphOperation[]): HostFrame { const before = Y.encodeStateVector(this.doc) - const ops = mintWireOps(operations, { + const ops = mintWireOps(operations as GraphOperation[], { actor: HOST_ACTOR, baseVersion: this.seq }) diff --git a/browser_tests/fixtures/data/agent/agentConversation.test.ts b/browser_tests/fixtures/data/agent/agentConversation.test.ts index 421dd77c947..6f1b1cd7dea 100644 --- a/browser_tests/fixtures/data/agent/agentConversation.test.ts +++ b/browser_tests/fixtures/data/agent/agentConversation.test.ts @@ -173,58 +173,6 @@ describe('committed recordings', () => { ).toBe(true) }) - // The fields the applier reads for each recorded op variant; deleting any - // one of them refuses the recording. Fields the applier tolerates missing - // (add_node class_type and pos, which the node payload carries; delete_node - // removed_links, which the document derives; set_widget old) are not in - // this table because their absence leaves the document unchanged. - const readFields: Record = { - add_node: ['node', 'node_id'], - set_widget: ['node_id', 'value', 'widget'], - connect: [ - 'from_node', - 'from_slot', - 'link_id', - 'link_type', - 'to_node', - 'to_slot' - ], - delete_node: ['node_id'] - } - - it('refuses every recorded op variant missing a field the applier reads', () => { - const seen = new Set() - for (const file of files) { - const raw = load(file) as { - turns: Array<{ - response: Array<{ - kind: string - ops?: Array> - }> - }> - } - raw.turns.forEach((turn, turnIndex) => - turn.response.forEach((entry, entryIndex) => - entry.ops?.forEach((op, opIndex) => { - const variant = String(op.op) - seen.add(variant) - for (const field of readFields[variant] ?? []) { - const altered = structuredClone(raw) - delete altered.turns[turnIndex].response[entryIndex].ops![ - opIndex - ][field] - expect( - () => assertOpsApply(zAgentConversation.parse(altered)), - `${file} ${variant} without ${field}` - ).toThrow() - } - }) - ) - ) - } - expect([...seen].sort()).toEqual(Object.keys(readFields).sort()) - }) - it('refuses a set_widget whose value never reaches the document', () => { const raw = load('agent-rec-set-widget-existing.json') as { turns: Array<{ diff --git a/browser_tests/fixtures/data/agent/agentConversation.ts b/browser_tests/fixtures/data/agent/agentConversation.ts index 78892433958..b809ea41757 100644 --- a/browser_tests/fixtures/data/agent/agentConversation.ts +++ b/browser_tests/fixtures/data/agent/agentConversation.ts @@ -53,9 +53,10 @@ const OP_ENVELOPE: Record = { } const OP_ENVELOPE_KEYS = Object.keys(OP_ENVELOPE) -// Only the vocabulary and the absence of the envelope are checked here, so -// the parsed op stays structural; assertOpsApply is where the production -// applier proves the payload and the op becomes a GraphOperation. +// Only the vocabulary and the absence of the envelope are checked here; a +// recorded op stays structural. Nothing in this fixture parses the semantic +// operation contract, which the package owns; assertOpsApply below applies +// the ops to a document and reports what that application shows. const zGraphOperation = z .object({ op: z.enum(FROZEN_OPS) }) .passthrough() @@ -63,6 +64,7 @@ const zGraphOperation = z (op) => OP_ENVELOPE_KEYS.every((key) => !(key in op)), 'a recorded op carries the semantic operation only; the wire envelope is minted at replay' ) +export type RecordedGraphOperation = z.infer // WorkflowJSON and WorkflowNode declare an index signature, so the schema // validates the guaranteed fields and keeps the rest. @@ -157,7 +159,7 @@ const zTurn = z 'cancel_after must precede the final agent_message_done entry; the replay stops a turn that is still running' }) }) -type RecordedTurn = z.infer +export type AgentConversationTurn = z.infer export const zAgentConversation = z .object({ @@ -196,19 +198,7 @@ export const zAgentConversation = z message: 'recorded turns carry the message id they were captured from' }) }) -export type RecordedConversation = z.infer - -// The applier-proven form of a recording: the same bytes, with every op typed -// by the library's own union. Only assertOpsApply produces it. -type AgentConversationEntry = - | Extract, { kind: 'event' }> - | { kind: 'graph_ops'; ops: GraphOperation[]; at_ms?: number } -export type AgentConversationTurn = Omit & { - response: AgentConversationEntry[] -} -export type AgentConversation = Omit & { - turns: AgentConversationTurn[] -} +export type AgentConversation = z.infer export function listRecordedConversations(): string[] { const dir = fileURLToPath(new URL('./conversations/', import.meta.url)) @@ -246,16 +236,15 @@ function missingValue(value: unknown, path: string): string | null { return null } -// The production applier is the parser for the recorded operations: a -// recording it would reject during replay is refused before one starts, and -// the ops carry the library's type only once it has accepted every one. -export function assertOpsApply( - recorded: RecordedConversation -): AgentConversation { - const { seed, catalog } = recorded.workflow +// Applies every recorded op to a document minted from the recording's seed +// and catalog. This is application, not parsing: it shows the applier accepts +// each op against that document and that the projection it leaves carries a +// value everywhere, which is what the replay needs and all it proves. +export function assertOpsApply(conversation: AgentConversation): void { + const { seed, catalog } = conversation.workflow const doc = mint(seed, catalog) let version = 1 - for (const [turnIndex, turn] of recorded.turns.entries()) + for (const [turnIndex, turn] of conversation.turns.entries()) for (const [entryIndex, entry] of turn.response.entries()) { if (entry.kind !== 'graph_ops') continue const label = `turn ${turnIndex} entry ${entryIndex}` @@ -275,14 +264,15 @@ export function assertOpsApply( if (hole !== null) throw new Error(`${label}: the projection carries no value at ${hole}`) } - return recorded as AgentConversation } export function loadAgentConversation(caseId: string): AgentConversation { const file = fileURLToPath( new URL(`./conversations/${caseId}.json`, import.meta.url) ) - return assertOpsApply( - zAgentConversation.parse(JSON.parse(readFileSync(file, 'utf-8'))) + const conversation = zAgentConversation.parse( + JSON.parse(readFileSync(file, 'utf-8')) ) + assertOpsApply(conversation) + return conversation } diff --git a/browser_tests/tests/agent/agentConversationReplay.spec.ts b/browser_tests/tests/agent/agentConversationReplay.spec.ts index dc1198326b5..a652dc92a82 100644 --- a/browser_tests/tests/agent/agentConversationReplay.spec.ts +++ b/browser_tests/tests/agent/agentConversationReplay.spec.ts @@ -10,44 +10,20 @@ test.describe('Agent conversation replay', { tag: '@cloud' }, () => { test.describe('wire evidence', () => { test.use({ conversationCase: WIRING_CASE }) - // The wire check reads pixels the app's own render loop painted, so a - // canvas that never repaints after a connect must fail it. - test('reports a wire the canvas never painted', async ({ - agentConversation + // The second turn's only edit is a connect, so what the canvas shows after + // it is the wire itself: the app's own render loop paints it, and the + // expectation is the picture, not a reconstruction of the renderer. + test('paints the wire the second turn connects', async ({ + agentConversation, + page }) => { test.setTimeout(90_000) - const [first, second] = agentConversation.conversation.turns - const wired = second.response.flatMap((entry) => - entry.kind === 'graph_ops' - ? entry.ops.flatMap((op) => - op.op === 'connect' - ? [ - `${op.from_node}:${op.from_slot}->${op.to_node}:${op.to_slot}` - ] - : [] - ) - : [] - ) - expect(wired.length, 'the second turn connects').toBeGreaterThan(0) - expect(first.response.some((entry) => entry.kind === 'graph_ops')).toBe( - true - ) - - await agentConversation.sendPrompt(0) - await agentConversation.replayResponse(0) - await agentConversation.waitForTurnComplete() - await agentConversation.expectCanvasReplayed(0) + await agentConversation.runTurns() - await agentConversation.panel.page().evaluate(() => { - window.app!.canvas.drawBackCanvas = () => {} - }) - await agentConversation.sendPrompt(1) - await agentConversation.replayResponse(1) - await agentConversation.waitForTurnComplete() - - await expect - .poll(() => agentConversation.unpaintedLinks()) - .toEqual(expect.arrayContaining(wired)) + await expect(page.locator('#graph-canvas')).toHaveScreenshot( + 'two-turn-dependent-edit-wired.png', + { mask: [agentConversation.panel] } + ) }) }) From 01adbe82093c3f08590138d675dc1c764356c400 Mon Sep 17 00:00:00 2001 From: Nathaniel Parson Koroso Date: Wed, 9 Sep 2026 21:40:44 -0700 Subject: [PATCH 48/52] test(agent): ship the painted-wire baseline and close the failed-open tab The wire evidence test now carries the @screenshot tag so the expectations workflow regenerates its baseline, and the cloud-linux baseline rendered by CI run 34433666331 is committed so the cloud shard compares instead of failing on a missing snapshot. openWorkflow resolves false for a handled load failure after restoring the retained workflow; the agent's minted tab is then closed the same way a rejected open is, with a regression test. --- .../agent/agentConversationReplay.spec.ts | 2 +- ...-turn-dependent-edit-wired-cloud-linux.png | Bin 0 -> 158275 bytes .../extensions/agent/AgentPanelRoot.test.ts | 31 ++++++++++++++++++ .../extensions/agent/AgentPanelRoot.vue | 9 ++++- 4 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 browser_tests/tests/agent/agentConversationReplay.spec.ts-snapshots/two-turn-dependent-edit-wired-cloud-linux.png diff --git a/browser_tests/tests/agent/agentConversationReplay.spec.ts b/browser_tests/tests/agent/agentConversationReplay.spec.ts index a652dc92a82..cf2c2762f2b 100644 --- a/browser_tests/tests/agent/agentConversationReplay.spec.ts +++ b/browser_tests/tests/agent/agentConversationReplay.spec.ts @@ -13,7 +13,7 @@ test.describe('Agent conversation replay', { tag: '@cloud' }, () => { // The second turn's only edit is a connect, so what the canvas shows after // it is the wire itself: the app's own render loop paints it, and the // expectation is the picture, not a reconstruction of the renderer. - test('paints the wire the second turn connects', async ({ + test('paints the wire the second turn connects @screenshot', async ({ agentConversation, page }) => { diff --git a/browser_tests/tests/agent/agentConversationReplay.spec.ts-snapshots/two-turn-dependent-edit-wired-cloud-linux.png b/browser_tests/tests/agent/agentConversationReplay.spec.ts-snapshots/two-turn-dependent-edit-wired-cloud-linux.png new file mode 100644 index 0000000000000000000000000000000000000000..3040a4de8fcbc855517c13486f2b78869e8694b0 GIT binary patch literal 158275 zcmb@uby!>5wl*G03k6zep%g2yTM87n;$BKA?yehmcMBCt@#608#Wg_DqQNO%+zFaM zAjxm-b9VRH_kQ43wu(q>N5=LTj3A*)unYDT>U>tw8rM{j}l4xq-J`kvd z_bK+T%l|kAIbz|N{I@H&{vTa=HT?IE=if{G=F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-OHh8=N&hQ}o-_TmJ(k>=8@= literal 0 HcmV?d00001 diff --git a/src/workbench/extensions/agent/AgentPanelRoot.test.ts b/src/workbench/extensions/agent/AgentPanelRoot.test.ts index a450ef1b63c..186326824c3 100644 --- a/src/workbench/extensions/agent/AgentPanelRoot.test.ts +++ b/src/workbench/extensions/agent/AgentPanelRoot.test.ts @@ -159,6 +159,7 @@ const workflowService = vi.hoisted(() => ({ workflowStore.openWorkflowsInBackground({ right: [tab.path] }) workflowStore.activeWorkflow = await known.load() } + return true }) })) @@ -2681,6 +2682,35 @@ describe('AgentPanelRoot workflow binding', () => { ) }) + it('agent_active_tab closes the minted tab when opening it reports failure', async () => { + makeTab('wf-42') + mockMessagesEndpoint('wf-42') + + await renderAndSend('work here') + workflowService.openWorkflow.mockResolvedValueOnce(false) + + ws.emit('agent_active_tab', { + workflow_id: 'wf-77', + name: 'Video test', + thread_id: 'th-1' + }) + + await vi.waitFor(() => + expect(workflowService.openWorkflow).toHaveBeenCalledWith( + expect.objectContaining({ path: 'workflows/Video test.json' }) + ) + ) + await vi.waitFor(() => + expect( + workflowStore.getWorkflowByPath('workflows/Video test.json') + ).toBeNull() + ) + expect( + useAgentWorkflowTabBindingStore().tabPathFor('wf-77') + ).toBeUndefined() + expect(telemetry.trackAgentWorkflowApplied).not.toHaveBeenCalled() + }) + it('agent_active_tab strips dotfile prefixes hidden behind whitespace', async () => { makeTab('wf-42') mockMessagesEndpoint('wf-42') @@ -2743,6 +2773,7 @@ describe('AgentPanelRoot workflow binding', () => { }) const known = workflowStore.getWorkflowByPath(slow.path) if (known) workflowStore.activeWorkflow = await known.load() + return true } ) diff --git a/src/workbench/extensions/agent/AgentPanelRoot.vue b/src/workbench/extensions/agent/AgentPanelRoot.vue index b2f47bf9450..6b9d26a1171 100644 --- a/src/workbench/extensions/agent/AgentPanelRoot.vue +++ b/src/workbench/extensions/agent/AgentPanelRoot.vue @@ -648,12 +648,19 @@ async function onAgentActiveTab( agentTabGraph ) tabActivity.setCreating(false) + // openWorkflow reports a handled load failure by resolving false, having + // restored the retained workflow; the minted tab is a ghost either way. + let opened = false try { - await workflowService.openWorkflow(tab) + opened = await workflowService.openWorkflow(tab) } catch (error) { await workflowStore.closeWorkflow(tab) throw error } + if (!opened) { + await workflowStore.closeWorkflow(tab) + return + } if (stale()) { // A newer activation superseded this one mid-open: close the minted // tab rather than stranding a ghost the user never asked for. From fb3067534f1b4c818aefc5e4b521e21bb0f9893d Mon Sep 17 00:00:00 2001 From: Nathaniel Parson Koroso Date: Wed, 9 Sep 2026 22:28:33 -0700 Subject: [PATCH 49/52] test(agent): boot the replay without the canvas FPS overlay The wire screenshot masks the panel but not the bottom-left canvas statistics, and LGraphCanvas.renderInfo paints the live frame rate there, so the golden could never match twice. The replay boot now disables Comfy.Graph.CanvasInfo the way the ComfyPage fixture does; the golden is regenerated from that boot. --- browser_tests/fixtures/agentConversationFixture.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/browser_tests/fixtures/agentConversationFixture.ts b/browser_tests/fixtures/agentConversationFixture.ts index ad8e17306da..13ede86a485 100644 --- a/browser_tests/fixtures/agentConversationFixture.ts +++ b/browser_tests/fixtures/agentConversationFixture.ts @@ -187,7 +187,10 @@ class AgentConversationHarness { ) await bootAgentApp(this.page, agentFlag, { // Only the Vue node renderer projects follower edits onto the canvas. - settings: { 'Comfy.VueNodes.Enabled': true }, + settings: { + 'Comfy.VueNodes.Enabled': true, + 'Comfy.Graph.CanvasInfo': false + }, // Replayed nodes materialize from registered node types; the recordings use core nodes only. objectInfo: 'server' }) From 8299c72dfe2d7822a09dd5da2ec52d224b1e573f Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 10 Sep 2026 05:36:50 +0000 Subject: [PATCH 50/52] [automated] Update test expectations | snapshot | status | changed pixels | | --- | --- | --- | | `tests/agent/agentConversationReplay.spec.ts-snapshots/two-turn-dependent-edit-wired-cloud-linux.png` | modified | 158275B -> 154963B | Screenshot capture is not bit-deterministic; small pixel deltas are usually text rasterization noise. Confirm each rewrite corresponds to a test expected to change. --- ...-turn-dependent-edit-wired-cloud-linux.png | Bin 158275 -> 154963 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/browser_tests/tests/agent/agentConversationReplay.spec.ts-snapshots/two-turn-dependent-edit-wired-cloud-linux.png b/browser_tests/tests/agent/agentConversationReplay.spec.ts-snapshots/two-turn-dependent-edit-wired-cloud-linux.png index 3040a4de8fcbc855517c13486f2b78869e8694b0..fbf4f885a404f34ace48cbb42e10ff5c5716f05c 100644 GIT binary patch delta 10749 zcmb_?bzD?iyZ@$9L{JozRuS|dAqYqg1|U*Lx-ShM%+wOQ+Vo^L$sOUI%1;zNFqiSmdG1>voE!iIfl zjACdVaW5Suy8`9Id=5(Tg7ZE-z4QLUo5>E=HaGz>W4Sq&rp=vqi@@t+HSni| zRWE6joJZp9Ez(2v$0KMfY1yfI!{h~G>Ka!}Qr@+52;yrm-4|Hst~QBnu4&b$z2U~Fw?;VqF?Cz?q)T$_;bK)~GJ}h$|K@Vyf}3e>Z)~^te0`y| zcm_=I@bQZGHAtG4GMXq`Grd!vou*4HuDKJ^-i?x+gdXh z4boCwlHcq|kHQisR-9O*=^sP)PD=kd6U|2nQ67~fa2utzA7zClI4)nlV>;$M z*&Gp$Hx||-Jy?rM5l<;7UI?4n(Q#sRuA#nu&}Ute=-~QdAnQ@Tq@*Ma4oTSE5qFza z@7;aE+5fiQ0r!BIzN!m#=3}U!6e3;dO?Z?b2VWd_XX<~L8X(Oba z-f6}Aio!ZhdD05H1UH1FrSG_hzEiy0sqT#;#0ysc`eICCuNyOlZZ4q zXfLpaD=)q|NTxTz#?X<2W$+;-F+Ldm*HZi6DlK^>1i|}vx61KDpRwfB0_gXn)=j1Ow|+FWKVMOhGR8Ut{Ej5b_sf{GY=NRsOJ`ywQ6 z6FI1>t6Nz;A2WI^bMq#smA_Rf>4mN)$o<>P>1A$i?(Oah->I4OEM*0SvZZfK{sN-> z@j}*-e8LC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wAm-Pk191vCI)UjY&~T*DoU(Z`Qs*?yIeQLm5ks-AA;TdlxnD7A-`?JCV`*76GQU*jmZ8NznXFX{9ASSx7Onx6 z+4PXFJGMt5!8h4w+MhILfn219X)U)=8ynrdcW(m-GvCcF3lNHVa1VG{w+Bjn9_7(7 zGPadVknNrS2SZl#QX7ob1N(-1^K;6ozlr@#X41sXT9t(MAh zqM7RA{PRYFf32$gccRL^c>!?iaH(_v_uHf(2={IXPU`3+G1`gOa-*F9jY>sBLj%ZQ zDysXib&r0)$Ai&IT|LdK()p+1U$)7<5+UIt`Ir0c#KIc7S8jH0&V6<1%_cn9Jnk55 z|9m0EcZ+hv+q$~Cw{L-TlzwEt9Pmytv9TJOn!scrlSD@K=lltFPB#7RTYYXkkm^D1 zjRJSQme%0dSUzmcLNpO*2td?$21;3CqT((?K=<3fynEnd4H@8@d6$EqJox~u2|#4G zcX~;D11On>22g#Lwz}cVBQXfFROp-C@9-npsZ(zS0hm0z$x7L)RJUN$vRGSEX&gQ{ zs0MDTBGy}jyQ2Q>p3nUMP60P`bYf(@ao%RJySTqfYR0XyGR6srG}Dd nU@#JiDc|xDIEdm9OOV67J`AN7=Dhl|^2^^+xmkGK`0;-L=RNd* From c3775ace207c39da87c4b34a5727652dbe890089 Mon Sep 17 00:00:00 2001 From: Nathaniel Parson Koroso Date: Thu, 10 Sep 2026 16:04:05 -0700 Subject: [PATCH 51/52] test(agent): read the replay's tool rows from the folded work summary Main folds a finished turn's tool calls and thinking into one Worked summary (#17339), so the per-turn Ran N tool calls groups the replay opened are gone. The fixture now opens the turn's summary and reads the recorded tool rows from it, skipping the thinking rows; the expectations are unchanged. --- .../fixtures/agentConversationFixture.ts | 58 ++++++++++--------- 1 file changed, 30 insertions(+), 28 deletions(-) diff --git a/browser_tests/fixtures/agentConversationFixture.ts b/browser_tests/fixtures/agentConversationFixture.ts index 13ede86a485..f3cc562605a 100644 --- a/browser_tests/fixtures/agentConversationFixture.ts +++ b/browser_tests/fixtures/agentConversationFixture.ts @@ -49,8 +49,9 @@ const COMPOSER_LABEL = createI18n({ locale: 'en', messages: { en: enMessages } }).global.t('agent.placeholder') -const GROUP_LABEL = /^Ran (\d+) tool calls?/ +const SUMMARY_LABEL = /^Worked/ const FAILED_GLYPH = /lucide--circle-x/ +const THINKING_GLYPH = '[class*="lucide--brain"]' interface RecordedLink { fromNode: string @@ -67,7 +68,7 @@ interface RecordedWidgetValue { interface PanelCounts { streams: number - groups: number + summaries: number } // [id, from, from_slot, to, to_slot, type], as the projection stores a link. @@ -128,7 +129,7 @@ class AgentConversationHarness { private readonly host: HostDoc private readonly streams: Locator - private readonly groups: Locator + private readonly summaries: Locator private readonly seedIds: Set // Every node id the host has held so far, seed included. private readonly seenIds: Set @@ -162,7 +163,7 @@ class AgentConversationHarness { this.expectations = expectations ?? [] this.panel = page.locator('#agent-panel-root') this.streams = this.panel.getByTestId('markdown-stream') - this.groups = this.panel.getByRole('button', { name: GROUP_LABEL }) + this.summaries = this.panel.getByRole('button', { name: SUMMARY_LABEL }) this.vueNodes = new VueNodeHelpers(page) } @@ -254,7 +255,7 @@ class AgentConversationHarness { private async panelCounts(): Promise { return { streams: await this.streams.count(), - groups: await this.groups.count() + summaries: await this.summaries.count() } } @@ -349,8 +350,8 @@ class AgentConversationHarness { } // What this turn put on the panel, against the recording's explicit - // expectations: the complete assistant text, and every tool call group in - // order with the rows a user reads once it is open. + // expectations: the complete assistant text, and the tool call rows in order + // as a user reads them once the turn's work summary is open. private async expectTurnRendered( turn: number, before: PanelCounts @@ -364,28 +365,29 @@ class AgentConversationHarness { ) .toBe(expected.text) - await expect(this.groups).toHaveCount( - before.groups + expected.groups.length + // A finished turn folds its tool calls into one closed summary; the + // thinking rows it lists between them are not part of the recording. + const rows = expected.groups.flat() + await expect(this.summaries).toHaveCount( + before.summaries + (rows.length > 0 ? 1 : 0) ) - for (const [index, rows] of expected.groups.entries()) { - const group = this.groups.nth(before.groups + index) - const failed = rows.some((row) => row.failed) - const calls = rows.reduce((sum, row) => sum + row.count, 0) - await expect(group).toHaveText(new RegExp(`^Ran ${calls} tool call`)) - // A group stays open exactly where a call failed. - await expect(group).toHaveAttribute('aria-expanded', String(failed)) - if (!failed) await group.click() - const items = group.locator('..').getByRole('listitem') - await expect(items).toHaveCount(rows.length) - for (const [at, row] of rows.entries()) { - const item = items.nth(at) - await expect(item.locator('span').nth(1)).toHaveText(row.label) - const glyph = item.locator('span').first() - if (row.failed) await expect(glyph).toHaveClass(FAILED_GLYPH) - else await expect(glyph).not.toHaveClass(FAILED_GLYPH) - if (row.count > 1) await expect(item).toContainText(`×${row.count}`) - else await expect(item).not.toContainText('×') - } + if (rows.length === 0) return + const summary = this.summaries.nth(before.summaries) + await expect(summary).toHaveAttribute('aria-expanded', 'false') + await summary.click() + const items = summary + .locator('..') + .getByRole('listitem') + .filter({ hasNot: this.page.locator(THINKING_GLYPH) }) + await expect(items).toHaveCount(rows.length) + for (const [at, row] of rows.entries()) { + const item = items.nth(at) + await expect(item.getByText(row.label, { exact: true })).toBeVisible() + const glyph = item.locator('span').first() + if (row.failed) await expect(glyph).toHaveClass(FAILED_GLYPH) + else await expect(glyph).not.toHaveClass(FAILED_GLYPH) + if (row.count > 1) await expect(item).toContainText(`×${row.count}`) + else await expect(item).not.toContainText('×') } } From 6a1c539091883013244e07d94cc0b48eaa9819f4 Mon Sep 17 00:00:00 2001 From: Christian Byrne Date: Thu, 10 Sep 2026 16:13:24 -0700 Subject: [PATCH 52/52] test(agent): match Worked-for group label after #17339 --- browser_tests/fixtures/agentConversationFixture.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/browser_tests/fixtures/agentConversationFixture.ts b/browser_tests/fixtures/agentConversationFixture.ts index 13ede86a485..20411036c32 100644 --- a/browser_tests/fixtures/agentConversationFixture.ts +++ b/browser_tests/fixtures/agentConversationFixture.ts @@ -49,7 +49,8 @@ const COMPOSER_LABEL = createI18n({ locale: 'en', messages: { en: enMessages } }).global.t('agent.placeholder') -const GROUP_LABEL = /^Ran (\d+) tool calls?/ +// Matches "Worked", "Worked for 3 seconds" and "Worked for 1m 2s" (agent.worked*). +const GROUP_LABEL = new RegExp(`^${enMessages.agent.worked}( for .+)?$`) const FAILED_GLYPH = /lucide--circle-x/ interface RecordedLink {