Conversation
🦋 Changeset detectedLatest commit: cff1feb The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Each call to Now let me verify the Looking at the However, considering that DAGs are derived from static analysis of the source code at bundle time, and only the wrangler instance that owns the workflow would have the bundled source, this seems intentional. The DAG data is embedded in the binding map at bundling time, so only the owner would have it. Let me now confirm there are no issues with the The UI
After thorough review, this PR looks well-structured. The architecture is clean - data flows correctly from WASM parser through wrangler to miniflare to the explorer worker to the UI. Let me check one last thing about the The DAG parsing happens inside LGTM |
d88648d to
5d6cffb
Compare
create-cloudflare
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-editor-shared
wrangler
commit: |
|
✅ All changesets look good Review Summary:
All version types are appropriate (minor for new features), descriptions are meaningful, and there are no formatting issues. |
abcf6f6 to
2d59c0a
Compare
|
Codeowners approval required for this PR:
Show detailed file reviewers
|
2d59c0a to
1663d07
Compare
1663d07 to
3f2bef8
Compare
3f2bef8 to
cff1feb
Compare
Fixes WOR-1199.
Adds the diagram of workflow steps to the local explorer UI ( to match production Workflows dashboard). The diagram is generated by static analysis of the workflow source code. For this, we vendor a WASM build of the Rust-based visualizer-controller (the same parser that powers the production diagram). Vendoring was chosen because the parser is not yet ready to be open-sourced as a standalone npm package, but we still wanted exact production parity rather than maintaining a separate JS parser. The WASM binary is ~982KB.
Changes
Wrangler:
vendor/workflow-dag-parser/: vendored WASM build of the visualizer-controller (JS wrapper + .wasm binary)src/workflows/dag-parser.ts: calls the vendored parser on the esbuild bundle output and maps results per workflowsrc/workflows/dag-types.ts: TS types matching the parser's output formatsrc/dev/miniflare/index.ts: parses dags once per bundle change, threads them through workflow optionstsup.config.ts: esbuild plugin to copy .wasm to wrangler-dist/Miniflare:
plugins/shared/index.ts: WorkflowDagPayload type and dag field on WorkflowOptionplugins/workflows/index.ts: Zod schema accepts dagplugins/core/types.ts: dag field on WorkflowBindingInfoplugins/core/explorer.ts: passes dag through to explorer binding mapsrc/index.ts: threads dag through workflow options collectionworkers/local-explorer/resources/workflows.ts: getWorkflowDag handlerworkers/local-explorer/explorer.worker.ts: GET /api/workflows/:name/graph routeworkers/local-explorer/openapi.local.json: new endpoint + schemaLocal Explorer UI:
components/workflows/diagram/: full diagram rendering, ported from the production Workflows dashboard (WorkflowDiagram, DAGWrapper, connectors, step cards, icons, BackgroundDots, CopyDiagramButton)routes/workflows/$workflowName/index.tsx: side-by-side layout with instances table + diagram panel, expand/collapse toggle, copy/download/refresh buttonsA picture of a cute animal (not mandatory, but encouraged)