mirror of
https://github.com/supabase/supabase.git
synced 2026-12-04 23:49:03 +00:00
create-pull-request/patch
40517
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
6bdb443398 |
docs(guides): fix code fence languages in three guides (#53722)
## Problem
Three code blocks in the docs guides use the wrong language tag, so they
are highlighted and type-checked as JavaScript or TypeScript instead of
what they are:
- `guides/database/arrays.mdx`: a SQL query is tagged `js`
- `guides/database/import-data.mdx`: the `pgloader config.load` command
is tagged `jsx`
- `guides/ai/hybrid-search.mdx`: a cURL command is tagged `tsx`
The docs style guide says JavaScript and TypeScript blocks get type
hints and are formatted by Prettier, which does not apply to these
blocks.
## Solution
Retag the blocks: `sql` for the query and `bash` for the two shell
commands (`bash` is the most common shell tag in the guides).
For the SQL block I also lowercased the keywords, per the style guide's
"Prefer lowercase for SQL". Prettier's SQL plugin rewrites
`textarray[1]` to `textarray as [1]`, which is not valid Postgres, so
the block is preceded by `{/* prettier-ignore */}`, the same convention
already used in `guides/ai/engineering-for-scale.mdx` and
`guides/api/query-plans.mdx`.
Earlier PRs fixed the same kind of problem: #11870, #19033, #14856,
#11235.
## Review instructions
1. Open the diff: only the language tags change, plus the lowercase SQL
and the `prettier-ignore` comment in `arrays.mdx`.
2. Check the three pages in the preview: the SQL block in the SQL tab of
"Working with arrays", the `pgloader` step in "Import data into
Supabase", and the cURL block in "Hybrid search".
3. Run `pnpm test:prettier`. It passes for these files with the repo's
`prettier.config.mjs`.
## 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).
(Not run: this edit only changes code fence languages, and I applied the
style guide's code block rules by hand.)
Co-authored-by: Santhosh-x23 <185920429+Santhosh-x23@users.noreply.github.com>
|
||
|
|
74818f1441 | fix(self-hosted): allow request bodies over 1 MB through the nginx proxy (#53039) | ||
|
|
c3c049ea53 |
chore: remove public TIA PDF and point to Trust Center (#53687)
<!-- claude-slack-attribution --> _Requested by **Ivan Vasilov** · [Slack thread](https://supabase.slack.com/archives/C0161K73J1J/p1795121287621619)_ ## Problem **Before:** The Studio org Documents page linked directly to `https://supabase.com/downloads/docs/Supabase+TIA+250314.pdf`, and that PDF was served publicly from `apps/www/public/downloads/docs/`. Legal/Security wants people to get the latest TIA from the Trust Center instead, and the old PDF taken off the public site. **After:** The Studio TIA section links to https://trust.supabase.io, and the PDF is deleted from `apps/www`. The old PDF URL permanently redirects to the Trust Center, so existing links don't 404. This removes the public TIA PDF and repoints the dashboard to the Trust Center. ## Solution - Deleted only `apps/www/public/downloads/docs/Supabase+TIA+250314.pdf` (the other docs in that folder are untouched). - `TIA.tsx` in Studio: the button now links to `https://trust.supabase.io` (the same form already used in the legal FAQ), reads "View TIA in Trust Center", uses the external-link icon, and drops the `download` attribute. Description copy mentions the Trust Center. The existing `document_view_button_clicked` telemetry is unchanged. - `apps/www/lib/redirects.js`: added a permanent redirect for `/downloads/docs/Supabase\\+TIA\\+250314.pdf` to `https://trust.supabase.io`, following the existing DPA PDF redirect. This is easy to drop if you'd rather have a hard 404. No other references to the PDF exist in the repo (checked www, studio, docs, packages). The legal FAQ already links to the Trust Center. ## Important caveats - Deleting the file does **not** remove the blob from git history. `supabase/supabase` is public, so the PDF stays fetchable through the repo's history. If it must be truly gone, that needs a separate decision (history rewrite and/or contacting GitHub support). - A CDN/Vercel cache may serve the PDF briefly after deploy (and the redirect takes effect once deployed). ## Review instructions 1. In the Studio preview, open an org's Documents page and check the TIA section: the button opens https://trust.supabase.io in a new tab. 2. On the www preview, request `/downloads/docs/Supabase+TIA+250314.pdf` and confirm it redirects to the Trust Center. ## Testing Typecheck, lint and tests were not run: `pnpm install` is partially blocked in my environment (npm.jsr.io is egress-blocked) and prettier couldn't load its plugins. I only confirmed `redirects.js` loads in Node and the entry parses. I couldn't reach supabase.com, so the live URLs are unverified. --- _Generated by [Claude Code](https://claude.ai/code)_ Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
f9fd4a2a9f |
feat(www,docs,kb): show Do Not Sell or Share footer link to US visitors (#53490)
## Problem US visitors need a "Do Not Sell or Share My Personal Information" footer link, and no site reads the visitor's country ([GROWTH-1369](https://linear.app/supabase/issue/GROWTH-1369)). ## Solution - The www proxy copies the `x-vercel-ip-country` header into a `_sb_country` cookie, which the footers read client-side. Docs and kb route through www, so that covers all three. - US visitors and unknown countries see the opt-out label. Everyone else keeps "Privacy Settings". Both open the same modal. - The link sits on each footer's copyright line, and the label stays hidden until the cookie is read. - Out of scope: GPC ([GROWTH-1373](https://linear.app/supabase/issue/GROWTH-1373)) and modal copy ([GROWTH-1370](https://linear.app/supabase/issue/GROWTH-1370)). - Tests cover US, non-US, unknown countries, and the cookie write. Screenshots used a hand-set cookie. **www** | | Before | US | DE | |---|---|---|---| | 375px | <img src="https://github.com/user-attachments/assets/1bd8bcb8-6692-4fe9-90a0-5343b0364053" width="200"> | <img src="https://github.com/user-attachments/assets/0514a0bd-ad1c-4773-b889-de941f5466b5" width="200"> | <img src="https://github.com/user-attachments/assets/328ca1b4-9698-492e-8045-a15d884108f2" width="200"> | | 1440px | <img src="https://github.com/user-attachments/assets/3cb3e7d7-62ab-4d34-841c-23d50d7d1cd5" width="300"> | <img src="https://github.com/user-attachments/assets/caf75b29-7286-404a-b1ea-7dfa5022912c" width="300"> | <img src="https://github.com/user-attachments/assets/2c067209-39cd-4ad8-9987-4f8763d70660" width="300"> | **docs** | | Before | US | DE | |---|---|---|---| | 375px | <img src="https://github.com/user-attachments/assets/37248b4a-436b-4d2d-b2d3-3966117abf9e" width="200"> | <img src="https://github.com/user-attachments/assets/0b109a0d-7618-46f8-ade0-8ba17e390b56" width="200"> | <img src="https://github.com/user-attachments/assets/0047b2b8-7047-40df-8d9c-09f51e538fa4" width="200"> | | 1440px | <img src="https://github.com/user-attachments/assets/0a7d6a65-e964-43dc-911e-0ea033cb1e91" width="300"> | <img src="https://github.com/user-attachments/assets/27922348-661c-4246-b3fc-44ac054bd084" width="300"> | <img src="https://github.com/user-attachments/assets/30afb171-1023-43ff-b77e-89f341128377" width="300"> | **kb** | | Before | US | DE | |---|---|---|---| | 375px | <img src="https://github.com/user-attachments/assets/cd4fb8d1-8827-4b1a-8d13-c2a5d4f97378" width="200"> | <img src="https://github.com/user-attachments/assets/2706ae24-3df8-4149-9a51-75abb0456734" width="200"> | <img src="https://github.com/user-attachments/assets/7afb8731-b487-4e48-ae83-a3a6bde36bee" width="200"> | | 1440px | <img src="https://github.com/user-attachments/assets/3b2bdc17-fee7-4ec0-bd24-d35a0367a6ca" width="300"> | <img src="https://github.com/user-attachments/assets/479b03e6-6890-4714-bbbb-ab122f46e786" width="300"> | <img src="https://github.com/user-attachments/assets/252f4e0f-5bcc-4b43-aeda-784df9f000ca" width="300"> | ## Review instructions 1. From a US IP, click the footer link on the www preview. The modal opens. 2. From a non-US IP, see "Privacy Settings". ## 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) --------- Co-authored-by: Danny White <3104761+dnywh@users.noreply.github.com> |
||
|
|
6fda122771 |
chore(studio): show the TanStack devtools only with ?tanstack-devtools (#53708)
## What kind of change does this PR introduce? Chore (local developer experience) ## What is the current behavior? In local development, Studio renders the TanStack devtools floating trigger in the bottom-right corner on every page. It overlaps Studio's own dev toolbar trigger and gets in the way. ## What is the new behavior? The TanStack devtools (Router and Query panels) only show when Studio is loaded with `?tanstack-devtools` in the URL, using the library's built-in `requireUrlFlag` setting. Once loaded, they stay available while navigating within Studio, and a reload without the flag hides them again. Use a URL that doesn't redirect, for example `/org/<slug>?tanstack-devtools` or `/project/<ref>?tanstack-devtools`. The library reads the flag when the devtools mount, so a redirect that drops the query string can hide them. **If you've opened the devtools before**, the library has saved its settings to localStorage, and those override the `config` prop. Turn on **Require URL Flag** in the devtools Settings tab once, or delete the `tanstack_devtools_settings` localStorage key. ## How to verify - With no `tanstack_devtools_settings` in localStorage, run `pnpm dev:studio` and open `/org/<slug>`: no TanStack trigger appears. - Open `/org/<slug>?tanstack-devtools`: the trigger appears and opens the panel. Click through to another page: it's still there. - Reload without the flag: the trigger is gone. - Production and test builds are unchanged. --------- Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com> Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com> |
||
|
|
a76a577e96 |
fix(ui-patterns): make charts accessible by default (#53706)
## Problem Chart measurements are available on hover, but cannot be reached with a keyboard. Chart animations also ignore the user's reduced-motion preference. ## Solution Enable keyboard navigation and visible focus in ChartLine and ChartBar. Disable line and bar animation when reduced motion is requested. Other users keep the existing animation behaviour. | ChartBar | ChartLine | | --- | --- | | <img width="1022" height="522" alt="CleanShot 2026-11-20 at 15 04 50@2x" src="https://github.com/user-attachments/assets/7b241141-2646-4f36-8855-5478fa45858d" /> | <img width="1040" height="528" alt="CleanShot 2026-11-20 at 15 04 24@2x" src="https://github.com/user-attachments/assets/2ee933dc-54e2-4117-abe5-cf4456b50e4c" /> | ## Review instructions 1. Open the [design-system preview](https://design-system-git-dnywh-chart-line-accessibility-supabase.vercel.app/design-system/docs/ui-patterns/charts#basic-chart-types) and go to **Charts > Basic Chart Types**. Review both **Standard Line Chart** and **Standard Bar Chart**. 2. For each chart, use Tab to focus it, then Left and Right arrows to move through measurements. Check that focus is visible and the tooltip updates. 3. In Chrome DevTools, open the command menu (⌘+Shift+P), run **Show Rendering**, then set **Emulate CSS media feature prefers-reduced-motion** to **reduce**. Reload and check both charts draw without animation. 4. Turn reduced motion off and reload. Check that the existing animation and hover tooltips still work. |
||
|
|
4ce89b7090 |
Remove unnecessary guard in CLI login (#53707)
## Context Resolves FE-5165 The CLI login screen could get stuck on the loading state and never navigate to the device code view. Was happening due to two guards that interact badly: - `startedForSessionIdRef` stops the effect from sending a second POST for the same `session_id`. - An `isActive` flag, set to `false` in the effect cleanup, made the POST handler ignore its result once the effect had been cleaned up. It's seemingly a race condition issue as in my case I only ran into this problem locally, but not on staging as `isActive` was getting flipped to `false` and hence the UI never navigates to show the device code Opting to remove the `isActive` guard and solely rely on `startedForSessionIdRef.current` since the latter should be able to handle this logic by itself ## To test This one can only be tested locally i reckon - [ ] Verify that you can login via CLI via `supabase login --profile supabase-local` |
||
|
|
62d6bf56f8 |
fix(telemetry): send the live posthog session id on custom events (#53504)
Custom events sent through the telemetry endpoint often carry a session id the browser's PostHog session has already left: 8.9% of server-captured events in a recent week had an id more than 24 hours old, against 0.046% of browser-captured ones. Two things on the client cause it. The `session_id` in the request body is parsed out of the PostHog cookie without going through posthog-js, so a custom event never rotates an expired session. And the `session_id` cookie, which the API reads for the events it emits itself, was written on each pageview before posthog-js rotated the session, so the first pageview after an idle period stored the previous session's id. **Changed:** - **Custom events carry the live session id**: I changed `buildTelemetryEventRequest` to ask posthog-js for the session id the way a captured event does, so an expired session rotates first. Until posthog-js has loaded it sends the cookie-parsed id, as before. - **The `session_id` cookie follows the session**: I moved the write from the pageview handler to posthog-js's session-change callback, plus one write when posthog-js loads, so the cookie changes when the session does. - **The cookie stays cleared after an opt-out**: when a visitor withdraws consent, posthog-js resets the session, and the new id would have been written back over the cleared cookie. I skip the write once the visitor has opted out, in this tab or another. Unit tests cover this one: preview builds accept consent by default, so withdrawal can't be exercised there. - **Session metrics will step**: custom events now count as session activity. A long-lived tab that sends events without navigating stays in one session, so expect fewer, longer sessions from the day this reaches each app. **Note:** The API starts reading the body's `session_id` in a companion change on its side. Either can deploy first: the field is already sent today and ignored. ## To test Tested on the PR preview: - [x] In Studio with the Network tab open, open the user dropdown in the header. Expect the `telemetry/event` request body's `session_id` to equal the `session_id` cookie. - [x] Open the dropdown again right away. Expect the same `session_id` as in the first request. - [x] Leave that tab untouched for 35 minutes, then open the user dropdown again without navigating. Expect a different `session_id` in the request body than in the first step, and the `session_id` cookie to equal the new one. Observed after 38 idle minutes. - [x] Navigate to another Studio page. Expect the `session_id` cookie to keep the value from the previous step. Observed on an in-app navigation to the account page. ## Linear - fixes GROWTH-1509 |
||
|
|
21fa55ba0e |
Navigate away after deleting the open table when its tab was already pruned (#53710)
## Context Table Editor E2E tests for context menu is failing on `deleting the open table from its context menu closes its tab` Likely a race condition happening as the test does passes sometimes, but fails way too often. Fix is applied on `useCloseDeletedTableTab` to navigate away after deleting the open table when tab was already pruned |
||
|
|
c18904c171 |
kb: add how to use Drizzle with Supabase as just Postgres article (#53295)
## Problem There aren't much guides on how to use Supabase as just Postgres and use it with Drizzle. ## Solution Adds a simple tutorial article in the KB for how to create an app with Drizzle & TanStack, and use Supabase as just Postgres. ## Preview links https://kb-git-tylershukert-devrel-615-drizzle-supabase-1159ba-supabase.vercel.app/kb/guides/setup-drizzle-with-postgres-and-tanstack-start <!-- ## Additional context Optionally add any other context or screenshots. --> ## Review instructions Provide a clear numbered procedure that the PR reviewer can walk through. Make sure the tone and the content in general follow what we would want within KB. ## 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 `/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: kodster28 <kody.jackson@supabase.io> |
||
|
|
b1d59e0ee8 |
feat(www): pricing (#53320)
## Problem - pricing page shows checks in the bright brand green - pro button sits lower than the other plan buttons, and each price sits lower than its plan name - compute slider has no step marks, so a reader cannot see the sizes before a drag ## Solution - changes the plan cards so names, prices and buttons line up, and the pro card has the only green button - replaces the bright green check circles with tinted checks and drawn minus icons, so both icons pass contrast - adds step marks and a hover preview to the compute slider, so the badge and price show a size before the click - adds a tab above the micro row in the compute table, so readers see which size the plan credits cover - fixes the spend cap chart, which showed the bars of both states on toggle because css transitions changed the motion values | before | after | | --------------------------------------------------------------------------- | -------------------------------------------------------------------------- | | <img width="2880" height="23304" alt="pricing-before" src="https://github.com/user-attachments/assets/c42c7487-e0fb-4914-a210-844fe67015bd" /> | <img width="2880" height="22958" alt="pricing" src="https://github.com/user-attachments/assets/e2066006-f610-4c53-a5a7-94525966fefc" /> | ## Preview links | Site | Live | Preview | | ---- | ------------------------------------------------------------------------------------ | --- | | WWW | [/pricing](https://supabase.com/pricing) | [/pricing](https://zone-www-dot-com-git-antlio-feat-www-pricing-supabase.vercel.app/pricing) | ## Review instructions 1. visit [/pricing](https://zone-www-dot-com-git-antlio-feat-www-pricing-supabase.vercel.app/pricing) |
||
|
|
0ce2a96c53 |
feat(studio): show Warehouse workload on the integration overview (#53575)
## Problem The Warehouse integration overview shows replication status but gives no view of query activity. ## Solution Add last-hour query rate and p95 duration charts, with refresh and a link to Observability. Metrics failures appear beside the replication information. | Before | After | | --- | --- | | <img width="1292" height="1288" alt="CleanShot 2026-11-18 at 13 44 48@2x" src="https://github.com/user-attachments/assets/f06314bb-8322-448b-a86b-6821a3427a52" /> | <img width="1314" height="1930" alt="CleanShot 2026-11-18 at 13 45 10@2x" src="https://github.com/user-attachments/assets/0cbaab85-b7bb-445d-8547-3c772010a0d1" /> | | _No “Workload” section._ | _A new “Workload” section._ | Depends on #53574. ## Review instructions 1. Open the [Studio staging preview](https://studio-staging-git-dnywh-warehouse-overview-workload-supabase.vercel.app) with a staging project that has Warehouse configured. 2. Go to **Integrations > Warehouse > Overview**. Check the **Workload** charts below replication status. 3. Refresh the charts, then use **Observability** to open the full report. 4. Check a period without query activity. The empty message should name the last 60 minutes. --------- Co-authored-by: Joshen Lim <joshenlimek@gmail.com> |
||
|
|
98b197509e |
feat(studio): show Warehouse worker activity (#53574)
## Problem The Warehouse report does not show worker starts or request performance. ## Solution Add worker starts, worker start time, requests by method and request duration below Capacity. Keep the API’s kind, result, method and status labels visible. Durations use milliseconds. | After | | --- | | <img width="1670" height="3362" alt="CleanShot 2026-11-18 at 13 41 47@2x" src="https://github.com/user-attachments/assets/90f6c5ec-dc4c-4828-ba40-7242fa4c1b71" /> | | _The new “Worker activity” section._ | ## Review instructions 1. Open the [Studio staging preview](https://studio-staging-git-dnywh-warehouse-report-workers-supabase.vercel.app) with a staging project that has Warehouse access, then go to **Observability > Warehouse**. 2. Check **Worker activity** below Capacity. Compare worker starts and start time, then requests by method and request duration. 3. Change the period and refresh. Check that the labels distinguish the returned worker kinds and request outcomes, and that missing measurements stay distinct from zero. --------- Co-authored-by: Joshen Lim <joshenlimek@gmail.com> |
||
|
|
8409c5d98f |
feat(studio): show Warehouse capacity (#53573)
## Problem The Warehouse report does not show available worker capacity or why requests are rejected. ## Solution Add worker-slot usage alongside the slot limit, plus rejected requests split by reason. Labelled measurements keep separate lines and missing values stay visible as gaps. | After | | --- | | <img width="1694" height="1842" alt="CleanShot 2026-11-18 at 13 38 04@2x" src="https://github.com/user-attachments/assets/e480b83c-6c93-4b18-85e6-9a37caf304b0" /> | | _The new “Capacity” section._ | ## Review instructions 1. Open the [Studio staging preview](https://studio-staging-git-dnywh-warehouse-report-capacity-supabase.vercel.app) with a project that has Warehouse access, then go to **Observability > Warehouse**. 2. Under **Capacity**, compare **In use**, **Active grants** and **Pending grants** with **Limit**. 3. Check **Rejected requests** for labelled rejection reasons. Change the period and refresh to check both charts update. --------- Co-authored-by: Joshen Lim <joshenlimek@gmail.com> |
||
|
|
2372aa0fc2 |
feat(studio): show Warehouse query latency (#53570)
## Problem The Warehouse report shows query activity and outcomes, but not how long queries spend waiting or running. ## Solution Add query-duration percentiles, worker-acquisition waits and successful-query duration. Durations are shown in milliseconds, with missing measurements kept distinct from zero. Latency loads separately so a failed request does not hide query activity. | After | | --- | | <img width="1678" height="1796" alt="CleanShot 2026-11-18 at 12 28 53@2x" src="https://github.com/user-attachments/assets/48c6545e-8f2d-40c4-aa3c-977dd2ae6479" /> | | _New latency section._ | ## Review instructions 1. Open the [Studio staging preview](https://studio-staging-git-dnywh-warehouse-report-latency-supabase.vercel.app) with a staging project that has Warehouse access ([example](https://studio-staging-git-dnywh-warehouse-report-latency-supabase.vercel.app/dashboard/project/yirnfrgkxmnqgexikhfc/observability/warehouse?its=2026-11-18T00%3A23%3A52.901Z&ite=2026-11-18T01%3A23%3A52.901Z&isHelper=true&helperText=Last+60+minutes)), then go to **Observability > Warehouse**. 2. Check **Query duration**, **Time waiting for a worker** and **Successful query duration** below the query charts. Hover the lines to compare timing measurements. 3. Change the date range and refresh. Both query activity and latency should update. 4. Check the selected period without measurements. Empty or unavailable data must remain distinct from measured zeroes. Shared ChartLine accessibility changes are separate in #53706. --------- Co-authored-by: Joshen Lim <joshenlimek@gmail.com> |
||
|
|
df6eafef7c |
Joshenlim/fe 5116 support editduplicatedelete tables from (#53662)
## Context We previously introduced context menus to the table editor [here](https://github.com/supabase/supabase/pull/53506), but prevented edit, delete, and duplicate actions as those actions were coupled to the router. Hence this PR decouples that by making those actions target a table by a provided ID "More options" action now also shows on every row, just visibly shown only if its active or the user hovers over the row <img width="335" height="183" alt="image" src="https://github.com/user-attachments/assets/9897945d-37f4-4658-9420-29b948173208" /> ## To test Can test edit / delete / duplicate table on a table that you're not currently actively on, via both context menu and dropdown menu |
||
|
|
1479013fd8 |
docs(guides): rework five how-to pages to the how-to template (#53650)
Closes DOCS-1614 ## Problem This PR is to apply the template to top-five low-hanging fruit pages -- ones that nearly match the template already and do not need to break out new topics. This PR also tests the template to see that it is working as expected. ## Solution Apply the How-to Template to 5 how-to pages. ## Preview links | Site | Live | Preview | Search for | | --- | --- | --- | --- | | Docs | [/docs/guides/storage/analytics/creating-analytics-buckets](https://supabase.com/docs/guides/storage/analytics/creating-analytics-buckets) | [/docs/guides/storage/analytics/creating-analytics-buckets](https://docs-git-docs-howto-rework-easy-pages-supabase.vercel.app/docs/guides/storage/analytics/creating-analytics-buckets) | Create an analytics bucket | | Docs | [/docs/guides/functions/debugging-tools](https://supabase.com/docs/guides/functions/debugging-tools) | [/docs/guides/functions/debugging-tools](https://docs-git-docs-howto-rework-easy-pages-supabase.vercel.app/docs/guides/functions/debugging-tools) | Debug Edge Functions locally | | Docs | [/docs/guides/queues/consuming-messages-with-edge-functions](https://supabase.com/docs/guides/queues/consuming-messages-with-edge-functions) | [/docs/guides/queues/consuming-messages-with-edge-functions](https://docs-git-docs-howto-rework-easy-pages-supabase.vercel.app/docs/guides/queues/consuming-messages-with-edge-functions) | Consume queue messages | | Docs | [/docs/guides/database/postgres/setup-replication-external](https://supabase.com/docs/guides/database/postgres/setup-replication-external) | [/docs/guides/database/postgres/setup-replication-external](https://docs-git-docs-howto-rework-easy-pages-supabase.vercel.app/docs/guides/database/postgres/setup-replication-external) | Replicate to an external Postgres | | Docs | [/docs/guides/security/rotate-leaked-api-keys](https://supabase.com/docs/guides/security/rotate-leaked-api-keys) | [/docs/guides/security/rotate-leaked-api-keys](https://docs-git-docs-howto-rework-easy-pages-supabase.vercel.app/docs/guides/security/rotate-leaked-api-keys) | Rotate a leaked API key | ## Review instructions 1. Open the live and preview links for each page side by side. 2. Check that each page opens with a value statement and ends with Next steps. 3. Check that the code blocks and the Dashboard steps match the live page. 4. On the debugging page, check that the steps run in order across the two phases. 5. On the replication page, check that the code blocks and notes render under the right steps and the numbering runs 1 to 5. 6. On the rotate page, check that the "Retire the compromised key" link in Prerequisites still jumps to its heading. ## 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 `/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) |
||
|
|
656aa60b20 |
docs(database): explain which role a security_invoker view checks (#53641)
## Problem The "View security" section of the views guide explains `security_invoker` but not which role is checked when the view is queried through the Data API, or why a `security_invoker` view over `auth` tables fails with every API key. Related to [FDBKIN-21897](https://linear.app/supabase/issue/FDBKIN-21897) Closes [DOCS-1687](https://linear.app/supabase/issue/DOCS-1687) ## Solution Adds two paragraphs of body text after the SQL example in "View security" (`apps/docs/content/guides/database/views.mdx`). The existing paragraph and SQL are unchanged. - The first paragraph says that through the Data API, Postgres checks the role from the request's API key or JWT (`anon`, `authenticated`, or `service_role`). That role needs privileges, such as `select`, on every table the view reads, not only on the view. Postgres logs show `authenticator`, the role the Data API connects as, not the role the view checks. - The second paragraph says that by default, API roles have no privileges on tables in the `auth` schema, so a `security_invoker` view over `auth.users` fails with `permission denied for table users`, even with a secret key. It points readers to storing user data in a `public` table, with a link to the User management guide. It does not recommend granting `auth` tables to any role. Needs review: the text says "by default" for `auth` grants because older projects may carry extra grants. Checks run: `prettier --check` on the changed file and `pnpm turbo run lint --filter='[origin/master]'` pass on the latest commit. `pnpm turbo run typecheck --filter='...[origin/master]'` passed on the first commit; the second commit changes only MDX prose. Docs tests were skipped because they need a local Supabase stack (Docker). ## 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> |
||
|
|
58e0d8067d |
docs(rls): add an example for rows shared by two users (#53640)
## Problem The RLS guide shows policies for rows that belong to one user (`user_id`), but not for a row that two users share through two columns, such as the buyer and the seller of an order. Related to [FDBKIN-27655](https://linear.app/supabase/issue/FDBKIN-27655) Closes [DOCS-1686](https://linear.app/supabase/issue/DOCS-1686) ## Solution Adds a `### Share rows between users` section to the RLS guide, between "Write a policy for each operation" and "Specify roles in your policies". The section spans operations, so it sits beside the per-operation subsections, not among them. It has: - An `orders` table with `buyer_id` and `seller_id`. RLS is enabled, grants are revoked from `anon, authenticated`, and `select, update` are granted to `authenticated`, following the page's grant pattern. - A select policy and an update policy that both use `(select auth.uid()) in (buyer_id, seller_id)`. The update policy uses the same expression in `using` and `with check`, so the updated row must still include the user as buyer or seller. - A sentence on `insert` and `delete`: check only the user who can create or remove the row, because a delete policy that checks both columns lets one user remove the row for both. - A note that this needs no `security definer` function, with a link to "Use security definer functions" for checks against another table. - A note to index `buyer_id` and `seller_id` separately, with a link to "Add indexes". No existing section is changed. ### Verification - I ran the SQL in PGlite (Postgres 17) with an `authenticated` role, an `auth.uid()` that reads `request.jwt.claim.sub`, and an index on each of `buyer_id` and `seller_id`: - Buyer: selects 1 row and updates 1 row. Setting both IDs to a third user fails with `new row violates row-level security policy for table "orders"`. - Seller: same as the buyer. - Another user: selects 0 rows and updates 0 rows. - `explain select * from orders` with `enable_seqscan=off` shows a `BitmapOr` over both indexes, with `auth.uid()` in InitPlans. - `pnpm turbo run lint --filter='[origin/master]'` passes, with no findings on the changed file. - Prettier `--check` passes on the changed file. - The page compiles with `@mdx-js/mdx`. - `build:guides-markdown` could not run in the sandbox: it needs GitHub credentials for federated content. ## 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> |
||
|
|
00c96d23f0 |
docs(auth): update Keycloak client settings to the current admin console (#53638)
## Problem The Keycloak social sign-in guide still describes the legacy Keycloak admin console: it tells readers to set "Access Type" to "confidential", a field that no longer exists. The current console configures this under **Capability config** with **Client authentication** and **Standard flow**. Related to [FDBKIN-4596](https://linear.app/supabase/issue/FDBKIN-4596) Closes [DOCS-1684](https://linear.app/supabase/issue/DOCS-1684) ## Solution In `apps/docs/content/guides/auth/social-sign-in/auth-keycloak.mdx`: - **Overview list:** the client uses **Client type** **OpenID Connect**, with **Client authentication** and **Standard flow** on under **Capability config**. The secret bullet now says **Client Secret** on the **Credentials** tab. - **One client procedure:** merged "Create a Keycloak client" and "Client settings" into one numbered procedure that follows the Create client screens: 1. **Clients** > **Create client** 2. Set **Client type** to **OpenID Connect** 3. Set **Client ID**, then **Next** 4. In **Capability config**, turn on **Client authentication** and leave **Standard flow** on, then **Next** 5. In **Login settings**, add the callback URL to **Valid redirect URIs** 6. **Save** Each step is an instruction. The labels match the Keycloak tab of the self-hosted OAuth guide. The "Client settings" heading is gone, and nothing in the repo links to its anchor. - **Client secret:** "Obtain the client secret" says to copy the **Client Secret** from the client's **Credentials** tab. - **Screenshots:** removed every screenshot of the legacy console from the page and deleted the files under `apps/docs/public/img/guides/auth-keycloak/`, which nothing else references: - `keycloak-create-realm.png` - `keycloak-add-client.png` - `keycloak-client-id.png` - `keycloak-redirect-uri.png` - `keycloak-client-secret.png` - `keycloak-openid-endpoint-config.png` No new screenshots are added. Supabase Auth's Keycloak provider uses a confidential Authorization Code flow (client secret plus code exchange). That flow needs Client authentication and Standard flow, so the guide does not ask readers to enable Direct access grants. Unchanged: the `docker run` command and the text of the realm section. Checks: `pnpm turbo run typecheck --filter='...[origin/master]'`, `pnpm turbo run lint --filter='[origin/master]'`, and Prettier on the changed MDX file all pass. The docs tests were skipped because they need Docker. ## 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> |
||
|
|
39295dd584 |
docs(api): explain that default privilege changes leave existing tables exposed (#53639)
## Problem The Securing your API guide explains how to stop new objects in `public` from getting Data API grants. It doesn't say that this only changes the defaults for objects created later. Existing tables keep their grants and stay reachable through the Data API. Related to [FDBKIN-41883](https://linear.app/supabase/issue/FDBKIN-41883) Closes [DOCS-1685](https://linear.app/supabase/issue/DOCS-1685) ## Solution Adds text to `apps/docs/content/guides/api/securing-your-api.mdx` and rewrites no existing text: - **Default privileges:** a new paragraph says that changes to default privileges, including the platform default change, apply only to new objects, so existing tables keep their grants and stay reachable through the Data API. A per-table revoke follows it: `revoke all on table public.your_table from anon, authenticated, service_role;`. A sentence after it says that leaving out `service_role` keeps server-side access with a secret key. - **Revoke default privileges:** a new sentence says that existing tables, sequences, and functions keep their current grants. It links to the per-table revoke in `#default-privileges`. Sources for the behavior: - The Dashboard toggle's SQL (`buildDefaultPrivilegesSql` in `packages/pg-meta/src/sql/studio/database/privileges.ts`) runs only `alter default privileges … grant/revoke` statements. It runs no revoke on existing tables. - The Postgres docs for `ALTER DEFAULT PRIVILEGES` say it affects only objects created later. - `getting-started/api-keys.mdx` says that a secret key uses `service_role`, which bypasses RLS but still needs table grants. - Checked on PGlite (PostgreSQL 18.6). After `alter default privileges … revoke all on tables`, a table created earlier kept its `anon`, `authenticated`, and `service_role` grants, and a table created later had none. After the per-table revoke, `has_table_privilege('anon', 'public.old_t', 'select')` returned false. With `service_role` left out of the revoke, `service_role` still read an RLS-enabled table. With `service_role` included, it got `permission denied`. Checks run: `pnpm turbo run lint --filter='[origin/master]'` (0 errors), `pnpm turbo run typecheck --filter='...[origin/master]'`, Prettier `--check` on the changed file, and `pnpm -C apps/docs run check:removed-anchors`. `pnpm build:guides-markdown` didn't run locally: its federated-content step needs GitHub credentials. The docs tests weren't run because they need Docker. ## 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> |
||
|
|
6f13230f52 |
Add "Supports AWS PrivateLink" to Team plan and comparison table on pricing page (#53689)
## What - Adds "Supports AWS PrivateLink" to the Team plan card in `packages/shared-data/plans.ts`, so it matches the Enterprise card. - Renames the PrivateLink row in the comparison table (`packages/shared-data/pricing.ts`) from "AWS PrivateLink" to "Supports AWS PrivateLink", so the cards and the table use the same wording. ## Why The Enterprise card lists "Supports AWS PrivateLink" but Team does not. That could suggest PrivateLink is Enterprise-only, even though the comparison table shows it on both Team and Enterprise. Requested in Slack by David Ventimiglia. ## Note The row's info tooltip is keyed on `security.privateLink`, so it is unaffected by the rename. It now reads "About Supports AWS PrivateLink". 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Wendie Cheung <wendie.cheung@supabase.io> Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com> |
||
|
|
3b12d2e167 |
feat(ui): switch component (#53379)
## Problem * the shared switch in `packages/ui` uses the radix primitive * the thumb does not react to hover or press, and only the track color shows the state * a click on a switch label toggles the switch, but the label keeps the default cursor ## Solution * replaces the radix switch with base ui, and keeps a native `<button>`, so labels and `role="switch"` work as before * changes the thumb to white and the resting track one step darker, so the off state shows on light pages * replaces the hover color change with a thumb stretch that grows more on press, so the thumb reacts to the pointer * adds a pointer cursor on labels next to an enabled switch, because a click on the label toggles it * removes the `PointerEvent` stand-in from the studio test setup, because it blocks base ui switch clicks in jsdom * changes the install step in the switch docs to `@base-ui/react`, so the manual install matches the component <!-- linear:table-colwidths:345,344 --> <table> <thead> <tr> <th></th> <th>preview</th> </tr> </thead> <tbody> <tr> <td>light</td> <td> https://github.com/user-attachments/assets/a7c33dda-3487-43b8-881b-344e28891650 </td> </tr> <tr> <td>dark</td> <td> https://github.com/user-attachments/assets/9718057b-f983-4099-8f7e-82521001b625 </td> </tr> </tbody> </table> ## Preview links | Site | Live | Preview | Search for | | -- | -- | -- | -- | | Design system | [/design-system/docs/components/switch](<https://supabase.com/design-system/docs/components/switch>) | [/design-system/docs/components/switch](<https://design-system-git-feat-switch-base-ui-supabase.vercel.app/design-system/docs/components/switch>) | Airplane Mode | | Studio | [/dashboard/project/\_/storage/files](<https://supabase.com/dashboard/project/_/storage/files>) | [/dashboard/project/\_/storage/files](<https://studio-git-feat-switch-base-ui-supabase.vercel.app/dashboard/project/_/storage/files>) | Public bucket | ## Review instructions 1. open [/design-system/docs/components/switch](<https://supabase.com/design-system/docs/components/switch>) and [/design-system/docs/components/switch](<https://design-system-git-feat-switch-base-ui-supabase.vercel.app/design-system/docs/components/switch>) side by side 2. hover and click the "airplane mode" label, and make sure that the cursor is a pointer and the switch toggles 3. change the theme to light and to dark, and make sure that the thumb stays white in the on and off states 4. scroll to the form example, and make sure that the disabled "security emails" switch does not toggle or stretch 5. open [/dashboard/project/\_/storage/files](<https://studio-git-feat-switch-base-ui-supabase.vercel.app/dashboard/project/_/storage/files>), click "new bucket" and turn on "public bucket", and make sure that the "public buckets are not protected" warning shows ## 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 `/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>) |
||
|
|
0fdee0e487 |
feat(docs): post docs PRs to team-docs-alerts when ready for review (#53636)
## Problem Not every docs PR gets posted in #team-docs, so some never get noticed by the docs team. Tracked in [DOCS-1683](https://linear.app/supabase/issue/DOCS-1683), the first stage of the docs PR review workflow project. ## Solution A new workflow, `.github/workflows/docs-pr-alert.yml`, posts a one-line message to #team-docs-alerts whenever a PR that changes `apps/docs/**` becomes ready for review: | What happens | Posts? | | --- | --- | | Opened as a draft | No | | Draft marked ready for review | Yes | | Opened as ready (not a draft) | Yes, when it's opened | | Ready, then draft, then ready again | Yes, each time it's marked ready | The message links the PR title and says whether the PR is internal or external (from a fork): ``` #00000 Add RLS examples to the auth guide · External ``` Key choices: - **`pull_request_target`** so fork PRs can read the webhook secret. The workflow only reads the event payload: it never checks out or runs PR code, and has `permissions: {}`. It's added to the zizmor `dangerous-triggers` allowlist alongside `external-pr-comment.yml` and the other `pull_request_target` workflows. - **Path filter instead of the `documentation` label**, because the labeler adds the label in a separate run and it may not be there yet when this runs. - **Reuses the existing `SLACK_DOCS_WEBHOOK_URL` secret** from `docs-master-alert.yml` (#53366), which already posts to #team-docs-alerts. No new Slack app or secret is needed. The workflow still skips quietly if the secret is missing. ## Review instructions 1. Read `.github/workflows/docs-pr-alert.yml` and confirm it never checks out or executes PR code. 2. Confirm the `zizmor.yml` change only adds this workflow to the allowlist. Checked locally with actionlint, zizmor 1.26.1 (same config as CI), and Prettier. ## 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) 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
d8ae148258 |
docs(skills): read a change as a reader before the review-the-docs checklist (#53655)
## Problem The `review-the-docs` content checklist covers voice, terms, components, links, and rendering. A content change can pass all of it and still read wrong on the page. In recent docs PRs, most review comments were about how the change fits the page: content left wrong on the same page, a section in the wrong place, a repeat of another page, a long admonition, a missing answer to the reader's next question, and sections that link to each other. Related to [DOCS-1691](https://linear.app/supabase/issue/DOCS-1691/review-the-docs-reads-a-change-as-a-reader-before-the-checklists) ## Solution Content review gets a first step: read the change the way a reader meets it. The reviewer reads the whole page, the pages it links to, and what the change is for, then reports each way the change reads wrong. The common problems are listed as examples, so the step stays open to whatever a page needs. The checklist gets one item for the step. This is a draft for the Docs team to discuss before anything merges. ## 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) --------- Co-authored-by: Nik Richers <nik@validmind.ai> |
||
|
|
4442d91d77 |
feat(studio): Wire org and users authorized apps list to backend (#53674)
## Description Part of the work for OAuth apps with the scoped permissions. This PR wires the org and users authorized apps lists to backend. |
||
|
|
90a7bb08c0 |
chore(www): add infrastructure section to Koodos case study (#53683)
## 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) |
||
|
|
b518418b0c |
chore(www): add infrastructure section to Chatbase case study (#53682)
## 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) |
||
|
|
598e7ec1f7 |
chore(www): add infrastructure section to eXp Realty case study (#53681)
## 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) |
||
|
|
81d5e239e2 |
docs(style-guide): add how-to guide template (#53648)
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) |
||
|
|
c949db8810 |
fix(studio): mobile heading for unified logs (#53679)
## 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. |
||
|
|
10488ed799 |
feat(studio): Wire the OAuth apps consent screen to the backend (#53511)
## 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
|
||
|
|
4c4112fa1f |
feat(studio): select a usage project by clicking its name (#53671)
## 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) |
||
|
|
7637c6d5ee |
docs(www): update SLA agreement reference and hide from Legal Hub (#53618)
<!-- 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> |
||
|
|
12bd59d18a |
chore(deps): bump nuxt to 4.6.4 (#53541)
## Problem `pnpm audit` reports a moderate-severity advisory for `nuxt` 4.6.3, which `@supabase/vue-blocks` (`blocks/vue`) pulls in. ## Solution Bump `nuxt` from 4.6.3 to 4.6.4 in `pnpm-lock.yaml` with `scripts/fix-audit-vulnerability.ts nuxt`. The script resolved it without a permanent override, so `pnpm-workspace.yaml` and every `package.json` are unchanged. The lockfile diff is nuxt 4.6.4 and the `@nuxt/*` packages it pins at the same version. ## Review instructions This change has no UI. To verify it: 1. `pnpm install --frozen-lockfile` succeeds. 2. `pnpm why nuxt --recursive` shows a single version, `nuxt@4.6.4`. 3. `pnpm --silent tsx scripts/fix-audit-vulnerability.ts nuxt --json` returns `"status": "not_vulnerable"`. 4. `pnpm --filter @supabase/vue-blocks run typecheck` passes. ## 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-5131](https://linear.app/supabase/issue/FE-5131/bump-a-single-vulnerable-dependency) Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com> |
||
|
|
f3409dd3a0 |
fix: Make system the default theme value (#53667)
## Problem Default theme in KB is dark. ## Solution Use `system` as KB's default theme value. <!-- ## Preview links If relevant, include links to changed pages for easy review access. Copy the preview base URL from the Vercel bot comment on this PR. Use the following table as an example template. | Site | Live | Preview | Search for | | -------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | ----------------------------- | | WWW | [/blog/your-post](https://supabase.com/blog/your-post) | [/blog/your-post](https://zone-www-dot-com-git-branch-name-supabase.vercel.app/blog/your-post) | unique phrase from the change | | Docs | [/docs/guides/your-page](https://supabase.com/docs/guides/your-page) | [/docs/guides/your-page](https://docs-git-branch-name-supabase.vercel.app/docs/guides/your-page) | unique phrase from the change | | Studio | [/dashboard](https://supabase.com/dashboard) | [/dashboard](https://studio-git-branch-name-supabase.vercel.app/dashboard) | unique phrase from the change | | Design system | [/design-system](https://supabase.com/design-system) | [/design-system](https://design-system-git-branch-name-supabase.vercel.app/design-system) | unique phrase from the change | | UI library | [/library](https://supabase.com/library) | [/library](https://ui-library-git-branch-name-supabase.vercel.app/library) | unique phrase from the change | | Knowledge base | [/kb/guides/your-page](https://supabase.com/kb/guides/your-page) | [/kb/guides/your-page](https://kb-git-branch-name-supabase.vercel.app/kb/guides/your-page) | unique phrase from the change | --> <!-- ## Additional context Optionally add any other context or screenshots. --> ## Review instructions 1. Open the preview in this PR 1. Go to the user menu on the top right corner 1. In the theme group, the system option should be active 1. Site's theme should match your system preference ## 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 `/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) |
||
|
|
9437334289 | feat(pipelines): Update docs and UI (#53665) | ||
|
|
08388eecd6 |
feat: update headers on www (#43442)
## 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> |
||
|
|
960cf92854 |
[FE-5150] fix(studio): make router hooks follow renderRoute's URL in tests (#53660)
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>
|
||
|
|
aac6e0aad7 |
fix(studio): catch tus terminate rejection when cancelling storage uploads (#53505)
## 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> |
||
|
|
0c95428678 |
fix(studio): strip auth error and method params when building sign-in redirects (#53598)
## 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 |
||
|
|
c44da4032f |
Refactor flaky table-editor e2e tests (#53659)
## Context Introduced some flaky e2e tests on table-editor so this addresses it + looks into refactoring / improving table editor e2e tests in general based on the rules to not have unnecessary or redundant tests |
||
|
|
800a8ef0b8 |
fix(studio): return correct status codes from self-hosted API handlers (#53530)
## 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>
|
||
|
|
6842fbd119 |
chore(www): add infrastructure section to Loot Donkey case study (#53627)
## 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) |
||
|
|
5b0c50a2dc |
feat(studio): show Warehouse query outcomes (#53496)
## 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> |
||
|
|
8fcd5e7f65 |
feat(studio): add Warehouse report date controls (#53494)
## Problem The Warehouse report only shows the last hour. ## Solution Add date selection and refresh using the shared report controls. Respect the organisation’s log retention limits and the metrics API’s 30-day maximum. | After | | --- | | <img width="1688" height="1050" alt="CleanShot 2026-11-18 at 11 35 24@2x" src="https://github.com/user-attachments/assets/88267bf8-1054-480b-ac26-c0c2b58386bc" /> | | _The new controls._ | | <img width="2420" height="1028" alt="CleanShot 2026-11-18 at 11 47 52@2x" src="https://github.com/user-attachments/assets/383c06a0-5470-4748-b9a6-fe80647a1399" /> | | _The standard retention upgrade prompt follow tapping either of these on a Pro plan._ | ## Review instructions 1. Open the [Studio staging preview](https://studio-staging-git-dnywh-warehouse-metrics-range-supabase.vercel.app) and select a staging project with Warehouse access. 2. Open **Observability > Warehouse**, or `/project/<ref>/observability/warehouse` ([example](https://studio-staging-git-dnywh-warehouse-metrics-range-supabase.vercel.app/dashboard/project/yirnfrgkxmnqgexikhfc/observability/warehouse)). Change Last 60 minutes to Last 24 hours and check that the chart or no-data state reflects the selected period. 3. Refresh the report. Check that the selected period stays selected. 4. On a paid staging organisation, select a period beyond its log retention (for example, Last 14 days with 7-day retention). Check that the retention upgrade prompt appears and the current period stays selected. --------- Co-authored-by: Joshen Lim <joshenlimek@gmail.com> |
||
|
|
48c90094d9 |
feat(studio): show Warehouse query activity in Observability (#53495)
## Problem Warehouse query activity is not available in Observability. ## Solution Add a Warehouse report showing query rate over the last hour, with loading, setup, no-data and request-error states. The report uses live project metrics and appears in navigation for projects with Warehouse access. | After | | --- | | <img width="2548" height="1416" alt="CleanShot 2026-11-17 at 16 55 33@2x" src="https://github.com/user-attachments/assets/4d6796e0-72f1-45d5-b6b7-2cd4a3577496" /> | | <img width="2552" height="1390" alt="CleanShot 2026-11-17 at 16 56 18@2x" src="https://github.com/user-attachments/assets/d96efdfd-4ca9-42fe-ac30-9cb4667c95d7" /> | | <img width="2544" height="1388" alt="CleanShot 2026-11-17 at 16 32 11@2x" src="https://github.com/user-attachments/assets/bc80af8d-0468-4229-98d0-ac2681823059" /> | | <img width="2560" height="1344" alt="CleanShot 2026-11-17 at 16 59 53@2x" src="https://github.com/user-attachments/assets/1ed70348-c2fc-4673-85a7-530d9734886c" /> | Visitor | What they see -- | -- Signed-in customer without Warehouse access | No Warehouse entry in Observability Customer with Warehouse access, not configured | “Warehouse is not set up” empty state and setup button Customer with Warehouse disabled | “Warehouse is disabled” empty state and setup button Customer with active Warehouse | Query rate chart, or the relevant loading/empty/error state ## Review instructions 1. Open the [Studio staging preview](https://studio-staging-git-dnywh-warehouse-metrics-client-supabase.vercel.app) with a staging project that has Warehouse access. 2. Go to **Observability > Warehouse**, or `/project/<ref>/observability/warehouse` ([example](https://studio-staging-git-dnywh-warehouse-metrics-client-supabase.vercel.app/dashboard/project/yirnfrgkxmnqgexikhfc/observability/warehouse)). 3. Check the query-rate chart after running Warehouse queries. A project without measurements shows an explicit last-hour empty state. 4. Open the report on a project where Warehouse is not set up and check the setup link. --------- Co-authored-by: Joshen Lim <joshenlimek@gmail.com> |
||
|
|
096a6f6ca3 |
chore(www): remove stale DevTo footer link (#53654)
## 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.) |
||
|
|
50efdde07d |
docs(platform): clarify SSO onboarding workflow for existing members (#53325)
- 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> |
||
|
|
6c8c25b4da |
fix(docs): show CLI flag defaults in the reference (#53647)
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. |