fix(ui): guard navigator.platform in QueryConsole for SSR — fixes /search build crash #4057
ccantynzcommented Jun 15, 2026
Originally written by @vercel[bot] on GitHub.
Deployment failed with the following error:
There is no GitHub account connected to this Vercel account.ccantynzcommented Jun 15, 2026
Originally written by @vercel[bot] on GitHub.
The latest updates on your projects. Learn more about Vercel for GitHub.
| Project | Deployment | Actions | Updated (UTC) |
|---|---|---|---|
| alec-rae-com-admin | Jun 15, 2026 10:56pm |
Cross-repo impact
See what breaks downstream if this PR merges.
⮌ Merged
This pull request was merged into main.
c comment · e edit title · m merge · a approve · r request changes · ? shortcuts
Originally written by @ccantynz-alt on GitHub.
Imported from https://github.com/ccantynz-alt/AlecRae.com/pull/74
Problem
Next.js build was crashing on the
/searchpage:packages/ui/src/composites/query-console.tsxaccessednavigator.platformdirectly in JSX with no SSR guard. During Next.js static prerendering,navigatordoesn't exist in the Node.js runtime → build failure.Fix
Added
typeof navigator !== "undefined"guard to both keyboard shortcut hint lines (464, 467). Defaults toCtrlon the server (correct for non-Mac).After merging
On the box:
cd /opt/alecrae && git pull --ff-only origin main && bun run build --filter @alecrae/web && sudo systemctl restart alecrae-webhttps://claude.ai/code/session_017mhAkS4qhMjcvVnyFi61xp
Generated by Claude Code