Commit Graph
10 Commits
Author SHA1 Message Date
Kody JacksonandClaude Sonnet 5.5 86bd9294fa chore(kb) - update readme + agents.md (#53328)
Updates README for human contributors + Agents.md to mention community
content.

Will likely expand further over time.

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-17 12:38:06 -06:00
Ivan VasilovandClaude Sonnet 5.5 2ac3b77594 chore: replace pnpm hooks and chains with turbo task dependencies in the remaining apps (#53169)
## Problem

`ui-library`, `design-system`, `learn`, `kb`, `www` and `studio` still
order their build, dev and typecheck steps with pnpm `pre`/`post` hooks,
`&&` chains and `run-p`. Turbo can't see those steps, so it can't cache
or parallelize them. Follow-up to #52556, which migrated `apps/docs`.
Part of
[FE-4977](https://linear.app/supabase/issue/FE-4977/migrate-remaining-apps-pnpm-scripts-to-turbo-tasks).

## Solution

The ordering now lives in each app's `turbo.jsonc` as `dependsOn`, the
hooks and chains are gone, and scripts with same-package prerequisites
are wrapped with `maybe-turbo`. `node
.agents/skills/turbo-scripts/scripts/audit.mjs apps/<name>` reports no
findings for any of the six apps.

- **`ui-library`, `design-system`, `learn`:** content, registry and
markdown steps are turbo tasks with declared outputs. `dev:content` uses
the `with` key. `build:next` and `dev:next` are folded into `build` and
`dev`. `ui-library`'s markdown task now depends on `build:registry`,
which the old chain hid. `pnpm --filter library build:registry` still
regenerates the committed registry output.
- **`kb`:** `fetch:federated-content` is uncached, and the tasks that
read its output use `jit` inputs.
- **`www`:**
- `build` depends on `docs#build:guides-markdown`, so federated content
is fetched once instead of twice.
  - `build:next` is folded into `build`.
  - `typecheck` runs `next typegen` itself.
- `turbo-build.test.ts` is updated for the new task graph. It reads
`PATH` through a copy of the env, because `turbo/no-undeclared-env-vars`
flags it once the `passThroughEnv: ["*"]` wildcard is gone.
- `passThroughEnv: ["*"]` is gone, and the env vars the content scripts
read are declared.
- **`studio`:** `typecheck` runs `next typegen` inline, and `lint`
depends on a new `lint:type-checks` task. The `predev` turbopack cache
clean moved into `scripts/dispatch.js`. It's a local side effect, and
making it a turbo task would route `dev` through turbo's strict env
filtering, which drops `NODE_ENV`, `MODE` and `STUDIO_FRAMEWORK`.

## Review instructions

- For each app, check that a second `pnpm build` hits the cache. `www`'s
fetch and content tasks re-run by design, since they're uncached.
- Not verified: the `www` and `studio` dev servers started from the repo
root, a Studio production build, the e2e flow, and runs with real
production credentials.
- `kb`'s build reads a remote database that turbo can't hash. It stays
cached, keyed on `SUPABASE_URL`. Say if you'd rather make it uncached.
- Builds rewrite two tracked files,
`apps/docs/public/markdown/manifest.json` and
`apps/www/public/customers-rss.xml`, so a fresh checkout can miss the
cache once.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 16:40:21 +01:00
Jeremias Menichelli 30833db87e chore: Refactor sync troubleshooting scripts after data reconciliation (#52713)
## Problem

We solved manually some `troubleshooting_entries` table missing data and
mismatches.

- **Rows without slugs.** Some `troubleshooting_entries` rows had no
slug, so no guide could match them and the guides looked "new".
- **Duplicate discussions.** A guide that didn't match its row got a
fresh GitHub discussion, leaving the original behind (sometimes with
extras).
- **Slug mismatch.** The fetch stripped the hash suffix from file names
while the table keeps it, so those guides never matched their rows.
- **Overlapping runs.** The workflow had no concurrency control, so two
runs could both create a discussion for the same guide, and `upsert`
silently overwrote the first run's row.
- **Missing checksums.** Rows without a checksum counted as "changed"
and were re-pushed to GitHub on every run.
- **Weak dry run.** `--dry-run` only printed slugs, so it was hard to
see what a run would actually do.
- **Fragile lookup and duplicated code.** Rows were fetched with every
slug in the URL (`.in('slug', …)`), and both scripts carried their own
copy of the guide reader and checksum.

## Solution

After those steps we applied successfully to the database, we revamp our
existing sync scripts to allow dry runs to make sure the changes we
apply are going to generate the correct impact.

A new improvement to prevent bulk discussion errors on GitHub API.

<!--
## 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
_Sadly, we need to merge, and pray..._

## 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-04 10:24:19 +01:00
Kody JacksonandClaude Haiku 5.5 17c2985e16 fix(kb) - include faqs in sitemap.md (#52559)
## Problem

2 gaps:
- Missing FAQs in the sitemap.md
- Experiment to redirect requests to the homepage to sitemap.md

## Preview links

### FAQ addition

Now includes faqs in
https://kb-git-kody-devrel-813-sitemapmd-tweaks-supabase.vercel.app/kb/markdown/sitemap.md
<img width="1338" height="669" alt="image"
src="https://github.com/user-attachments/assets/fb5174f7-23f4-4187-8fed-1fb7ca9fa216"
/>

### markdown behavior

```
curl "https://kb-git-kody-devrel-813-sitemapmd-tweaks-supabase.vercel.app/kb" \
-H "Accept: text/markdown"
```

```
# Supabase Knowledge Base

In-depth guides, tutorials, troubleshooting, and explainers for best practices for Supabase

## Topics

- [Migration](https://supabase.com/kb/topics/migration.md)
- [Comparison](https://supabase.com/kb/topics/comparison.md)
- [Rundowns](https://supabase.com/kb/topics/rundowns.md)
- [Troubleshooting](https://supabase.com/kb/topics/troubleshooting.md)
- [Tutorials](https://supabase.com/kb/topics/tutorials.md)
- [Storage](https://supabase.com/kb/topics/storage.md)
- [Auth](https://supabase.com/kb/topics/auth.md)
- [Database](https://supabase.com/kb/topics/database.md)
- [Edge Functions](https://supabase.com/kb/topics/edge-functions.md)
- [Queues](https://supabase.com/kb/topics/queues.md)
....
```

---------

Co-authored-by: Claude Haiku 5.5 <noreply@anthropic.com>
2026-10-30 12:12:16 -05:00
Jeremias Menichelli 497cbecfd3 feat: Generate sitemap.md file in kb, fix markdown slug reconciliation, update llms file (#52076)
## Problem

We need a general entry level file for kb discovery for agents.

## Solution

- Generate a sitemap.md file with all relevant links listed within the
project
- Set redirects so supabase.com/kb/sitemap.md and supabase.com/kb.md
lead to that file
 - Add link to the file in the llms.txt file
 - Fix some slug reconciliation issues within troubleshooting suffixes
 - Move scripts to .ts to follow architectural conventions
 
<!--
## 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. Make sure troubleshooting markdown files work correctly, go to the
preview site of kb in this PR, open a troubleshooting guide with a
suffix, add .md at the end, it should return markdown version of the
page
2. Go to the preview site of kb in this PR, add /sitemap.md, a markdown
file with a list of all topics, guides and troubleshooting articles
should appear

(sadly www redirects cannot be tested on preview environments)

## 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-21 15:40:37 +02:00
Kody JacksonandClaude Haiku 5.5 ebfe057c9a feat(kb) - add in content negotiation support (#51801)
## Problem

KB doesn't currently support content negotiation via `-H "Accept:
text/markdown`, which helps agents dramatically cut down on the tokens
they use.

## Solution

Adds in Vercel rewrites + headers to support this functionality.

## Output

### Live

[Live](https://supabase.com/kb/guides/sample-guide)

```
curl "https://supabase.com/kb/guides/sample-guide" \
-H "Accept: text/markdown"
```
```
<!DOCTYPE html><html lang="en" data-astro-cid-ju4pidww><head><meta charset="utf-8"><meta name="viewport" content="width=device-width"><meta name="robots" content="noindex, nofollow"><meta name="description" content="A lorem ipsum sample guide exercising every base Markdown element supported by the guide layout."><script>
			// Set data-theme on <html> before first paint, so the page doesn't flash
			// the wrong theme while this loads. Defaults to dark (no system-preference
			// check — the toggle in components/ThemeToggle.tsx is light/dark only).
			;(function () {
				try {

```

### Preview


[Preview](https://kb-git-kody-devrel-718-content-negotiation-supabase.vercel.app/kb/guides/sample-guide)

```
curl "https://kb-git-kody-devrel-718-content-negotiation-supabase.vercel.app/kb/guides/sample-guide" \
-H "Accept: text/markdown"
```

```
# Markdown elements sample

A lorem ipsum sample guide exercising every base Markdown element supported by the guide layout.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
```

---------

Co-authored-by: Claude Haiku 5.5 <noreply@anthropic.com>
2026-10-15 12:43:48 -05:00
Jeremias Menichelli 05396e3378 [DOCS-1422] feat: create GitHub workflow or script to fetch troubleshooting (#51365)
## Problem

Currently troubleshooting guides merged in a private repository trigger
an action to open a PR against our Docs project.

From now on, we want the `kb` to host the troubleshooting guides and
take care of all the Github discussion process while improving some of
its parts.

## Solution

With this PR now:
- All files and scripts related to handling the actions and processes
for handling troubleshooting entries and GitHub Discussion creation on
Docs are deleted.
- A new workflow to sync troubleshooting guides with Supabase's
`troubleshooting_entries` table was created with some improvements.
- Now troubleshooting entries are fetched at pre-build in `kb` project
directory.
- When troubleshooting guides are created a new script detects this,
creates the GitHub discussion for it, extracts the URL, and pushes the
row to a db table at `push`.
- When troubleshooting guides are updated, a checksum holding its title
and body is compared, and the GitHub discussion content gets updated.
 
_Note: all troubleshooting content hasn't been migrated for **kb**, so
content not ready is filtered and not placed in the directory. This
allow us to progressively migrate all pages without breaking the build._

<!--
## 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 the database workflow, sadly, we will have to wait and monitor, but
the fetching mechanism can be tested.

1. Go to the preview link for `kb`
2. Go to Topics > Troubleshooting
3. A new guide should be visible "Partial migrations and schema
inconsistencies from embedded transactions", click on its link
4. A page showing the guide's content should render

<img width="1022" height="810" alt="Screenshot 2026-10-07 at 13 19 17"
src="https://github.com/user-attachments/assets/cbd25a60-8721-4329-907f-f92de894c217"
/>



## 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-13 14:30:58 -03:00
Kody Jackson 895f016a54 fix(kb): hide LLM-focused topics from homepage and nav listing (#51139)
## Problem

Within the KB, we'll be adding a specific type of content primarily
aimed at LLM crawlers (similar in scope to https://vercel.com/i /
https://www.runpod.io/articles / https://www.braintrust.dev/articles).

These topics don't need as much visibility for human end users of the
site, especially within a) the site navigation and b) the KB homepage.

## Solution

To allow some topics to be less emphasized, this PR adds in a new
`visible` field to elements of the `TOPICS` array and then uses that
field to filter out entries from the homepage (pinned topics, all
topics) and the navigation (Nav.tsx).

This is a more minimal approach than #51099, which was attempting to
create a different folder / schema / layout for these entries.

## Preview links

https://kb-git-kb-comparsion-topic-supabase.vercel.app/kb, which
excludes `Comparison` from the top nav and the `All topics` section.


https://kb-git-kb-comparsion-topic-supabase.vercel.app/kb/topics/comparison,
which still renders pages tagged with `Comparison`.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Updates**
* The Comparison topic no longer appears in the main navigation or
homepage topic sections, including pinned topics. Its listing page
remains available.
* Other topics continue to appear in navigation and homepage sections,
with their labels and links unchanged.
* Homepage pinned topics are selected from the topics shown in the
homepage sections.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-10-02 08:36:18 -05:00
Jeremias Menichelli fd863ee15d feat(kb): Expose markdown alternatives for articles and topics pages (#50135) 2026-09-10 12:04:42 +00:00
Jeremias Menichelli 143f141e0f feat: initial kb scaffolding (#49601) 2026-08-31 14:55:04 +00:00