## Problem
The Koodos case study doesn't yet cover the infrastructure behind Shelf.
## Solution
Add a short "Under the hood" subsection at the end of "Choosing
Supabase", before "The approach". It explains where Koodos's Postgres
database runs, what it holds, and why the team doesn't have to host,
patch, or maintain the servers.
## Preview links
| Site | Live | Search for |
| ---- | --------------------------------------------------------------
| -------------- |
| WWW | [/customers/koodos](https://supabase.com/customers/koodos) |
Under the hood |
## Review instructions
1. Open the preview of `/customers/koodos`.
2. Confirm the "Under the hood" section appears at the end of "Choosing
Supabase" and before "The approach".
## Checklist
- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [ ] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs
[style
guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)
## Problem
The Chatbase case study doesn't yet cover the infrastructure behind
Chatbase's primary instance.
## Solution
Add a short "Under the hood" subsection at the end of "Engineering for
the next phase of growth", before "Results". It explains where the
primary instance runs, what it carries, and how the storage
configuration change fits with the planned read replica for reporting.
## Preview links
| Site | Live | Search for |
| ---- |
---------------------------------------------------------------- |
-------------- |
| WWW | [/customers/chatbase](https://supabase.com/customers/chatbase) |
Under the hood |
## Review instructions
1. Open the preview of `/customers/chatbase`.
2. Confirm the "Under the hood" section appears at the end of
"Engineering for the next phase of growth" and before "Results".
## Checklist
- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [ ] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs
[style
guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)
## Problem
The eXp Realty case study doesn't yet cover the infrastructure behind
eXp's Supabase projects.
## Solution
Add a short "Under the hood" subsection at the end of "Democratizing
development", before "The new calculus of build versus buy". It explains
where each eXp Supabase project runs and why that lets non-engineers
spin up a backend while core engineering only reviews the schema and RLS
policies.
## Preview links
| Site | Live | Search for |
| ---- |
-------------------------------------------------------------------- |
-------------- |
| WWW | [/customers/exprealty](https://supabase.com/customers/exprealty)
| Under the hood |
## Review instructions
1. Open the preview of `/customers/exprealty`.
2. Confirm the "Under the hood" section appears at the end of
"Democratizing development" and before "The new calculus of build versus
buy".
## Checklist
- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [ ] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs
[style
guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)
Closes DOCS-1608
## Problem
We do not have a template for the most common and important type of
content we have: the procedure.
## Solution
This PR introduces our first template: the how-to. This also includes
the scaffolding needed for all other templates, including a
template-selection table and wiring into our docs-writing skills.
## Preview links
The style guide isn't served by the docs site, so the table links the
changed files on `master` and on this branch instead.
| Site | Live | Preview | Search for |
| ---- |
-------------------------------------------------------------------------------------------------------------------------------------
|
---------------------------------------------------------------------------------------------------------------------------------------------
| ------------------------- |
| Docs |
[03-page-structure.md](https://github.com/supabase/supabase/blob/master/apps/docs/style-guide/03-page-structure.md)
|
[03-page-structure.md](https://github.com/supabase/supabase/blob/docs/how-to-template/apps/docs/style-guide/03-page-structure.md)
| `Choose a template` |
| Docs | Not on `master` |
[templates/how-to-guide.md](https://github.com/supabase/supabase/blob/docs/how-to-template/apps/docs/style-guide/templates/how-to-guide.md)
| `How-to guide template` |
## Review instructions
1. Open `templates/how-to-guide.md` from the preview link and confirm
it's 80 lines or fewer and makes sense without other files.
2. Follow the new links in `03-page-structure.md`, the style-guide
README, and the three skills, and confirm each resolves.
3. Run `pnpm test:prettier` and confirm it passes.
## Checklist
Check all before review:
- [ ] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [ ] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs
[style
guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)
## Problem
On narrow/mobile widths, the Unified Logs header crammed the search
filter bar and the action icons (refresh, saved views, column options,
download, Live) onto the same line, making the toolbar look cramped and
hard to use.
## Solution
Split the toolbar into two explicit full-width rows below the `sm`
breakpoint — the search bar on its own line, and the action icons (plus
the mobile filter-funnel trigger) on a second line below it, separated
by a top border. Adjusted padding so the divider sits flush edge-to-edge
and the gap between the two rows isn't doubled up by both the row
padding and the flex-wrap gap. Desktop (single-row) layout is unchanged.
| Before | After |
|--------|--------|
| <img width="521" height="536" alt="Screenshot 2026-11-19 at 17 14 29"
src="https://github.com/user-attachments/assets/0089b3cd-0c29-4320-abed-e1638ad5c7fb"
/> | <img width="498" height="368" alt="Screenshot 2026-11-19 at 17 31
52"
src="https://github.com/user-attachments/assets/25be8595-2d65-4916-96c6-186adaf7d3df"
/> |
## Review instructions
1. Open Unified Logs (`/project/[ref]/logs/explorer`) at a narrow/mobile
viewport width.
2. Confirm the search bar and the icon toolbar each sit on their own
full-width line, with a clean top border between them.
3. Resize back to desktop width and confirm the toolbar still renders as
a single row, unchanged.
## Description
Part of the work for OAuth apps with the scoped permissions. This PR
wires consent screen to the backend.
## Review instructions
### Setup
Copy the `examples/oauth-app-authorization-flow/.env.example` to
`examples/oauth-app-authorization-flow/.env`
> [!IMPORTANT]
> In next steps, make sure to copy the apps ids/secrets in the
`examples/oauth-app-authorization-flow/.env` with a way to differentiate
them:
> ```
> # org bound all projects
> SUPABASE_CLIENT_ID=xxx
> SUPABASE_CLIENT_SECRET=xxx
> ```
As an organization admin, go to the _Organization settings/OAuth Apps_
and create the following _Publishable apps_:
- `test_org_bound`:
- _Use the permissions of the person who connects_ unchecked
- _Ask for specific projects_ unchecked
- Select only _Database Read_ for the permissions
- `test_org_bound_projects`:
- _Use the permissions of the person who connects_ unchecked
- _Ask for specific projects_ checked
- Select only _Database Read_ for the permissions
- `test_member_bound`:
- _Use the permissions of the person who connects_ checked
- _Ask for specific projects_ unchecked
- Select only _Database Read/Write_ for the permissions
- `test_member_bound_projects`:
- _Use the permissions of the person who connects_ checked
- _Ask for specific projects_ checked
- Select only _Database Read/Write_ for the permissions
Make sure you have 3 projects in the org. Add a team member that have
Administration rights on the first project, read-only access to the 2nd
and no access to the third.
Install the `examples/oauth-app-authorization-flow` dependencies and
start the app.
- `test_org_bound`:
- connected on studio as the org admin
- click the `oauth-app-authorization-flow` button
- check that you don't have to select a project on the consent screen
- check that the permissions requested are correct and you can approve
the app
- update the published app to include the _Database Write_ permissions
- return to the `oauth-app-authorization-flow` index and click its
button again
- check that the consent screen shows the permissions difference and
approve it again
- connected as a simple team member, check that you have a message
indicating you can't approve this app
- `test_org_bound_projects`:
- connected on studio as the org admin
- click the `oauth-app-authorization-flow` button
- check that you have to select projects on the consent screen
- check that the permissions requested are correct and you can approve
the app
- update the published app to include the _Database Write_ permissions
- return to the `oauth-app-authorization-flow` index and click its
button again
- check that the consent screen shows the permissions difference and
approve it again
- connected as a simple team member, check that you have a message
indicating you can't approve this app
- `test_member_bound`:
- connected on studio as a member
- click the `oauth-app-authorization-flow` button
- check that you don't have to select a project on the consent screen
- check that the permissions requested are correct and you can approve
the app
- update the published app to add another permission
- return to the `oauth-app-authorization-flow` index and click its
button again
- check that the consent screen shows the permissions difference and
approve it again
- `test_member_bound_projects`:
- connected on studio as the org admin
- click the `oauth-app-authorization-flow` button
- check that you have to select projects on the consent screen (you
should see only the two you have access to) and select them all one by
one
- check that the permissions requested are correct
- approve the app and check that you have an error related to the
project with read-only access
- unselect it and approve the app
- update the published app to include the _Database Write_ permissions
- return to the `oauth-app-authorization-flow` index and click its
button again
- check that the consent screen shows the permissions difference and
approve it again
## Problem
On the organization usage page, the per-project breakdowns list project
names, but there's no way to jump to that project's usage. You have to
find it in the project dropdown instead. Resolves FE-5153.
## Solution
Project names in the usage breakdowns are now buttons that set the
`projectRef` filter and clear `branchRef`, so the page shows that
project's usage. The other query params, such as the date range, are
left alone.
- New `UsageProjectName` component. It renders plain text when that
project is already selected, and a button otherwise. It underlines on
hover only.
- Applied in the metric breakdown tooltip (`BillingMetric`), the compute
hover card (`ComputeMetric`) and the database size table
(`DatabaseSizeUsage`).
- `TotalUsage` passes the selected `projectRef` down to the metric
components.
- The `projectRef`/`branchRef` nuqs parsers are now shared as
`usageFilterParsers` in `Usage.utils.ts`, so `Usage` and
`UsageProjectName` use the same definition.
Tests cover the click updating the URL (and clearing `branchRef`), the
selected project rendering as text, and the `BillingMetric` breakdown in
both states.
<img width="410" height="296" alt="Screenshot 2026-11-19 at 13 36 17"
src="https://github.com/user-attachments/assets/1f032cc3-d0e2-4185-80f7-4ab3303fc6b6"
/>
## Review instructions
1. Open an organization's usage page (`/org/<slug>/usage`) for an org
with several projects.
2. Hover a metric that has a per-project breakdown, such as Egress, and
click a project name.
3. The project dropdown should switch to that project and the usage
should update. Any date range you had selected should survive the click.
4. Hover the same metric again. The selected project is now plain text
and the others are still clickable.
5. Do the same from the compute hover card and the database size table.
## Checklist
Check all before review:
- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [ ] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs
[style
guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)
<!-- claude-slack-attribution -->
_Requested by **Nicole Kramer** · [Slack
thread](https://supabase.slack.com/archives/C0161K73J1J/p1795012270095809)_
**Before:** The SLA page (`/sla`) opened by incorporating "the
Subscription Agreement between Supabase, Inc. and Customer" for
"Enterprise Customers", and it was listed under Customer Legal Resources
on the Legal Hub and indexable by search engines.
**After:** The SLA page incorporates the Enterprise SaaS Subscription
Agreement (linked at https://supabase.com/enterprise-terms, or such
other agreement entered into between Supabase and Customer) and applies
to "Customers subscribed to an Enterprise Plan". The page is no longer
listed on the Legal Hub and is `noindex, nofollow`, so it is reachable
only by direct URL, like `/enterprise-terms`.
Updates the SLA preamble wording as provided by Legal and hides `/sla`
from the Legal Hub and search engines.
## Solution
- `apps/www/data/legal/sla/v1.mdx`: replaced the opening paragraph with
Legal's wording. The text is unchanged except that the quoted term uses
straight quotes (`the "Agreement"`) to match the rest of the file. The
URL is a bare URL, which remark-gfm autolinks, the same way
`enterprise-terms` MDX does. The SLA is a single `v1.mdx` with no
version selector or effective date, so it is edited in place and no
versioning is introduced.
- `apps/www/pages/legal/index.tsx`: removed the SLA entry from the
Customer Legal Resources links, the same way `/enterprise-terms` is
absent from the hub.
- `apps/www/pages/sla.tsx`: added `noindex: true` and `nofollow: true`
to the `NextSeo` meta, plus a short comment matching the one in
`supplemental-terms.tsx`.
- `apps/www/next.config.mjs`: added an `X-Robots-Tag: noindex, nofollow`
header rule for `/sla`, next to the existing `/enterprise-terms` rule.
Other pages that link to `/sla` (the Support Policy and a few docs
guides) are intentionally unchanged, since direct links keep working.
`generate-sitemap.mjs` has no exclusion for `/enterprise-terms`, so none
was added for `/sla` either.
## Review instructions
1. Open `/legal` on the preview and confirm Service Level Agreement is
no longer listed under Customer Legal Resources.
2. Open `/sla` on the preview and confirm the first paragraph matches
the new wording and that "https://supabase.com/enterprise-terms" is a
working link.
3. Check the `/sla` response has `X-Robots-Tag: noindex, nofollow` and
the page has a `noindex, nofollow` robots meta tag.
## Checklist
Check all before review:
- [ ] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [ ] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs
[style
guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)
---
_Generated by [Claude
Code](https://claude.ai/code/session_01VBvtQVPkbcDz2ojrwur2SF)_
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.
YES
## Problem
www sends no `Content-Security-Policy`, `X-Frame-Options`,
`X-Content-Type-Options`, or `Referrer-Policy` headers on its pages.
Only HSTS is set.
The first version of this PR added these headers on `/(.*)`. That turned
out to be unsafe, because www is the zone router: `lib/rewrites.js`
proxies Studio (`/dashboard`), docs, the UI library, the design system,
the knowledge base, and other apps, and the header rules in
`next.config.mjs` also apply to those proxied responses. A CSP there
would add a second enforced policy on top of each app's own headers, and
`X-Frame-Options: DENY` would break the UI library previews, which
iframe `/library/example/*`.
## Solution
The headers are built in `apps/www/lib/security-headers.js` and spread
into `headers()` in `next.config.mjs`.
**Scope**
- The rules apply only to paths that www serves itself. The proxied path
prefixes come from `lib/rewrites.js`, so a new zone rewrite is excluded
automatically.
- On those paths: `X-Frame-Options: SAMEORIGIN`,
`X-Content-Type-Options: nosniff`, `Referrer-Policy:
strict-origin-when-cross-origin`, and an enforced CSP.
**CSP (script-focused)**
- `script-src` allows `'self'`, `'unsafe-inline'`, and an explicit list
of the third-party script hosts that www pages load: GTM through Stape,
PostHog, Usercentrics, tweet embeds, HubSpot, hCaptcha, Default.com, Buy
with AWS, and a path-scoped jsDelivr entry for unicornstudio. Each entry
has a comment that names its user.
- `'unsafe-inline'` stays, because the Next.js inline scripts need a
nonce otherwise, and a nonce needs dynamic rendering.
- `object-src 'none'`, `base-uri 'self'`, `form-action 'self'`,
`frame-ancestors 'self'`.
- Removed from the earlier version: `unpkg.com` (only used inside a blog
code block, and anyone can publish scripts there), `*.vercel.app` (any
Vercel app), `frontend-assets.supabase.com` (www serves its assets from
the same origin), and the duplicate `script-src-elem`.
**`'unsafe-eval'`**
- Off by default.
- Allowed only on the pages that evaluate MDX on the client with
`next-mdx-remote-client`: `/changelog`, `/customers/[slug]`,
`/events/[slug]`, `/alternatives/[slug]`, and
`/partners/catalog/[slug]`. Removing it there would break those pages.
- Allowed in development, because Next.js needs it there.
**Preview and staging**
- Detection matches Studio's CSP: `NEXT_PUBLIC_VERCEL_ENV === 'preview'`
or `NEXT_PUBLIC_ENVIRONMENT` of `local` or `staging`. It no longer
depends on `NEXT_PUBLIC_IS_PLATFORM`.
- On preview and staging, the Vercel toolbar and the staging PostHog
host are added.
- The PostHog origin also comes from `NEXT_PUBLIC_POSTHOG_HOST`, the
same value the client uses.
**Tests**
`lib/security-headers.test.ts` covers the policy for each environment,
the proxied prefixes from the real rewrites, and the header sources. The
sources are compiled with the same path-to-regexp build and options that
Next.js uses.
## Review instructions
1. Open the preview and accept cookie consent so GTM and PostHog load.
2. Open DevTools → Console and filter on `Content-Security-Policy`.
3. Visit these pages and confirm there are no violations:
- home
- a blog post with a tweet embed (`/blog/launch-week-5-community-day`)
- `/changelog`
- a `/customers/...` page
- `/state-of-startups`
- `/contact/sales`
- `/aws-marketplace`
- a `/go` page with a HubSpot form
4. Run `curl -sI <preview>/` and check the four headers. Run `curl -sI
<preview>/changelog` and check that the CSP includes `'unsafe-eval'`.
5. Run `curl -sI <preview>/dashboard` and `curl -sI <preview>/library`
and check that they have no www CSP or `X-Frame-Options`.
6. Confirm `/dashboard` and `/library` still load.
## Checklist
- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
In Studio's vitest setup, `useParams` from `common` is mocked globally
to return `{ ref: 'default' }`, and `next/router`, `next/compat/router`
and `next/navigation` are mocked with `next-router-mock`. `renderRoute`
mounts a real TanStack memory router, but nothing connected it to those
mocks. So components under a route test never saw the route's path or
search params, and `router.push` from legacy code never moved the
TanStack router. Route tests worked around this by hand-mocking
`useParams` to repeat their URL.
Inside `renderRoute`, these hooks now defer to the app's own
`compat/next` shims, which read the memory router, so they match
runtime: kebab-case keys are camelCased, repeated keys collapse to the
first value, and the hooks follow in-test navigation. All other tests
keep the static mocks.
**Changed:**
- `tests/vitestSetup.ts`: the `common` `useParams`, `next/router`,
`next/compat/router` and `next/navigation` mocks are route-aware.
- `tests/lib/route-render.tsx`: the root route provides a
`RenderedRouteContext` marker. The switch keys off this marker rather
than any TanStack router context, because some component tests mount
their own `RouterContextProvider` or mock `@tanstack/react-router`.
- Route tests that relied on the old behavior:
- The EdgeFunctionOverview self-hosted test, `new/$slug` and
`logs/index.platform` now assert on `router.state.location` instead of
`next-router-mock`.
- The `logs` test's `useSignOut` mock is now stable, like the real hook;
an unstable mock made the redirect effect push in a loop.
- The EdgeFunctionOverview periods test now seeds the function detail
under its real slug instead of `undefined`.
- Removed the hand-written `useParams` mocks from the `authorize`,
Stripe `login`, `sign-in-mfa`, Vercel `new-project` and storage
`vectors` route tests; their URLs carry the params now.
**Added:**
- `tests/lib/route-aware-hooks.ts`: `routeAwareHook` and
`mockNextRouter`.
- `tests/lib/route-render.test.tsx`: renders a route at
`/project/abc/probe?query-tab=logs&id=1&id=2`, asserts what
`useParams()`, `useRouter().query` and `usePathname()` return, then
navigates and asserts again.
Addresses
[FE-5150](https://linear.app/supabase/issue/FE-5150/useparams-in-routes-tests-doesnt-return-any-querystring-params)
## To test
- [ ] `pnpm --filter studio exec vitest --run
tests/lib/route-render.test.tsx` passes.
- [ ] With `tests/vitestSetup.ts`, `tests/lib/route-render.tsx` and
`tests/lib/route-aware-hooks.ts` reverted to `master`, the same test
fails with `expected { ref: 'default' } to deeply equal { ref: 'abc',
queryTab: 'logs', id: '1' }`.
- [ ] Regression checks: `pnpm --filter studio exec vitest --run
tests/routes components/interfaces/Functions
components/interfaces/Database/Replication
components/interfaces/Account/Preferences` passes. These include route
tests and the component tests that mount their own TanStack router or
mock `next/router`.
---------
Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
## Problem
When a user cancels resumable uploads in the storage explorer, Studio
calls `upload.abort(true)` on each tus upload. In tus-js-client v4,
`abort()` returns a promise that sends a DELETE to terminate the upload
on the server. The call was wrapped in a synchronous `try/catch`, which
does not catch a rejected promise. When the terminate request fails (for
example because the network is unreachable), every cancelled upload
produced an unhandled promise rejection: `tus: failed to terminate
upload`.
## Solution
Attach a `.catch()` to `upload.abort(true)` in
`apps/studio/state/storage-explorer.tsx` and log the failure with
`console.warn`. The upload is already stopped on the client, so a failed
server-side terminate is safe to ignore. Cancel behaviour is otherwise
the same: the upload promise still rejects with `Upload aborted by
user`, and the toast flow does not change.
## Review instructions
1. Open a project's storage bucket in the Studio preview and start
uploading several large files.
2. While they upload, cancel the upload from the upload toast. The
uploads stop and the toast shows the cancellation as it did before.
3. Optional: in DevTools, set the network to Offline, then cancel during
an upload. The console shows a `Failed to terminate upload on the
server` warning and no `Uncaught (in promise)` error.
Checks run:
- `pnpm turbo run typecheck --filter='...[origin/master]'`: passed
- `eslint state/storage-explorer.tsx` (in `apps/studio`): no errors
- Prettier check on the changed file: passed
- `pnpm turbo run lint --filter='[origin/master]'`
(`studio#lint:type-checks`) ran out of memory twice in the build
sandbox.
## Checklist
- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [ ] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs
[style
guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)
[FE-5117](https://linear.app/supabase/issue/FE-5117/error-tus-failed-to-terminate-upload-caused-by-networkunreachable)
Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
## Context
Bit of an odd bug that I happened to come across which I can't remember
how to reproduce from scratch but its a valid issue.
If i try to log in on the sign-in route with `method` and
`error_description` query params in the URL, the `error_description`
param gets carried forward to the next page, which if my account has
MFA, it'll then bounce back to `/sign-in`
`/sign-in?error_description=Unable+to+exchange+external+code%3A+53f8&method=github`
Am opting to strip transient params when building the sign-in redirects
## To test
- [ ] Ensure that you've got an account with MFA
- [ ] Try logging in via this URL
`/sign-in?error_description=Unable+to+exchange+external+code%3A+53f8&method=github`
- [ ] You should be able to land on the sign-in-mfa page with no issue +
no error toasts
## Problem
Several self-hosted Studio API route handlers report success after a
failure or send invalid responses:
- `DELETE /api/platform/auth/{ref}/users/{id}/factors` started the
factor deletions with `forEach(async ...)` and returned 200 without
waiting. A failed delete was never reported.
- `POST /api/platform/auth/{ref}/{invite,magiclink,otp,recover}` called
`res.status(code)` with the upstream error code. When the request failed
with no HTTP response (a network error or an abort), `code` is undefined
and the web response adapter fell back to 200.
- `PUT /api/platform/projects/{ref}/analytics/log-drains/{uuid}` wrote a
500 inside `.catch` and then continued to `res.status(200)`. It also
returned 200 when Logflare answered with a non-2xx status.
- `DELETE` on the same route had the same `.catch` problem and sent
`res.status(204).json(...)`. The web `Response` constructor rejects a
body on a 204, so every successful delete threw and became a 500.
- `GET /api/connect` pushed every file path twice.
- The 405 `Allow` headers were wrong: `['PATCH']` on `users/{id}` (which
also handles DELETE) and `['GET', 'POST']` on `log-drains/{uuid}` (which
handles GET, PUT, and DELETE).
## Solution
- Factors: await every `deleteFactor` call with `Promise.all`, and
return 400 with the first error message if any delete failed.
- Auth senders: `res.status(code ?? 500)`.
- Log drain PUT/DELETE: use `try`/`catch` around `fetch`, check
`response.ok`, and return 500 from the handler itself on failure. DELETE
returns `res.status(204).end()` with no body.
- Connect: remove the duplicate `push` (`.DS_Store` is already skipped
earlier in the loop).
- Fix both `Allow` headers.
## Review instructions
On a self-hosted Studio:
1. Delete a log drain. The request returns 204 with an empty body, the
drain disappears from the list, and no error toast shows.
2. Update a log drain with values that Logflare rejects. The request
returns 500 and Studio shows an error, not success.
3. `GET /api/connect` returns each file path once.
4. Remove MFA factors for a user who has factors. The request returns
200 only after the factors are deleted, and the user's factor list is
empty afterwards.
5. Send an unsupported method (e.g. `GET`) to
`/api/platform/auth/{ref}/users/{id}`. The 405 response has `Allow:
PATCH, DELETE`.
Checks run: `pnpm turbo run typecheck --filter='...[origin/master]'`,
`pnpm turbo run lint --filter='[origin/master]'`, and prettier on the
changed files. Lint ran out of memory twice at the default heap size,
then passed with `NODE_OPTIONS=--max-old-space-size=8192`. No unit tests
cover these route files.
## Checklist
- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [ ] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs
[style
guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)
[FE-5124](https://linear.app/supabase/issue/FE-5124/self-hosted-studio-api-handlers-hide-errors-and-return-wrong-status)
---------
Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
## Problem
The Loot Donkey case study doesn't yet cover the infrastructure behind
the game.
## Solution
Add a short "Under the hood" subsection after the "lose any sleep" quote
and before "Getting ready for Early Access". It explains where the Fool
King database, Auth and Steam verification Edge Function run, and why
that keeps the weekly maintenance load close to zero.
## Preview links
| Site | Live | Search for |
| ---- |
-------------------------------------------------------------------- |
------------------ |
| WWW |
[/customers/loot-donkey](https://supabase.com/customers/loot-donkey) |
Under the hood |
## Review instructions
1. Open the preview of `/customers/loot-donkey`.
2. Confirm the "Under the hood" section appears after the "lose any
sleep" quote and before "Getting ready for Early Access".
## Checklist
- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [ ] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs
[style
guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)
## Problem
The Warehouse report shows query volume but not how many queries are
running, failing or being canceled.
## Solution
Add queries in progress, errors, timeouts and cancellations alongside
query rate. Timeouts are labelled as part of errors; cancellations
remain separate. Missing measurements stay distinct from zero.
| After |
| --- |
| <img width="1798" height="2318" alt="CleanShot 2026-11-18 at 12 18
38@2x"
src="https://github.com/user-attachments/assets/79c5b3d7-ec04-4519-89d0-f99a77ec3521"
/> |
| _Every chart tile except the first is new._ |
## Review instructions
1. Open the [Studio staging
preview](https://studio-staging-git-dnywh-warehouse-metrics-model-supabase.vercel.app)
with a staging project that has Warehouse access.
2. Go to **Observability > Warehouse**. Check the query activity and
outcome charts for a period with Warehouse traffic.
3. Change the period and refresh. Check that empty measurements are
distinct from measured zeroes, and that the timeout description makes
clear it is already included in errors.
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
## Problem
The www footer Community column linked to
[dev.to/supabase](https://dev.to/supabase), which has not been updated
since March and sits oddly among otherwise first-party Community links.
## Solution
Remove the DevTo entry from `apps/www/data/Footer.ts`.
## Review instructions
1. Open the [www deploy
preview](https://zone-www-dot-com-git-dnywh-chore-www-remove-dev-fa7823-supabase.vercel.app/).
2. Scroll to the footer Community column.
3. Confirm DevTo is gone, and the other Community links are unchanged.)
- Move "Enabling SSO for an organization" after the account notes
- Explain which email to use for the non-SSO owner account
- Explain how to test SSO when your own account is already a non-SSO
member
## Problem
- The current getting "Enabling SSO for an organization" instructions
leaves off certain key points that can be blockers and cause confusion.
## Solution
- Add extra clarity around the steps including steps based on specific
scenarios.
- Move admonitions from "Enabling SSO for an organization" to the "How
SSO works in Supabase" section as they belong there not
## Review instructions
Provide a clear numbered procedure that the PR reviewer can walk
through.
1. For example, `Open the live and preview links side-by-side.`
2. For example, `See the issue is fixed.`
## Checklist
Check all before review:
- [X] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [X] If I wrote a new docs topic or edited an existing topic, I used
the `/review-the-docs`
---------
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Show default values from the CLI spec on global and command flag rows.
For example, readers can see which format `--output-format` uses when
omitted. Skip empty defaults and omit `Default: false` for opt-in
switches such as `--debug`.
Only render a parameter type when one is supplied. This removes the
contradictory `no type` label beside CLI flags such as `--network-id
<string>` while preserving type labels in the API reference and
self-hosting guides.
This changes the renderer only. The generated CLI spec is published
separately.
## Problem
Several docs snippets and statements are wrong or incomplete:
- The OpenCode MCP config generated by `McpUrlBuilder` uses the old
shape (`mcp.supabase` with `enabled: true`). Current OpenCode config
expects servers under `mcp.servers.<name>` and uses `disabled` instead
of `enabled`, so the snippet does not register the server.
- The Python type generation guide builds Pydantic models with
`PublicMovies(m)`. `BaseModel` does not accept a positional dict, so the
example raises `TypeError`.
- The API keys page does not mention that the Data API OpenAPI root
(`GET /rest/v1/`) accepts only secret keys, so a publishable key gets a
401 there.
- The logs page says retention depends on the plan but does not give the
values.
- The Auth Hooks page names the Send SMS hook secret
`SEND_SMS_HOOK_SECRETS`, while the Send SMS hook page, the other hook
pages, and the self-hosting guide use the singular `..._HOOK_SECRET`.
## Solution
- `packages/ui-patterns/src/McpUrlBuilder`: OpenCode config now emits `{
"mcp": { "servers": { "supabase": { "type": "remote", "url": ... } } }
}`. Updated `OpenCodeMcpConfig`, `isOpenCodeMcpConfig`, and `getMcpUrl`
to match.
- `generating-python-types.mdx`: use `PublicMovies.model_validate(m)` in
the select, insert, and update examples.
- `getting-started/api-keys.mdx`: add a Known limitations bullet about
`GET /rest/v1/` requiring a secret key, with table routes or
`/auth/v1/health` as the check for a publishable key.
- `observability/logs.mdx`: add a per-plan retention table (Free 1 day,
Pro 7 days, Team 28 days, Enterprise 90 days), matching
`packages/shared-data/pricing.ts`.
- `auth/auth-hooks.mdx`: rename `SEND_SMS_HOOK_SECRETS` to
`SEND_SMS_HOOK_SECRET`.
Checks run: `pnpm turbo run typecheck --filter='...[origin/master]'`
(passed, run with `--concurrency=1` after the first run was OOM-killed),
`pnpm turbo run lint --filter='[origin/master]'` (passed, no errors),
`vitest run src/McpUrlBuilder` in `packages/ui-patterns` (37 passed),
and Prettier on changed files. Docs tests were skipped because they need
Docker.
## Review instructions
1. On the docs preview, open `/docs/guides/getting-started/mcp`, select
OpenCode, and confirm the config shows `mcp.servers.supabase` with
`type: "remote"` and the URL, and no `enabled` field.
2. Open `/docs/guides/ai-tools/mcp`, select OpenCode, and confirm the
same config.
3. Open `/docs/guides/api/rest/generating-python-types` and confirm the
select, insert, and update examples use
`PublicMovies.model_validate(m)`.
4. Open `/docs/guides/getting-started/api-keys#known-limitations` and
confirm the bullet about `GET /rest/v1/` accepting only secret keys.
5. Open `/docs/guides/observability/logs` and confirm the retention
table lists Free 1 day, Pro 7 days, Team 28 days, Enterprise 90 days.
6. Open `/docs/guides/auth/auth-hooks` and confirm the Send SMS examples
use `SEND_SMS_HOOK_SECRET`, not `SEND_SMS_HOOK_SECRETS`.
## Checklist
- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [x] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs
[style
guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)
Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
## Problem
In `apps/docs/content/guides/database/extensions/pgtap.mdx:14`, the
pgTAP description reads "It is an framework …". "framework" starts with
a consonant sound, so the article should be "a".
## Solution
Change "an framework" to "a framework". Docs-only change, no behavior
change.
Fixes#53396
Co-authored-by: Kody Jackson <kody.jackson@supabase.io>
## Problem
The [account MFA
guide](https://supabase.com/docs/guides/platform/multi-factor-authentication#enable-mfa)
says Supabase can't restore access if you lose all your MFA credentials.
That conflicts with the rewritten troubleshooting guide in
supabase/troubleshooting#368, which walks users through recovery codes,
a second authenticator app and contacting support.
## Solution
Replace the caution under **Enable MFA** with a short paragraph. It
recommends a second authenticator app and saved recovery codes, then
links to the troubleshooting guide for users who can't complete the MFA
step.
## Review instructions
1. Open `/docs/guides/platform/multi-factor-authentication#enable-mfa`
in the docs preview.
2. Check that the "we will not be able to restore access" caution is
gone and the new paragraph links to the troubleshooting guide
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
## Context
Lots of links that initially go to 301's within docs / kb. Updates these
to their resolved target.
Ask your Claude Code to review the new destinations programmatically.
---------
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
## What
Adds internal cross-links to docs guides
## Testing
- Prettier passes on the changed lines.
- Docs build passes (`pnpm build --filter=docs`).
- Docs link e2e run locally against the production build for every
changed page across this PR
---------
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Adds internal cross-links to docs guides
## Testing
- Prettier passes on the changed lines.
- Docs build passes (`pnpm build --filter=docs`).
- Docs link e2e run locally against the production build for every
changed page across this PR.
---------
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
This PR updates Management API docs automatically.
This regenerates:
- Management API specs and sections
- Personal Access Tokens permission-to-endpoint table
- Personal Access Tokens MCP tool permissions table
Sources include the live Management API specs, MCP permission map,
and Studio's shared permission catalog.
Co-authored-by: phamhieu <689843+phamhieu@users.noreply.github.com>
Co-authored-by: Ali Waseem <waseema393@gmail.com>
Search telemetry sent whatever people typed, and search boxes are a
place where people paste credentials and personal data. I replace the
raw text with a description of it. #53336 added the raw `query` to
`kb_search_submitted`; docs search and the command menu already sent it.
**Changed:**
- **I send a description of the search term**: `kb_search_submitted`,
`docs_search_v2_search_submitted`, `docs_search_v2_result_clicked` and
`command_menu_search_submitted` now send `queryLength` and
`queryWordCount`, measured after trimming and collapsing repeated
whitespace.
- **Text only for keywords**: the term itself (`query`, `value`, and
`search_query` on `command_menu_command_clicked`) is sent only when it
is up to 4 letters-only parts of at most 16 letters each, 40 characters
in total. Keys, tokens, emails, IDs, project refs and connection strings
never match. Over the last 30 days that shape covers about 96% of
command menu searches, 88% of docs searches and 73% of KB searches, so
term-level analysis such as no-result queries keeps most of its data.
- **I removed `keywords` from the auth users search event**:
`auth_users_search_submitted` no longer carries it. Those terms identify
customers' end users, and I confirmed nothing downstream reads them.
- **The `keywords` URL parameter is redacted wherever telemetry copies a
URL**: the Auth users page keeps the search term in its URL, so I
replace the value with `keywords=redacted` in the page URL, query string
and referrer we send, and in the posthog-js `before_send` hook for the
URL properties the SDK fills in on its own (`$session_entry_url`,
`$initial_current_url`, `$referrer`, `$initial_referrer`). The URL in
the browser is unchanged.
**Note:** a letters-only name or passphrase still matches the keyword
shape, and longer questions lose their text. I opened this in place of
#53435, which removed `query` from the KB event only.
## To test
Tested on the PR previews (docs, kb, studio-staging), reading the
request bodies sent to `/platform/telemetry/event`:
- [x] Docs: open search and type `auth`, expect
`docs_search_v2_search_submitted` with `query: "auth"`, `queryLength: 4`
and `queryWordCount: 1`. Observed exactly that, with `hasResults: true`.
- [x] Docs: type `person@example.com`, expect the same event with
`queryLength: 18` and no `query`. Observed, and no telemetry body in
that step contained the address.
- [x] KB: search `how do I reset my database password`, expect
`kb_search_submitted` with `queryLength: 35`, `queryWordCount: 7` and no
`query`. Observed.
- [x] KB: search `storage policies` with two spaces, expect
`kb_search_submitted` with `query: "storage policies"` and `queryLength:
16`. Observed, with `queryWordCount: 2`.
- [x] Studio: open the command menu and type `abcdefghijklmnopqrst`,
expect `command_menu_search_submitted` with no `value`, then type `auth`
and expect `value: "auth"`. Observed both, with `queryLength` 20 and 4.
- [x] Studio: on Auth > Users, search `person@example.com`, expect
`auth_users_search_submitted` with no `keywords`. Observed: `trigger`,
`sort_column`, `sort_order`, `providers` and `filter_column` only.
- [x] Studio: with `?keywords=person%40example.com` in the Auth > Users
URL, reload, then trigger an event on the page, expect `page_url` and
`ph.search` in the request body to carry `keywords=redacted` and the
address bar to keep the real term. Observed on all three events from
that page, and the address bar kept the term.
- [x] Studio: from that URL, do a full page load to another project page
and trigger an event, expect `ph.referrer` to carry `keywords=redacted`
while `document.referrer` keeps the real term. Observed on all three
events from the new page.
- [x] Studio: after that session, query the staging analytics project
for events from the preview host, expect no property value to carry the
address or anything but `keywords=redacted`. Observed: none of the
events in the test window carried the address, and the SDK's own `$set`,
`$pageview` and `$pageleave` events arrived with `keywords=redacted` in
`$current_url`, `$referrer` and `$initial_current_url`. The session
started on a page without the parameter, so `$session_entry_url` was not
exercised here; the unit test on the `before_send` hook covers it.
## Linear
- fixes GROWTH-1501
## What
Updates links in `apps/www` that pointed at redirecting URLs so they
point at the final destination, and fixes a few broken links:
## Testing
- Every replacement destination was requested and returns 200 with no
further redirect
- Prettier passes on all changed files
- Content and data changes only, apart from the one-line `/vector` fix
in `MagnifiedProducts.tsx`
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
## What
Adds internal cross-links from blog posts (`apps/www/_blog`) to the docs
page for the product, feature, or concept each post mentions.
## Testing
Skim through PR output for any irregularities. Spot check should do.
Notes:
- Prettier passes on the changed lines (a handful of these posts already
had unrelated Prettier issues, left untouched).
- Every link target is an existing docs page.
---------
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
## Problem
`useNotificationsV2Query` and `useProjectServiceStatusQuery` run
whenever their component is mounted, whether or not a session exists.
When a session ends and the app redirects to `/sign-in`, they can still
fetch (or refetch) `/platform/notifications` and
`/v1/projects/{ref}/health` with no `Authorization` header. The API then
responds 401 `No access token provided`, and the response is classified
as an `UnclassifiedApiError` and reported.
## Solution
Both hooks now gate `enabled` on `useIsLoggedIn()` from `common`.
`usePermissionsQuery` and `useOverdueInvoicesQuery` already follow this
pattern. The caller's `enabled` option still applies on top of it.
Self-hosted builds always count as logged in, so their behavior is
unchanged.
Checks run:
- `pnpm turbo run typecheck --filter='...[origin/master]'`: passes
- `pnpm turbo run lint --filter='[origin/master]'`: passes. The first
run of `studio#lint:type-checks` ran out of heap memory. It passed on a
rerun with `NODE_OPTIONS=--max-old-space-size=8192`.
- `pnpm exec vitest run
components/layouts/AppLayout/AdvisorButton.test.tsx
components/layouts/AppLayout/AdvisorButton.platform.test.tsx
components/ui/AdvisorPanel/AdvisorSignals.integration.test.tsx` (in
`apps/studio`): passes
- Prettier check on the changed files: passes
## Review instructions
1. Sign out of the Studio preview. Open
`/dashboard/sign-in?returnTo=/project/<ref>`, keep the network tab open,
and confirm that no request to `/platform/notifications` or
`/v1/projects/<ref>/health` returns 401.
2. Sign in and open a project's home page. The service status indicator
still loads its status.
3. Open the Advisor/Issues panel from the header. Notifications still
load, and the header button still shows the unread/critical indicator
when it applies.
## Checklist
- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [ ] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs
[style
guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)
[FE-4989](https://linear.app/supabase/issue/FE-4989/unclassifiedapierror-no-access-token-provided)
Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
Updates the CLI reference from the supabase/cli release workflow.
Generated by `scripts/generate-docs-spec.ts` in supabase/cli — edit the
command tree or the content under `apps/cli/docs/` there rather than
this
file.
New commands also need an entry in
`apps/docs/spec/common-cli-sections.json` —
without one a command's page is silently dropped from the docs site.
Sections fixes can be committed directly onto this branch — later
releases
add commits on top instead of rewriting it.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
## Description
Part of the work for OAuth apps with the scoped permissions. This PR:
- Update the mock data to the new format returned or expected by the
backend
- Remove unnecessary hooks that have their feature merged in another one
(`useOAuthOrgAppDetailsQuery` is now merged in
`useOAuthAppsPreflightValidationQuery`)
> [!NOTE]
> At this stage, the UI still only use mock data
## Review instructions
If all tests pass, we're good.
## Description
Part of the work for OAuth apps with the scoped permissions. This PR:
- Update `<MultiSelector>` to allow consumers to react to search terms
changes
- Refactor OAuth app consent screen to ensure we can load projects
asynchronously with an infinite list and server side filtering
> [!NOTE]
> At this stage, the UI still only use mock data
## Review instructions
If all tests pass, we're good.
## Problem
A 401 from the platform API means the browser sent no valid session
token: the user signed out, or the session expired. Studio then
redirects to sign-in. `classifyResponseError` turns any 4xx into
`UnclassifiedApiError` with `fault: 'studio'`, so every query that fails
while the session is gone goes to Sentry at the Studio-owned sample
rate. The first query to fail is often the read-replicas query. Sentry
fills with errors that Studio can't fix.
## Solution
- `UnclassifiedApiError` now derives its fault from the status: a 401 is
`user`, and every other 4xx stays `studio`.
- `ERROR_ROUTING.UnclassifiedApiError` gets a `user` entry at
`SAMPLE_USER_FAULT`. 401s still send a small trickle to catch
misclassification, and 403/404/429 keep `SAMPLE_OWNED`.
- Because the fault is `user`, `AlertError` shows the user-fault
presentation for a 401 ("try again / refresh"), with no contact-support
prompt.
- Tests: `handleError.test.ts` expects `user` for a 401, and
`error-routing.test.ts` covers the 401 and 403 routing.
## Review instructions
This change has no new UI. To check it:
1. In `apps/studio`, run `vitest run lib/errors data/handleError.test.ts
data/error-classification.test.ts data/fetchers-errors.test.ts
data/query-client-reporting.test.ts components/ui`. All tests pass.
2. In `apps/studio`, run `eslint` on the changed files. It reports
nothing.
3. `tsc --noEmit` in `apps/studio` reports one error, in
`packages/ui-patterns/src/McpUrlBuilder/components/InstructionBlocks.tsx`.
The same error appears without this change: it comes from running `tsc`
without `next typegen` first.
[FE-5086](https://linear.app/supabase/issue/FE-5086/unclassifiedapierror-no-access-token-provided)
Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
## Context
Table Editor supports actions on tables via the "..." while the table is
active in view as such:
<img width="350" alt="image"
src="https://github.com/user-attachments/assets/3fbf7b08-1156-403e-ae89-ada7f56e7270"
/>
Am opting to add support for making these actions available behind a
context menu as well, which would align the UX with the SQL Editor,
Storage, Explorer, etc. Makes it much more easier to reach these actions
without having to first open the table in view and having to click the
"..." button. Doing so in a similar way with how it's done in the
Storage Explorer where we declare the the available actions in a single
place, then render both DropdownMenu + ContextMenu with that set of
actions.
<img width="350" alt="image"
src="https://github.com/user-attachments/assets/862e0a71-4d60-4a5b-8c98-f0812c0e6bf4"
/>
Note that for now, we're preventing selection of Edit, Duplicate, and
Delete actions from the context menu as this requires a bit more
refactoring which I'm planning to do as a separate PR. For context -
those 3 actions are currently coupled with the router, as they depend on
the table ID that's present in the URL, so we'll need to decouple them
first before making these actions available.
<img width="350" alt="image"
src="https://github.com/user-attachments/assets/edc8af5c-b9b7-4e02-805c-90ad0a24d8dc"
/>
Also added E2E test coverage since this would affect local CLI /
self-hosted
For a user with MFA enabled, Studio requests PostHog flags once with the
pre-MFA token, the API refuses it, and nothing requests them again after
the challenge is verified. The flags stay missing until the user opens
an organization or project, or reloads, so pages reached straight after
MFA (`/organizations`, `/new`, `/account`) get no flag values.
I made `FeatureFlagProvider` refetch when the auth client reports a
verified MFA challenge. Verification changes none of the existing fetch
inputs (user, organization, project), which is why the refused first
response stuck.
**Note:** The refetch runs on any verified MFA challenge (sign-in,
enrolling a factor, identity re-verification), so users who never verify
a challenge make the same flag requests as before. I did not key it on
the access token, because that would refetch on every token refresh.
## To test
Tested on the PR preview, with a temporary TOTP factor on a staging
account:
- [x] Sign in with an MFA-enabled account, with the network log open,
landing on `/organizations`. Expect a `GET
/platform/telemetry/feature-flags` returning 200 with the account's
flags after `POST /auth/v1/factors/:id/verify`, before opening any
organization or project. Observed: flags 403 before the verify, verify
200, then one flags 200 with no organization or project param.
- [x] Repeat with `returnTo=/new`. Expect the same 200 after the verify
request. Observed: landed on `/new`, same order (403, verify 200, flags
200).
- [x] On the landing page after MFA, open the dev toolbar's Flags tab,
which reads the provider's PostHog flags. Expect the account's flags and
no `message` entry. Observed: the account's flags listed, no `message`
entry, and no flag-lookup console errors.
- [x] Sign in with an account without MFA. Expect no verify request, so
no refetch from this change. Observed: no `factors/:id/verify` request;
every flags request returned 200.
- [x] Enroll a TOTP factor in Account > Security. Expect one flags
request after the enrollment verify (the case the Note describes).
Observed: verify 200, then flags 200.
## Linear
- fixes GROWTH-1507