Skip to content

web: consume @bb/shared-ui for button/input/label - #1954

Open
yegor-korobeynikov wants to merge 3 commits into
get-bb:mainfrom
yegor-korobeynikov:design-system/web-shared-ui-migration
Open

web: consume @bb/shared-ui for button/input/label#1954
yegor-korobeynikov wants to merge 3 commits into
get-bb:mainfrom
yegor-korobeynikov:design-system/web-shared-ui-migration

Conversation

@yegor-korobeynikov

Copy link
Copy Markdown

Summary

apps/web (the public site, getbb.app) had its own copy-pasted button/input/label components — byte-identical in logic to packages/shared-ui's, diverging only in import paths. This swaps apps/web's dashboard.tsx onto @bb/shared-ui and removes the now-dead local copies (plus already-unused badge/pill/card).

  • Removed dead local badge.tsx, pill.tsx, card.tsx (zero importers)
  • Added @bb/shared-ui as a dependency of apps/web
  • Added the Tailwind v4 @source scan directive so shared-ui's classes aren't purged from the prod bundle (mirrors apps/app's theme.css)
  • Ported the four theme tokens shared-ui components need that apps/web didn't yet define (--success-foreground, --surface-recessed-soft-solid, --surface-raised-solid, --surface-attention) — landing.css's separate token set and the landing/dashboard isolation boundary in __root.tsx are untouched
  • Swapped dashboard.tsx's imports to @bb/shared-ui/button, @bb/shared-ui/input, @bb/shared-ui/label
  • Removed the now-unused local button.tsx, input.tsx, label.tsx

Test plan

  • pnpm --filter @bb/web typecheck — clean
  • pnpm --filter @bb/web test — 13 files / 74 tests pass
  • pnpm --filter @bb/web build — succeeds; verified compiled CSS bundle contains shared-ui's classes and all four new tokens (not purged)
  • Local vite dev + headless-browser check of /dashboard and / (landing) — both render correctly, computed styles resolve to real color values (no var(--undefined) fallbacks), no console errors
  • Full Cloudflare Workers staging deploy (vibecodethis.site) — not verified: the staging Worker requires 5 secrets (GITHUB_CLIENT_ID, GITHUB_CLIENT_SECRET, BETTER_AUTH_SECRET, LANDING_POSTHOG_KEY, RESEND_API_KEY) that weren't available in this environment. The local vite dev check above covers rendering/CSS but not the real Worker runtime or auth flow — flagging this as a known, named gap for a maintainer with staging secrets to confirm before merge, not a silent skip.

update_environment_directory switches a thread's environment/cwd for
the next turn but never invalidated the last recorded provider
session. The provider CLI keys its own session storage by the cwd it
started in, so resuming that session id under a new cwd fails with
"No conversation found with session ID: ...".

getLastStoredProviderThreadId now withholds a session for resume when
its recorded environmentId explicitly differs from the thread's
current one, letting the next turn start a fresh provider session
instead. A missing environmentId (legacy/synthetic rows) still falls
back to the old trusting behavior.
Zero importers anywhere in apps/web — confirmed via grep. Leftover
from the original copy-paste fork of shared-ui; @bb/shared-ui already
provides these if apps/web ever needs them.
apps/web had its own copy-pasted button/input/label components,
byte-identical to shared-ui's, differing only in import paths. Adds
@bb/shared-ui as a dependency, wires the Tailwind v4 @source scan so
its classes are not purged from the prod bundle, ports the four
theme.css tokens shared-ui needs that apps/web did not yet define
(success-foreground, surface-recessed-soft-solid, surface-raised-solid,
surface-attention), swaps dashboard.tsx's imports to the shared
package, and removes the now-dead local copies.

landing.css's separate ink-prefixed token set is untouched - the
landing/dashboard token-isolation boundary in __root.tsx still holds.
@yegor-korobeynikov
yegor-korobeynikov force-pushed the design-system/web-shared-ui-migration branch from 5ce28bc to 7a98c0c Compare August 20, 2026 18:50
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