Skip to content

Migrate docs app to @vercel/geistdocs#391

Open
molebox wants to merge 22 commits into
mainfrom
migrate-docs
Open

Migrate docs app to @vercel/geistdocs#391
molebox wants to merge 22 commits into
mainfrom
migrate-docs

Conversation

@molebox

@molebox molebox commented May 28, 2026

Copy link
Copy Markdown
Contributor

Migrates the docs app from vendored geistdocs/fumadocs runtime code to the published @vercel/geistdocs package (1.6.1).

  • Runtime, layout, MDX, source, proxy, and routes now come from @vercel/geistdocs
  • Uses the package Badge, CommandPrompt, and ThemeAwareImage (dropped local copies)
  • Home code blocks render via the package CodeBlock, with framework logos via title="…#next" / #svelte
  • Migrated local shadcn tokens to the Geist --ds-* scale; geistdocs.css trimmed to just the page-background override
  • Restored the install switcher's width animation

@vercel

vercel Bot commented May 28, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
flags-playground Ready Ready Preview, Comment, Open in v0 Jun 5, 2026 6:45pm
flags-sdk-dev Ready Ready Preview, Comment, Open in v0 Jun 5, 2026 6:45pm
flags-sdk-next-15 Ready Ready Preview, Comment, Open in v0 Jun 5, 2026 6:45pm
flags-sdk-next-16 Ready Ready Preview, Comment, Open in v0 Jun 5, 2026 6:45pm
flags-sdk-snippets Ready Ready Preview, Comment, Open in v0 Jun 5, 2026 6:45pm
flags-sdk-sveltekit-snippets Ready Ready Preview, Comment, Open in v0 Jun 5, 2026 6:45pm
shirt-shop Ready Ready Preview, Comment, Open in v0 Jun 5, 2026 6:45pm
shirt-shop-api Ready Ready Preview, Comment, Open in v0 Jun 5, 2026 6:45pm

@socket-security

socket-security Bot commented May 28, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​vercel/​geistdocs@​1.6.1100100100100100

View full report

christopherkindl and others added 2 commits June 4, 2026 11:38
Remove the local copies now exported by @vercel/[email protected] and import
them from the package instead:

- Badge -> @vercel/geistdocs/components/badge (provider-list)
- CommandPrompt -> @vercel/geistdocs/components/command-prompt (install-command)
- ThemeAwareImage -> @vercel/geistdocs/components/theme-aware-image
  (docs MDX components); migrate the SvelteKit MDX call site to the new
  src={{ light, dark }} API.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The hero "For humans / For agents" switcher called router.refresh() on
every toggle (added in #366). That remounts/reconciles the switcher
subtree mid-toggle, resetting the CommandPrompt's measured width state so
the command-line width spring never plays — the line snapped instead of
growing.

Drop the refresh: this flag's only consumer is the switcher itself, so the
optimistic override already shows the correct command and the cookie
persists the choice across reloads (the server reads it and renders the
matching prebuilt `[code]`). The refresh changed nothing visible and only
broke the animation. startTransition() does not help, since router.refresh
already runs as a transition.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
christopherkindl and others added 2 commits June 4, 2026 12:42
Replace the hand-rolled shiki token renderer in HighlightedCode with
fumadocs highlight() + the geistdocs CodeBlock, highlighting with the
shared geistShikiTheme so the home page "Effortless setup" blocks match
the documentation (same syntax colors, header, language icon, copy
button, radius). transformerIcon() fills the filename icon slot; the
caption is preserved below.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Grow each HighlightedCode block to fill its grid cell (h-full root +
flex-1 wrapper forcing the Card to h-full) so both columns share the
taller block's height and their captions align. The Card and its <pre>
share bg-background-100, so the shorter block fills seamlessly.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
christopherkindl and others added 5 commits June 4, 2026 13:35
Only chart-1..5 and sidebar-primary are unused by both the app and the
geistdocs/fumadocs package CSS. The other shadcn tokens (secondary,
card-foreground, the remaining sidebar-* set, etc.) must stay: the package
stylesheet consumes them via var(--token) for its fd-* utility mappings
and the #nd-sidebar rule, and does not self-define them — the consuming
app has to provide them.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Switch every shadcn-token consumer (select, switch, iframe-browser, the
home marketing pages, and the illustrations SVGs) to the Geist --ds-*
scale using the geistdocs PR #75 mapping (foreground->gray-1000,
muted->gray-100, muted-foreground->gray-800, border/input->gray-alpha-400,
ring->gray-600, destructive->red-800, background/card/popover->
background-100, accent->gray-100, etc.).

With no consumers left, drop the entire local shadcn layer from
geistdocs.css (the @theme --color-* mappings and the :root/.dark oklch
palette) and instead override fumadocs --color-fd-* and #nd-sidebar to
--ds-* (so the package's docs UI keeps working without the raw palette),
matching the geistdocs template. The geist utilities themselves come from
@vercel/geistdocs/styles.css.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Picks up the Next.js logo gradient-id fix so the framework logo renders
correctly in the mobile docs menu.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
const router = useRouter();
// Optimistic override so the tab updates instantly; the server render of the
// matching prebuilt `[code]` takes over on refresh.
// The optimistic override drives the UI instantly and the cookie persists the

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@dferber90 please double-check here

christopherkindl and others added 4 commits June 5, 2026 17:25
The home "Effortless setup" snippets are Next.js examples, but the
language-based transformerIcon rendered a React glyph for the .tsx block.
Remove the icons (these blocks never had them) and hide the now-empty
header icon slot so the filename stays flush.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The streamdown @source pointed at a transitive dep path that doesn't
resolve under pnpm (matched nothing). Streamdown is now sourced upstream
from @vercel/geistdocs's own styles.css, so this line is unneeded.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
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