Scale Workflow Activity vNext canvas for large workflows - #3581
Open
AbigailDeng wants to merge 26 commits into
Open
Scale Workflow Activity vNext canvas for large workflows#3581AbigailDeng wants to merge 26 commits into
AbigailDeng wants to merge 26 commits into
Conversation
…y-vnext' into feat/2026-09-03_workflow-canvas-scaling
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Workflow Activity vNext reuses the shared React Flow canvas, but large workflows still caused graph-wide node work and lost unchanged object references during common interactions. Continuous zoom subscriptions and mounting all offscreen elements also limited scaling, while Run Detail rebuilt semantically unchanged graph elements. The branch had no repeatable production-build benchmark for 100/500/1000-node workflows.
Solution
2N - 3edges, four rendering policies, eight scenarios, and 96 result rows.1.60.0, whose Node>=18requirement matches the package's Node>=18.20.0contract.Affected paths
src/shared/graphs/GraphCanvas.tsxand graph reconciliation helpers.Benchmark
The benchmark route is included only when the build-time value
AEVATAR_WORKFLOW_CANVAS_BENCHMARKis exactly1. It uses deterministic synthetic data and performs no authentication, backend, storage, or external network calls.CI builds the production bundle, runs the Playwright benchmark against system Chrome, and uploads:
apps/aevatar-console-web/artifacts/workflow-canvas-benchmark/results.jsonapps/aevatar-console-web/artifacts/workflow-canvas-benchmark/summary.mdScope boundary
Related to #3578.
Viewport capture and authoritative persistence are intentionally deferred to #3576 and #3577. This change does not use
localStorage,sessionStorage, IndexedDB, cookies, or any browser-local state as an authoritative viewport source.Local verification
Commands below were run from
apps/aevatar-console-webunless a repository-root path is shown.Explicit changed Jest tests:
pnpm exec jest src/pages/team-member-workflow-studio/components/WorkflowStudioCanvas.test.tsx src/pages/workflow-activity-vnext/activity/RunDetailPage.test.tsx src/pages/workflow-activity-vnext/activity/executionGraph.test.ts src/pages/workflow-activity-vnext/index.test.tsx src/pages/workflow-canvas-benchmark/benchmarkGraph.test.ts src/routesConfig.test.ts src/shared/graphs/GraphCanvas.test.tsx src/shared/graphs/reconcileGraphElements.test.ts src/shared/studio/graph.test.ts --runInBandResult: 9 suites passed, 263 tests passed.
Dependency-related Jest tests:
pnpm exec jest --findRelatedTests config/config.ts config/routes.ts playwright.performance.config.ts src/app.tsx src/pages/team-member-workflow-studio/components/WorkflowStudioCanvas.tsx src/pages/team-member-workflow-studio/components/WorkflowStudioCanvasRegion.tsx src/pages/team-member-workflow-studio/components/WorkflowStudioEditorSurface.tsx src/pages/workflow-activity-vnext/activity/RunDetailPage.tsx src/pages/workflow-activity-vnext/activity/executionGraph.ts src/pages/workflow-activity-vnext/hooks/useWorkflowEditor.ts src/pages/workflow-activity-vnext/workflows/WorkflowEditorPage.tsx src/pages/workflow-canvas-benchmark/benchmarkGraph.ts src/pages/workflow-canvas-benchmark/index.tsx src/shared/graphs/GraphCanvas.tsx src/shared/graphs/reconcileGraphElements.ts src/shared/studio/graph.ts --runInBandResult: 25 suites passed, 613 tests passed. The existing React 19
flushSynclifecycle warning remains visible inworkflow-activity-vnext/index.test.tsx; it does not fail the suite and predates this branch.Changed-file static checks:
Result: 26 files checked, no fixes required.
Dependency and repository guards:
Result: lockfile current; test stability guard passed; docs lint passed for 87 files; diff check passed.
Final static review: no Critical, Important, or Minor findings; Ready YES.
Full frontend suite, affected-unavailable typecheck, production build, and production Playwright benchmark are delegated to GitHub CI by the personal incremental-validation policy.