Skip to content

[web-shared] [web] Delete dead code - #5529

Closed
mitul-s wants to merge 5 commits into
mainfrom
web-shared/dead-code
Closed

mitul-s wants to merge 5 commits into
mainfrom
web-shared/dead-code

Conversation

@mitul-s

@mitul-s mitul-s commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Deletes dead code in @workflow/web-shared and @workflow/web: unused files, components, hooks, exports and dependencies, plus copies of helpers that already exist elsewhere.

Why

Both packages had code nothing calls: shadcn copies that only web uses, wrappers left behind after refactors, URL-state hooks with no callers, and a DataInspector that re-implemented the ref type guards lib/hydration.ts already re-exports from @workflow/core. All of it is code to maintain and review that nothing runs.

Approach

I took the known candidates, then ran knip scoped to the two packages and checked every hit by hand with repo-wide grep (including workbench/ and docs/). For public @workflow/web-shared exports I also searched for consumers outside this repo. If an export had external consumers I kept it. After updating onto current main, I re-checked every deletion against main with grep; all of them are still unused.

Removed public exports (@workflow/web-shared)

  • MenuDropdown and MenuDropdownOption. No code in this repo or in any external consumer I could find uses them. This is the one break in the public API, and the changeset says so.

Deprecated, not removed

  • hydrateResourceIOWithKey is now a @deprecated alias of hydrateResourceIOAsync, which takes the same arguments. External consumers still import it, so removing it would break them.

Deleted files

  • web-shared: ui/card.tsx, ui/alert.tsx (unused copies of web's shadcn components), ui/menu-dropdown.tsx, hooks/use-dark-mode.ts, src/index.d.ts and src/components/index.d.ts (tsc ignores a .d.ts that sits next to a .ts of the same name; the published types come from dist/)
  • web: display-utils/side-panel.tsx, display-utils/page-size-dropdown.tsx, display-utils/rerun-button.tsx, ui/input.tsx, ui/label.tsx, ui/switch.tsx, lib/config-world.server.ts, lib/known-worlds.ts

Other removals (internal, not in the package entry points)

  • web-shared: DuplicateEventTooltip; the unused getPaginationDisplay in lib/utils.ts (web keeps its own copy in app/lib/utils.ts, which is the one in use); the duplicate isStreamRef/isRunRef/isClassInstanceRef/isEncryptedMarker and ref types in ui/data-inspector.tsx, which now imports them from lib/hydration.ts. That file was already imported, so the "avoid circular deps" comment no longer applied. Also the unused isEncryptedData, RUN_REF_TYPE and serializedInstanceToRef re-exports from lib/hydration.ts.
  • web-shared: dropped export from symbols only their own file uses: AttributeBlock, DetailKeyValueRow, sortAttributeKeys, TimelineBar, kbdVariants, MIN_START/MIN_END/MeasureFn/TruncateResult, EXPIRED_DISPLAY_NAME, summarizeArrayBufferView, isRunLevelEvent, convertEventsToSpanEvents.
  • web: useLazyEvents; eight URL-state hooks (useSidebarState, useThemeState, useTabState, useHookIdState, useStepIdState, useEventIdState, useStreamIdState, useWorkflowIdState) and the useUrlParam helper they shared; readStreamServerAction, which the /api/stream/:streamId route replaced; unused re-exports in the workflow-api-client.ts barrel; module-internal flow-graph helpers that were exported; the unused @keyframes gradient in app/globals.css.
  • Stale comments that still mentioned ObjectInspector now refer to DataInspector.
  • Dependencies: shiki from both packages (nothing imports it, and streamdown 2.x doesn't depend on it); @radix-ui/react-label, @radix-ui/react-switch and cross-env from web. The lockfile was regenerated from main's lockfile with pnpm install --lockfile-only and only has deletions.

Left as is on purpose

  • collapseRefs and isDeepEqual are still exported "for testing". They do have tests (test/collapse-refs.test.ts, test/data-inspector.test.ts).
  • Partially used shadcn primitive files in web/app/components/ui (unused DropdownMenuSub, SelectGroup and so on) are kept as vendored component APIs. Exported prop and interface types are kept too.
  • Areas sibling PRs own: getEventColor, the status-color files and RESOURCE_CLASS_NAMES; trace-viewer/util/timing.ts, localMillisecondTime and the timestamp-tooltip time helpers; web's cn; the copy-button files; LoadMoreButton, DecryptButton, Spinner and IconButton/iconButtonVariants; styles.css tokens and keyframes; search inputs.

Validation (re-run after updating onto current main)

  • pnpm turbo typecheck test build --filter=@workflow/web-shared --filter=@workflow/web: 12/12 tasks passed (web-shared 286 tests, web 160 tests).
  • biome check packages/web-shared packages/web: no errors.
  • react-router typegen && tsc --noEmit in packages/web (CI doesn't run it): 19 errors, none in files this PR touches. No missing-module or missing-export errors.
  • Visuals were not rendered. The only runtime code path that changed is DataInspector's ref detection, which now uses the @workflow/core guards. They also match the non-enumerable "opaque" refs that collapseRefs builds, and the existing DataInspector/collapseRefs tests pass.

Co-authored-by: vercel-v[bot] <353008837+vercel-v[bot]@users.noreply.github.com>

Co-authored-by: vercel-v[bot] <353008837+vercel-v[bot]@users.noreply.github.com>
@changeset-bot

changeset-bot Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: d01efae

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

This PR includes changesets to release 18 packages
Name Type
@workflow/web-shared Minor
@workflow/web Minor
@workflow/cli Patch
@workflow/nitro Patch
workflow Patch
@workflow/world-testing Patch
@workflow/nuxt Patch
@workflow/world-cloudflare Patch
@workflow/core Patch
@workflow/world-vercel Patch
@workflow/builders Patch
@workflow/next Patch
@workflow/vitest 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

vercel Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated
example-nextjs-workflow-turbopack Ready Ready Preview, v0 Nov 17, 2026 9:17pm UTC
example-nextjs-workflow-webpack Ready Ready Preview, v0 Nov 17, 2026 9:17pm UTC
example-workflow Ready Ready Preview, v0 Nov 17, 2026 9:17pm UTC
workbench-astro-workflow Ready Ready Preview, v0 Nov 17, 2026 9:17pm UTC
workbench-express-workflow Ready Ready Preview, v0 Nov 17, 2026 9:17pm UTC
workbench-fastify-workflow Ready Ready Preview, v0 Nov 17, 2026 9:17pm UTC
workbench-hono-workflow Ready Ready Preview, v0 Nov 17, 2026 9:17pm UTC
workbench-nestjs-workflow Ready Ready Preview, v0 Nov 17, 2026 9:17pm UTC
workbench-nitro-workflow Ready Ready Preview, v0 Nov 17, 2026 9:17pm UTC
workbench-nuxt-workflow Ready Ready Preview, v0 Nov 17, 2026 9:17pm UTC
workbench-python-workflow Ready Ready Preview, v0 Nov 17, 2026 9:17pm UTC
workbench-sveltekit-workflow Ready Ready Preview, v0 Nov 17, 2026 9:17pm UTC
workbench-tanstack-start-workflow Ready Ready Preview, v0 Nov 17, 2026 9:17pm UTC
workbench-vite-workflow Ready Ready Preview, v0 Nov 17, 2026 9:17pm UTC
workflow-docs Ready Ready Preview, v0 Nov 17, 2026 9:17pm UTC
workflow-swc-playground Ready Ready Preview, v0 Nov 17, 2026 9:17pm UTC
workflow-tarballs Ready Ready Preview, v0 Nov 17, 2026 9:17pm UTC
workflow-web Ready Ready Preview, v0 Nov 17, 2026 9:17pm UTC

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

✅ All tests passed

⚠️ Flaky E2E Tests (passed on retry)

These tests failed at least once and passed on a retry. A recurring entry here is a real race worth investigating.

  • readableStreamWorkflow (hono · vercel-prod / vercel / node / production)

🛠 Infra Events (absorbed by the harness)

Platform anomalies the e2e harness detected and worked around (e.g. a run the queue never picked up, replaced by a fresh run). Clustered timestamps indicate a backend blip; a steady drip indicates a platform issue worth escalating.

  • run-pickup-stall · runs app-generated source against a registered step (tanstack-start) · at 21:20:33Z · abandoned wrun_01M7NP3KYEWDKE0T3CF4QP5R94
  • cold-start-warmup · suite warmup (tanstack-start) · at 21:20:40Z · abandoned wrun_01M7NP3KYWVC63YMYC0VY786XN

E2E Test Summary

Summary
Passed Failed Skipped Total
✅ ▲ Vercel Production 4649 0 940 5589
✅ 💻 Local Development 5272 0 731 6003
✅ 📦 Local Production 5272 0 731 6003
✅ 🐘 Local Postgres 5417 0 586 6003
✅ 🪟 Windows 401 0 13 414
✅ 🌐 Cross-language Conformance 68 0 114 182
✅ dynamic-runs 0 0 0 0
✅ local-postgres-spec9 0 0 364 364
✅ local-spec9 409 0 5 414
✅ vercel-http-transport 1054 0 188 1242
✅ vercel-multi-region 27 0 0 27
✅ vercel-queue-hold 4 0 0 4
✅ vercel-spec9 395 0 19 414
✅ vercel-ws-transport 712 0 116 828
Total 23680 0 3807 27487
Details by Category

✅ ▲ Vercel Production

App Passed Failed Skipped
✅ astro-node 171 0 36
✅ astro-quickjs 170 0 37
✅ example-node 171 0 36
✅ example-quickjs 170 0 37
✅ express-node 171 0 36
✅ express-quickjs 170 0 37
✅ fastify-node 171 0 36
✅ fastify-quickjs 170 0 37
✅ hono-node 171 0 36
✅ hono-quickjs 170 0 37
✅ nest-node 171 0 36
✅ nest-quickjs 170 0 37
✅ nextjs-turbopack-node 199 0 8
✅ nextjs-turbopack-quickjs 198 0 9
✅ nextjs-webpack-node 199 0 8
✅ nextjs-webpack-quickjs 198 0 9
✅ nitro-node 171 0 36
✅ nitro-quickjs 170 0 37
✅ nuxt-node 171 0 36
✅ nuxt-quickjs 170 0 37
✅ python-node 66 0 141
✅ sveltekit-node 190 0 17
✅ sveltekit-quickjs 189 0 18
✅ tanstack-start-node 171 0 36
✅ tanstack-start-quickjs 170 0 37
✅ vite-node 171 0 36
✅ vite-quickjs 170 0 37

✅ 💻 Local Development

App Passed Failed Skipped
✅ astro-stable-node 172 0 35
✅ astro-stable-quickjs 171 0 36
✅ express-stable-node 172 0 35
✅ express-stable-quickjs 171 0 36
✅ fastify-stable-node 172 0 35
✅ fastify-stable-quickjs 171 0 36
✅ hono-stable-node 172 0 35
✅ hono-stable-quickjs 171 0 36
✅ nest-stable-node 172 0 35
✅ nest-stable-quickjs 171 0 36
✅ nextjs-turbopack-canary-node 201 0 6
✅ nextjs-turbopack-canary-quickjs 200 0 7
✅ nextjs-turbopack-quickjs-snapshot 200 0 7
✅ nextjs-turbopack-stable-node 201 0 6
✅ nextjs-turbopack-stable-quickjs 200 0 7
✅ nextjs-webpack-canary-node 201 0 6
✅ nextjs-webpack-canary-quickjs 200 0 7
✅ nextjs-webpack-stable-node 201 0 6
✅ nextjs-webpack-stable-quickjs 200 0 7
✅ nitro-stable-node 172 0 35
✅ nitro-stable-quickjs 171 0 36
✅ nuxt-stable-node 172 0 35
✅ nuxt-stable-quickjs 171 0 36
✅ sveltekit-stable-node 191 0 16
✅ sveltekit-stable-quickjs 190 0 17
✅ tanstack-start-node 172 0 35
✅ tanstack-start-quickjs 171 0 36
✅ vite-stable-node 172 0 35
✅ vite-stable-quickjs 171 0 36

✅ 📦 Local Production

App Passed Failed Skipped
✅ astro-stable-node 172 0 35
✅ astro-stable-quickjs 171 0 36
✅ express-stable-node 172 0 35
✅ express-stable-quickjs 171 0 36
✅ fastify-stable-node 172 0 35
✅ fastify-stable-quickjs 171 0 36
✅ hono-stable-node 172 0 35
✅ hono-stable-quickjs 171 0 36
✅ nest-stable-node 172 0 35
✅ nest-stable-quickjs 171 0 36
✅ nextjs-turbopack-canary-node 201 0 6
✅ nextjs-turbopack-canary-quickjs 200 0 7
✅ nextjs-turbopack-quickjs-snapshot 200 0 7
✅ nextjs-turbopack-stable-node 201 0 6
✅ nextjs-turbopack-stable-quickjs 200 0 7
✅ nextjs-webpack-canary-node 201 0 6
✅ nextjs-webpack-canary-quickjs 200 0 7
✅ nextjs-webpack-stable-node 201 0 6
✅ nextjs-webpack-stable-quickjs 200 0 7
✅ nitro-stable-node 172 0 35
✅ nitro-stable-quickjs 171 0 36
✅ nuxt-stable-node 172 0 35
✅ nuxt-stable-quickjs 171 0 36
✅ sveltekit-stable-node 191 0 16
✅ sveltekit-stable-quickjs 190 0 17
✅ tanstack-start-node 172 0 35
✅ tanstack-start-quickjs 171 0 36
✅ vite-stable-node 172 0 35
✅ vite-stable-quickjs 171 0 36

✅ 🐘 Local Postgres

App Passed Failed Skipped
✅ astro-stable-node 177 0 30
✅ astro-stable-quickjs 176 0 31
✅ express-stable-node 177 0 30
✅ express-stable-quickjs 176 0 31
✅ fastify-stable-node 177 0 30
✅ fastify-stable-quickjs 176 0 31
✅ hono-stable-node 177 0 30
✅ hono-stable-quickjs 176 0 31
✅ nest-stable-node 177 0 30
✅ nest-stable-quickjs 176 0 31
✅ nextjs-turbopack-canary-node 206 0 1
✅ nextjs-turbopack-canary-quickjs 205 0 2
✅ nextjs-turbopack-quickjs-snapshot 205 0 2
✅ nextjs-turbopack-stable-node 206 0 1
✅ nextjs-turbopack-stable-quickjs 205 0 2
✅ nextjs-webpack-canary-node 206 0 1
✅ nextjs-webpack-canary-quickjs 205 0 2
✅ nextjs-webpack-stable-node 206 0 1
✅ nextjs-webpack-stable-quickjs 205 0 2
✅ nitro-stable-node 177 0 30
✅ nitro-stable-quickjs 176 0 31
✅ nuxt-stable-node 177 0 30
✅ nuxt-stable-quickjs 176 0 31
✅ sveltekit-stable-node 196 0 11
✅ sveltekit-stable-quickjs 195 0 12
✅ tanstack-start-node 177 0 30
✅ tanstack-start-quickjs 176 0 31
✅ vite-stable-node 177 0 30
✅ vite-stable-quickjs 176 0 31

✅ 🪟 Windows

App Passed Failed Skipped
✅ nextjs-turbopack-node 201 0 6
✅ nextjs-turbopack-quickjs 200 0 7

✅ 🌐 Cross-language Conformance

App Passed Failed Skipped
✅ python 68 0 114

✅ dynamic-runs

App Passed Failed Skipped
✅ astro-vercel 0 0 0
✅ example-vercel 0 0 0
✅ express-vercel 0 0 0
✅ fastify-vercel 0 0 0
✅ hono-vercel 0 0 0
✅ nest-vercel 0 0 0
✅ nextjs-turbopack-vercel 0 0 0
✅ nextjs-webpack-vercel 0 0 0
✅ nitro-vercel 0 0 0
✅ nuxt-vercel 0 0 0
✅ sveltekit-vercel 0 0 0
✅ tanstack-start-vercel 0 0 0
✅ vite-vercel 0 0 0

✅ local-postgres-spec9

App Passed Failed Skipped
✅ nextjs-turbopack-stable-node 0 0 182
✅ nextjs-turbopack-stable-quickjs 0 0 182

✅ local-spec9

App Passed Failed Skipped
✅ nextjs-turbopack-node 205 0 2
✅ nextjs-turbopack-quickjs 204 0 3

✅ vercel-http-transport

App Passed Failed Skipped
✅ example 171 0 36
✅ express 171 0 36
✅ hono 171 0 36
✅ nextjs-turbopack 199 0 8
✅ nitro 171 0 36
✅ vite 171 0 36

✅ vercel-multi-region

App Passed Failed Skipped
✅ nextjs-turbopack 27 0 0

✅ vercel-queue-hold

App Passed Failed Skipped
✅ nextjs-turbopack 4 0 0

✅ vercel-spec9

App Passed Failed Skipped
✅ nextjs-turbopack-node 198 0 9
✅ nextjs-turbopack-quickjs 197 0 10

✅ vercel-ws-transport

App Passed Failed Skipped
✅ example 171 0 36
✅ express 171 0 36
✅ nextjs-turbopack 199 0 8
✅ vite 171 0 36

📋 View full workflow run

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

📊 Workflow Benchmarks

commit d01efae · Tue, 17 Nov 2026 21:30:01 GMT · run logs

Backend: vercel · app: nextjs-turbopack

Metric Scenario Best (ms) P75 (ms) P90 (ms) P99 (ms) Samples
TTFS step 1766 (+28%) 🔻 1850 🔴 (+19%) 🔻 1877 🔴 (+17%) 🔻 1957 🔴 (+17%) 🔻 30
TTFS stream 507 (-64%) 💚 1846 🔴 (+24%) 🔻 1876 🔴 (+20%) 🔻 1985 🔴 (+18%) 🔻 30
TTFS hook + stream 356 (-71%) 💚 2025 🔴 (+16%) 🔻 2044 🔴 (+14%) 2079 🔴 (+6.0%) 30
Fan-out TTFS Promise.all(100 steps) 439 (+17%) 🔻 2238 (+259%) 🔻 2405 (+35%) 🔻 2420 (+33%) 🔻 10
Fan-out TTLS Promise.all(100 steps) 2361 (+110%) 🔻 4983 (+28%) 🔻 5132 (+25%) 🔻 7160 (+2.9%) 10
STSO 1020 steps (inline) 86 (-10%) 125 (+5.0%) 147 (+5.8%) 244 (+20%) 🔻 1019
WO 1020 steps 126892 (+4.6%) 126892 (+4.6%) 126892 (+4.6%) 126892 (+4.6%) 1
📈 STSO distribution vs main (inline / queue-hop histograms)

1020 steps (inline)

Cumulative STSO time: main 119920ms → this run 124812ms (Δ +4892ms, +4%)

 50-100 ms  ┃                         main   9  this   6    -3
100-150 ms  ██████████████████████┃█  main 960  this 920   -40
150-200 ms  █┃                        main  38  this  64   +26
200-250 ms  ┃                         main   4  this  19   +15
250-300 ms  ┃                         main   3  this   6    +3
300-350 ms  ┃                         main   2  this   4    +2
400-450 ms  ┃                         main   2  this   0    -2
500-550 ms  ┃                         main   1  this   0    -1
📜 Previous results (1)

84da3d0

Tue, 17 Nov 2026 20:15:52 GMT · run logs

vercel / nextjs-turbopack

Metric Scenario Best (ms) P75 (ms) P90 (ms) P99 (ms) Samples
TTFS step 160 (-53%) 💚 289 🔴 (-80%) 💚 323 🔴 (-78%) 💚 475 (-74%) 💚 30
TTFS stream 181 (-30%) 💚 273 🔴 (-80%) 💚 347 🔴 (-76%) 💚 440 (-71%) 💚 30
TTFS hook + stream 279 (-73%) 💚 403 🔴 (-74%) 💚 436 🔴 (-74%) 💚 504 (-74%) 💚 30
Fan-out TTFS Promise.all(100 steps) 287 (-15%) 💚 555 (-5.9%) 1924 (+161%) 🔻 2094 (+23%) 🔻 10
Fan-out TTLS Promise.all(100 steps) 889 (-72%) 💚 3757 (-2.4%) 4974 (+21%) 🔻 5523 (-3.1%) 10
STSO 1020 steps (inline) 73 (+14%) 108 (+2.9%) 128 (+0.8%) 233 (+5.9%) 1019
WO 1020 steps 107814 (+4.5%) 107814 (+4.5%) 107814 (+4.5%) 107814 (+4.5%) 1
ℹ️ Metric definitions & methodology

The collapsed STSO distribution section above buckets every step gap, split inline (same warm process — pure framework overhead) vs queue-hop (fresh process — dispatch, reinit, replay). █ = main, ┃ = this run, ░ = fill.

Best/P75/P90/P99 deltas compare against the most recent benchmark run on main at the time of this run. 🔻 flags a delta worse than +15%, 💚 one better than −15%.

Metrics — TTFS: time to first step body (in-deployment start() → first step body) · Fan-out TTFS: fan-out time to first step (in-deployment start() → first of the parallel step bodies to complete) · Fan-out TTLS: fan-out time to last step (in-deployment start() → last of the parallel step bodies to complete, i.e. when the Promise.all resolves) · STSO: step-to-step overhead (gap between consecutive step bodies) · WO: workflow overhead (whole-run time outside step bodies, in-deployment anchored)

Scenarios — step: one trivial no-op step, no stream; no hooks, so the run stays in turbo mode (in-process fast path) · stream: one streaming step; no hooks, so the run stays in turbo mode (in-process fast path) · hook + stream: registers a hook before one step, which exits turbo mode (dispatch path) · 1020 steps: 1020 trivial sequential steps; STSO is measured between consecutive steps in the given step ranges, and WO is the whole-run overhead outside step bodies · Promise.all(100 steps): 100 trivial no-op steps started together in a single Promise.all; Fan-out TTFS is the first of them to complete and Fan-out TTLS the last, both from the in-deployment clientStart, so their gap is the spread the runtime adds across the fan-out

🔴 marks a percentile over its target (within target is left unmarked). Targets (p75/p90/p99, ms) — TTFS 200/300/600

All timestamps are deployment-side; runs are triggered in-deployment, so the CI runner and api.vercel.com sit outside every measured window. TTFS = start() → first step body (includes dispatch + any cold start); Fan-out TTFS/TTLS = first/last step completion of one Promise.all from the same anchor (the gap is the runtime’s fan-out spread); STSO/WO between step bodies. Streaming delivery performance is measured in durabench.

Cold starts stay in the numbers (real bursty-workload latency, inflates P75+); Best is the warm floor.

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Sim World

Simulated world deterministic testing for races. Traces

🟢 world-sim scenario book — 0 fail of 45 total
scenario outcome events virt replay violations
✅ smoke-no-steps completed 3 0ms ok 0
✅ smoke-one-step completed 5 0ms ok 0
✅ hook-at-step-started completed 9 0ms ok 0
✅ hook-at-step-completed completed 9 0ms ok 0
✅ hook-at-hook-created completed 9 0ms ok 0
✅ claim-hook-at-registration completed 9 0ms ok 0
✅ claim-hook-at-step-started completed 9 0ms ok 0
✅ deadline-hook-wins completed 6 1.0h ok 0
✅ deadline-expires completed 6 1.0h ok 0
✅ step-vs-timer-early-settlement completed 6 1.0h ok 0
✅ long-sleep completed 9 30.0d ok 0
✅ hook-never-arrives stalled 3 0ms skipped 0
✅ step-retries-twice completed 9 2.0s ok 0
✅ parallel-steps completed 7 0ms ok 0
✅ hook-on-execution-state completed 9 0ms ok 0
✅ peek-hook-before-branch completed 9 0ms ok 0
✅ peek-hook-after-branch completed 9 0ms ok 0
✅ peek-hook-at-registration completed 9 0ms ok 0
✅ race-hook-before-probe completed 9 0ms ok 0
✅ race-hook-after-probe completed 9 0ms ok 0
✅ race-duplicate-delivery completed 10 0ms ok 0
✅ attr-hook-before-step completed 9 0ms ok 0
✅ attr-hook-after-step completed 9 0ms ok 0
✅ attr-from-step-body completed 10 0ms ok 0
✅ fork-hook-after-timeout completed 11 1.0m ok 0
✅ fork-hook-before-timeout completed 11 1.0m ok 0
✅ count-hook-after-timeout completed 13 1.0m ok 0
✅ count-hook-before-timeout completed 15 1.0m ok 0
✅ stale-read-step-count-fork completed 15 1.0m ok 0
✅ stale-read-equal-step-counts completed 11 1.0m ok 0
✅ step-vs-step-fork completed 9 0ms ok 0
✅ step-vs-step-fork-fenced completed 9 1.0s ok 0
✅ fence-catches-benign-direction completed 9 1.0s ok 0
✅ run-ahead-fenced-overlap completed 10 1.0s ok 0
✅ in-flight-before-decision completed 15 1.0m ok 0
✅ in-flight-before-decision-counted completed 13 1.0m ok 0
✅ in-flight-after-decision completed 15 2.0m ok 0
✅ stale-read-step-count-fork-fenced completed 15 1.0m ok 0
✅ fork-hook-wins completed 10 1.0m ok 0
✅ fork-timeout-wins completed 10 1.0m ok 0
✅ unclaimed-payload-under-fork completed 14 1.0m ok 0
✅ claimed-payload-under-fork completed 14 1.0m ok 0
✅ writers-independent-step-bodies completed 9 0ms ok 0
✅ writers-scripted-tempo completed 9 0ms ok 0
✅ cancel-mid-step cancelled 6 0ms skipped 0

Full trace: world-sim.txt

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor
Framework Flow route Step reg. Framework output
hono 306.2 KiB (±0) 124.0 KiB (±0) 2.39 MiB (±0)
nextjs-turbopack 397.8 KiB (±0) 491 B (±0) 1.13 MiB (±0)
About these numbers

Sizes are gzip; parentheses show the change against main.
Flow route and Step reg. gate this job, on raw bytes rather than the gzip shown, at max(2%, 50.0 KiB). Framework output is informational.

d01efae · run

mitul-s and others added 3 commits November 17, 2026 16:08
Signed-off-by: Mitul Shah <[email protected]>

Co-authored-by: vercel-v[bot] <353008837+vercel-v[bot]@users.noreply.github.com>
Signed-off-by: Mitul Shah <[email protected]>

Co-authored-by: vercel-v[bot] <353008837+vercel-v[bot]@users.noreply.github.com>
Signed-off-by: Mitul Shah <[email protected]>

Co-authored-by: vercel-v[bot] <353008837+vercel-v[bot]@users.noreply.github.com>
This was referenced Nov 17, 2026
@mitul-s mitul-s closed this Nov 17, 2026
mitul-s added a commit that referenced this pull request Nov 17, 2026
### What

Deletes dead code in `@workflow/web-shared`, and removes every public
export that neither `@workflow/web` nor the Vercel dashboard
(`vercel/front`) imports, including the unused
`@workflow/web-shared/components` entry point. This is the web-shared
half of #5529. The `@workflow/web` half is in #5543, and the two PRs
don't depend on each other.

### Why

Code that nothing runs still has to be maintained and reviewed, and
every export is API we have to keep working. Consumers are expected to
update with this change rather than hold the cleanup back. The dashboard
only needs one change, listed below.

### Preview

[workflow-web
preview](https://workflow-web-git-web-shared-delete-dead-code.labs.vercel.dev/?tab=runs)

1. Open a run whose input or output contains a stream, a run reference,
a class instance or encrypted data, and go to `?tab=trace`.
2. Select the step and check that the inspector still renders stream and
run refs as links, class instances with their class name, and encrypted
fields as `Encrypted` with a Decrypt button that decrypts them.

#### Change needed in `vercel/front`

`hydrateResourceIOWithKey` is removed. Swap it for
`hydrateResourceIOAsync`, which takes the same arguments:

- `observability/(tabs)/workflows/lib/use-events-list-data.ts` (lines 8,
73, 107, 141)
- `observability/(tabs)/workflows/components/run-details-view.tsx`
(lines 9, 192)

Nothing else the dashboard imports changes (checked against front's
`main` on 2026-11-17), and front never imports the `/components`
subpath.

#### Removed exports

| Export | What happened to the code |
| --- | --- |
| `hydrateResourceIOWithKey` | Deleted. It only forwarded to
`hydrateResourceIOAsync`. |
| `MenuDropdown`, `MenuDropdownOption` | Deleted. Unused here, in front,
and anywhere else in the org (`gh search code --owner vercel`). |
| `materializeSteps`, `materializeHooks`, `materializeWaits`,
`materializeAll` and the `Materialized*` types | Deleted
`lib/event-materialization.ts` and its tests. Only `index.ts` and tests
imported it. |
| `shouldShowReenqueueButton`, `hasPendingStepsFromEvents`,
`hasPendingHooksFromEvents`, `isTerminalStatus` | Deleted.
`analyzeEvents` stays. |
| `identifyStreamSteps`, `StreamStep` | Deleted. |
| `looksLikeWorkflowIdSearchInput` | Deleted, along with its tests. |
| `CLASS_INSTANCE_REF_TYPE`, `ClassInstanceRef`, `extractStreamIds`,
`isClassInstanceRef`, `isStreamId`, `isStreamRef`, `STREAM_REF_TYPE`,
`truncateId`, `StreamRef` | Re-exports from
`@workflow/core/serialization-format`. Import them from there. |
| `hookEventsToHookEntity`, `isEncryptedMarker`,
`DUPLICATE_EVENT_MESSAGE`, `findDuplicateEventIds`, `isSealedNoopEvent`,
`SEALED_EVENT_MESSAGE`, `parseExactWorkflowSearchId`,
`ExactWorkflowSearchId`, `isQuickJSSnapshotRun`, `extractConversation`,
`isDoStreamStep`, `formatDurationPrecise`, `DecodedStreamChunkSource`,
`useToast` | Still used inside the package. Only the export from the
entry point goes. |
| `ResolveHookModal`, `ConversationView`, `SidebarDataProvider`,
`SelectedSpanInfo`, `DecryptClickContext`, `DecryptClickContextValue`,
`IconButton`, `Kbd`, `LoadMoreButton` | Same: used internally, no longer
exported. |

#### Kept on purpose

- Types that are part of an API that stays public, so callers can
annotate what they pass in or get back: `ButtonProps`,
`DataInspectorProps`, the
`useHookActions`/`HookResolveModalWrapper`/`ResolveHookDropdownItem`
prop and option types, `EventAnalysis`,
`RunLimitGuidance`/`RunLimitGuidanceKind`,
`RunStateHydratorOptions`/`StateHistoryPage` (the docs describe
`createRunStateHydrator` for custom inspectors), and
`SpanSelectionInfo`/`DetailResource` (the arguments and result of
`FetchSpanDetail`).
- `SpanEvent`, which is part of `Span`, and which the v5 What's New page
says is still exported.
- `collapseRefs` and `isDeepEqual` stay exported from their modules for
their tests.

#### Other cleanup

- Deleted `ui/card.tsx` and `ui/alert.tsx` (unused copies of web's
shadcn components), `hooks/use-dark-mode.ts`, `DuplicateEventTooltip`,
and the unused `getPaginationDisplay` in `lib/utils.ts`.
- Deleted `src/index.d.ts` and `src/components/index.d.ts`: tsc ignores
a `.d.ts` next to a `.ts` of the same name, and the published types come
from `dist/`.
- `ui/data-inspector.tsx` drops its private copies of the ref type
guards and imports them from `lib/hydration.ts`.
- Dropped `export` from symbols that only their own file uses
(`AttributeBlock`, `DetailKeyValueRow`, `sortAttributeKeys`,
`TimelineBar`, `kbdVariants`,
`MIN_START`/`MIN_END`/`MeasureFn`/`TruncateResult`,
`EXPIRED_DISPLAY_NAME`, `summarizeArrayBufferView`, `isRunLevelEvent`,
`convertEventsToSpanEvents`).
- Comments that still mentioned `ObjectInspector` now say
`DataInspector`.
- Removed the unused `shiki` dependency. The lockfile diff is three
deleted lines.

#### Overlap with other open PRs

- #5557 rebuilds `MenuDropdown` on Radix, but this PR deletes it because
nothing uses it. Only one of the two should land.
- #5528 edits `lib/event-materialization.ts` and `start-hook.test.ts`,
which this PR deletes and trims. Whichever lands second resolves the
conflict by keeping the deletion.
- #5522, #5523, #5528 and #5530 edit the same entry-point barrels
(`src/index.ts`, `src/components/index.ts`), so expect small conflicts
there.

#### Differences from #5529

- #5529's sync with `main` restored `ui/alert.tsx` and `shiki` by taking
`main`'s copies of conflicting files. This PR deletes them again because
they are still unused on `main`.
- #5529 kept `hydrateResourceIOWithKey` as a deprecated alias for the
dashboard. This PR removes it.

### How did you test your changes?

- `pnpm turbo typecheck test build --filter=@workflow/web-shared` on the
first commit: 10/10 tasks passed.
- `pnpm typecheck` in `packages/web-shared`: no errors.
- `pnpm vitest run` in `packages/web-shared`: 34 files, 276 tests
passed. Ten fewer than `main`: the seven `event-materialization` tests,
the start Hook materialization test, and the two
`looksLikeWorkflowIdSearchInput` tests, all of which covered deleted
code.
- `pnpm turbo build test --filter=@workflow/web` against this branch:
10/10 passed, so `web` builds on the smaller API. `react-router typegen
&& tsc --noEmit` in `packages/web` reports the same 19 errors as `main`.
- `pnpm biome check packages/web-shared`: no errors.
- Export audit: every remaining export from `src/index.ts` is imported
by `packages/web` or front, apart from the types kept on purpose above.
- Visuals were not rendered. The only runtime change is
`DataInspector`'s ref detection, which now uses the `@workflow/core`
guards. They check `__type` with `in`, so they also match the
non-enumerable opaque refs that `collapseRefs` builds, and the existing
`DataInspector`/`collapseRefs` tests pass.

### PR Checklist - Required to merge

- [x] 📦 `pnpm changeset` was run to create a changelog for this PR
- Use the correct semver bump type: `patch` for bug fixes, `minor` for
new features, `major` for breaking changes.
- Use `pnpm changeset --empty` if you are changing documentation or
workbench apps
- [x] 🔒 DCO sign-off passes (run `git commit --signoff` on your commits)
- [ ] 📝 Ping `@vercel/workflow` in a comment once the PR is ready, and
the above checklist is complete

_Written by fx_

---------

Signed-off-by: mitul-s <[email protected]>
mitul-s added a commit that referenced this pull request Dec 1, 2026
### What

Deletes dead code in `@workflow/web`: unused components, hooks, server
actions, styles and dependencies. This is the web half of #5529. The
`@workflow/web-shared` half is in #5542, and the two PRs don't depend on
each other.

### Why

Nothing runs this code, but it still has to be maintained and reviewed.
#5529 is split into one PR per package so each one can be reviewed and
land on its own.

### Preview

[workflow-web
preview](https://workflow-web-git-web-delete-dead-code.labs.vercel.dev/?tab=workflows)

1. On the Workflows tab, open a workflow's graph and check that loop,
conditional (diamond) and self-loop nodes still render.
2. Open a run, go to `?tab=graph`, and check the execution graph the
same way.
3. On the run page, check that the run actions (replay, wake up, cancel)
still work.

#### Deleted files

- `display-utils/side-panel.tsx`,
`display-utils/page-size-dropdown.tsx`, `display-utils/rerun-button.tsx`
- `ui/input.tsx`, `ui/label.tsx`, `ui/switch.tsx`
- `lib/config-world.server.ts`, `lib/known-worlds.ts`

#### Other removals

- `useLazyEvents` in `run-actions.tsx`.
- Eight URL-state hooks (`useSidebarState`, `useThemeState`,
`useTabState`, `useHookIdState`, `useStepIdState`, `useEventIdState`,
`useStreamIdState`, `useWorkflowIdState`) and the `useUrlParam` helper
they shared.
- `readStreamServerAction`, which the `/api/stream/:streamId` route
replaced.
- Unused re-exports in the `workflow-api-client.ts` barrel.
- Dropped `export` from flow-graph helpers that only
`workflow-graph-viewer.tsx` uses.
- The unused `@keyframes gradient` in `app/globals.css`.
- Dependencies nothing imports: `shiki`, `@radix-ui/react-label`,
`@radix-ui/react-switch` and `cross-env`. The lockfile diff only deletes
lines.

The changeset is a `patch` because nothing here is part of a public API.

#### Differences from #5529

#5529's sync with `main` took `main`'s copies of conflicting files. That
brought back `ui/input.tsx`, `ui/label.tsx` and `ui/switch.tsx`, the
flow-graph `export`s, `@keyframes gradient` and the four dependencies.
All of them are still unused on `main`, so this PR removes them again.
The `workflow-graph-viewer.tsx` conflict keeps `main`'s lucide icons
from #5537.

### How did you test your changes?

- `pnpm turbo test build --filter=@workflow/web`: 10/10 tasks passed.
`web` has no `typecheck` script.
- `pnpm vitest run` in `packages/web`: 24 files, 160 tests passed.
- `react-router typegen && tsc --noEmit` in `packages/web` (CI doesn't
run it): 19 errors. Every one is also on `main`, and none is in a file
this PR touches.
- `pnpm biome check packages/web`: no errors.
- Merged with #5542 locally: no conflicts, and `pnpm install
--lockfile-only` leaves the combined lockfile unchanged.
- Visuals were not rendered. Nothing deleted here was imported or
referenced by code that runs.

### PR Checklist - Required to merge

- [x] 📦 `pnpm changeset` was run to create a changelog for this PR
- Use the correct semver bump type: `patch` for bug fixes, `minor` for
new features, `major` for breaking changes.
- Use `pnpm changeset --empty` if you are changing documentation or
workbench apps
- [x] 🔒 DCO sign-off passes (run `git commit --signoff` on your commits)
- [ ] 📝 Ping `@vercel/workflow` in a comment once the PR is ready, and
the above checklist is complete

_Written by fx_

Signed-off-by: mitul-s <[email protected]>
Co-authored-by: mitul-s <[email protected]>

This branch was successfully deployed

1 active deployment
Preview – workflow-docs — d01efaeb Deployed Nov 17, 2026 by vercel[bot]
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