fix(docs): hide preview-only nav items in production#1941
Conversation
The geistdocs facelift (#1666) dropped the VERCEL_ENV-based filter on nav items, so the "Internal" entry (preview: true) was visible on the production docs deployment. Restore the filter in the server-rendered Navbar and pass the filtered list to MobileMenu so both desktop and mobile honor it. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
🧪 E2E Test Results✅ All tests passed Summary
Details by Category✅ ▲ Vercel Production
✅ 💻 Local Development
✅ 📦 Local Production
✅ 🐘 Local Postgres
✅ 🪟 Windows
✅ 📋 Other
|
📊 Benchmark Results
workflow with no steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Next.js (Turbopack) workflow with 1 step💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Next.js (Turbopack) workflow with 10 sequential steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Next.js (Turbopack) workflow with 25 sequential steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Next.js (Turbopack) workflow with 50 sequential steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Next.js (Turbopack) Promise.all with 10 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Next.js (Turbopack) Promise.all with 25 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Next.js (Turbopack) Promise.all with 50 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Next.js (Turbopack) Promise.race with 10 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Next.js (Turbopack) Promise.race with 25 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Next.js (Turbopack) Promise.race with 50 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Next.js (Turbopack) workflow with 10 sequential data payload steps (10KB)💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Next.js (Turbopack) workflow with 25 sequential data payload steps (10KB)💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Next.js (Turbopack) workflow with 50 sequential data payload steps (10KB)💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Next.js (Turbopack) workflow with 10 concurrent data payload steps (10KB)💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Next.js (Turbopack) workflow with 25 concurrent data payload steps (10KB)💻 Local Development
▲ Production (Vercel)
🔍 Observability: Next.js (Turbopack) | Nitro workflow with 50 concurrent data payload steps (10KB)💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Next.js (Turbopack) Stream Benchmarks (includes TTFB metrics)workflow with stream💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Next.js (Turbopack) stream pipeline with 5 transform steps (1MB)💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Next.js (Turbopack) 10 parallel streams (1MB each)💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Next.js (Turbopack) fan-out fan-in 10 streams (1MB each)💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Next.js (Turbopack) SummaryFastest Framework by WorldWinner determined by most benchmark wins
Fastest World by FrameworkWinner determined by most benchmark wins
Column Definitions
Worlds:
❌ Some benchmark jobs failed:
Check the workflow run for details. |
There was a problem hiding this comment.
Pull request overview
This PR restores preview gating for docs navigation after the geistdocs navbar rewrite in #1666 dropped the existing filter. It keeps preview-only entries such as /docs/internal visible in preview/dev while preventing them from appearing in production, across both desktop and mobile navigation.
Changes:
- Reintroduces preview/dev-only filtering for
navitems in the server-renderedNavbar. - Passes the filtered nav list to both
DesktopMenuandMobileMenu. - Updates
MobileMenuto render injected nav items instead of importing the full unfilterednavconfig directly.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| docs/components/geistdocs/navbar.tsx | Restores env-based filtering and shares the filtered nav list with both menu variants. |
| docs/components/geistdocs/mobile-menu.tsx | Accepts filtered nav items as props so mobile no longer bypasses the production gate. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
No backport to This change only modifies files under To override, add the |
Summary
docs/components/geistdocs/navbar.tsxand dropped theVERCEL_ENV-based filter that was added in 20b32ce to gatepreview: truenav entries. As a result, the Internal link (/docs/internal, defined indocs/geistdocs.tsx) was visible on the production docs deployment.MobileMenualso importednavdirectly and rendered every entry, so even if desktop had been fixed, mobile would still leak the preview link.Navbar(VERCEL_ENV === 'preview' || NODE_ENV === 'development') and pass the filtered list down to bothDesktopMenuandMobileMenu.Test plan
https://workflow-sdk.dev/docs/internalis also excluded from sitemap androbots.txt(already in place; no change here).🤖 Generated with Claude Code