## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.
YES
## What kind of change does this PR introduce?
Chore / dead code removal
## What is the current behavior?
The `apps/docs/components/Flag/` directory contained legacy feature flag
code that was never wired up:
- `FlagProvider.tsx` — all ConfigCat logic commented out; only wraps
children in an empty context
- `FlagContext.ts` — an empty `createContext({})` with no values ever
set
- `Flag.tsx` — a gate component that reads from the above empty context,
so flags always evaluate to falsy
- `hooks/useFlag.ts` — references the dead local `FlagContext` instead
of `common`'s `FeatureFlagContext`
The docs app already uses `FeatureFlagProvider` from the `common`
package (configured in `apps/docs/features/app.providers.tsx`), making
this entire local implementation obsolete.
Closes
[GROWTH-611](https://linear.app/supabase/issue/GROWTH-611/clean-up-deadlegacy-flag-code-in-docs-app)
## What is the new behavior?
The dead code is removed:
- `apps/docs/components/Flag/` directory deleted
- `apps/docs/hooks/useFlag.ts` deleted
Any code needing feature flags should import `useFlag` directly from
`common`.
## Additional context
No flag-gated features were affected — the old local implementation was
non-functional (context always resolved to `{}`), so removing it has no
behavioral impact.
* Remove extra file.
* Remove unneeded tsconfig.jsons.
* Add @/* alias for importing in-package files to all apps.
* Remove baseUrl from all apps except studio (it'll require changes in almost all files).
* Fix baseUrl issues in docs, ui-library and design-system.
* Fix the typecheck for cms app. Fix all baseUrl errors in the cms app.
* Add deprecated flag to baseUrl in www.
Refactor tabs so that:
- Behavior add-ons, such as query params, are HOCs in ui-patterns, to keep the basic Tabs minimal
- No dependency on next/router (this is to smooth out a separate App Router migration PR)
- No dependency on useSearchParams either (this is to preserve static generation of as much HTML content as
possible, for SEO purposes -- see comment about client-rendering bailout when using useSearchParams)
- Syncing behavior better localized in a hook
Minor enhancement to save tab preferences to local storage so they are remembered between sessions
Before: All pages have the Home nav menu in static HTML, which is blown away and replaced by the proper nav menu upon hydration. This leads to jankiness when the page first loads and an unpleasant flash of the wrong nav menu (especially obvious on the JavaScript ref page, which takes a long time to process and rerender the nav).
Now: All pages have their correct nav menu in static HTML.