Use one Geist tooltip in the web UI (#4272)
* Use one Geist tooltip across the web UI, workbench, and docs The trace detail panel's "Navigate up"/"Navigate down" controls render the Geist tooltip from packages/web-shared: a gray-1000 pill with a 10px radius, 2/1.5 padding, 13px label type, a triangular arrow, and an 8px side offset. Three other tooltip implementations shipped alongside it and none of them matched: - packages/web had its own shadcn copy (light `bg-popover` surface, 1px border, `text-sm`, `rounded-md`, no portal, no arrow, 4px offset). - workbench/nextjs-* had a newer shadcn copy (`bg-foreground`, `text-xs`, `rounded-md`, rotated-square arrow, 0px offset) plus per-call-site `bg-red-600`/`bg-orange-600` overrides. - docs pulled `@vercel/geistdocs/components/tooltip` (`rounded-md`, `text-xs`, px-3, rotated-square arrow, 0px offset). Now there is a single implementation: - web-shared exports Tooltip/TooltipTrigger/TooltipContent/TooltipProvider and packages/web imports them, dropping its duplicate component. - The workbench and docs each carry a verbatim copy of that component (they do not depend on web-shared). The workbench stylesheet gains the `--ds-gray-1000` / `--ds-background-100` tokens and the `text-label-13` utility the surface needs; docs already defines all three. - docs mounts a TooltipProvider in GeistdocsProvider, since the shared Tooltip is the bare Radix root rather than a self-providing wrapper. Call sites that fought the shared surface are cleaned up: the workbench error-tooltip background overrides and the `text-xs` wrappers inside the docs tooltip contents. The tooltip arrow measures itself with ResizeObserver, which jsdom lacks, so packages/web gains a vitest setup file that stubs it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Co-Authored-By: mitul-s <mitul-s@users.noreply.github.com> * Scope the tooltip change to the web packages only Drops the docs and workbench parts of this branch. The remaining change is confined to `@workflow/web` and `@workflow/web-shared`: the shared Geist tooltip is exported from web-shared and `packages/web` consumes it instead of its own shadcn copy. Reverted: - docs — the local tooltip component, the TooltipProvider in GeistdocsProvider, the three worlds components re-pointed off `@vercel/geistdocs/components/tooltip`, the `@radix-ui/react-tooltip` dependency, and the lockfile entry it added. - workbench/nextjs-* — the rewritten tooltip component, the Geist tokens and `text-label-13` utility added to globals.css, and the call-site cleanups in invocations-panel.tsx and ai-elements/message.tsx. Those apps keep the tooltips they had on main. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Co-Authored-By: mitul-s <mitul-s@users.noreply.github.com> * Stub ResizeObserver in the test instead of in the vitest config Drops `packages/web/vitest.setup.ts` and reverts `vitest.config.ts`, so this branch touches no test tooling configuration. The shared tooltip renders an arrow, and Radix measures it with ResizeObserver, which jsdom does not implement. Only status-badge.test.tsx opens a tooltip, so the no-op stub now lives in that file. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Co-Authored-By: mitul-s <mitul-s@users.noreply.github.com> --------- Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com> Co-authored-by: mitul-s <mitul-s@users.noreply.github.com>
M
Mitul Shah committed
f160d64c1b2912d4898cb78921212cd7a17a23dd
Parent: 6c1b1e8
Committed by GitHub <noreply@github.com>
on 9/21/2026, 2:01:55 PM