CodeIssuesPull RequestsActionsSecurityInsights
✨ AI
More
Settings

fix(ui): guard navigator.platform in QueryConsole for SSR — fixes /search build crash #4057

Merged⚡ AI-generatedXSccantynz wants to mergeclaude/code-audit-vapron-migration-6jya3kmainopened Jun 15, 2026
ccantynzcommented Jun 15, 2026

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 /search page:

ReferenceError: navigator is not defined
    at <unknown> (.next/server/chunks/3242.js:40:55433)

packages/ui/src/composites/query-console.tsx accessed navigator.platform directly in JSX with no SSR guard. During Next.js static prerendering, navigator doesn't exist in the Node.js runtime → build failure.

Fix

Added typeof navigator !== "undefined" guard to both keyboard shortcut hint lines (464, 467). Defaults to Ctrl on 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-web

https://claude.ai/code/session_017mhAkS4qhMjcvVnyFi61xp


Generated by Claude Code

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 Error Error Jun 15, 2026 10:56pm

Cross-repo impact

See what breaks downstream if this PR merges.

Analyze →
⮌ Merged

This pull request was merged into main.

c comment · e edit title · m merge · a approve · r request changes · ? shortcuts