mirror of
https://github.com/supabase/supabase.git
synced 2026-12-04 07:29:16 +00:00
docs/reference-template
672
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
28c2c2dd53 |
feat(www): add Launch Week 16 banner (#54511)
Add a dismissible bar above the www nav that promotes Launch Week 16 (December 7-11) and links to /launch-week. Hide the bar on /launch-week pages. Hide it on /state-of-startups too because the fixed nav on that page would cover it. ## Banner polish Adds shared animated dot artwork, a link CTA, and responsive spacing and alignment. Reduced-motion preferences keep the dots static. Studio uses this artwork in the dependent #54512. | After | | --- | | <img width="500" height="584" alt="31035" src="https://github.com/user-attachments/assets/7ebad641-158e-47ea-a8be-3097ecc5c0ae" /> | | <img width="500" height="584" alt="18287" src="https://github.com/user-attachments/assets/02c87481-1dbe-4576-afc0-bdc9f22fc893" /> | | <img width="995" height="584" alt="89244" src="https://github.com/user-attachments/assets/aad4b608-71f1-484f-bbf4-54c725800f52" /> | | <img width="995" height="584" alt="99848" src="https://github.com/user-attachments/assets/a8b50942-1ecd-4c63-91b3-a6b4847d8830" /> | ## Review instructions 1. Open the www homepage on the preview in light and dark mode. Check the centred desktop message, link hover, and close button. 2. At a phone width, check the left-aligned copy and artwork on the right. Open the mobile menu and close it; the banner should return. 3. Dismiss the banner and reload. It should stay dismissed. Validation: scoped ESLint, formatting, and ui-patterns typecheck pass. --------- Co-authored-by: Danny White <3104761+dnywh@users.noreply.github.com> |
||
|
|
ff9ff456cd |
feat(design-system): updated trace ui components (#54389)
## Problem The `Trace` primitives in `ui-patterns` only supported panning and zooming through the minimap, and had no way to show summary facts about a trace. Using them for a real trace view in Unified Logs needs direct manipulation on the waterfall itself, a resizable span column for long span names, and a place to put trace-level stats. Part 1 of 3. This PR is design-system only — nothing in Studio consumes it yet. ## Solution **Direct manipulation on the waterfall** - Drag across the timeline to pan, wheel to zoom around the pointer. Panning only starts past a small threshold, so a drag never selects the row it ends on. - `Trace.Scrubber` follows the pointer with the offset from the trace start. - The span column is resizable by a focusable separator: drag it, nudge with the arrow keys, or jump to its bounds with Home and End. The timeline is kept above a minimum width so the tree can't be dragged over it. **Minimap** - Dragging outside the brush now selects a new window. Dragging the brush still pans and dragging an edge still resizes; a plain click outside still recentres. **New parts** - `Trace.Summary` / `Trace.SummaryItem`, with `Trace.TotalDuration`, `Trace.SpanCount` and `Trace.Depth` as values. **Visual** - Leaf rows get an elbow connecting them to their parent's guide, so the tree reads as a tree rather than floating dots. - Minor ruler ticks between the labelled ones, and a shorter ruler, which also shortens the span header. **One breaking change:** `Trace.Minimap` is now passed to `Trace.Waterfall`'s `minimap` prop instead of being a child, so it sits outside the area that handles pointer gestures. Both demos and the docs page are updated to match; these are the only consumers in the repo. ## Review instructions 1. Open the design-system preview and go to **UI Patterns → Tracing**. 2. On the first demo, drag left and right across the timeline to pan, and scroll to zoom — the zoom should stay anchored under the pointer. 3. Drag a span bar and release on it. It should pan, not select the row. 4. Drag the divider between the span column and the timeline. Then tab to it and use the arrow keys, Home and End — the handle should move from where it appears, and End should reach the far edge. 5. Move the pointer across the timeline and confirm the scrubber line tracks it with a readable offset. 6. Check the summary strip above the waterfall shows Duration, Depth and Total Spans. 7. On the minimap: drag the brush to pan, drag an edge to resize, drag outside the brush to select a new window, and click outside it to recentre. Zoom all the way in and confirm the brush stays wide enough to grab. 8. Scroll the docs page and confirm the code sample matches what the demos actually do. |
||
|
|
9447067a51 |
feat: Add Security topic (#54423)
## Problem Security team needs a new topics/category to host their troubleshooting content. ## Solution Create a topic about Security. <!-- ## 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 category (docs PRs only) <!-- If this PR changes docs and you're on the Supabase team, select one category. PRs from forks are always reviewed as Low, so you can skip this section. --> - [ ] Critical: needs a review as soon as possible - [ ] Urgent: the feature ships soon, or it's blocking something else - [x] Moderate: good to have soon, not urgent - [ ] Low: get to it when you can ## Review instructions Nothing to test yet, since there's no content poured, project will ignore empty topics. ## 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) |
||
|
|
d86bc8fb9d |
fix(studio): keep the new MFA factor when clicking outside the verify dialog (#54223)
## Problem
On the account Security page, when you set up an authenticator app, a
click outside the "Verify authenticator app" dialog counts as a cancel
and unenrolls the factor that was just created. The dialog stays open
while that request runs, so you can still type a code and click Confirm,
and verification then fails with an unexpected server error. A page
element that stays clickable above the dialog, such as a consent banner,
triggers this easily.
## Solution
`ConfirmationModal` gets an optional `dismissOnInteractOutside` prop
(default `true`, so no other dialog changes). The authenticator verify
step turns it off. Only Cancel, the close button, or Escape cancel setup
and remove the unverified factor. The verify step also stays in its
loading state while an unenroll is in flight, so Confirm can't run
against a factor that is being deleted.
## How to verify
1. Open Account → Security and click Set up MFA. Enter a name and click
Generate QR code.
2. Click anywhere outside the "Verify authenticator app" dialog. The
dialog stays open, and the QR code and secret do not change.
3. Enter a valid code from the authenticator app and click Confirm. The
method is added ("MFA method added").
4. Repeat steps 1–2, enter a wrong code, and click Confirm. The toast
reports an invalid TOTP code, not an unexpected failure.
5. Repeat step 1, then click Cancel. The dialog closes and no unverified
authenticator remains in the list.
6. Open any other confirmation dialog in Studio and click outside it. It
still closes as before.
## Checks
Ran `pnpm turbo run typecheck --filter=studio --filter=ui-patterns`,
`eslint` (default and type-checks configs) on the changed Studio files,
`oxfmt --check` on the changed files, and `vitest run
components/interfaces/Account/TOTPFactors/AddNewFactorModal.test.tsx`.
The new test checks that an outside pointer or focus event does not
unenroll the factor and that Confirm then verifies it. It fails without
the fix.
## Checklist
- [x] I have read the [Contributing
Guidelines](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [ ] I have checked that the change works in the preview deployment
- [x] I have added or updated tests where applicable
## Feedback for Tedd
To ask Tedd for a change to this PR, reply in Tedd's session on
[FE-5246](https://linear.app/supabase/issue/FE-5246/clicking-outside-the-mfa-setup-dialog-deletes-the-new-factor-so).
Tedd doesn't read comments on this PR.
---------
Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
|
||
|
|
f05fe34966 |
feat(ui): scroll area (#54023)
## Problem - on `/kb/guides/migrate-from-auth0` in safari 27 on macos, the mouse wheel does not scroll the page and a trackpad does - radix scroll area bar in the table of contents adds a non-passive `wheel` listener on `document` - webkit stops mouse-wheel page scroll when that listener meets `overscroll-behavior-y: none` on `html`, which kb sets ## Solution - replaces radix with base ui in the `ui` scroll area parts because base ui binds its wheel listener to the scrollbar element - replaces the radix `display: table` workarounds in the studio token sheets and the connect sheet with a reset of the base ui content `min-width` - changes the docs ask ai scroll area to use the `ui` scroll area - adds an inset focus ring to the scroll area viewport because base ui makes an overflowing viewport focusable - adds a `getAnimations` stub to the jsdom test setups because the base ui viewport calls it - adds `@base-ui/react` to the pnpm catalog + points the design system scroll area page at the base ui docs <!-- ## 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 [/kb/guides/migrate-from-auth0](https://kb-git-antlio-ui-scroll-area-supabase.vercel.app/kb/guides/migrate-from-auth0) in safari on macos with a mouse 2. turn the mouse wheel and make sure that the page scrolls and the table of contents marks the active heading 3. open the preview [/design-system/docs/components/scroll-area](https://design-system-git-antlio-ui-scroll-area-supabase.vercel.app/design-system/docs/components/scroll-area) and make sure that each demo shows its bar on hover and scrolls with the wheel 4. make sure that the horizontal demo scrolls sideways 5. press `tab` until a demo takes focus and make sure that it shows an inset focus ring 6. open a project in the [studio preview](https://studio-staging-git-antlio-ui-scroll-area-supabase.vercel.app/dashboard), click `Connect` and make sure that a long code line scrolls inside its code block and the sheet body does not scroll sideways 7. open the [docs preview](https://docs-git-antlio-ui-scroll-area-supabase.vercel.app/docs), press `cmd+k`, search for `auth` and make sure that the results list scrolls ## 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) |
||
|
|
c78476711e |
fix(ui-patterns): use FrameworkImage in ExpandableVideo dialog (#54224)
Fixes the docs build on master, which fails type checking with `TS2607` in `ExpandableVideo/index.tsx`. #53906 replaced the `next/image` import with `FrameworkImage`, and #53981 (merged after it) added a new `<Image>` that still relied on the old import. With no import, `Image` resolves to the browser's global `Image` constructor. This swaps it for `FrameworkImage`, which the file already uses with the same props. |
||
|
|
5b31e21ddb |
feat(docs): guide video preview (#53981)
## Problem * video card in the docs guide sidebar blurs the thumbnail making it hard to preview * users cannot see which video the card opens before they click it ## Solution * adds a `GlassLens` filter wrapper to `ui-patterns` with lens curvature and color fringe settings * replaces the video card in both docs sidebars with a sharp thumbnail * changes the video dialog in docs and www to fade the backdrop + skip the zoom when reduced motion is on * fixes the white iframe in dark mode + a one-frame backdrop flash at the end of the close animation * adds autoplay on open + the card thumbnail behind the iframe while the video loads * adds a hidden dialog title for screen readers <!-- linear:table-colwidths:801 --> <table> <thead> <tr> <th>preview</th> </tr> </thead> <tbody> <tr> <td> https://github.com/user-attachments/assets/b41b3b8a-4d3e-47b3-92ea-3b2cd7629494 </td> </tr> </tbody> </table> ## Review instructions 1. open [/docs/guides/database/overview](<https://docs-git-antlio-docs-video-preview-supabase.vercel.app/docs/guides/database/overview>) in dark mode 2. make sure that the video card shows a thumbnail 3. make sure it feels better :) ## 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>) |
||
|
|
832d238af3 | fix(logs): apply pathname exclusions when leaving the value FE-5233 (#54127) | ||
|
|
433d95afd0 |
feat(studio): track usage on the API keys pages (#54070)
## Problem Nothing is tracked on the API keys pages (new and legacy), so we can't tell which keys people copy, how often they create or delete keys, or how quickly projects disable legacy keys. Closes FE-5030. ## Solution Adds five events, defined in `packages/common/telemetry-constants.ts` and fired through `useTrack()`: | Event | When | Properties | | --- | --- | --- | | `api_key_copied` | User copies a publishable, secret, or legacy anon/service_role key with its Copy button. Keyboard copies aren't counted. Not fired when blocked by permissions or when the copy fails. | `keyType` | | `api_key_reveal_clicked` | User reveals a secret or legacy service_role key (not on hide) | `keyType` | | `api_key_created` | Key created from the dialog, or by the first-time setup (fires once per key) | `keyType`, `source` | | `api_key_removed` | Key deleted after confirming in the modal | `keyType` | | `legacy_api_keys_updated` | Legacy keys disabled or re-enabled | `enabled` | - Create, delete, and legacy toggle fire in the mutation hook's `onSuccess`, so failed attempts aren't counted and the event still fires if the component unmounts mid-request. They're attributed to the mutation's own project. Copy and reveal fire in the click handler. - Delete is tracked in `SecretAPIKeys` / `PublishableAPIKeys`, where the confirm modal and mutation live, not in the dropdown item. - No key names or values in properties. - `data-attr` added to the copy, reveal, create, delete, and docs controls (static strings; Studio's PostHog autocapture is currently off, so these send nothing today). `DocsButton` gets an optional `data-attr` prop. - `ui-patterns` `Input` gets optional `onReveal` and `onCopied` callbacks. `onCopied` fires only for the Copy button, so legacy and new keys count copies the same way. - The empty-state sample keys are `inert`, so their buttons don't copy or track. - New `getLegacyApiKeyType` helper maps the legacy `anon` / `service_role` tags to the event's `keyType`. Tests cover copy, reveal, the no-event-on-hide and denied-grant cases, the legacy toggle, and the key-type helper. Success paths for the create dialogs and delete aren't covered. ## How to test - [ ] Open `/project/[ref]/settings/api-keys`, copy a publishable and a secret key, reveal a secret key, and check `api_key_copied` and `api_key_reveal_clicked` in PostHog (staging) with the expected `keyType` - [ ] Create and delete a publishable and a secret key and check `api_key_created` / `api_key_removed` - [ ] On the legacy page, copy anon and service_role, reveal service_role, then disable and re-enable the keys and check `legacy_api_keys_updated` |
||
|
|
041c363873 |
fix(docs): layout v2 fixtures (#53761)
## Problem - keyboard users hit focus problems in the option-1 docs layout because the on this page rail clips focus rings and Firefox adds an unlabeled tab stop on the sidebar scroll area - skip link to the content does not render - reference sits in a dropdown next to the logo which doesn't feel optimal - header breadcrumbs repeat the sidebar section with group crumbs that never link ## Solution - fixes the focus rings and tab stops in the sidebar, the rails and the footers so each ring is inset and is not clipped - changes the header breadcrumbs to show the parent and the page + links a group crumb to its overview page when it has one - moves reference into the sidebar section list with a back button + removes the sections dropdown and points the logo to the docs home - moves the knowledge base to the top of the sidebar footer and removes the changelog link - removes the hover backgrounds and color transitions from the sidebar and rail rows + fades the sidebar list under the back button on scroll - aligns the home agent prompt with the second framework column and changes the footer separator to a square <!-- ## 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. --> 1. visit [/docs/guides/database/replication/pipelines?docs-ia-mvp-v1=option-1](https://docs-git-antlio-fix-docs-layout-v2-nits-supabase.vercel.app/docs/guides/database/replication/pipelines?docs-ia-mvp-v1=option-1) 2. reload the page and press Tab once to make sure that the first stop is the skip link to the content 3. press Tab through the sidebar, the on this page rail and the page footer to make sure that each ring is inset and round and is not clipped 4. click the back button in the sidebar until the section list shows, then click `Reference` to make sure that it opens the reference list with a back button ## 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) |
||
|
|
7c368aadfd |
refactor(ui-patterns): use FrameworkProvider for routing and drop next (#53907)
Migrates the remaining router consumers in `packages/ui-patterns` (`MobileSheetNav`, `CommandProvider`, `useCrossCompatRouter`) to `useFramework()` from `common`, removing the final `next` imports and `next` peerDependency from `packages/ui-patterns`. **Changed:** - `MobileSheetNav`: read `asPath` from `useFramework()` instead of `next/router`, and close as soon as a link inside it is tapped (Studio only updates `asPath` once the destination route has loaded) - `CommandProvider`: close the menu when `asPath` changes (ignoring hash-only changes), in every framework - `useCrossCompatRouter`: call `useFramework().push` and close/reset the menu once it settles. No `startTransition` around the push – awaiting a Pages Router push inside a transition deadlocks, since Next renders the route change in a transition of its own. This drops the `useTransition` / `onPendingEnd` plumbing - Updated `MobileSheetNav` and `CommandMenu` tests to wrap with `FrameworkProvider` instead of mocking `next/*`, plus regression tests for a Pages Router-style push, same-URL pushes, pushes that throw, children staying mounted, hash-only changes, and sheet link taps **Removed:** - `next` from `packages/ui-patterns/package.json` `peerDependencies` - `next-router-mock` from `packages/ui-patterns/package.json` `devDependencies` and `packages/ui-patterns/vitest.setup.ts` - `useCrossCompatRouter` from the `CommandMenu` barrel (no consumers outside `ui-patterns`) ## To test - Run `packages/ui-patterns` tests and typecheck - Open the command menu (`Cmd+K`) in Studio and WWW (both an App Router page and a Pages Router page), navigate to a route, and confirm it navigates and closes cleanly - Search docs from the command menu on a WWW Pages Router page and open a result - Open a mobile sheet nav in Studio, navigate routes/queries, and verify close-on-route-change and `shouldCloseOnQueryChange` behavior --------- Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com> |
||
|
|
576171b9b7 |
refactor(ui-patterns): use FrameworkLink and FrameworkImage (#53906)
Replaces `next/link` and `next/image` imports in `packages/ui-patterns` components with `FrameworkLink` and `FrameworkImage` from `common` so each host app supplies its own implementation (`next/link` + `next/image` in Next apps, TanStack Link + `<img>` in Studio). **Changed:** - Links (`FrameworkLink`): `AuthenticatedDropdownMenu`, `Chart`, `InnerSideMenu`, `MetricCard`, `TextLink` - Images (`FrameworkImage`): `AuthenticatedDropdownMenu`, `ExpandableVideo`, `GlassPanel`, `Image`, `TweetCard` - `Image`: `caption`, `captionAlign`, and `containerClassName` no longer leak onto the `<img>`, and the unused static image type re-exports are dropped - `TweetCard`: avatar is decorative (`alt=""`) since the handle is right next to it ## To test - Run `packages/ui-patterns` tests and typecheck, plus typecheck across Studio, WWW, Docs, and Design System - Click `InnerSideMenu`, `Chart`, and `MetricCard` links in Studio and verify client-side TanStack navigation - Spot-check `ui-patterns/Image` (including captions), `ExpandableVideo`, `GlassPanel`, `TextLink`, `TweetCard`, and `AuthenticatedDropdownMenu` in WWW and Docs to verify Next.js links and image optimization work as before --------- Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com> |
||
|
|
4fa8afe918 | feat(studio): support grouped OR filters in unified logs (#53943) | ||
|
|
b2cd26e054 |
chore(ui-patterns): remove trivial and unused next imports (#53903)
Removes unused and straightforward `next` imports in
`packages/ui-patterns` (and a dead `next/navigation` test mock in
`packages/ui`) that do not require a framework adapter.
**Removed:**
- Unused `LW15Banner`, `AnnouncementBanner`, `Announcement`, and
`PromoToast` components and their `package.json` exports
- Unused `HIDE_PROMO_TOAST` local storage key (only `PromoToast` read
it)
- Unused `next/navigation` mock from `packages/ui/vitest.setup.ts`
**Changed:**
- `PrivacySettings`: replace external `next/link` anchors with plain
`<a>` tags
- `Markdown/components` & `SqlToRest`: replace `next/dynamic` with
`React.lazy` + `Suspense` (plus a client-mount guard in `SqlToRest` to
preserve `{ ssr: false }`)
- `McpUrlBuilder` (`McpConfigurationDisplay` & `InstructionBlocks`):
replace `next/image` with plain `<img>` for static bundled
icons/screenshots. Both now share `normalizeAssetUrl` from
`mcpIconAssets.ts`, and the screenshot is lazy-loaded
- `types/assets.d.ts`: type `*.png` / `*.svg` imports as `string | {
src: string }` instead of `import('next/image').StaticImageData` (Vite
returns a string, Next returns an object, and consumers only read `src`)
## To test
- Run `packages/ui-patterns` and `packages/ui` unit tests and typecheck
- Open the MCP connect panel in Studio / Docs and confirm client icons
and setup screenshots render
- Open Privacy Settings modal in WWW / Docs and verify links open
properly
- Check SQL-to-REST translator page in Docs renders client-side
---------
Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
|
||
|
|
f1905195a6 | fix(ui-patterns): stop sending command menu search telemetry with an empty query (#53937) | ||
|
|
d885fc7458 |
feat(www): shared account menu (#53666)
## Problem - www keeps its own copy of the account menu items separate from the shared top nav menu in kb and docs - www header buttons stay hidden until auth loads and the mobile menu shows no account links during that time - on app router page such as the home page sign out does not reload the page ## Solution - moves the www desktop account menu onto the shared top nav menu so www docs and kb show the same account items - fixes "Command Menu" shortcut label to follow the platform, so windows and linux readers see "Ctrl K" - changes the header and the mobile menu to read the signed-in mark while auth loads - moves the mobile menu account links onto the shared mobile actions, so www, docs and kb use one component - changes the desktop "Sign in" links to open the sign-in page, so desktop and mobile open the same page - fixes sign out on app router pages so the page reloads after sign out on every page <!-- ## 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. visit [homepage](https://zone-www-dot-com-git-antlio-fix-www-shared-account-menu-supabase.vercel.app/) 2. open the browser console, and run this snippet, which stores a fake dashboard session with no real token: ```js const user = { id: 'test', aud: 'authenticated', email: 'you@example.com', user_metadata: { avatar_url: 'https://github.com/supabase.png' } } const key = 'supabase.dashboard.auth.token' localStorage.setItem(key, JSON.stringify({ access_token: 'a.b.c', refresh_token: 'r', token_type: 'bearer', expires_in: 3600, expires_at: Math.floor(Date.now() / 1000) + 3600, user })) localStorage.setItem(`${key}-user`, JSON.stringify({ user }))``` 3. reload the page ## 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) |
||
|
|
c2292c97f2 |
fix(docs): shared account menu (#53620)
## Problem - docs menu keeps its own copy of the account items, separate from the shared top nav menu that #53558 adds for kb - docs header waits for auth, so a signed-out reader sees "Sign up" appear after load and the header shifts ## Solution - moves the docs desktop account menu onto the shared top nav menu, so docs and kb show the same account items and sign out - changes the shared menu button to show the avatar of the reader or a person icon when there is no avatar, so kb gets the avatar too - changes the docs "Sign up" link and the menu button to read that mark while auth loads so the header is correct at first paint <!-- ## 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 [/docs/guides/getting-started](https://docs-git-antlio-fix-docs-shared-account-menu-supabase.vercel.app/docs/guides/getting-started) with the network set to "Slow 4G" in devtools 2. make sure that "Sign up" shows on the first frame and that the header does not shift when the page finishes loading 3. make sure that the browser console shows no react error 418 4. open the browser console on the preview, and run this snippet, which stores a fake dashboard session with no real token: ```js const user = { id: 'test', aud: 'authenticated', email: 'you@example.com', user_metadata: { avatar_url: 'https://github.com/supabase.png' } } const key = 'supabase.dashboard.auth.token' localStorage.setItem(key, JSON.stringify({ access_token: 'a.b.c', refresh_token: 'r', token_type: 'bearer', expires_in: 3600, expires_at: Math.floor(Date.now() / 1000) + 3600, user })) localStorage.setItem(`${key}-user`, JSON.stringify({ user })) 5. reload the page ## 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) |
||
|
|
ef8005d863 |
fix(kb): header sign in state (#53558)
## Problem - the kb header shows "Sign up" to every reader, also to readers who are signed in to the dashboard - kb never reads the dashboard session, so a signed-in reader has no link to the dashboard and no way to sign out ## Solution - reads the dashboard session in the kb header with the shared `AuthProvider` from `common/auth`, the same as docs and www - changes the header link to "Dashboard" for a signed-in reader, and keeps "Sign up" for other readers and in the server html, so the header does not move on load - adds the email, "Account Preferences", "All Projects" and "Sign out" to the header menu for a signed-in reader, the same as the docs menu - changes the mobile menu footer to "Sign in" and "Start your project", or to "Dashboard" for a signed-in reader, the same as the docs drawer - adds tests that store a session and check the header and mobile menu links | before | after | | --- | --- | | <img width="760" height="1000" alt="image" src="https://github.com/user-attachments/assets/424feb44-4008-4d8e-b994-bd7d5c103bc3" /> | <img width="760" height="1000" alt="image" src="https://github.com/user-attachments/assets/54be6c7d-39e1-45ac-9a79-9fc0650d251c" /> | <!-- ## 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 [/kb](https://kb-git-antlio-fix-kb-header-sign-in-state-supabase.vercel.app/kb) at a desktop width, and make sure that the header link shows "Sign up" 2. open the browser console on the preview, and run this snippet, which stores a fake dashboard session with no real token: ```js const user = { id: 'test', aud: 'authenticated', email: 'you@example.com' } const key = 'supabase.dashboard.auth.token' localStorage.setItem(key, JSON.stringify({ access_token: 'a.b.c', refresh_token: 'r', token_type: 'bearer', expires_in: 3600, expires_at: Math.floor(Date.now() / 1000) + 3600, user })) localStorage.setItem(`${key}-user`, JSON.stringify({ user })) 3. reload page ## 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) |
||
|
|
ca2286dd56 |
feat(kb): hero refacto (#53626)
## Problem - kb home and topic heroes stay blank on load because their canvases wait for react dom and hydration - the guide lists fade in row by row so the rows show late (i liked it at first but now doesn't feel right) ## Solution - changes the heroes to start from a small head script so the first frame does not wait for react - changes the heroes to hydrate only the home search button so a hydration mismatch cannot remove the running canvases - removes the stagger from the guide lists - moves the `GlyphLines` canvas code and `toOpaque`, now `flattenColor` into modules without react <!-- ## 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 [/kb](https://kb-git-antlio-kb-hero-refacto-supabase.vercel.app/kb) now rings should show faster vs prod 2. open [/kb/topics/auth](https://kb-git-antlio-kb-hero-refacto-supabase.vercel.app/kb/topics/auth), reload, and make sure that the grid lines and shapes show directly after the title ## 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) |
||
|
|
fcbdda8107 |
chore: migrate formatter from Prettier to oxfmt (#53835)
Migrate code formatting across the monorepo from Prettier to `oxfmt`
(`0.79.0`, pinned) for much faster formatting checks locally and in CI
while keeping code churn minimal (78 files total, 0.7% of the repo).
Studio's `@ianvs/prettier-plugin-sort-imports` ordering
(`<BUILTIN_MODULES>`, `<THIRD_PARTY_MODULES>`, blank line, then `@/` and
relative imports) is preserved via `oxfmt`'s native `sortImports`
override for `apps/studio/**/*.{js,jsx,ts,tsx}`.
### Performance (before vs after, uncached)
| Benchmark | Prettier (`3.8.x`) | oxfmt (`0.79.0`) | Speedup |
| --- | ---: | ---: | ---: |
| CI formatting step (`blacksmith-4vcpu-ubuntu-2404`, full repo) | `73s`
| **`7s`** | **~10×** |
| Local `apps/studio` JS/TS (`5,157` files) | `17.74s` | **`0.36s`** |
**~49×** |
| Local full monorepo (`11,131` files) | — | **`2.39s`** | — |
**Added:**
- `.oxfmtrc.jsonc` at repo root with Prettier-matching options,
`sortPackageJson: false`, the Studio `sortImports` override, and ignore
patterns migrated from `.prettierignore`
- `oxfmt` (`0.79.0` exact pin) in `pnpm-workspace.yaml` catalog and
workspace `devDependencies` / `dependencies`
- Shared `.agents/scripts/format_and_lint.sh` hook script and
`.agents/hooks.json` (used by both Claude Code and Antigravity)
**Changed:**
- Replaced `test:prettier` with `format:check` and switched `format` in
root `package.json` to `oxfmt`
- Updated `packages/api-types` (`codegen`,
`verify-production-types.mjs`), `apps/design-system` (`build:registry`),
`apps/docs` (`CodeSample.ts`, `generate-sitemap.ts`, `next.config.mjs`,
`spec/Makefile`), `apps/www` (`generate-sitemap.mjs`), and
`packages/build-icons` (`generateIconFiles.mjs`) from Prettier to
`oxfmt`
- Updated `.github/workflows/prettier.yml` (keeping the `format` job ID
intact), `.github/workflows/autofix_linters.yml`,
`.claude/settings.json`, `AGENTS.md`, `CONTRIBUTING.md`, and
`.github/copilot-instructions.md`
- Applied one-time `oxfmt` formatting pass in a separate commit (78
files: 30 `i18n/README.*.md` trailing spaces, 19 Studio files, 17 other
TS/TSX/generated types, 8 MD/MDX, 3 `package.json`, 2 example CSS files)
**Removed:**
- `prettier`, `@ianvs/prettier-plugin-sort-imports`, and
`prettier-plugin-sql-cst` from `devDependencies` (note: `.sql` files
were not part of the CI formatting glob; `eslint-config-prettier` is
kept for ESLint)
- `prettier.config.mjs`, `.prettierignore`, and
`.claude/scripts/format_and_lint.sh`
## To test
- Run `pnpm run format:check` and confirm it passes cleanly across all
matched files
- Run `pnpm --filter api-types test`, `pnpm --filter docs exec vitest
run features/directives/CodeSample.test.ts`, and `pnpm --filter www exec
vitest run generate-sitemap.test.ts`
- Edit an `apps/studio` file with out-of-order imports and run `pnpm run
format` to confirm builtin/third-party vs `@/`/relative grouping matches
prior behavior
- Check that the `Check Code Formatting` CI workflow passes on this PR
---------
Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.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> |
||
|
|
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. |
||
|
|
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) |
||
|
|
8feb4a04a4 |
fix(docs): correct OpenCode MCP config, Python type examples, and small docs gaps (#53637)
## 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>
|
||
|
|
27578cdfb5 |
fix(telemetry): send search query shape instead of raw text (#53500)
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 |
||
|
|
b58913895c |
feat(studio): Refactor OAuth app consent screen for project selection (#53361)
## 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. |
||
|
|
2e3e10826f |
docs(design-system): deprecate legacy Studio page chrome (#53571)
<!-- CURSOR_AGENT_PR_BODY_BEGIN --> ## Problem Legacy Studio page chrome (`PageLayout`, `Scaffold*`, in-header breadcrumbs/tabs) is still easy to reach for new work. #53356 deprecated a few of those APIs; the rest still lacked `@deprecated` notices. ## Solution Add `@deprecated` JSDoc on the remaining Studio page-chrome helpers and strengthen the existing `PageHeaderBreadcrumb` / `PageHeaderNavigationTabs` notices, with site-relative `/design-system/docs/...` links. Also point Nav Menu docs at `PageNav` instead of `PageLayout`. ## Review instructions 1. Skim JSDoc on `apps/studio/components/layouts/Scaffold.tsx` and `PageLayout/PageHeader.tsx`. 2. Confirm `PageHeaderBreadcrumb` and `PageHeaderNavigationTabs` in `packages/ui-patterns/src/PageHeader/index.tsx` point at `/design-system/docs/fragments/...`. ## 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) <!-- CURSOR_AGENT_PR_BODY_END --> <div><a href="https://cursor.com/agents/bc-1c9eee9e-93f6-4914-9d1d-76a7bbd511be?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> <a href="https://cursor.com/background-agent?bcId=bc-1c9eee9e-93f6-4914-9d1d-76a7bbd511be&cursor_ref=pr_footer&cursor_cta=open_in_cursor"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a> </div> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Danny White <dnywh@users.noreply.github.com> |
||
|
|
b23e9e8d94 |
fix(consent): clear tracking state and reload when consent is withdrawn (#53294)
## Problem Opting out from the Privacy Settings modal (www, docs, kb) clears no cookies, and GTM keeps running. The banner's Opt out misses `_ga_<id>`, `_dcid`, and PostHog. ## Solution - `revokeTrackingConsent()` runs from `denyAll`, and from `updateServices` unless every service is accepted. It clears `_ga`, `_ga_*`, `_gcl_*`, `FP*`, `_dcid`, `session_id`, `ph_*_posthog`, PostHog's localStorage, stale consent copies. - PostHog resets and opts out, with persistence off. The opt-out survives sign-out. A saved accept opts back in. - Every opt-out calls `POST /platform/telemetry/reset` (keepalive, errors ignored) to clear the API's HttpOnly `session_id`, `anonymous_id`, and `user_id`. Studio's own call is removed. - To stop GTM, a saved opt-out reloads the page if tracking was on, waiting at most 1s for the reset. ## Review instructions 1. `cd packages/common && npx vitest run consent-state.test.ts posthog-client.test.ts` 2. On prod: accept, open Privacy Settings, turn Marketing off, Confirm. The page reloads with cookies gone and no `collect` request. Tested: `common` (237 pass), `AnalyticsSettings` tests, CI unit tests and typecheck. No browser test (previews lack Usercentrics). ## 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 |
||
|
|
cf223ae74a |
[FE-3106] (part 13) – chore(studio): remove next entry files and config (#53222)
Removes the Next-only entry files and config now that every page lives in `routes/**` (FE-3106). `routes/__root.tsx` already mirrors `pages/_app.tsx` (dayjs plugins, providers, telemetry, error boundary, favicons). Part 13 of the stack. **Depends on:** #53221 **Changed:** - `components/interfaces/App/{NotFoundPage,ServerErrorPage}.tsx` – the 404/500 pages, rendered by `__root.tsx`, now with native `Link`/`useNavigate` and `<img>` - `routes/api/{status-page,scoped-access-token-permissions}.ts` – App Router handlers from `app/api/**` moved in (`NextResponse.json` → `Response.json`); `buildAPIPermissionScopeMap` moves to `lib/api/` - `package.json`, `tsconfig.json` – no `next typegen` step or `.next/types` include - `packages/ui-patterns/.../InstructionBlocks.tsx` – asset map typed `StaticImageData | string`: under Vite a png import is a URL string, which Next's global image types used to hide - `vite.config.ts`, `knip.jsonc`, `turbo.jsonc` and comments across studio – Next build references removed **Removed:** - `pages/{_app,_document,404,500}.tsx`, `pages/_error.jsx`, `pages/README.md`, `app/**`, `next.config.ts`, `proxy.ts`, `instrumentation{,-client}.ts`, `sentry.{server,edge}.config.ts`, `fonts/index.ts` (next/font), `BootTimeoutFallback`, `postcss.config.cjs`, the `next/server` shim - `@next/bundle-analyzer`, `raw-loader`, `postcss`, `@tailwindcss/postcss` dev dependencies Addresses [FE-3106](https://linear.app/supabase/issue/FE-3106/move-page-bodies-into-route-files-and-delete-pages). ## To test - Open an unknown URL – the 404 page renders with working "Head back" - `/api/status-page` and `/api/scoped-access-token-permissions` on platform – same JSON and `Cache-Control` - Fonts (Inter, Manrope, Source Code Pro) still load --------- Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com> |
||
|
|
51bd16d9ca |
Joshenlim/fe 5064 update database triggers to use new nav (#53356)
## Context Update database triggers to use the new page components + add deprecation notices to legacy components There's no visual change here --------- Co-authored-by: Danny White <3104761+dnywh@users.noreply.github.com> |
||
|
|
000320e914 |
fix(studio): keep form text consistent across breakpoints (#53429)
## Problem Small and medium form controls and related text grow from 14px to 16px below a viewport breakpoint, making them larger than surrounding dashboard text. ## Solution Keep these sizes at 14px across breakpoints in shared controls and form layouts, plus Studio search fields and assistant textareas. Explicit large and extra-large variants keep their existing sizes. The shared sizing change also applies to buttons. ```diff - text-base md:text-sm + text-sm ``` This accepts iOS Safari’s automatic zoom when focusing smaller editable fields. User zoom remains available. Validation: Prettier, scoped Studio ESLint, and whitespace checks pass. Browser checks and a full build have not been run. ## Review instructions 1. Open a project’s **Settings > General**. Resize across 768px and check that field text, labels, helper text, and buttons keep the same font size. 2. Open the organisation/project selector and resize across 640px. Its search text should stay at 14px. 3. Open the assistant and check that its textarea text stays the same size across 768px. 4. On an iPhone, focus an editable field and check that the accepted focus zoom behaviour remains usable. ## Checklist - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) |
||
|
|
22ea45a3ba |
feat: getting started v2 (#52511)
## Problem * the getting started page is a stack of content listings: an overview, use cases, framework quickstarts and tutorials * a new reader must find a path in that list, and the page gives no commands or agent prompt for their setup ## Solution * adds a stepper to the getting started page, so a reader gets the steps and an agent prompt for their setup * adds the `docs-getting-started-v2` posthog flag, so the stepper and the current page can run as an a/b test * adds events for stepper choices, link clicks and prompt copies, so the test can compare the two pages * adds a markdown export of the stepper, so the `.md` page lists every path for agents * moves the iso shapes from kb into `ui-patterns`, so the docs feature cards use the same shapes as the kb heroes * changes the edge functions shape to a flat puzzle piece, because the old shape had too many parts <!-- linear:table-colwidths:397,397 --> <table> <thead> <tr> <th>state</th> <th>preview</th> </tr> </thead> <tbody> <tr> <td>after</td> <td> https://github.com/user-attachments/assets/7127d817-4240-4d08-a1c9-6ada1b1b2563 </td> </tr> </tbody> </table> ## Review instructions 1. open [/docs/guides/getting-started?docs-getting-started-v2=stepper](<https://docs-git-docs-getting-started-explorations-supabase.vercel.app/docs/guides/getting-started?docs-getting-started-v2=stepper>) and make sure that the stepper shows with agent selected 2. select next.js and the auth card, then make sure that the setup prompt names next.js and has a step for auth 3. open [/docs/guides/getting-started?docs-getting-started-v2=stepper&start=cli&fw=nextjs](<https://docs-git-docs-getting-started-explorations-supabase.vercel.app/docs/guides/getting-started?docs-getting-started-v2=stepper&start=cli&fw=nextjs>) and make sure that connect your app shows the install command and the quickstart button ## 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>) |
||
|
|
e59bf8de78 |
fix(ui-patterns): stop clipping focus ring in card section (#53369)
I fixed the focus ring on the last field of a `CollapsibleCardSection` being cut off along its bottom edge. The section clipped vertical overflow all the time, although it only needs to while it opens or closes, and the focus ring extends 4px past the field. <img width="732" height="627" alt="Screenshot 2026-11-13 at 11 27 27 PM" src="https://github.com/user-attachments/assets/abb6b7fc-8a9c-414c-baa0-7c08b035c493" /> <img width="708" height="647" alt="Screenshot 2026-11-13 at 11 29 40 PM" src="https://github.com/user-attachments/assets/4752012c-5761-4f6d-903a-8aec9eeaedc4" /> **Changed:** - **Focus ring shows in full**: the section now clips vertical overflow only during its open and close animation. I added two animation variants that layer the clipping on top of the existing collapsible animations, so nothing is clipped at rest. - **Bottom padding removed**: I dropped the 1px of bottom padding that kept borders from being clipped, so each section is 1px shorter while open. **Note:** The existing `collapsible-down` and `collapsible-up` animations are unchanged, so every other collapsible behaves as before. ## To test Setup: sign in and set the `onboardingSurveyPlacement` flag to `org_form` with the dev toolbar. Tested on the PR preview, in Chrome only: - [x] Open `/new` and move keyboard focus to the last question of the "Help improve Supabase" section: expect the green focus ring around that field to show on all four sides, bottom edge included. Observed: the ring is continuous on all four sides of "Do you know how to code?"; the section's computed `overflow-y` is `visible` and its bottom padding is 0. - [x] On `/new`, click the "Help improve Supabase" heading to close the section, then click it again: expect the questions to slide closed and open without spilling over the Cancel and Create organization buttons mid-animation. Observed: paused partway through closing, the questions are cut off at the section boundary and nothing overlaps the buttons; `overflow-y` reads `clip` while either animation runs and `visible` once the section is open again. - [x] Open the Collapsible Card Section page in the design system, open the section in the demo and Tab to its last field: expect the focus ring to show on all four sides. Observed: the ring shows on all four sides of the demo's input. The demo has spacing below that input, so it does not exercise the bottom edge. |
||
|
|
c5e45baff7 |
fix(ui-patterns): keep admonition action surfaces opaque (#52348)
## Problem Default buttons inside Admonition actions are translucent in the following circumstances: - Light mode: button hover - Dark mode: static button This means they show the alert surface (yellow, red, grey, etc) unintentionally. ## Solution Give each independent action its own FloatingPlate, with transparent gaps between buttons. Explicit groups share one plate; fragments are flattened. Full-width groups retain responsive sizing, while single buttons stay snug. | Before | After | | --- | --- | | <img width="1510" height="256" alt="CleanShot 2026-10-27 at 15 32 14@2x" src="https://github.com/user-attachments/assets/2c1c285e-ffb3-4b26-a186-ce39a9b597b3" /> | <img width="1508" height="248" alt="CleanShot 2026-10-27 at 15 32 30@2x" src="https://github.com/user-attachments/assets/1cb86562-2227-4792-a60d-69dc1a06234d" /> | ## Review instructions 1. Open [Admonition examples](https://design-system-git-dnywh-fix-admonition-floating-plate-supabase.vercel.app/design-system/docs/fragments/admonition) and find the examples with action buttons. 2. Light mode: hover the default action buttons. 3. Dark mode: just compare against the [production design system](https://supabase.com/design-system/docs/fragments/admonition), statically. Notice the buttons retain their standard fill. |
||
|
|
9ef93f1f19 |
feat(design-system): trace header and composition (#52169)
## Problem We're adding tracing UI primitives to the design system as building blocks for future trace waterfalls. This is PR 7, the last in a stack of small, component-by-component PRs. The earlier PRs built the waterfall itself. This one adds the header controls, a live demo and a docs page that reads as one story. It also gives the zoom a way back, since `resetWindow()` from PR 5 had no button until now. Part of [DEBUG-243](https://linear.app/supabase/issue/DEBUG-243/tracing-ui-primitives-stacked-prs) ## Solution Adds the header parts, a live demo and a docs restructure. **Header parts** (`Trace.Header`, `Trace.Title`, `Trace.Status`, `Trace.CollapseAll`, `Trace.ResetZoom`) - `Trace.Header` is a layout container for the controls above the waterfall, and takes a `className`. The other parts take no props. - `Trace.Title` shows the name of the first root span, falling back to "Trace". There's no new field on the trace data. - `Trace.Status` is a badge showing Live, Done or Failed. Failed means the root span has an error status. It also renders a visually hidden `role="status"` element with `aria-live="polite"` that announces the same text, and has no footprint where it isn't rendered. - `Trace.CollapseAll` toggles every span that has children, and its label flips between "Collapse all" and "Expand all". It's disabled when no span has children. It's cheap on large traces because it only walks spans that have children. This uses `toggleAllCollapsed` and `areAllCollapsed` in `utils.ts` and one bulk `toggleCollapseAll()` on the view context. - `Trace.ResetZoom` calls `resetWindow()`. It's disabled unless the view is zoomed, and after a reset the window follows a growing live trace again. **Live demo** - A new docs example with a ticking live trace. Spans appear and finish as the clock advances, and it includes an error span and event markers. - It starts paused at 0ms, with a Play/Pause button in the header. The clock is an accumulated base value plus the start of the current play session, so pausing freezes the elapsed time exactly and resuming continues without a jump. It uses `minRangeMs` so the axis isn't degenerate at the start. When it reaches the end, the badge flips from Live to Done, and Play after that restarts from 0. - Both demos now use Supabase request paths (such as `GET /rest/v1/orders` and `POST /functions/v1/process-order`) as sample data. **Docs** - The main example is now a single composed waterfall: header, minimap, ruler, rows, bars and inspector. The page runs from the intro to a Composition section with that example and a snippet, then short sections for Header, Waterfall and ruler, Rows and bars, Minimap and zoom, Inspector, and Live traces. The static live example from PR 2 was dropped from the composed example. ## Additional context This is PR 7 of a stack, so it builds on `kemal/debug-243-6-trace-inspector-popover`. The earlier exploration is in the draft #51184, which can be closed once the stack lands. Known and left as is: - While a live trace grows unzoomed, finished bars and markers jump while the ruler ticks slide. A shared `transition-[left,right,width]` across the bar primitives would fix it, and it's a follow-up. - The Failed state is only exercised in a test fixture, not in a docs example. A root error in the live demo would mean Done never shows. Out of scope: `Trace.Filter` and search, controlled `selectedId` props, mouse-wheel or pinch zoom, zoom-to-span, row enter and exit motion, kind-based tinting, responsive rows, and a per-span icon slot. ## Review instructions 1. Open the preview link and find the Tracing page under UI Patterns. Check the page reads in order from intro to composition to the individual sections. 2. In the composed example, check the title shows the root span's name and the status badge shows Done. 3. Zoom in with the minimap. Check "Reset zoom" is disabled before you zoom, enables after, and restores the full range when clicked. 4. Click "Collapse all". The tree should collapse to the root rows and the label should change to "Expand all". Click again and everything should expand. 5. Check the inspector, minimap and arrow-key navigation still work in the composed example. 6. In the live demo: 1. It starts paused at 0ms with a Live badge. 2. Click Play and check time advances and bars grow. 3. Click Pause and check the elapsed time stays frozen. Wait a few seconds, then resume and check it continues without a jump. 4. Zoom in and check the window stays fixed while the trace grows. Click "Reset zoom" and check it follows growth again. 5. Let it run to completion and check the badge flips to Done. Play after that should restart from 0. 7. With a screen reader or by inspecting the DOM, check the visually hidden `role="status"` text matches the badge. 8. Switch between light and dark mode and check the header, controls and demo are legible in both. 9. Read `Header.tsx`, the collapse helpers in `utils.ts` and the live demo's clock logic. Run the Trace unit tests in `packages/ui-patterns`, which now cover the collapse-all helpers, and run typecheck and Prettier. |
||
|
|
42e3fb307d |
feat(design-system): trace inspector (#52167)
## Problem We're adding tracing UI primitives to the design system as building blocks for future trace waterfalls. This is PR 6 in a stack of small, component-by-component PRs. PR 5 added the minimap and zoom, and this one adds the inspector, which shows the details of the selected span. Selection has been in place since PR 3 but had nothing reading it until now. Part of [DEBUG-243](https://linear.app/supabase/issue/DEBUG-243/tracing-ui-primitives-stacked-prs) ## Solution Adds `Trace.Inspector`, a non-modal popover anchored to the selected span's bar. - It renders nothing when no span is selected. When one is, it opens at the bar's actual x-position, so it reserves no layout space when closed. Place `<Trace.Inspector />` once inside `Trace.Root`. - The content is compact and read-only: name, status badge, start offset, duration (marked as running when the span has no end), attributes and events. - It's anchored with Radix Popper's virtual-element anchor. The virtual rect re-queries the DOM within this root's tree on every position update, and falls back from the bar (clamped to its lane) to the lane, and then to an off-screen rect so the popover hides when nothing is visible. `updatePositionStrategy="always"` keeps it in step with scroll, zoom, pan and virtualization. - `contextElement` is the tree element, so Floating UI attaches scroll listeners to the Rows viewport and the popover follows the bar when it scrolls. - Lookups are scoped to this root's tree and never go through `document`. The docs page renders several waterfalls that reuse the same span ids, so a document-wide query would anchor to the wrong demo. The view context gains a `treeRef` for this, with no wrapper element. - Auto-focus on open and close is prevented, so the arrow-key navigation from PR 3 keeps working while the popover is open. - Radix also dismisses on focus outside, which would close the popover on every arrow-key move. `onInteractOutside` ignores interactions inside this root's waterfall for that reason. - The popover is keyed per selected span, so changing the selection re-anchors cleanly. - `Trace.Rows` now scrolls the selected row into view when the selection changes, reusing its existing `scrollToIndex`, so selecting a row that isn't mounted still lands the popover in the right place. - `formatAttributeValue` in `utils.ts` formats attribute values, with a unit test. - Docs: `<Trace.Inspector />` in both examples, two attributes added to `auth.verify` so the section isn't empty, and a new "Inspector" section on how it opens and closes. ## Additional context This is PR 6 of a stack, so it builds on `kemal/debug-243-5-trace-minimap` and PR 7 builds on this branch. The earlier exploration is in the draft #51184, which stays open as reference until the stack lands. How it closes: - Escape or an outside click closes it and clears the selection. - Clicking another row switches the popover to that row without closing it first. - Dragging the minimap brush keeps it open. Behaviours worth knowing before you review: - **Zoom:** when the selected bar is fully outside the visible window, the popover anchors under the row's lane. When it's partly visible, it anchors to the visible part. - **Virtualization:** when the selected row scrolls out of the Rows viewport, the popover hides and the selection is kept. It reappears at the row when you scroll back. - **Viewport edge:** near the right edge the popover shifts left to stay on screen, so its left edge may not line up with the bar. - **Multiple roots on one page:** each root has its own non-modal popover, so opening a popover in one demo closes the others. Escape also only closes the most recently opened popover. Neither matters in an app with one trace per page, so this PR doesn't add anything to prevent it. - **Out of scope:** header controls, search, controlled `selectedId` props, tabs or actions in the inspector, and a pinned-span mode. ## Review instructions 1. Open the preview link, find the Tracing page under UI Patterns, then the "Inspector" section. 2. Click a bar's row and check the popover opens at the bar, just below it, showing name, status, start, duration, attributes and events. 3. Press the arrow keys through at least three rows (Enter selects) with the popover open. It should re-anchor each time, and keyboard focus should stay on the rows. 4. Scroll the Rows viewport with the popover open. It should move with the bar, and hide when the row scrolls out of view and come back when you scroll back. 5. In the second example, select a span that has the same name as one in the first example, and check the popover anchors to the bar in the second one. 6. Zoom in with the minimap so the selected bar leaves the window, and check the popover anchors under the row's lane and isn't stuck in the wrong place. Drag the brush and check the popover stays open. 7. Check the closing behaviour: Escape closes it, an outside click closes it, and clicking another row switches directly. 8. Switch between light and dark mode and check the popover is legible in both. It fades in on open, so check it once it has settled. 9. Read `Inspector.tsx` and the changes to `Rows.tsx` and `Trace.tsx`. Run the Trace unit tests in `packages/ui-patterns`, which now cover `formatAttributeValue`, and run typecheck and Prettier. |
||
|
|
2895c78d0a |
feat(design-system): trace minimap (#52164)
## Problem We're adding tracing UI primitives to the design system as building blocks for future trace waterfalls. This is PR 5 in a stack of small, component-by-component PRs. PR 4 added bars and markers, and this one adds the minimap. It's also the first PR where the visible time window can change, so the waterfall can now be zoomed and panned. Part of [DEBUG-243](https://linear.app/supabase/issue/DEBUG-243/tracing-ui-primitives-stacked-prs) ## Solution Adds `Trace.Minimap` and the zoomable window it controls. **Window state** - `useView()` gains `window`, `isZoomed`, `setWindow(start, end)` and `resetWindow()`. `resetWindow` has no button yet. The header controls come in a later PR. - Unzoomed, the window follows the trace bounds as a live trace grows. Once zoomed, it stays fixed. - `Trace.Waterfall` now builds its scale from the view window instead of the trace bounds. - `clampWindow` keeps the window inside the bounds with a minimum width of 1% of the bounds, and `resizeWindow` handles edge drags. Both are pure and tested. - `createTimeScale` takes an `origin`, so tick labels stay offsets from the trace start while zoomed and don't reset to 0. This was a known gap from PR 2. - `Trace.Bar`, `Trace.CollapsedChildren` and `Trace.Slowest` follow the window. Spans outside it are clipped by the lane, out-of-window child ticks are skipped, and the slowest badge hides when its bar is entirely out of view or sits at the visible trailing edge. **Minimap** - A full-width strip above the ruler showing the whole trace compressed. It draws one row per depth level, coloured by status (errors win where spans overlap), and rows deeper than the limit fold into the last row. Neighbouring columns are merged, so the DOM size doesn't depend on the number of spans. - A brush shows the visible window. Drag the body to pan, drag either 8px edge to resize, and click outside it to recentre. - The brush is a focusable slider with an aria-label and aria-valuetext. Arrow keys pan by 10% of the window, and Shift+arrows move the end edge. **Transitions** - The 300ms live-growth transitions (ruler ticks, the "now" line, the running bar width) only apply while the view isn't zoomed, so nothing lags behind the brush while you drag. Docs: both example waterfalls include the minimap, and there's a new "Minimap and zoom" section. ## Additional context This is PR 5 of a stack, so it builds on `kemal/debug-243-4-trace-bar-markers` and PR 6 builds on this branch. The earlier exploration is in the draft #51184, which stays open as reference until the stack lands. Known and left as is: - Once you zoom, dragging the brush back to the full range keeps the window fixed. It stops following a growing live trace until `resetWindow()` is called. The reset button arrives with the header controls, so there's no reset in the docs example yet and a reload is the way back. - The minimap is full width and no longer lines up with the timeline column. That's deliberate. - Mouse-wheel or pinch zoom on the lanes, zoom-to-span and search are out of scope. ## Review instructions 1. Open the preview link and find the Tracing page under UI Patterns, then the "Minimap and zoom" section. 2. Check the strip above the ruler shows the trace as depth rows coloured by status, with a brush covering the full range. 3. Drag the brush's end edge inward and check the ruler, bars, markers and child ticks all update together with no lag, and that tick labels still read as offsets from the trace start. 4. Drag the brush body to pan, and check bars outside the window are clipped and don't leave stray artifacts. 5. Click on the strip outside the brush and check the window recentres there. It stops at the bounds, so the brush won't always land under the cursor. 6. Focus the brush and use the keyboard: 1. Left and Right pan the window. 2. Shift+Left and Shift+Right shrink and grow the end edge. 7. In the live example, check the minimap, ruler and bar still behave as before while unzoomed. 8. Switch between light and dark mode and check the strip, brush and rows are legible in both. 9. Read `Minimap.tsx`, the window state in `Trace.tsx` and the additions to `utils.ts`. Run the Trace unit tests in `packages/ui-patterns`, which now cover the window clamp and resize, the tick origin and the minimap rects, and run typecheck and Prettier. |
||
|
|
6205145edd |
feat(ui): heading links (#53094)
## Problem - kb article headings have no link to their section, so a reader cannot share a link to one part of a guide - docs and www headings show a `#` link that only jumps to the heading, and studio report headers use their own copy link button ## Solution - adds `CopyHeadingLinkButton` to `ui`, with the studio look, so one copy link button serves all surfaces - replaces the `#` link in `Heading` with the button, so docs, www and `ui-patterns` markdown headings copy a link on click - adds the button to the h2 to h4 headings of kb guides, faqs and troubleshooting articles - changes the studio report section headers to use the shared button, and removes their local copy logic | before | after | | -------|------| | <img width="795" height="378" alt="image" src="https://github.com/user-attachments/assets/68302dc8-829a-4af1-b1c3-5ec68d8c39e3" /> | <img width="795" height="378" alt="image" src="https://github.com/user-attachments/assets/b21d363e-3f27-43b0-aa0c-0efd92693d7e" /> | <!-- ## 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 [/kb/guides/migrate-from-mysql](https://kb-git-anthonylio-fdbkin-47106-add-heading-links-to-knowledge-base-troubleshooting-guides-supabase.vercel.app/kb/guides/migrate-from-mysql) and hover the "Retrieve your MySQL database credentials" heading 3. click the icon and check that the clipboard holds the page url with `#retrieve-your-mysql-database-credentials` 4. open [/docs/guides/database/overview](https://docs-git-anthonylio-fdbkin-47106-add-heading-links-to-knowledge-base-troubleshooting-guides-supabase.vercel.app/docs/guides/database/overview), hover an h2 and do steps 2 and 3 again 5. repeat 3 6. open [/blog/introducing-dbarena](https://zone-www-dot-com-git-anthonylio-fdbkin-47106-add-heading-links-to-knowledge-base-troubleshooting-guides-supabase.vercel.app/blog/introducing-dbarena), hover an h2 and do steps 2 and 3 again 7. open [/dashboard/project/_/observability/auth](https://studio-git-anthonylio-fdbkin-47106-add-heading-links-to-knowledge-base-troubleshooting-guides-supabase.vercel.app/dashboard/project/_/observability/auth), select a project, change a filter, and copy the "Usage" section link 8. make sure that the copied url keeps the filter query string and ends with `#usage` ## 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) |
||
|
|
0ed90ae460 |
fix(ui): split button divider (#53258)
## Problem - in dark mode split button shows a middle divider that is lighter and heavier than the outer edge, and the design system `button-split-dropdown` example has the same bug - button edge is a translucent inset shadow over a translucent fill, so the `-ml-px` overlap stacks two edges and two fills in one column - light mode has the same defect on hover and with the menu open, because the hover fill is translucent too ## Solution - adds a `SplitButtonGroup` component to `ui`, so a split button has a `role="group"` wrapper and one shared divider - fixes the divider color in both themes, because only one button paints the shared border column - changes the shared column to follow the hovered button, so the divider takes its edge color in a fixed place - removes the press scale from buttons in the group, so no gap opens between the two buttons - changes the design system split button docs to `SplitButtonGroup` | before | after | | -------|------| | <img width="428" height="219" alt="image" src="https://github.com/user-attachments/assets/4cbc5dc9-3575-4eef-83b9-a6141796ccc8" /> | <img width="428" height="219" alt="image" src="https://github.com/user-attachments/assets/9c5b283d-e6bd-428a-bee1-7f59249aeb83" /> | | <img width="428" height="219" alt="image" src="https://github.com/user-attachments/assets/046338f9-6dfd-4c32-8e33-30c1b0f84715" /> | <img width="428" height="219" alt="image" src="https://github.com/user-attachments/assets/c79e1c7a-e1ac-4682-a898-1a36c6b028fc" /> | <!-- ## 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 [/design-system/docs/components/button](https://design-system-git-antlio-fix-split-button-divider-supabase.vercel.app/design-system/docs/components/button#split-with-dropdown) preview in dark mode, and zoom in on the split example 2. make sure that the divider has the same color and weight as the outer edge 3. hover the primary action, and make sure that the divider takes its edge color and stays in the same place 4. hover the chevron and open the menu, and make sure that the divider takes the chevron edge color 5. switch to light mode, and repeat steps 2 to 4 6. press and hold the primary action, and make sure that it does not shrink 7. tab to the chevron, and make sure that the focus ring shows on all four sides and that Enter opens the menu 8. open the [/design-system/docs/fragments/admonition](https://design-system-git-antlio-fix-split-button-divider-supabase.vercel.app/design-system/docs/fragments/admonition#split-button-with-dropdown) preview at a narrow width, and make sure that the split fills the row with one divider 9. open the [/dashboard/project/\_/settings/log-drains](https://studio-git-antlio-fix-split-button-divider-supabase.vercel.app/dashboard/project/_/settings/log-drains) preview, and make sure that the `primary` split looks the same as on master ## 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) |
||
|
|
0c49117cf3 |
feat(design-system): trace bar and markers (#52163)
## Problem We're adding tracing UI primitives to the design system as building blocks for future trace waterfalls. This is PR 4 in a stack of small, component-by-component PRs. PR 3 added the span rows with an empty timeline column, and this one fills it in with bars, event markers and two optional overlays. After it, the waterfall looks like one. Part of [DEBUG-243](https://linear.app/supabase/issue/DEBUG-243/tracing-ui-primitives-stacked-prs) ## Solution Adds `Trace.Bar`, `Trace.Markers`, `Trace.Slowest` and `Trace.CollapsedChildren`. They're separate primitives that you compose inside a `Trace.Lane`, positioned from the Waterfall's time scale: - `Trace.Bar` is the span's bar. - It's tinted by span status (brand, destructive or muted), not by service or kind. - It has a minimum visible width so very short spans stay visible, and a ring when its row is selected. - A running span extends to `nowMs`, and its width transitions smoothly (linear, 300ms, respecting reduced motion) while it runs. - `Trace.Markers` draws a small marker at each of the span's event timestamps, with the event name as a native tooltip. Events outside the visible window are skipped. - `Trace.Slowest` is opt-in. It shows a warning badge on the row of the slowest finished span (`slowestId` from PR 1). The badge is anchored to the bar's trailing edge with `right:`, so it stays inside the lane even when the bar is nearly full width, and it has a solid background so it's readable over a coloured bar. - `Trace.CollapsedChildren` is opt-in. When a row has children and is collapsed, it draws a thin tick at each direct child's midpoint on the parent's bar. It only looks at direct children, and it renders nothing when a span has more than 200 of them (`MAX_COLLAPSED_MARKS`), to bound the DOM cost. - Recommended order inside a `Lane` is `Bar`, `CollapsedChildren`, `Markers`, `Slowest`, so markers and the badge sit on top if they overlap. - `utils.ts` gains `effectiveEndMs`, `MAX_COLLAPSED_MARKS` and `collapsedChildMidpoints`. `Trace.Duration` now uses `effectiveEndMs`, so running spans measure up to `nowMs`. - `Trace.Root` gets an optional `defaultCollapsed` prop (a set of span ids). It lets the docs example open with a parent collapsed to show the child ticks. - Docs: the "Rows" example heading becomes "Rows and bars", the example now shows each state (normal, error, running, collapsed parent with child ticks, events and the slowest badge), and there's a short composition snippet. ## Additional context This is PR 4 of a stack, so it builds on `kemal/debug-243-3-trace-rows-cell-lane` and PR 5 builds on this branch. The earlier exploration is in the draft #51184, which stays open as reference until the stack lands. Known and left as is: - Only the running bar's width animates. Finished bars and markers move instantly while the Ruler's ticks slide as the range grows, and a running bar's left edge changes without animating. If that looks off in a live trace, the fix is a shared `transition-[left,right,width]` across the four primitives. - The docs example is static, so running-bar growth isn't visible on the page. It was checked on a temporary ticking page that isn't part of this PR. ## Review instructions 1. Open the preview link and find the Tracing page under UI Patterns. 2. In the "Rows and bars" example, check each state: 1. A normal bar. 2. An error bar in the destructive tint. 3. A running bar that ends at the "now" line. 4. A collapsed parent with a tick for each child. Expand it and the ticks should disappear. 5. A span with event markers. Hover a marker to see the event name. 6. The slowest badge on the full-width root bar, fully inside the lane and readable. 3. Click a bar and check its row gets selected and the bar shows the ring. 4. Switch between light and dark mode and check the bars, ticks, markers and badge are legible in both. 5. Read `Bar.tsx` and the additions to `utils.ts`. Run the Trace unit tests in `packages/ui-patterns`, which now cover the bar and child-tick helpers including the 200 cap, and run typecheck and Prettier. |
||
|
|
106381829f |
feat(docs): ai layout shell (#52976)
Closes DOCS-1472 ## Problem - new top bar, sidebar and footer need a layout that mounts them only for readers on the `docs-layout-v2` flag - guide table of contents and the reference navigation sit in the page column, so the reading column is narrow ## Solution - adds the layout shell, so the flag picks the new or the current top bar, sidebar and footer - moves the guide table of contents into a right rail, and shows the current heading in the top bar breadcrumb - moves the reference navigation into the right rail, and hides the library and version row because the breadcrumb shows them - keep the docs home to keep the current top bar and no sidebar, so the home page stays full width <!-- ## 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 [/docs/guides/database/overview?docs-ia-mvp-v1=option-1](https://docs-git-antlio-docs-v2-5-shell-right-rail-supabase.vercel.app/docs/guides/database/overview?docs-ia-mvp-v1=option-1) 2. make sure that the sidebar shows the database pages with a back link to Products, and that the table of contents is in the right rail 3. open [/docs/reference/javascript/introduction?docs-ia-mvp-v1=option-1](https://docs-git-antlio-docs-v2-5-shell-right-rail-supabase.vercel.app/docs/reference/javascript/introduction?docs-ia-mvp-v1=option-1), and make sure that the version dropdown is in the breadcrumb and not above the right rail ## 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) |
||
|
|
aad6ac1adc |
feat(docs): ai layout breadcrumbs page actions (#52974)
Closes DOCS-1470 ## Problem - reference pages have no breadcrumbs, so a reader on `/reference/cli/supabase-init` sees no path back to the cli reference - a guide breadcrumb can repeat its parent, for example "Connecting to your database" twice under Database > Fundamentals - redesign needs page actions in the top bar to copy a page as markdown and to set up an agent ## Solution - adds reference breadcrumbs, so a reference page shows the reference home and its library - adds the current version to the library breadcrumb when the library has more than one version - removes a breadcrumb that repeats its parent with the same url and name - adds a copy page split button and a set up agent menu, with telemetry events for each action - changes `ui-patterns` to export `CrossfadeIcon`, so the copy button reuses its copied state animation #52972 must merge first, because the breadcrumbs skip the overview row that it adds <!-- ## 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. run `pnpm --filter docs exec vitest run lib/breadcrumbs.test.ts`, and make sure that all tests pass 2. read the new telemetry events in `packages/common/telemetry-constants.ts`, and make sure that each event names what the user did 3. the top bar shows the page actions in the next pr, so check them on the preview of that pr ## 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) |
||
|
|
3aa70c221f |
feat(docs): ai layout groundwork (#52971)
## Problem - docs layout redesign needs a flag, so the team can check the new layout on production first - ai tools agent cards open a setup page with no agent selected, so the reader picks the agent again ## Solution - adds the `docs-layout-v2` posthog flag, and `?docs-layout-v2=true|false` overrides it for the rest of the browser session - adds a `layout-v2:` css variant, so server components can style the new layout and the current layout from the same markup - changes the agent cards to set `?client=` on their link, so the setup page opens with that agent selected - replaces the footer with link cells for status, product updates and issue reports, and keeps the old footer for the flag merge the stack together, because the new footer shows for every reader until #PR5 adds the flag switch <!-- ## 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 [/docs/guides/getting-started?docs-layout-v2=true](https://docs-git-antlio-docs-v2-1-groundwork-supabase.vercel.app/docs/guides/getting-started?docs-layout-v2=true), and make sure that the `<html>` element has `data-docs-layout="v2"` 2. open the same page with `?docs-layout-v2=false`, and make sure that `data-docs-layout` is gone ## 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) |
||
|
|
cd6b25614c |
feat(design-system): trace row, cell, lane and duration (#52161)
## Problem We're adding tracing UI primitives to the design system as building blocks for future trace waterfalls. This is PR 3 in a stack of small, component-by-component PRs. PR 2 added the waterfall container and the time ruler, and this one adds the span rows. It's the first PR where the tree is interactive. Part of [DEBUG-243](https://linear.app/supabase/issue/DEBUG-243/tracing-ui-primitives-stacked-prs) ## Solution Adds `Trace.Rows`, `Trace.Cell`, `Trace.Lane` and `Trace.Duration`: - `Trace.Rows` is a virtualized, scrollable `role="tree"` list of span rows, so large traces stay fast. Rows are flattened from the span tree and the collapse state, and collapsed spans hide their descendants. The children you pass are the per-row template. - `Trace.Cell` is the tree column for a row: indent by depth, an expand/collapse toggle when the span has children, the span name and `Trace.Duration`. - `Trace.Lane` is the timeline column for a row. For now it's only the positioned container that bars and markers will fill in the next PR, and it has no padding so it lines up with the Ruler. - `Trace.Duration` shows the formatted duration, and pulses (motion-safe only) while the span is running. - The root now holds view state: `selectedId` and the set of collapsed spans. Both are uncontrolled and available through `useView()`. Selection is here because rows are interactive and the Inspector PR will read it. - Keyboard support follows the tree pattern, with a roving tabindex: - Up/Down move focus. - Right expands a collapsed row. - Left collapses an expanded row, or moves focus to the parent from a collapsed row or a leaf. - Enter or Space selects. - Arrow keys move focus only. Selection is separate and happens on Enter, Space or click. - `utils.ts` gains `flattenTree` (visible rows with depth, `hasChildren` and `isExpanded`) and `formatDuration` (three significant digits on top of `formatMs`). - New dependency: `@tanstack/react-virtual` in `ui-patterns`, using the same range as Studio (`^3.13.24`) and with a matching `pnpm-lock.yaml` change. - The Tracing docs example now renders the rows, with the preview sitting under the "Rows" heading. There are no bars yet, so the timeline column is empty apart from the ruler. Bars come in the next PR. ## Additional context This is PR 3 of a stack, so it builds on `kemal/debug-243-2-trace-waterfall-ruler` and PR 4 builds on this branch. The earlier exploration is in the draft #51184, which stays open as reference until the stack lands. Left out on purpose: - Controlled `selectedId` props. - `aria-setsize` and `aria-posinset`. - Hidden-descendant counts, which come with the collapsed-children marks in PR 4. A span whose parent is missing is treated as a root, which is how PR 1 already behaves, so there's no separate orphan handling here. ## Review instructions 1. Open the preview link and find the Tracing page under UI Patterns. 2. In the example, check the rows render with indent, toggles, names and durations, and that the timeline column lines up under the ruler. 3. Collapse and expand a parent with the toggle. Its descendants should disappear and reappear. 4. Click into the tree and use the keyboard: 1. Down moves focus to the next row. 2. Right expands a collapsed row. 3. Left collapses an expanded row. 4. Left on a leaf or a collapsed row moves focus to its parent. 5. Enter selects the focused row. 5. In the live example, check the running span's duration pulses, and that it doesn't when your OS has reduced motion on. 6. Switch between light and dark mode and check the rows, toggles and selected state are legible in both. 7. Read `Rows.tsx`, the view state in `Trace.tsx` and the additions to `utils.ts`. Run the Trace unit tests in `packages/ui-patterns`, which now cover `flattenTree` and `formatDuration`, and run typecheck and Prettier. |
||
|
|
44573b7a5c |
feat(studio): rename Advisors to Issues in navigation (#52993)
Part 5 of 6: #52989 → #52990 → #52991 → #52992 → #52993 → #53138 Switches Studio navigation between Advisors and Issues with `issuesInbox`. With the flag off, the existing Advisors sidebar, pages, command menu entries, shortcuts, header panel, and contextual finding links remain available. With it on, these entry points show Issues and legacy Advisor URLs forward to the matching Issues category while preserving finding context. Direct Issues routes remain accessible in either state. The homepage section remains hidden when the flag is off. Telemetry event names are unchanged. ## How to test 1. Turn `issuesInbox` off: desktop and mobile navigation show Advisors, the header opens Advisor Center, and Security, Performance, and enabled Health Advisor pages remain usable. 2. Turn it on: navigation and the header show Issues. Legacy Advisor category URLs forward to matching Issues lists. 3. `G` then `V` opens the active variant. `V` then `S`, `P`, or `H` follows the active category links; shortcut reference labels match. 4. Table Editor finding links open the legacy finding when off and its issue when on. 5. Direct Issues routes remain usable with the flag off; the homepage section stays hidden. ## Validation - Broad navigation/layout/redirect/shortcut regression suite: 456 tests passed, retries disabled. - Focused suite: 181 tests passed with shuffle seed 52993, retries disabled. - Full Studio TypeScript, scoped ESLint, and changed-file Prettier pass. - Behavioral mutation probes detect broken flag guards, finding links, and redirect destinations; source restored afterward. [DEBUG-255](https://linear.app/supabase/issue/DEBUG-255/replace-advisor-terminology-with-issues-throughout-studio) --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Jordi Enric <jordi.err@gmail.com> |
||
|
|
ba94909a8c |
feat(design-system): trace waterfall, ruler, grid and cursor (#52158)
## Problem We're adding tracing UI primitives to the design system as building blocks for future trace waterfalls. This is PR 2 in a stack of small, component-by-component PRs. PR 1 added the data layer, and this one adds the first visible pieces: the waterfall container and the time ruler. It also creates the Tracing docs page. Part of [DEBUG-243](https://linear.app/supabase/issue/DEBUG-243/tracing-ui-primitives-stacked-prs) ## Solution Adds `Trace.Waterfall`, `Trace.Ruler`, `Trace.Grid` and `Trace.Cursor`. - `Trace.Waterfall` measures its own width and provides the time scale to the primitives inside it. Three columns: the tree (`treeWidth`, default 320), the timeline, and a controls gutter (`controlsWidth`, default 56). Both widths are exposed as CSS variables and subtracted from the scale width, so everything shares one layout. No rounded corners. - `Trace.Ruler` is the time axis: a "SPAN" label over the tree column, ticks that adapt to the visible range, and the gutter, which renders the Ruler's children (for icon controls). - `Trace.Grid` draws a vertical gridline at every ruler tick, from the same `scale.ticks`. It's one non-scrolling overlay below the ruler that fills the timeline column, so rows added later sit on top. - `Trace.Cursor` draws the live cursor, a line from the top of the ruler to the bottom of the waterfall with a dot on the ruler's bottom edge. It shows while the trace is live and inside the visible window. Ticks, gridlines and the cursor share one live-growth transition that respects reduced motion. - `createTimeScale` also returns the ticks, and `utils.ts` gains `niceTickStep` and `formatMs`. Tick labels pick their precision per unit, so 1.2s and 1.4s don't both read "1s". - New design-system page, Tracing, with an intro and one example showing a finished trace and a live trace. `ComponentPreview` gets an optional `squared` prop, used only by this page, to remove the preview's rounded top corners. Rows, bars, markers, the minimap and the inspector come in later PRs, so the timeline is empty apart from the ruler. ## Additional context This is PR 2 of a stack, so it builds on `kemal/debug-243-1-trace-foundation` and PR 3 builds on this branch. The earlier exploration is in the draft #51184, which stays open as reference until the stack lands. ## Review instructions 1. Open the preview link and find the Tracing page under UI Patterns. 2. In the first example, check the ruler ticks and labels across the trace duration, and that the labels read sensibly (for example 1.2s and 1.4s stay distinct). 3. In the live example, check the "now" line sits at about the halfway point, and that it's not drawn when `nowMs` falls outside the visible range. 4. Resize the window and check the ticks re-measure and re-space. 5. Switch between light and dark mode and check the ticks, labels and now line are legible in both. 6. Read `Waterfall.tsx` and the additions to `utils.ts`. Run the Trace unit tests in `packages/ui-patterns`, which cover the tick step and formatting logic, and run typecheck and Prettier. |
||
|
|
79763687f7 |
Include command section for event tracking in cmd k (#53205)
## Context Just updating Cmd K to include a `command_section` within the `command_menu_command_clicked` event action's properties, mainly to let us identify which section the clicked command came from. For e.g with the recent resource aware Cmd K changes, this will allow us to identify whether "Related resources" command items are being used, `command_section` will be set as "Related resources" <img width="500" alt="image" src="https://github.com/user-attachments/assets/3ab67df1-4a35-4ab0-9c12-6621a0a0fe8f" /> Or for searching database entities, clicking on each command item within their sections will set `command_section` as `"Tables" | "Policies" | "Triggers" | "Functions"` <img width="500" alt="image" src="https://github.com/user-attachments/assets/b0ba9cd7-d2ed-4ee6-8aae-c7fe8157f340" /> |
||
|
|
bf39c95230 |
feat(design-system): trace ui foundations (#52153)
## Problem We're adding tracing UI primitives to the design system as building blocks for future trace waterfalls. This is the first PR in a stack of small PR's and it lays the data layer and foundations. It doesn't render anything yet. Part of [DEBUG-243](https://linear.app/supabase/issue/DEBUG-243/tracing-ui-primitives-stacked-prs) ## Solution Adds the span types, the trace index and `Trace.Root`: - OpenTelemetry-compatible span types (trace id, span id, parent span id, name, start/end, status, attributes, events). - `buildTraceIndex` and the time-to-position scale that later primitives share. - `Trace.Root`, which provides the index through context. It's the only UI export in this PR. - Three additions to the index: - `isLive`: true if any span is still running (`endMs === null`). - `minRangeMs`: an optional `Trace.Root` prop that sets a floor on the visible duration while the trace is live. - `slowestId`: the id of the longest finished span (first encountered wins ties), or `null` if there is none. Everything visual (Waterfall, Ruler, Rows, Bar, Minimap, Inspector and so on) comes in the PRs after this one. There are no visual changes here, so no screenshots. ## Additional context This is PR 1 of a stack, so later PRs build on this branch. The earlier exploration is in the draft #51184, which stays open as reference until the stack lands. ## Review instructions Nothing renders in this PR, so review is code-only. 1. Read the span types and check they cover the OpenTelemetry fields listed above. 2. Read `buildTraceIndex` and check `isLive`, the `minRangeMs` floor and `slowestId` against the descriptions above. The floor should only apply while the trace is live, and a running span should never be picked as slowest. 3. Run the Trace unit tests in `packages/ui-patterns` and check they pass. The new cases cover `isLive`, `minRangeMs` and `slowestId`. 4. Run typecheck and lint for the package. |
||
|
|
f59c795eb5 |
feat(docs): render Option 1 on the server when the variant is forced (#52735)
Closes DOCS-1520 ## Problem The original PR was only client-side. This is adding server-side integration. The docs-nav evals fetch each page's HTML with no JavaScript and add `?docs-ia-mvp-v1=option-1` to every request. The option-1 arm gets the control navigation anyway. Guide pages are statically generated, so the server can't read the query parameter. `useIaNavVariant` reads the override from the URL after the page loads, so the fetched HTML always has today's nav, hidden with an `invisible` class. The top nav dropdowns have a second gap. Their panels mount on the client, so their links are not in the server HTML for either variant. Every eval case starts at `/docs`, where those links are the only way into the Option 1 groups. ## Solution - **Rewrite option-1 requests:** `proxy.ts` sends `/docs` and guide pages with `?docs-ia-mvp-v1=option-1` to `/docs/ia/option-1/…`. Pages there render on the first request and are then cached, so nothing is added to the build. Requests without the parameter, and `.md` requests, are not rewritten. - **Read the variant from the route:** `IaNavRouteProvider`, in the root layout, reads the variant from the layout segments. `useIaNavVariant` returns it on the server and records no PostHog exposure for it. `useIaNavReady` is ready at once, so the nav has no `invisible` class. - **Strip the route prefix:** on the server, `usePathname` returns the rewritten path. The nav components, breadcrumbs, and `AiTools` use `useDocsPathname`, which strips the `/ia/option-1` prefix. - **Breadcrumbs follow the variant:** they resolve from the visitor's nav config, not always today's. - **Top nav subheads in the HTML:** a `<noscript>` block next to the top nav lists the dropdown links for the visitor's variant, inside an `sr-only` nav. Browsers with JavaScript ignore it. - **No index for the route:** direct visits to `/docs/ia/option-1/…` get `noindex`. Canonical URLs point to the real guide. **Not changed:** - **Reference pages:** they keep today's nav, even with the parameter. - **Config pages:** the five generated config pages under `self-hosting` and `local-development/cli` are not in the markdown manifest, so they keep today's nav too. - **Links:** they don't carry the query parameter, so a click in the browser leaves the forced variant. This was already the case before this PR. - **Conflicts with #52679:** it changes the same hooks. Whichever PR merges second needs a rebase. ## Review instructions `grep -c` counts the lines of server HTML that contain the text. A count of 1 or more means the text is in the HTML that an agent fetches without JavaScript. A count of 0 means it is not. 1. Run `curl -s "https://docs-git-docs-ia-option-1-server-render-supabase.vercel.app/docs/guides/auth/sessions?docs-ia-mvp-v1=option-1" | grep -c "Run and manage"`. The count is 1 or more. "Run and manage" is an Option 1 top nav label, so this checks that the parameter gets Option 1's nav from the server. 2. Run `curl -s "https://docs-git-docs-ia-option-1-server-render-supabase.vercel.app/docs/guides/auth/sessions" | grep -c "Run and manage"`. The count is 0. This checks that a request without the parameter still gets today's nav. 3. Run `curl -s "https://docs-git-docs-ia-option-1-server-render-supabase.vercel.app/docs?docs-ia-mvp-v1=option-1" | grep -c "guides/platform/ssl-enforcement"`. The count is 1 or more. The home page has no sidebar, and this link sits only in the "Run and manage" dropdown, so this checks that the top nav subhead links are in the server HTML. 4. Run `curl -s -o /dev/null -w "%{http_code}" "https://docs-git-docs-ia-option-1-server-render-supabase.vercel.app/docs/guides/auth.md?docs-ia-mvp-v1=option-1"`. It returns `200`. This checks that the markdown version still loads with the parameter. 5. Open [/docs/guides/auth](https://docs-git-docs-ia-option-1-server-render-supabase.vercel.app/docs/guides/auth) in a browser and hover over the top nav. You see today's nav and dropdowns. ## 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) |
||
|
|
e8a82b4db2 |
docs(mcp): document notebook tools for MCP v0.16.0 (#53045)
## Problem [MCP 0.16.0](https://github.com/supabase/mcp/releases/tag/mcp-server-supabase-v0.16.0) enables the notebook tools (`create_notebook`, `run_notebook`, `delete_notebook`) alongside `list_notebooks` and `get_notebook`, in the `notebooks` feature group, and [0.16.1](https://github.com/supabase/mcp/releases/tag/mcp-server-supabase-v0.16.1) enables that group by default. The MCP docs page doesn't mention them or their confirmations, and the configuration panel has no way to select the group or skip its confirmations. ## Solution Document the Notebooks group on the MCP page in the same format as the other groups: hosted only, not available in local or self-hosted Studio. Add a Notebook confirmations section covering `run_notebook` and `delete_notebook` elicitation and read-only behavior. Add `run_notebook` and `delete_notebook` to `skip_elicitations`, and add a Notebooks recommendation covering the per-run limits (50 query cells, about 1 MB of rows). In the configuration panel and Studio Connect sheet, add Notebooks as a default group for hosted connections only. A `defaultDisabled` flag on each group replaces the hardcoded Storage exclusion, and the notebook skip options appear only while Notebooks is enabled. No docs change needed for the other 0.16.0 and 0.16.1 fixes (feedback `project_id`, project ref hint, `partition_of`, check expressions, EXPLAIN confirmation, edge function paths, notebook URLs in tool outputs). ## Before merge - [supabase/platform#38799](https://github.com/supabase/platform/pull/38799) must ship. Until then, hosted only serves `list_notebooks` and `get_notebook`. - The scoped token permissions table is generated from the platform `mcp-tools-permissions` endpoint, which doesn't list `create_notebook`, `run_notebook`, or `delete_notebook` yet. ## Verification <img width="838" height="367" alt="image" src="https://github.com/user-attachments/assets/29d1bd4e-5046-4986-9dbb-ed077bdf3a56" /> MCP Docs preview [page](https://docs-git-rodriguespn-ai-1409-mcp-docs-v0-16-0-supabase.vercel.app/docs/guides/ai-tools/mcp) Closes AI-1409 |