Skip to content

docs: guide to running Workflow Builder diagrams on Temporal - #157

Open
dawidaksamski wants to merge 3 commits into
feat/WB-532-temporal-code-exchange-samplefrom
feat/WB-531-workflow-builder-temporal-guide
Open

dawidaksamski wants to merge 3 commits into
feat/WB-532-temporal-code-exchange-samplefrom
feat/WB-531-workflow-builder-temporal-guide

Conversation

@dawidaksamski

@dawidaksamski dawidaksamski commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Guide: Using Workflow Builder with Temporal

Adds apps/docs/src/content/docs/guides/temporal.mdx and one screenshot. The page walks through the @workflowbuilder/temporal integration file by file, proves it with a single run, and hands the reader the complete code as the runnable sample in examples/workflow-builder-temporal, fetched with npx degit.

The shape follows Temporal's own integration pages: understand the integration, see one run, download the code. It is about 2,300 words of prose and 270 lines of code, against roughly 2,500 words and 900 lines in the first draft of this branch.

What the page keeps is the part an integration reviewer cares about: the diagram-to-Workflow-Execution and node-to-Activity model, the workflows.ts re-export and why the bundler forces it, the executor registry as a mapped type with access to the attempt number and retry control through error classes, the snapshot-to-definition mapper that is the only glue between the canvas and the plugin, and what a run looks like in Event History, including node labels as activity Summaries and the retry recorded as attempt: 2 with lastFailure.

Every snippet labelled with a sample path is a verbatim excerpt of that file or a deletions-only subset of it, so the page and the folder the reader downloads cannot disagree. Three snippets diverge deliberately and say so in the prose.

Two files, no other workspace touched.

Base branch

Targets feat/WB-532-temporal-code-exchange-sample on purpose. The page's first actionable step is npx degit against examples/workflow-builder-temporal, which is not on main yet, so the sample has to land first. The docs site deploys by hand from release, so the published page never carries the dead link.

How it was verified

  • pnpm build:docs passes locally: 209 pages, with the guide and its screenshot emitted. The Docs build check also passes on CI for this branch.
  • A script diffs every snippet labelled with a sample path against that file. Six are verbatim or pure subsets. The three that differ are the console-only store, the client without its error handling, and the Run button excerpt, each called out where it appears.
  • The sample those snippets come from is typechecked and built by the temporal-sample CI job, and its runtime behaviour was verified when it landed: a full run against a local Temporal server, the deliberate retry in Event History, the bridge over HTTP and the editor driven in headless Chromium.
  • All internal links resolve, the in-page anchor matches its heading, and the three anchors into the plugin README exist. Prettier and eslint clean.

Review pass

A review of the finished page found 13 factual defects, all fixed here. The ones worth naming:

  • The pruned-branch paragraph asserted one branch outcome as fact. The sample draws a random amount against a threshold, so about half of all runs take the other branch and the sentence was false for those readers. It now describes the run in the transcript, and says the skip still reaches Event History as an emitEvent activity rather than leaving no trace.
  • The activity-profiles note had the direction backwards. A profiles map given to createRunWorkflow alone is applied; it is a map given to the plugin alone that leaves every node on the default.
  • The Temporal Cloud note said two connections. There are three, and missing the engine's one leaves the canvas Run button pointing at localhost.
  • The bridge port was offered as configurable without saying that the editor's Vite proxy names the same port, so moving it takes two edits.
  • Requirements asked for Node 20 while the plugin declares 20.3, and said "nothing else" beside a step that shells out to git.

Not in this PR

  • Nothing automatically checks the guide's snippets against the sample, so a rename there leaves both CI jobs green and this page quietly wrong. A small script in the tools workspace, asserting each labelled fence is a contiguous run of lines from the file it names, would close that. Worth its own change.

@dawidaksamski dawidaksamski self-assigned this Sep 17, 2026
@dawidaksamski
dawidaksamski added this pull request to stack #158 September 17, 2026 09:26
@dawidaksamski
dawidaksamski force-pushed the feat/WB-531-workflow-builder-temporal-guide branch from 4112961 to 4eb0d4d Compare September 21, 2026 16:20
@dawidaksamski dawidaksamski changed the title feat(guide): @workflowbuilder/temporal guide docs: guide to running Workflow Builder diagrams on Temporal Sep 21, 2026
@dawidaksamski
dawidaksamski marked this pull request as ready for review September 21, 2026 16:36
@dawidaksamski
dawidaksamski force-pushed the feat/WB-531-workflow-builder-temporal-guide branch from 7895b30 to d86f589 Compare September 22, 2026 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants