Introduces a lightweight `FrameworkProvider` React context in
`packages/common` (`Link`, `Image`, `pathname`, `asPath`, `isReady`,
`params`, `push`), wires it up in the consuming apps, and removes the
`next` dependency from `packages/common`.
**Added:**
- `FrameworkProvider`, `useFramework`, `FrameworkLink`, and
`FrameworkImage` in `packages/common/framework.tsx`, with plain HTML
defaults (`DefaultFrameworkLink` / `DefaultFrameworkImage`).
`useFramework().push` always exists and falls back to
`window.location.assign`
- App-level framework providers wiring `next/link`, `next/image`, and
router state in `www` (App + Pages routers), `docs`, `design-system`,
`learn`, and `ui-library`, and native TanStack Router bindings in
`studio` (`StudioFrameworkProvider`)
- `StudioFrameworkProvider` reuses the common defaults (its image only
applies the basePath) and reports `isReady` once the first route load
commits, so the first page view carries the final route after any
redirect
- Unit tests for `StudioFrameworkProvider` (`useParams`,
`FrameworkLink`, `FrameworkImage`, query/hash-only navigation,
`isReady`) and for `PageTelemetry` route-change sends and the
`TelemetryTagManager` consent gate
**Changed:**
- `common/hooks/useParams.ts`: read params from `useFramework()` instead
of `next/compat/router`
- `common/telemetry.tsx`: replace `next/script` in `TelemetryTagManager`
with `useEffect` script injection, and read route state from
`useFramework()` in `PageTelemetry`
- `common/MetaFavicons/app-router.ts`: drop type-only `Metadata` import
from `next`
- Moved `MetaFaviconsPagesRouter` to
`apps/www/components/MetaFaviconsPagesRouter.tsx` (its sole consumer)
- Studio: `toRoutePattern` and `applyBasePath` now live once in
`lib/internal-url.ts`, shared by the provider and the `compat/next`
shims
- `PageTelemetry` throws outside production when no `FrameworkProvider`
is mounted, since it would otherwise send only the landing pageview.
`useFramework()` itself still falls back to the defaults
- `ui-library`: renamed its code-sample framework context to
`FrameworkPreferenceProvider` / `useFrameworkPreference` so
`FrameworkProvider` only means the `common` one
**Removed:**
- `learn`'s unused copy of that context (`useCourse` had no callers)
- `next` from `packages/common/package.json` peerDependencies
App Router adapters set `asPath` to the pathname only, same as the
`usePathname`-based telemetry on master (reading search params at the
root would opt static pages out of static rendering).
## To test
- Run `packages/common` tests and typecheck, and `apps/studio`
`StudioFrameworkProvider` / `route-render` / `telemetry` tests
- Navigate between routes in Studio, Docs, and WWW and confirm page
telemetry fires once per navigation (and does not duplicate on hash-only
changes)
- Load Studio at `/` (which redirects) and confirm the first page event
has the final route
- Verify URL params (`useParams`) continue resolving route and search
params in Studio
---------
Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
## Problem
- Favicon files and markup are duplicated across apps.
## Solution
- Replace old files with one ICO, one Apple icon and two manifest icons
per set.
- Share icon markup and add generation notes and scripts.
- Keep existing branding, including Learn's black and white icon.
- Make the border radius match across all apps’ favicons.
## Review instructions
- Check normal app icons and Studio staging in browser tabs.
- Check icons load under `/docs` and `/kb`.
- Run `node scripts/validate-favicons.mjs`. All 8 sets should pass.
<!-- ccr-slack-attribution -->
_Requested by **Matt Rossman, Ali Waseem** · [Slack
thread](https://supabase.slack.com/archives/C0161K73J1J/p1785960993618839?thread_ts=1785960993.618839&cid=C0161K73J1J)_
## 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?
Bug fix.
## What is the current behavior?
The Supabase logo in the browser tab looks blurry on high-DPI displays
on supabase.com, but sharp on the dashboard. Same logo, same asset files
— only the marketing site looks soft.
Separately, `genFaviconData()` points one of its `<link rel="icon">`
tags at `favicon-128x128.png`, a file that no app in the repo ships.
That is a live 404 on docs, learn and ui-library today — and on
design-system, which hardcodes its own copy of the same icon list.
## What is the new behavior?
The tab icon is sharp on both, and the 404 is gone everywhere.
## Additional context
**How.** `apps/www/app/layout.tsx` hardcoded a Next.js `metadata.icons`
block that pointed `icon`, `shortcut` and `apple` all at
`/favicon/favicon.ico`. That `.ico` contains a single 16x16 layer, so on
a 2x display the browser has no 32px candidate to choose and upscales
the 16x16 — hence the blur. It only affects App Router routes, which now
includes the homepage, `/blog`, `/pricing` and the product pages; www's
remaining Pages Router routes already went through the shared component
and were fine.
www was not using the shared `genFaviconData()` helper from
`common/MetaFavicons/app-router`, which docs, learn and ui-library all
do. Swapping it in makes www advertise the same 16/32/48/96/128/180/196
PNG ladder the dashboard does, so the browser picks the 32px PNG on a 2x
display. The argument is `''` because www serves from the site root
(`basePath: ''` in `next.config.mjs`).
**Second, related change.** `packages/common/MetaFavicons/app-router.ts`
referenced `favicon-128x128.png`; the asset is `favicon-128.png` in
every app's `public/favicon/` (the pages-router variant of the helper
already had it right). Fixed to match. Without this, wiring www up to
the helper would have added a fourth app to the existing 404.
**Third, related change.** `apps/design-system/app/layout.tsx` had its
own inline copy of `genFaviconData` — byte-identical to the shared one
except that it still pointed at `favicon-128x128.png`, so fixing the
shared helper alone would have left design-system 404ing. Replaced the
91-line inline copy with the shared import, passing the app's existing
`BASE_PATH` (which mirrors `basePath` in its `next.config.mjs`) the same
way docs, learn and ui-library do. That removes the last hardcoded icon
list among the App Router apps, so the filename can't drift back out of
sync.
No favicon image assets were added or changed — every file the helper
references already exists in both `apps/www/public/favicon/` and
`apps/design-system/public/favicon/`.
**Possible follow-up.** `favicon.ico` itself is single-layer 16x16 in
both www and studio (byte-identical files). Regenerating it as a
multi-resolution ICO with 16/32/48 layers would help any consumer that
only reads the `.ico` — bookmark bars, some browser surfaces, and
notably supabase.com/evals, which is a rewrite to a separate Vercel app
and so won't pick up this layout change, but does resolve root-relative
icon hrefs against www's `public/`. Left out here because it touches
studio's assets too and is a separate call.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01F2AZs625JxKASYVAj8LWYq)_
---------
Co-authored-by: Claude <noreply@anthropic.com>