Removes the Next-only entry files and config now that every page lives
in `routes/**` (FE-3106). `routes/__root.tsx` already mirrors
`pages/_app.tsx` (dayjs plugins, providers, telemetry, error boundary,
favicons). Part 13 of the stack.
**Depends on:** #53221
**Changed:**
- `components/interfaces/App/{NotFoundPage,ServerErrorPage}.tsx` – the
404/500 pages, rendered by `__root.tsx`, now with native
`Link`/`useNavigate` and `<img>`
- `routes/api/{status-page,scoped-access-token-permissions}.ts` – App
Router handlers from `app/api/**` moved in (`NextResponse.json` →
`Response.json`); `buildAPIPermissionScopeMap` moves to `lib/api/`
- `package.json`, `tsconfig.json` – no `next typegen` step or
`.next/types` include
- `packages/ui-patterns/.../InstructionBlocks.tsx` – asset map typed
`StaticImageData | string`: under Vite a png import is a URL string,
which Next's global image types used to hide
- `vite.config.ts`, `knip.jsonc`, `turbo.jsonc` and comments across
studio – Next build references removed
**Removed:**
- `pages/{_app,_document,404,500}.tsx`, `pages/_error.jsx`,
`pages/README.md`, `app/**`, `next.config.ts`, `proxy.ts`,
`instrumentation{,-client}.ts`, `sentry.{server,edge}.config.ts`,
`fonts/index.ts` (next/font), `BootTimeoutFallback`,
`postcss.config.cjs`, the `next/server` shim
- `@next/bundle-analyzer`, `raw-loader`, `postcss`,
`@tailwindcss/postcss` dev dependencies
Addresses
[FE-3106](https://linear.app/supabase/issue/FE-3106/move-page-bodies-into-route-files-and-delete-pages).
## To test
- Open an unknown URL – the 404 page renders with working "Head back"
- `/api/status-page` and `/api/scoped-access-token-permissions` on
platform – same JSON and `Cache-Control`
- Fonts (Inter, Manrope, Source Code Pro) still load
---------
Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
Running Studio locally without the incident.io env vars produces a 500
from `/api/status-page` on every fetch, plus a server-side log and a
client `console.error`. Retries and the 5-minute refetch keep repeating
them, so the dev console stays noisy.
**Changed:**
- `lib/api/status-page.ts` – when `INCIDENT_IO_WIDGET_URL` is unset
outside production, return an empty (degraded, short-cached) status page
instead of throwing. The missing API key / status page ID log is also
limited to production. Production behavior is unchanged.
- `data/platform/status-page-query.ts` – remove the client-side
`console.error`, which repeated the error that React Query already
exposes
**Added:**
- Tests for the missing widget URL in dev (empty payload, no error log)
and in production (still throws)
## To test
- Run Studio locally in platform mode without `INCIDENT_IO_*` set: no
status page errors in the terminal or the browser console, and
`/api/status-page` returns 200 with empty arrays
- Support form and project creation still render normally (no status
banner, status page link points to status.supabase.com)
Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
## Summary
* Adds `/api/status-page` (Next route + TanStack wrapper), backed by the
[incident.io](<http://incident.io>) Widget API, annotating each item
with `visible`, `show_banner`, and (for scheduled maintenances)
`banner_lead_days`.
* Deployment-mode visibility is driven by a new
`status_page:visibility_field_ids` custom-content key.
* Widget array parsing is fault-tolerant: a malformed item in one array
is dropped and logged rather than failing the whole response, so one bad
item can't hide a real ongoing incident.
* 429s from [incident.io](<http://incident.io>) are retried with
equal-jitter exponential backoff, respecting `Retry-After`, up to 2
retries.
* Nothing consumes this endpoint yet — it replaces no existing behavior
and changes nothing user-visible. Later PRs (this is PR 1 of a stack)
wire up consumers behind the `incidentIoStatusPage` ConfigCat flag.
Part of
[FE-4057](https://linear.app/supabase/issue/FE-4057/frontend-bannerbot-reconfigured)
— see Linear for full design context.
## Test plan
- [X] `pnpm --filter studio run typecheck`
- [X] `pnpm --filter studio run lint:ratchet`
- [X] `pnpm knip --workspace apps/studio`
- [X] `pnpm test:prettier`
- [X] `pnpm --filter studio exec vitest run status-page` — 44 tests
passing, including a regression test built from a real production
[incident.io](<http://incident.io>) payload that initially failed to
parse, and a compile-time type-safety regression test for the
array-parsing helper
Co-authored-by: Claude Code
[charis@supabase.io](<mailto:charis@supabase.io>)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Added a status page that displays ongoing incidents and maintenance,
with visibility and banner settings based on linked incident details.
* Status page data is available through a new API endpoint, with caching
for successful responses and degraded results.
* **Bug Fixes**
* Status page data can still display when some linked incident details
are unavailable; affected results are marked as degraded.
* Improved handling of invalid widget entries so they don’t prevent
valid items from being processed.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: Claude Code <charis@supabase.io>