Skip to content

[web-shared] Define design tokens once and follow the theme class for dark mode - #5524

Merged
mitul-s merged 6 commits into
mainfrom
web-shared/geist-tokens
Nov 17, 2026
Merged

mitul-s merged 6 commits into
mainfrom
web-shared/geist-tokens

Conversation

@mitul-s

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

Copy link
Copy Markdown
Contributor

Defines the design tokens once, in @workflow/web-shared/styles.css, with the full palette, shadows and theme tokens. It also removes the second palette in @workflow/web.

Why

The tokens in web-shared/src/styles.css had errors and gaps:

  • Dark background-100 and background-200 were swapped.
  • Light gray-alpha-600 was 0.24 instead of 0.34.
  • 10 of the 12 --ds-shadow-* tokens it referenced were undefined.
  • It was missing the focus ring, z-index, motion, overlay and popover tokens, surface-hover/surface-active, hocus and the copy strong weight.
  • dark: followed the OS setting, but the app switches theme with a class.

web/app/globals.css also had its own radius scale (6/8/10/14px instead of 4/6/8/12), extra shadows, Tailwind v3 hex node fills, and a second copy of the palette under prefers-color-scheme.

Changes

  • styles.css holds the full token set. dark matches both .dark (next-themes in @workflow/web) and .dark-theme. --color-*: initial stays commented out so Tailwind's default colours still resolve.

  • web/app/globals.css removes:

    • the palette copy and the prefers-color-scheme block
    • the extra shadows and --ds-green-50
    • the unused --geist-background/--accents-* aliases
    • the radius override and the unused chart/sidebar variables

    The shadcn variables still in use are mapped onto the tokens on every theme root. Node fills use --ds-{hue}-100.

  • button.tsx uses the token radii (rounded-sm/md/lg), and its three repeated dark selectors become dark:. The hsl(0 0% 22%)/hsl(0 0% 80%) hover fills stay because no token sits one step off gray-1000.

  • These files lose dark: overrides for colours the tokens already flip: both ui/alert.tsx files, live-status.tsx and both flow-graph viewers. red-50/red-950 and the orange-* text and border colours become red/amber token steps.

  • context-card.tsx: the tip stroke uses gray-alpha-400 instead of hardcoded hex, and the extra ring that --ds-shadow-tooltip already includes is gone.

  • minimap.tsx: drops its rgb() fallback and its repeated dark selectors.

  • The unused tooltip-enter keyframe is removed.

  • live-status.tsx: the class was a broken template string ($ without {}), so no colour applied. It now interpolates and keeps text-red-600.

  • packages/web-shared/AGENTS.md: keep tokens in styles.css only, and don't redeclare them.

--muted-foreground maps to gray-900 and --destructive to red-800. Replacing text-muted-foreground call sites and adjusting status colours are left to follow-up PRs.

Breaking changes

  • The theme doesn't apply under [data-theme="dark"], and dark-theme:/light-theme: no longer match .dark/.light. Use dark: instead. gh search code found no uses in this repo or the vercel org.
  • styles.css no longer defines:
    • the font-v0 and geist-sr-only utilities
    • the --geist-space-* and --geist-page-margin variables
    • the --font-sans, --font-pixel-* and --font-serif* aliases

Testing

  • pnpm turbo typecheck test build --continue --filter=@workflow/web-shared --filter=@workflow/web: 12/12 tasks
  • pnpm biome check packages/web-shared packages/web: exit 0
  • Built @workflow/web CSS:
    • rounded-sm/md/lg are 4/6/8px.
    • There are no prefers-color-scheme rules.
    • dark: compiles to :where(.dark,.dark *,.dark-theme,.dark-theme *).
    • Dark --ds-background-100-value is 0,0%,4%.

Not checked visually: light and dark mode, button hover, the context-card tip, the minimap and the flow graph.

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>
@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 8:29pm UTC
example-nextjs-workflow-webpack Ready Ready Preview, v0 Nov 17, 2026 8:29pm UTC
example-workflow Ready Ready Preview, v0 Nov 17, 2026 8:29pm UTC
workbench-astro-workflow Ready Ready Preview, v0 Nov 17, 2026 8:29pm UTC
workbench-express-workflow Ready Ready Preview, v0 Nov 17, 2026 8:29pm UTC
workbench-fastify-workflow Ready Ready Preview, v0 Nov 17, 2026 8:29pm UTC
workbench-hono-workflow Ready Ready Preview, v0 Nov 17, 2026 8:29pm UTC
workbench-nestjs-workflow Ready Ready Preview, v0 Nov 17, 2026 8:29pm UTC
workbench-nitro-workflow Ready Ready Preview, v0 Nov 17, 2026 8:29pm UTC
workbench-nuxt-workflow Ready Ready Preview, v0 Nov 17, 2026 8:29pm UTC
workbench-python-workflow Ready Ready Preview, v0 Nov 17, 2026 8:29pm UTC
workbench-sveltekit-workflow Ready Ready Preview, v0 Nov 17, 2026 8:29pm UTC
workbench-tanstack-start-workflow Ready Ready Preview, v0 Nov 17, 2026 8:29pm UTC
workbench-vite-workflow Ready Ready Preview, v0 Nov 17, 2026 8:29pm UTC
workflow-docs Ready Ready Preview, v0 Nov 17, 2026 8:29pm UTC
workflow-swc-playground Ready Ready Preview, v0 Nov 17, 2026 8:29pm UTC
workflow-tarballs Ready Ready Preview, v0 Nov 17, 2026 8:29pm UTC
workflow-web Ready Ready Preview, v0 Nov 17, 2026 8:29pm UTC

@changeset-bot

changeset-bot Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 97c4c08

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 Patch
@workflow/web Patch
@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

@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

@mitul-s
mitul-s marked this pull request as ready for review November 17, 2026 20:07
@mitul-s
mitul-s requested a review from a team as a code owner November 17, 2026 20:07
mitul-s and others added 2 commits November 17, 2026 15:10
# Conflicts:
#	packages/web-shared/src/styles.css
…yles

Co-authored-by: vercel-v[bot] <353008837+vercel-v[bot]@users.noreply.github.com>
@mitul-s mitul-s changed the title [web-shared] Match Geist design tokens 1:1 with geistcn [web-shared] Make design tokens complete and consistent Nov 17, 2026

@vercel vercel Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Additional findings

  1. packages/web-shared/src/styles.css:863-867 — Removing the landing-animation styles prevents the selected span from flashing when users navigate from “View in Trace,” losing the visual cue identifying the destination span.

    Fix on Vercel

Comment thread packages/web/app/globals.css Resolved
…vious commit

Co-authored-by: vercel-v[bot] <353008837+vercel-v[bot]@users.noreply.github.com>
@mitul-s mitul-s changed the title [web-shared] Make design tokens complete and consistent [web-shared] Define design tokens once and follow the theme class for dark mode Nov 17, 2026
@mitul-s
mitul-s merged commit bace5ef into main Nov 17, 2026
73 checks passed
@mitul-s
mitul-s deleted the web-shared/geist-tokens branch November 17, 2026 20:45
@github-actions

Copy link
Copy Markdown
Contributor

No backport to stable for bace5ef (AI decision).

This is a design-token refactor and feature enhancement for the observability UI. It adds new tokens, a hocus variant and surface-* colours, changes dark-mode selection semantics, and makes self-described breaking changes (it drops [data-theme="dark"], font-v0, geist-sr-only and the --geist-space-* variables), which is not appropriate for a maintenance line. The genuine fixes inside it (the swapped dark background-100/background-200 values, the light gray-alpha-600 value, the undefined --ds-shadow-* tokens, and the broken template string in live-status.tsx that kept the colour class from applying) could be split out and force-backported if wanted.

To override, re-run the Backport to stable workflow manually via workflow_dispatch and paste this commit SHA into the ref input:

bace5ef5d554711f6eea9d02cee95ab0b4c34e39

This branch was successfully deployed

1 active deployment
Preview – workflow-docs — 97c4c08e 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.

2 participants