Comfy-Org / Comfy-Org/ComfyUI_frontend
Add insert_workflow case to agent subgraph follower Playwright spec once the op ships
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 699
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 490
Description
Add an `insert_workflow` case to the agent subgraph follower Playwright spec once the op ships.
- Spec: https://github.com/Comfy-Org/ComfyUI_frontend/pull/17585 (`browser_tests/tests/agent/agentSubgraphFollower.spec.ts`)
- Blocked on: https://github.com/Comfy-Org/ComfyUI_frontend/pull/17501 (`insert_workflow` in `@comfyorg/comfy-multi-player`)
- Gap is documented in the body of https://github.com/Comfy-Org/ComfyUI_frontend/pull/17585
Full context for agent readers
The current spec covers host materialization via `add_node` and `connect`, then a promoted `set_widget`. It cannot exercise `insert_workflow` because the follower branch (https://github.com/Comfy-Org/ComfyUI_frontend/pull/17202) pins `@comfyorg/comfy-multi-player@0.2.1`, whose frozen op set does not include it.
When https://github.com/Comfy-Org/ComfyUI_frontend/pull/17501 merges and the package version is bumped on the follower branch:
1. Add a fixture in `browser_tests/fixtures/data/agentSubgraphFollower.ts` that emits one `insert_workflow` op carrying a nested subgraph definition (depth 2 is enough) with raw node/link IDs and one dangling link.
2. Assert in the spec:
- the inserted nodes materialize with remapped IDs (not the raw IDs from the payload);
- the dangling link is dropped and the surviving link's slot references are consistent;
- a follow-up id-addressed `set_widget` targeting a node inside the nested definition applies;
- no `__`-prefixed private keys reach `ExportedSubgraph`.
3. Run locally with `DISTRIBUTION=cloud pnpm dev --host 0.0.0.0` and `pnpm test:browser:local --project=cloud browser_tests/tests/agent/agentSubgraphFollower.spec.ts`. The default localhost distribution does not mount the cloud-only agent panel, so the cloud distribution is required.
4. Run `pnpm typecheck:browser` and `pnpm lint`.
The applier-level behaviors above are already covered by unit tests in the cmp package; this issue is only about the browser-level end-to-end path through the follower and LGraph.
Contributor guide
Research direction
Wait for PR 17501 to ship and the follower branch to bump the package, then read browser_tests/fixtures/data/agentSubgraphFollower.ts and browser_tests/tests/agent/agentSubgraphFollower.spec.ts. Run the specified cloud-distribution Playwright spec first; done means the nested insert_workflow case passes its remapped-ID, dangling-link, set_widget, and private-key assertions, followed by browser typecheck and lint.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- playwright, typescript
- Domain
- frontend, testing
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100