Skip to content

Backport #2110: feat(nitro): add /_workflow web ui during dev#2224

Open
github-actions[bot] wants to merge 1 commit into
stablefrom
backport/pr-2110-to-stable
Open

Backport #2110: feat(nitro): add /_workflow web ui during dev#2224
github-actions[bot] wants to merge 1 commit into
stablefrom
backport/pr-2110-to-stable

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented Jun 2, 2026

Automated backport of #2110 to stable (backport job run).

AI recommendation: This is a self-contained minor feature addition to @workflow/nitro that adds a dev-only /_workflow route. Both packages/nitro (with its addVirtualHandler and nitro.routing infrastructure) and packages/web (including the ./server export it depends on) exist on stable, so the change should apply cleanly and provides useful dev-mode functionality on the GA channel.

Merge conflicts were resolved by AI (opencode with anthropic/claude-opus-4.7). Please review the conflict resolution carefully before merging.

Signed-off-by: Rihan Arfan <me@file.properties>
@github-actions github-actions Bot requested a review from a team as a code owner June 2, 2026 13:46
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jun 2, 2026

🦋 Changeset detected

Latest commit: 1c708c0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 16 packages
Name Type
@workflow/nitro Minor
@workflow/nuxt Patch
workflow Patch
@workflow/world-testing Patch
@workflow/core Patch
@workflow/builders Patch
@workflow/cli Patch
@workflow/next Patch
@workflow/vitest Patch
@workflow/web-shared Patch
@workflow/web Patch
@workflow/astro Patch
@workflow/nest Patch
@workflow/rollup Patch
@workflow/sveltekit Patch
@workflow/vite Patch

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

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Jun 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
example-nextjs-workflow-turbopack Ready Ready Preview, Comment Jun 2, 2026 1:50pm
example-nextjs-workflow-webpack Ready Ready Preview, Comment Jun 2, 2026 1:50pm
example-workflow Ready Ready Preview, Comment Jun 2, 2026 1:50pm
workbench-astro-workflow Ready Ready Preview, Comment Jun 2, 2026 1:50pm
workbench-express-workflow Ready Ready Preview, Comment Jun 2, 2026 1:50pm
workbench-fastify-workflow Ready Ready Preview, Comment Jun 2, 2026 1:50pm
workbench-hono-workflow Ready Ready Preview, Comment Jun 2, 2026 1:50pm
workbench-nitro-workflow Ready Ready Preview, Comment Jun 2, 2026 1:50pm
workbench-nuxt-workflow Ready Ready Preview, Comment Jun 2, 2026 1:50pm
workbench-sveltekit-workflow Ready Ready Preview, Comment Jun 2, 2026 1:50pm
workbench-tanstack-start-workflow Ready Ready Preview, Comment Jun 2, 2026 1:50pm
workbench-vite-workflow Ready Ready Preview, Comment Jun 2, 2026 1:50pm
workflow-docs Ready Ready Preview, Comment, Open in v0 Jun 2, 2026 1:50pm
workflow-swc-playground Ready Ready Preview, Comment Jun 2, 2026 1:50pm
workflow-tarballs Ready Ready Preview, Comment Jun 2, 2026 1:50pm
workflow-web Ready Ready Preview, Comment Jun 2, 2026 1:50pm

Copy link
Copy Markdown
Member

@TooTallNate TooTallNate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve — AI-resolved conflicts hold up, faithful backport

This is a backport of #2110 (Nitro dev-mode /_workflow dashboard route) to stable. The backport bot called out that conflicts were AI-resolved; I went through the diff carefully and the resolution is correct.

Byte-identical to original

  • Changeset ✓ byte-identical
  • package.json ✓ adds @workflow/web: workspace:* dependency identically
  • addDashboardHandler function body ✓ byte-identical (the createRequire lookup, the pathToFileURL URL wrapping, the lazy server start with promise caching, the two routing API variants with fromWebHandler wrapping for the old one)

Stable-shape adaptations

The diff against stable differs from main in exactly two places, both for sound reasons:

  1. Import line: stable doesn't already have fileURLToPath imported, so the backport adds a fresh import { pathToFileURL } from 'node:url'; line. Main has fileURLToPath already, so its diff added pathToFileURL to the existing import. Same effective import.

  2. Regex change skipped: The original PR removed web|web-shared from a regex pattern in main's isWorkflowPkg check. That regex doesn't exist on stable (it's a main-only addition from another PR for SWC workflow package detection). So skipping it is correct — there's nothing to update.

After stripping these two adaptation differences, the additions are byte-identical between the original and backport.

Verified locally

  • pnpm install --frozen-lockfile
  • pnpm turbo run build --filter @workflow/nitro
  • pnpm turbo run typecheck --filter @workflow/nitro

Dependency sanity check

  • @workflow/web/server exports startServer(port) on stable ✓ (verified origin/stable:packages/web/server.js)
  • @workflow/web is in the workspace and a workspace dep gets added correctly

CI

CI doesn't show the Tests workflow runs yet — only deployments + DCO + Socket Security pass (21 checks). The PR was opened ~16 minutes ago by the github-actions[bot]; Tests may need a manual approval or just hasn't triggered yet. Worth verifying CI runs before merge but no functional issues from the diff itself.

Bottom line

Faithful backport. The dev-only /_workflow redirect lets Nitro projects access the workflow web UI in development without a separate pnpm workflow web command. Useful quality-of-life feature now on the GA channel. Approving.

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.

1 participant