mirror of
https://github.com/supabase/supabase.git
synced 2026-12-04 23:49:03 +00:00
Part of DOCS-1474 ## Problem Someone dogfooding the new navigation opens `?docs-ia-mvp-v1=option-1`, clicks a link, and sees today's navigation again. The override lives only in the URL. Links do not carry the query string, so the first click drops it. Everyone who uses the override link is affected, including people outside the PostHog rollout. ## Solution - **Save the override:** a forced variant is saved in `sessionStorage` and read on later pages. Closing the tab clears it. - **Read it before paint:** the head script reads the saved override, so a full reload does not flash today's navigation. - **Keep exposure clean:** a saved override records no PostHog exposure, the same as a URL override. - **Switch back:** `?docs-ia-mvp-v1=control` replaces the saved value. **Priority:** the URL wins over the saved override. The saved override wins over the PostHog value. **Not changed:** the `/docs/ia/option-1/…` rewrite that the evals use, and how PostHog assigns visitors. **Tests:** `vitest run features/IaNav` passes, 7 files and 32 tests. Three of the four new tests failed before the change. The fourth, a URL `control` over a saved `option-1`, passed before and guards the priority. **Unverified:** typecheck, ESLint, and the steps below. `tsc` reports no errors in `IaNav`, but this worktree has no generated GraphQL types. ESLint did not run. ## Manual testing 1. Open the deploy preview at `/docs?docs-ia-mvp-v1=option-1`. The top nav shows "Run and manage". 2. Click any guide link. The nav still shows "Run and manage". 3. Reload the page. The nav shows "Run and manage" with no flash of today's navigation. 4. Open `/docs?docs-ia-mvp-v1=control`, then click any guide link. The nav shows today's navigation and keeps it. --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Supabase Docs
This directory contains the Next.js app for supabase.com/docs.
Guides live in content/ as MDX. Reference pages are generated from the specs in spec/: OpenAPI, SDKSpec, ConfigSpec, and CLISpec. Some sections come from other repositories.
Where to go
- To write a page, follow the style guide.
- To find where a page lives, add one, or update generated reference docs, use the contributing guide. Library maintainers start at Reference structure.
- To use an agent, use the AI agent skills for docs authoring. Those skills include framing a page and placing it in the information architecture.
- To run the site locally, use the developers' guide.
- To add or change a redirect, read
lib/redirects/README.mdfirst.