You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Brings the shared Button (packages/web-shared/src/components/ui/button.tsx) to 1:1 with the Geist Button (verified against the Geist source: packages/geist/src/components/button/button.module.css). Fixes three issues, most visibly on the encrypted-data "Decrypt" overlay (EncryptedDataBlock):
Hover (was broken): the inverted/default button drove its dark-mode hover with a dark-theme:hover: class, but dark-theme is not a registered Tailwind variant in our setup (theming is done by flipping --ds-* tokens), so the class compiled to nothing. In dark mode the white button fell back to the hardcoded light hover (hsl(0,0%,22%)) and turned dark gray; when imported into apps that supply their own Geist tokens (e.g. vercel/front), an earlier token-based attempt resolved to nothing and the background went transparent. Now uses Geist's literal hover fallbacks (hsl(0,0%,22%) / hsl(0,0%,80%)) driven by arbitrary ancestor-theme variants ([.dark-theme_&]: and [[data-theme=dark]_&]:) — no token dependency, so it resolves in any consumer.
Focus (was missing): added Geist's focus ring (outline: 2px solid var(--ds-focus-color) + 2px offset). Also defines --ds-focus-color (blue-700 / blue-900) in web-shared/styles.css, which was referenced but undefined (also fixes icon-button's colorless focus outline).
Radius:xs (24px) now uses Geist's tiny 4px radius instead of inheriting rounded-md (6px).
Tailwind v3 + v4 compatibility
web-shared is consumed by both TW3 and TW4 apps, so the focus ring uses arbitrary properties ([outline:...]) rather than the bare outline / outline-[var()] utilities (which differ between versions). Verified by compiling the exact class string through Tailwind 3.3.6 and 4.2.4 — both emit the correct .dark-theme …:hover, [data-theme=dark] …:hover, focus-ring, and border-radius:4px rules, with literal hsl() fallbacks present (so the background can never resolve to transparent).
Test plan
pnpm build for @workflow/web-shared (button/styles changes typecheck)
Compiled button classes through Tailwind v3.3.6 and v4.2.4 — output verified
Visual check of idle / hover / focus / decrypted states in dark mode
Confirm hover/focus render correctly when web-shared is imported into vercel/front
Note
CI's pnpm turbo run build may flag a pre-existing, unrelatedtsc error on main: attribute-panel.tsx:423 declares an attributes display fn whose key isn't in the AttributeKey type (TS2353). It is independent of this change (resolved separately on the ms/trace-search branch). Not touched here to keep this PR focused.
The shared Button's dark-mode hover relied on an unregistered `dark-theme:`
Tailwind variant, so the inverted (default) button lost its hover style — and
the background resolved to transparent when consumed by apps that supply their
own Geist tokens (e.g. vercel/front). Use Geist's literal hover fallbacks
driven by arbitrary ancestor-theme variants instead, render the previously
missing focus-visible ring, and apply Geist's 4px tiny radius to the xs size.
Authored to compile under both Tailwind v3 and v4.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The primary file changed (packages/web-shared/src/components/ui/button.tsx) does not exist on stable — the shared Button component is main-only. The accompanying --ds-focus-color additions in styles.css exist solely to support that Button (and an icon-button also absent on stable), so backporting only the CSS variable wouldn't fix any user-visible behavior on stable.
To override, re-run the Backport to stable workflow manually via workflow_dispatch and paste this commit SHA into the ref input:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Brings the shared
Button(packages/web-shared/src/components/ui/button.tsx) to 1:1 with the GeistButton(verified against the Geist source:packages/geist/src/components/button/button.module.css). Fixes three issues, most visibly on the encrypted-data "Decrypt" overlay (EncryptedDataBlock):dark-theme:hover:class, butdark-themeis not a registered Tailwind variant in our setup (theming is done by flipping--ds-*tokens), so the class compiled to nothing. In dark mode the white button fell back to the hardcoded light hover (hsl(0,0%,22%)) and turned dark gray; when imported into apps that supply their own Geist tokens (e.g.vercel/front), an earlier token-based attempt resolved to nothing and the background went transparent. Now uses Geist's literal hover fallbacks (hsl(0,0%,22%)/hsl(0,0%,80%)) driven by arbitrary ancestor-theme variants ([.dark-theme_&]:and[[data-theme=dark]_&]:) — no token dependency, so it resolves in any consumer.outline: 2px solid var(--ds-focus-color)+2pxoffset). Also defines--ds-focus-color(blue-700 / blue-900) inweb-shared/styles.css, which was referenced but undefined (also fixesicon-button's colorless focus outline).xs(24px) now uses Geist's tiny4pxradius instead of inheritingrounded-md(6px).Tailwind v3 + v4 compatibility
web-shared is consumed by both TW3 and TW4 apps, so the focus ring uses arbitrary properties (
[outline:...]) rather than the bareoutline/outline-[var()]utilities (which differ between versions). Verified by compiling the exact class string through Tailwind 3.3.6 and 4.2.4 — both emit the correct.dark-theme …:hover,[data-theme=dark] …:hover, focus-ring, andborder-radius:4pxrules, with literalhsl()fallbacks present (so the background can never resolve totransparent).Test plan
pnpm buildfor@workflow/web-shared(button/styles changes typecheck)vercel/frontNote
CI's
pnpm turbo run buildmay flag a pre-existing, unrelatedtscerror onmain:attribute-panel.tsx:423declares anattributesdisplay fn whose key isn't in theAttributeKeytype (TS2353). It is independent of this change (resolved separately on thems/trace-searchbranch). Not touched here to keep this PR focused.🤖 Generated with Claude Code