Commit Graph
10 Commits
Author SHA1 Message Date
anthony lio 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)
2026-11-28 13:25:55 +02:00
Anthony Lio 9659778769 feat(ui): scrollbar track (#52493)
## Problem

- proposal to lift scroll bar ui accross the apps
- fix shared `ScrollBar` in `ui` showing only a thin `bg-border` thumb
with no track, so the scroll position is hard to see

## Solution

- replaces the native scrollbars in the docs left nav and in the guide
right column with the shared scroll area
- replaces the native scrollbar in the docs search v2 results with the
shared scroll area, and keeps the animated list height and the bottom
fade
- changes the command menu list to the shared scroll area, with the bar
2px from the edge so it does not touch the hover highlight
- changes the studio connect sheet body and its framework combobox to
the shared scroll area, so long code lines still scroll inside their own
code blocks

| state | preview |
| -------|------|
| before | <img width="473" height="260" alt="image"
src="https://github.com/user-attachments/assets/ef22e643-b92a-4a23-9c77-6b10851e1445"
/> |
| after | <img width="473" height="260" alt="image"
src="https://github.com/user-attachments/assets/46fe95e9-0574-4eef-afbd-20d591baa859"
/> |

<!--
## 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
[/design-system/docs/components/scroll-area](https://design-system-git-antlio-feat-ui-scrollbar-track-supabase.vercel.app/design-system/docs/components/scroll-area),
scroll the vertical and horizontal demos, and make sure that the thumb
moves on a visible track and gets lighter on hover
2. open
[/docs/guides/database/postgres/row-level-security](https://docs-git-antlio-feat-ui-scrollbar-track-supabase.vercel.app/docs/guides/database/postgres/row-level-security),
scroll the left nav and the right column, and make sure that each shows
the new scrollbar
3. resize the page to mobile width, open the menu, and make sure that it
scrolls above the footer
4. make sure that the results scroll with the trackpad and with the
arrow keys, and that the bottom fade shows
5. open
[/dashboard](https://studio-git-antlio-feat-ui-scrollbar-track-supabase.vercel.app/dashboard),
press `⌘K`, scroll the command menu, and make sure that the thumb does
not touch the hover highlight of an item
6. open
[/dashboard/project/_?showConnect=true](https://studio-git-antlio-feat-ui-scrollbar-track-supabase.vercel.app/dashboard/project/_?showConnect=true),
scroll the connect sheet, and make sure that long code lines scroll
inside their code blocks and do not widen the sheet

## 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)
2026-11-05 09:16:06 +02:00
Anthony Lio 1a2db3779e feat(docs): ask ai v2 (#52459)
## Problem

- the change is a follow-up to search v2 (#51175, #52233), which runs as
the `docs-search-v2` experiment
- in the `search-v2-active` group, `cmd+k` opens the new search instead
of the legacy command menu, so readers lose ask ai
- a search with no results stops at "No results found." and gives no
next step

## Solution

- adds an ask ai panel and a `cmd+i` shortcut to search v2, so the
`search-v2-active` group can ask supabase ai
- adds ask ai entries to the top nav, the results footer and empty
results, so readers can ask from search
- changes search and ask ai to use one dialog for the page, so two
dialogs never open together
- adds `renderNoResults` and `renderFooterStart` slots to the
`docs-search` panel, so the package has no ask ai code
- nit: adds a `keycaps` variant to `KeyboardShortcut` with a
design-system example, and uses it in the search trigger and footers

| state | preview |
| -------|------|
| after | <video
src="https://github.com/user-attachments/assets/6681fcba-6267-4ee1-b9e0-154b5f45091d"
/> |

<!--
## 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?docs-search-v2=search-v2-active](https://docs-git-antlio-feat-docs-ask-ai-supabase.vercel.app/docs?docs-search-v2=search-v2-active)
2. make sure that the top nav shows the search box and an `Ask AI`
button
3. press `cmd+i` (`ctrl+i` on windows and linux), and make sure that the
ask ai dialog opens with example questions
4. select an example question, and make sure that the bolt icon changes
from gray to color while the answer loads
5. press `cmd+k`, and make sure that the same dialog changes to search
6. search for `zzqqxx`, select `Ask Supabase AI: zzqqxx`, and make sure
that ask ai opens and sends the question
7. search for `auth`, and make sure that the results footer shows `Ask
Supabase AI` and the keycap hints

## 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)
2026-11-02 11:13:44 +02:00
Anthony Lio e928d28e69 feat(ui-patterns): top nav menu (#52501)
## Problem

- kb and docs each keep their own copy of the top bar menu and its
buttons
- the kb bar has no search box, and the docs bar has one on the right

## Solution

- adds a shared top nav to `ui-patterns`, so kb and docs use one
megamenu and one set of bar buttons
- replaces the docs desktop dropdowns with the megamenu, so docs and kb
show the same menu design
- adds a heading to the first column of each docs menu, so the reader
sees which group a list belongs to
- adds the search box and a "sign up" button label to the kb bar, so it
matches docs

| state | preview |
| -------|------|
| before | <img width="1506" height="350" alt="image"
src="https://github.com/user-attachments/assets/3045d400-4ac0-41d7-a94f-acc23fa919fa"
/> |
| after | <img width="1506" height="350" alt="image"
src="https://github.com/user-attachments/assets/334e5130-611a-4eb7-a95a-c796e2bbcf80"
/> |

<!--
## 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 kb and docs preview links above in desktop
2. on kb, hover "topics" and make sure that the panel opens under the
bar
3. click the search box and make sure that the kb search dialog opens
4. on docs, open
[/docs/guides/auth](https://docs-git-antlio-feat-shared-top-nav-supabase.vercel.app/docs/guides/auth)
and make sure that the "products" label has an underline
5. open each docs menu and make sure that the first column has a heading
6. make sure that the menu button opens and closes the mobile menu in kb
and docs

## 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)
2026-10-30 08:57:23 +00:00
Jeremias Menichelli 27bb674186 chore: Delete non-existent rows by slug in search ingest (#52507)
## Problem

Current search shows deleted pages.

For example, here we are still indexing the troubleshooting index which
has been moved to kb.

<img width="793" height="765" alt="Screenshot 2026-10-29 at 15 54 24"
src="https://github.com/user-attachments/assets/5659477c-ead8-4f5d-900a-9ffd42342f7b"
/>

## Solution

After ingest, clean rows which haven't been updated on the last 25
hours. We run an ingest at least once at midnight, so a row that hasn't
been tracked twice means its content inside a page or the page itself
doesn't exist anymore.

<!--
## 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

Cannot be reproduced on preview.

_Tested locally, both database table correctly removes old rows. Search
doesn't send old results on local searches._

## 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)
2026-10-29 15:18:16 +00:00
Anthony Lio c4424c9795 feat(kb): open search with cmd+k on every page (#52413)
## Problem

- the kb search dialog opens only on the home page, because the home
hero button contains the dialog and the cmd+k listener

## Solution

- moves the search dialog and the cmd+k shortcut into the shared kb
layout, so cmd+k opens search on every kb page
- changes the home hero button to open the same dialog, so each page has
only one search dialog

<!--
## 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`
2. click the search button in the hero, and make sure that the search
dialog opens
3. close the dialog, push cmd+k (ctrl+k on windows or linux), and make
sure that the same dialog opens
4. push cmd+k again, and make sure that the dialog closes
5. open `/kb/topics/migration`, push cmd+k, and make sure that the
dialog opens

## 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)
2026-10-27 22:18:35 +02:00
Jeremias Menichelli f4d6d90527 chore: Open new search on ctrl+k and not-found page (#52233)
## Problem

When user press `ctrl` + `k` on docs, with the search v2 experiment
active, the old search opens instead of the new one.

Also, search v2 doesn't open on 404 page.

## Solution

Add missing key handler.

<!--
## 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 preview with new search experiment enabled
2. Press `ctrl` + `k`, the new search modal should appear
3. Then open a 404 page
4. Make sure that the "Search the page" button opens the new modal too

## 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)
2026-10-26 11:05:24 +01:00
Jeremias Menichelli fa9f1baeb4 fix: Trim query texts. Prevent searches with less than two characters (#52220)
## Problem

Currently we are firing searches too early and too often. Analyzing
data, most common cases are people adding spaces while typing, and not
so meaningful two character searches _(see screenshot below)_.

<img width="419" height="460" alt="Screenshot 2026-10-23 at 13 23 17"
src="https://github.com/user-attachments/assets/ead60c12-e558-4584-9108-1b4326846ce0"
/>

This first, makes unnecessary calls to our search function, but second
pollutes data.

## Solution

 - Trim queries before sending them to the search callbacks
- Avoid searches with only two characters, this is configurable on the
consumable side of the components via a `minCharacters` prop which
default is `0`.

<!--
## 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

Open both docs and kb previews, and open the new search experience in
both.

- Write combinations like " au", "au ", or "au" these strings shouldn't
trigger a search call in the network tab
- Once you add a third character that is not a space, a search call
should happen

## 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)
2026-10-26 11:04:10 +01:00
Jeremias Menichelli 8b4be6cdfd feat: Add search to kb (#52089)
## Problem

There's currently no search on kb.

## Solution

- Move components used in Docs' Search V2 project to a common package
for re-usage.
 - Use these components on the Search V2 on docs
 - Refactor useDocsSearchV2 to accept endpoint for other solutions
 - Connect the search with the new `kb_search` table

<!--
## 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

For both, the kb preview and the docs preview with the search v2
experiment active using the `?docs-search-v2=search-v2-active`:

 - Open the preview link of the project
 - On the homepage, press cmd/ctrl + k or click the search trigger
- A search panel should open, type something, for example "edge
functions" and wait for results to appear
 - Clicking a result should lead to the desired page

<img width="1173" height="832" alt="Screenshot 2026-10-22 at 13 34 43"
src="https://github.com/user-attachments/assets/1c3a3d7f-2fe3-452a-91dd-20ba7be3ef1b"
/>

_Search modal working on kb preview_

## 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)
2026-10-22 17:30:49 +02:00
Ali WaseemandJeremias Menichelli 20e304a377 feat(kb): add search ingestion and edge function (#51843)
## Problem

We need embeddings for Kb to run a search endpoint in the Content API
and future KB search.

## Solution

This PR adds KB search backed by its own Supabase table, ingested from
the KB markdown export, and aligns the KB and docs search ingest setups.

<!--
## 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.

-->

## Test

1. Run the **KB Search Ingest** workflow, or locally run `pnpm --filter
kb search:ingest` with `SUPABASE_URL` and `SUPABASE_SERVICE_ROLE_KEY`
set in `apps/kb/.env.local`.
2. Query the endpoint and check that the results link to
`https://supabase.com/kb/troubleshooting/...`:
   ```
   curl '<kb-url>/kb/api/search?q=connect%20timeout&limit=5'
   ```

## Checklist

Check all before review:

- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [x] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs
[style
guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)

---------

Co-authored-by: Jeremias Menichelli <jmenichelli@gmail.com>
2026-10-21 11:24:52 +02:00