mirror of
https://github.com/supabase/supabase.git
synced 2026-12-03 23:18:57 +00:00
docs/tutorial-template
396
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
cf63aa5459 |
ci(docs): trace docs workflow failures to the commits that introduced them (#54444)
## Problem Since #54339, the docs alert in `docs-master-alert.yml` names only the workflow, the run type, and the run link. That stopped it from blaming whoever merged last, but nothing says which change broke things. A failure needs to trace back to the commit that introduced it, for push, scheduled, and manual runs alike. Nobody needs to be pinged. ## Solution Each docs workflow that runs on `master` keeps a list of open failures. The alert posts to Slack only when a failure is added or fixed. Each new failure names the commit that introduced it, or lists the possible commits as unconfirmed. It never names the latest commit by default. - **What counts as a failure.** - Accessibility scan: a page and axe rule pair, from a new Playwright reporter (`e2e/docs/utils/a11y-failures-reporter.ts`). A guide that returns a status of 400 or higher fails as `<page>: http-<status>`. - Production smoke tests: one Vitest test, keyed as `<file> › <test>`, from Vitest's JSON reporter. A run where no test passed and some timed out counts as one failure, `every test timed out`. - Every other workflow: a failed job or step, from the Actions API. - Both test workflows upload their results as a `docs-failures-<attempt>` artifact for the alert to read, so a re-run never picks up an earlier attempt's results. - A Vitest file that fails to load, such as an import error, counts as one failure for that file, and its tests keep their earlier results. - **Which commit.** - Accessibility scan: the commits deployed to production since the last run, narrowed to the ones that touched the failing page's MDX file or a partial it includes. - Smoke tests: the deployed commits, not narrowed further. - Push runs: the run's own commit, plus the commits of every earlier run since the baseline whose alert didn't run, such as one that was cancelled or dropped. A run among them that passed still counts, since it may have skipped the failing step. - Other scheduled or manual runs: the commits since the last run without that failure. - One commit left is named. Several, or none on the failing page, are listed as unconfirmed. - **Deployed commits.** One GraphQL query reads the `Vercel – docs` status on recent `master` commits. A commit counts as deployed once its build finished before the run ended, so the range includes a commit that deploys partway through a scan. Builds Vercel skipped as not affected count too, because they leave the docs unchanged. The `Production – docs` GitHub deployments stopped updating, so they can't be used. No new secrets. - **Flaky results.** A page or smoke test that times out keeps its earlier result, so it doesn't count as a new failure or a fix. The same goes for a page whose scan is missing, empty, or skipped, for a skipped smoke test, and for a job or step that neither passed nor failed, such as one skipped after a failed step, cancelled, or with no conclusion. A job that timed out counts as failed. A step keeps its result when its whole job was skipped or failed without listing its steps, or when a passing run's condition skipped it. A guide that returns an error status keeps its earlier axe failures until a scan runs, and a new status replaces the earlier one. A step skipped in one run and then under a skipped job in the next keeps the baseline from the run that last ran it. When one of these later fails, its range starts at the last run that actually checked it. If no run has checked it since tracking started, the alert names no commit. - **Saving the list.** The list is saved as a run artifact for each workflow, kept for 90 days. The next alert downloads it. A failure that's still open keeps the commit from when it first failed. The alert only accepts a saved list from a `master` run in this repo, and ignores one without the expected shape and version. - **Pure logic and orchestration.** `e2e/docs/utils/open-failures.ts` holds the logic and the Slack message, with unit tests. `e2e/docs/scripts/docs-alert.ts` handles the API calls and posting. `pageSourceFiles` in `resolve-docs-scope.ts` lists a guide's MDX file and every partial it includes. `failure-sequences.test.ts` runs every sequence of four runs, for a job's steps, a smoke test file's tests, and a guide's status and scan, plus sequences that start with no saved list. It checks the open list and each new failure's baseline against a model of what each run observed. The axe rules and result checks the reporter needs moved to `utils/axe-rules.ts`, so the unit tests still run before CI installs packages. ### Behavior changes to review 1. **The alert also runs on passing runs.** It needs them to clear fixed failures, and it posts only when the list changes. A workflow that keeps failing no longer posts on every run. 2. **Smoke tests aren't narrowed to a page.** They test API routes, not guides, so the alert lists every deployed commit since the last passing run. 3. **First run.** With no saved list, the alert compares against the previous run if that run passed. The jobs and steps that run skipped count as never checked. Otherwise, current failures show as "already failing when tracking started", with no commit. 4. **Fewer workflows trigger the alert.** Docs Navigation Checks, Docs removed anchors, and Docs Tests run only on `pull_request`, so they never matched `branches: [master]`. They're removed from the trigger list. 5. **Runs from forks are ignored.** The `branches: [master]` filter also matches a fork branch named `master`, and the alert now reads artifacts from the run that triggered it. For the same reason, a saved list that a fork or another branch uploaded is never used. 6. **Missing results.** If the scan or smoke tests have no readable results, the list stays as it was. A scan whose spec fails to load and a smoke run with no test files count as no results too. When the run failed, the alert posts a plain "failed before it reported any results" message. ## Limitations - With no saved list, the scan and smoke tests count everything the previous passing run skipped as checked, because the alert doesn't read that run's results. - Failures are matched by name, so a renamed job, step, or test, or a moved smoke test file, looks like one fixed failure and one new failure. - An incoming webhook can't edit an earlier message, so each change to the list is a new post. - The compare API returns at most 250 commits per page, oldest first. A longer range fetches its last two pages, so the alert lists the newest commits and the full count. - GitHub keeps only one pending run per concurrency group. If three runs of the same workflow finish at once, the middle alert is dropped, and the next one covers its commits. ## Review instructions 1. Run `pnpm -C e2e/docs test` and confirm all 55 tests pass. 2. Run the scan with the new reporter on a real guide and one that doesn't exist: ```bash cd e2e/docs && CI=1 DOCS_A11Y_FAILURES_FILE=/tmp/a11y.json PLAYWRIGHT_BASE_URL=https://supabase.com \ DOCS_E2E_PAGE_PATHS=/docs/guides/resources,/docs/guides/not-a-real-guide pnpm exec playwright test --grep @a11y cat /tmp/a11y.json ``` Expect one failure, `/docs/guides/not-a-real-guide: http-404`, with that guide also listed as unchecked, so its axe rules keep their earlier results. 3. Dry-run the alert against a real smoke test run, with a fake failure. `DRY_RUN` prints the Slack payload instead of posting it: ```bash mkdir -p /tmp/alert/results gh api repos/supabase/supabase/actions/runs/46574787371 \ | jq '{workflow_run: (. + {conclusion: "failure", path: ".github/workflows/docs-a11y-scan.yml", name: "Docs Accessibility Scan"})}' > /tmp/alert/event.json echo '{"failures":[{"key":"/docs/guides/database/custom-postgres-config: heading-order","page":"/docs/guides/database/custom-postgres-config"}],"unchecked":[]}' > /tmp/alert/results/a11y-failures.json GITHUB_TOKEN=$(gh auth token) GITHUB_REPOSITORY=supabase/supabase DRY_RUN=1 \ GITHUB_EVENT_PATH=/tmp/alert/event.json STATE_OUT=/tmp/alert/state.json RESULTS_DIR=/tmp/alert/results \ node e2e/docs/scripts/docs-alert.ts ``` Expect the failure to be `introduced by 450939c`, the only deployed commit in that range that touched the page. 4. Run step 3 again with `STATE_IN=/tmp/alert/state.json` and no other change. Expect no output, because the list didn't change. Verified locally: - Unit tests, typecheck, oxfmt, and actionlint on the changed workflows. The unit tests also pass in a copy of the repo with no installed packages, as CI runs them. - Mutation probes on the rules for unchecked pages, the push range, the unchecked baseline, Vitest files that fail to load, the saved-list check, deploy narrowing, skipped steps, smoke runs where every test timed out, the compare total, guides that return an error status, a guide whose error status changes, steps under a skipped job, and step baselines across skipped jobs. The sequence test alone catches all 14 unchecked-state bugs found in review when each is put back. - The reporter against production, including a guide that returns 404. - Dry runs against real runs: both workflows that test production, a failed push run, and a failed scheduled run. These covered a step whose range starts at the last run that ran it, a compare range of 400 commits, a new failure, a second failure added while the first stayed open, an unchanged list, every failure fixed, a crash before results, missing results, an older run, a saved list in the wrong shape, a passing run whose condition skipped a step with a saved failure, a push range that spans three pages of runs, and a first run with no saved list after a run that skipped a step. - The saved-list filter on real artifact data. Not run live: - The push and scheduled paths for the other workflows, because none had a recent failed run to test against. - The alert workflow itself. A `workflow_run` workflow only runs from `master`, so the first real alert comes after merge. Resolves [DOCS-1831](https://linear.app/supabase/issue/DOCS-1831/trace-docs-workflow-failures-to-the-commits-that-introduced-them) ## Checklist - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) |
||
|
|
0c97b9789b |
[FE-3107] chore(studio): remove remaining Next.js references (#54426)
Removes the remaining Next.js dependencies, compatibility shims, test
mocks, ESLint/TypeScript presets, and webpack/Next workarounds from
Studio following the TanStack Start migration.
Addresses FE-3107.
**Removed:**
- `next` and `next-router-mock` from `apps/studio/package.json` (and
updated `pnpm-lock.yaml`)
- Orphaned `apps/studio/compat/next/script.tsx` shim, `script.test.tsx`,
`compat/**` knip entry, and `nextCompat()` / `ssr.noExternal` `/^next/`
plumbing from `apps/studio/vite.config.ts`
- `apps/studio/tests/lib/route-mock.ts` and all `next-router-mock`
setup/imports across `tests/vitestSetup.ts`,
`tests/lib/custom-render.tsx`, and 12 test files
- `apps/studio/tests/pages/` directory (moved the 3 remaining tests to
`components/interfaces/Organization/Organization.utils.test.ts` and
`apps/studio/tests/routes/`)
- Unused `'use client'` directives across 23 Studio files
- Next.js/webpack workarounds: `graphiqlViteWorkers()` in
`vite.config.ts`, webpack `import.meta.glob` `try/catch` fallback in
`ConnectStepsSection.tsx`, shell `NODE_ENV=test` override in
`vite.config.ts` / root `package.json` / `studio-e2e-test.yml`, Next
`getPathMatch` and `_next` passthrough in `redirects.shared.*`,
`window.next?.router` check in `monaco-graphiql-coexistence.spec.ts`,
and unused `ANALYZE` env var in `apps/studio/turbo.jsonc`
- Next-only Sentry/chunk-load filters (`NEXT_NOT_FOUND`,
`NEXT_REDIRECT`, Next `/org/[slug]/` regex, `/app:\/\//`, dead
`includeThirdPartyErrorFilter` plumbing, webpack chunk error regex) and
stale Next/Pages Router comments, docs, and `#__next` CSS selector
**Changed:**
- `apps/studio/eslint.config.cjs`: switched from
`eslint-config-supabase/next` to the new `eslint-config-supabase/react`
preset (dropping `@next/next/no-img-element: off`, keeping `.next` /
`next-env.d.ts` ignored for local checkouts with stale pre-migration
build artifacts)
- `apps/studio/tsconfig.json`: extends `tsconfig/base.json` directly
instead of `tsconfig/nextjs.json` (identical resolved compiler options)
- `apps/studio/.github/eslint-rule-baselines.json`: pruned 33 stale
`pages/...` and `types/next.ts` entries without changing any rule
thresholds
- `apps/studio/tests/lib/custom-render.tsx`: backed
`TestFrameworkProvider` with TanStack Router instead of
`next-router-mock`
-
`apps/studio/components/interfaces/Integrations/GraphQL/GraphiQLTab.tsx`:
imports `graphiql/setup-workers/vite` directly
- `apps/studio/styles/globals.css`: replaced `@source
'../pages/**/*.{js,ts,jsx,tsx}'` with `@source
'../routes/**/*.{js,ts,jsx,tsx}'`
- `apps/studio/turbo.jsonc`: declared `"NEXT_PUBLIC_*"` in
`tasks.build.env` now that Turborepo infers `nitro` instead of `nextjs`
-
`apps/studio/components/interfaces/Organization/Organization.utils.ts`:
narrowed `buildOrgUrl`'s `slug` parameter to `string[] | undefined`
**Added:**
- `packages/eslint-config-supabase/shared.js` and
`packages/eslint-config-supabase/react.js` (plus `presets.test.ts`),
decoupling non-Next React apps from `eslint-config-next` with verified
zero non-`@next/*` rule drift while keeping
`eslint-config-supabase/next` unchanged for the Next.js apps
## To test
- Run `pnpm --filter eslint-config-supabase run test` and confirm preset
parity tests pass
- Run `pnpm --filter studio run lint`, `pnpm --filter studio run
lint:ratchet`, `pnpm --filter studio run typecheck`, `pnpm knip
--workspace apps/studio`, and `pnpm --filter studio run test`
- Run `pnpm --filter studio run build` and verify the production build,
prerendered routes, chunk-cycle check, and GraphiQL web workers succeed
- Smoke-test Studio locally (`pnpm dev:studio`): verify GraphiQL loads
cleanly, ConnectSheet framework steps render, and Tailwind styles on
route pages are intact
---------
Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
|
||
|
|
c1330ca99f |
ci(docs): scan every docs guide for accessibility issues daily (#54339)
## Problem Since #53899, Docs E2E skips the accessibility scan on every CI run, because the scan is slow and only covers the pages a diff names. Nothing checks docs accessibility automatically, and a change to a shared component can break pages that no pull request lists. ## Solution A new **Docs Accessibility Scan** workflow scans every MDX guide on production once a day. - `.github/workflows/docs-a11y-scan.yml` runs `pnpm e2e:docs:all --grep @a11y` against `https://supabase.com` at 05:17 UTC, off the top of the hour when GitHub can delay or drop scheduled runs, and on demand through `workflow_dispatch`. Its concurrency group includes the ref, so a manual run on a branch can't cancel the scheduled run on `master`. It uploads the Playwright report when the scan fails. - `docs-master-alert.yml` now watches the new workflow, so a failed run posts to the docs alerts Slack channel the same way the Production Smoke Tests do. - The shared alert no longer names the latest `master` commit and its author. That commit often didn't cause the failure: a scheduled or manual run tests whatever is deployed, and a workflow that was already failing keeps failing on later commits. The alert now names the workflow, says whether a push, schedule, or manual run failed, and links the run. This applies to every workflow the alert watches. - The scope resolver skips guides that `static-redirects.json` sends elsewhere, in both the pull request scope and the full run. A redirected guide has no docs article to scan, so it could never pass. Today that's only `getting-started/features`. Docs E2E's sparse checkout now includes `apps/docs/lib/redirects` so the resolver can read the file. One helper lists every guide with no docs article to test (nav-disabled and redirected), and both resolvers use it. - The README says where and when the scans run, which checks fail the scan, and how to start one by hand. It also lists guides with no MDX file, such as the CLI and self-hosting config pages, as a known limitation: the full run only resolves MDX guides, so the scan skips them. The full run doesn't need sharding. A list over 20 pages already runs on 3 workers, and the whole site took 15.3 minutes against production, inside the job's 45-minute timeout. ## Known failures A full run against production on 2026-11-30 failed on 5 guides with real accessibility issues: 4 `duplicate-id` and 1 `heading-order`. Until [DOCS-1817](https://linear.app/supabase/issue/DOCS-1817/fix-the-accessibility-issues-the-daily-docs-scan-finds-on-5-guides) fixes them, each daily run fails and posts an alert. ## Follow-ups - [DOCS-1831](https://linear.app/supabase/issue/DOCS-1831/trace-each-docs-accessibility-scan-failure-to-the-commit-that): keep a list of open failures in every docs alert, each with the commit that introduced it, or its possible commits marked unconfirmed. ## Review instructions 1. Run `pnpm -C e2e/docs test` and confirm all 15 tests pass, including the two redirect tests. 2. Confirm a change to a redirected guide resolves to no pages: ```bash printf 'apps/docs/content/guides/getting-started/features.mdx\n' | pnpm -C e2e/docs resolve-docs-scope ``` Expect `skip=true`. 3. Run the scan the way the workflow does, on one passing guide and one guide from DOCS-1817: ```bash cd e2e/docs && PLAYWRIGHT_BASE_URL=https://supabase.com DOCS_E2E_PAGE_PATHS=/docs/guides/auth,/docs/guides/resources pnpm exec playwright test --grep @a11y ``` Expect `/docs/guides/auth` to pass and `/docs/guides/resources` to fail on `heading-order`. 4. Check the alert payload. Copy the `run` script from `docs-master-alert.yml`, replace the `curl` call with `echo "$PAYLOAD"`, and run it with `TRIGGER` set to `push`, then `schedule`. Expect no commit or author in either, and the run type in the workflow line. 5. After merge, start the workflow with `gh workflow run docs-a11y-scan.yml` and confirm it finishes in about 15 to 20 minutes. Verified locally: unit tests, mutation probes on both redirect tests, typecheck, actionlint on the changed workflows, the alert payload for push, scheduled, and manual runs, the resolver on a sparse checkout like the workflow's, and a full-site scan against production. A scheduled workflow only runs from `master`, so the workflow itself hasn't run on GitHub yet. Resolves [DOCS-1816](https://linear.app/supabase/issue/DOCS-1816/run-the-docs-e2e-accessibility-scan-on-a-schedule-across-the-whole) Resolves [DOCS-1826](https://linear.app/supabase/issue/DOCS-1826/word-docs-slack-alerts-for-scheduled-workflow-failures-without-blaming) ## Checklist - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) |
||
|
|
a310db593b |
[FE-5262] ci: run UI Tests on PRs into release (#54440)
The `release` ruleset requires the `test (1)` check, but `ui-tests.yml` only triggers on PRs into `master`, so every PR into `release` stays blocked waiting for a check that never reports (e.g. #54438). Adds `release` to the `pull_request` branch filter in `ui-tests.yml`. Follow-up to #54416, which did the same for typecheck, format and Docs E2E. This was the last required check missing on `release`. Resolves FE-5262 |
||
|
|
ba86e23d63 |
fix: restore Studio Braintrust evals in CI (#54345)
## Problem Our workflow sets `package_manager: pnpm`, which tells the Braintrust action to run `pnpm dlx braintrust eval`. That command fetches the latest `braintrust` package. Braintrust 4.0 dropped the bundled CLI, and the [eval job now fails with `ERR_PNPM_DLX_NO_BIN`](https://github.com/supabase/supabase/actions/runs/46545460526). ## Solution ```diff - package_manager: pnpm + package_manager: npm ``` The new setting launches the CLI from Studio’s frozen pnpm install. [Action source](https://github.com/braintrustdata/eval-action/blob/c0dd75b29984a0cc63a827d6e8da2f23f2752be4/eval/src/braintrust.ts#L78-L116) The action’s latest release, v2.1.0, still hardcodes `pnpm dlx braintrust` in pnpm mode. The `npm` setting is a workaround to restore CI now. We’ve asked Braintrust whether pnpm mode can use the project’s installed CLI. [v2.1.0 source](https://github.com/braintrustdata/eval-action/blob/ed007eb24e933007a4079bd56643bc72d3cb016f/eval/src/braintrust.ts#L147-L154) ## Review instructions The [PR workflow](https://github.com/supabase/supabase/actions/runs/46563640999) passed and posted the [Assistant eval summary](https://github.com/supabase/supabase/pull/54345#issuecomment-7299032048). Locally, `npx` also found the Assistant eval using Studio’s installed CLI with npm offline. |
||
|
|
d57ff4ea06 |
ci: run typecheck, format and Docs E2E on PRs into release (#54416)
The `release` ruleset requires `typecheck`, `format` and `Docs E2E`, but those workflows only trigger on PRs into `master`, so every PR into `release` sits blocked waiting for checks that never report (e.g. #54413). Adds `release` to the `pull_request` branch filter in `typecheck.yml`, `prettier.yml` and `docs-e2e.yml`. |
||
|
|
a5638ed9e2 |
fix(docs): check every changed page for broken links in Docs E2E (#53899)
## Problem The Docs E2E suite tests the guide pages a PR changes, but only the first 20 in sorted order. It drops the rest without a warning, so the check passes green with pages untested. That let a broken link through in #53561. The PR changed 62 guides, `delete-project` ranked 23rd, and the suite never loaded it. The link was missing its leading slash and resolved to a nested URL that returns 404 (fixed in #53871). A check that skips pages arbitrarily can't be relied on to catch the mistake it exists to catch. ## Solution The link check now runs on every changed page, with no cap. The accessibility scan no longer runs on pull requests, because it's slow and only checks the pages a diff names. A scheduled whole-site run fits it better, and that's tracked in [DOCS-1816](https://linear.app/supabase/issue/DOCS-1816/run-the-docs-e2e-accessibility-scan-on-a-schedule-across-the-whole). The `@a11y` tests stay in the suite, and `pnpm e2e:docs:a11y` still runs them. - The resolver returns every in-scope page. The 20-page cap is gone. - The workflow runs the suite with `--grep-invert @a11y`, so CI runs skip the accessibility scans. That includes manual `workflow_dispatch` runs, which ran them before. DOCS-1816 covers when CI runs them again. - Past 20 pages the suite runs on 3 workers instead of 1, the same as the Studio suite. - The suite no longer stops after 3 failed tests, so a run reports every page with a broken link. A broken link in a shared partial can fail many pages, and stopping at 3 left the rest unchecked. - The Docs E2E job now runs the harness unit tests (`pnpm -C e2e/docs test`) when `e2e/docs` or `e2e/shared` changes. No workflow ran them before, and harness-only changes skip Playwright. ## Run time Most PRs change few pages, so the added time is small. I looked at 51 recent merged PRs that touched guides: 67% changed 1 page, 20% changed 2-5, 8% changed 7-11, and 6% (3 PRs) changed 62-82. On the Vercel preview the link test takes about 6.5s per page. Estimated run time on the preview, excluding setup and retries. Skipping the accessibility scan (about 6.4s per page) offsets the extra link checks: | Pages changed | Before (capped at 20, link check and accessibility scan, 1 worker) | This PR (every page, link check only, 3 workers past 20) | | ------------- | ------------------------------------------------------------------ | -------------------------------------------------------- | | 1 | ~13s | ~7s | | 5 | ~1.1 min | ~0.5 min | | 11 | ~2.4 min | ~1.2 min | | 82 | ~4.3 min (62 pages unchecked) | ~3 min | On production, 40 link tests took 50s on one worker and 13s on four, so workers scale close to linearly. I haven't run a large page list in the CI workflow, and the Vercel preview might throttle 3 workers at once. If it does, lower the worker count in `playwright.config.ts`. CI retries a failing test up to 2 times, so a failing page can cost 3 runs. Since the suite no longer stops after 3 failures, a change that breaks many pages pays that cost for each of them. The job times out at 30 minutes, which the link check alone would reach at roughly 800 pages on 3 workers. ## Review instructions 1. Run `pnpm -C e2e/docs test` and confirm the scope tests pass, including the 82-page case. 2. Pipe 82 changed guide paths into the scope CLI and confirm `paths` lists all 82: ```bash printf 'apps/docs/content/guides/ai/%s.mdx\n' {1..82} | pnpm -C e2e/docs resolve-docs-scope ``` 3. List the tests the workflow runs for 3 pages and confirm there are 4 (1 guard, 3 link) and none for accessibility: ```bash cd e2e/docs && PLAYWRIGHT_BASE_URL=https://supabase.com DOCS_E2E_PAGE_PATHS=/docs/guides/auth,/docs/guides/database/overview,/docs/guides/storage pnpm exec playwright test --grep-invert @a11y --list ``` 4. Run the link test on 4 pages that don't exist and confirm all 4 fail, rather than the run stopping after 3: ```bash cd e2e/docs && PLAYWRIGHT_BASE_URL=https://supabase.com DOCS_E2E_PAGE_PATHS=/docs/guides/zz-nope-1,/docs/guides/zz-nope-2,/docs/guides/zz-nope-3,/docs/guides/zz-nope-4 pnpm exec playwright test --grep "loads and" ``` 5. Check that this PR's Docs E2E job runs the "Run docs E2E harness unit tests" step and that it passes. Verified locally: unit tests, the scope CLI with 82 paths, the test list above through the same `pnpm run e2e:docs --grep-invert @a11y` command the workflow uses, and the 4-failure run. Resolves [DOCS-1749](https://linear.app/supabase/issue/DOCS-1749/warn-instead-of-silently-skipping-pages-in-docs-e2e-when-a-pr-exceeds) ## Checklist - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
132f6b6d08 |
test: Add minimal tests for redirects on apps/docs (#54071)
## Problem We were lacking on redirect rules on apps/docs ## Solution Added basic unit test for: - Infinite redirects - Redirect chains - Missing redirects - Invalid sources or destinations <!-- ## 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 _Unit tests for redirects should run as part of our CI in PRs, including this one._ ## 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) |
||
|
|
fe8e912993 |
refactor(www): split redirects into static and dynamic files and add redirect checks (#54194)
## Problem `apps/www/lib/redirects.js` was a single file with static and dynamic rules mixed together, and the redirects had no automated checks. `/docs` redirects already moved to `apps/docs/lib/redirects/`, so www was the odd one out. ## Solution I applied the docs layout to www without changing how redirects are served: - `apps/www/lib/redirects/static-redirects.json`: 220 one-to-one entries, including fixed redirects to external `https://` URLs. - `apps/www/lib/redirects/dynamic-redirects.js`: 14 entries with params, splats, regex, escapes, or `has`. - `apps/www/lib/redirects/index.js`: combines both (static first) for `next.config.mjs` and `scripts/generateMdContent.mjs`. - `apps/www/lib/redirects/redirects.test.ts`: checks for loops, chains, duplicate sources, invalid sources and destinations (anchors, missing `/` or `https://`), dynamic entries in the static file, and internal destinations that do not exist. - README for the folder, plus updates to `apps/www/README.md`, `DEVELOPERS.md`, `CODEOWNERS`, and the `www-tests` path filter and sparse checkout. Bulk redirects are not part of this PR: www has 234 redirects, well under the route limit, so they stay in `next.config.mjs`. ### Missing-destination check Internal destinations are checked against the same sources the site serves from: - `app/` and `pages/` routes, and `public/` files. - Blog, customer, event, and alternative slugs, derived the way `lib/posts.tsx` derives them. Events with `disable_page_build` do not count. - Feature and `/go` page slugs. - `.md` destinations must be a page that `generateMdContent.mjs` publishes. An existing HTML page is not enough. - `/docs/guides` destinations, against the docs content and guide routes. Other zones and build-generated files are not checked. A destination with params is probed with one sample value, so value-specific loops or chains are not caught. The README lists these limits. ### Behavior notes - The rule set matches `master`, with one exception: `/blog/2021/07/30/1-the-supabase-hackathon` now points at the canonical slug `/blog/1-the-supabase-hackathon`. The old destination `/blog/the-supabase-hackathon` also resolves today, because the blog route matches posts by filename suffix. The check requires canonical slugs. - First-match results on `supabase.com` are identical on 241 probe paths. - Static entries now precede dynamic ones. On the `supabase.design` host, 25 static sources that used to sit after its catch-all rule now come before it. Those paths now take two hops to reach the design system instead of one. - Comments on static entries were dropped, because JSON has no comments. ## To test 1. Open the www preview and visit `/about`. It redirects to `/company`. 2. Visit `/buildersday`. It redirects to `/builderday`. 3. Visit `/sign-in`. It redirects to the dashboard sign-in page. 4. Visit `/blog/2021/07/30/1-the-supabase-hackathon`. It lands on the hackathon post. ## Linear - fixes GROWTH-1571 |
||
|
|
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>
|
||
|
|
a9d1e91bb6 |
chore: remove slack notification for ratchet baselines reaching 0 (#53855)
## Problem The weekly ESLint ratchet workflow posts a Slack message to #team-frontend when a rule's baseline drops to 0. That follow-up is no longer needed because this behavior is now built into Tedd. ## Solution Remove the Slack notification step from `.github/workflows/studio-lint-ratchet-decrease.yml`, along with the step outputs that only existed to feed it: - The `id: decrease-baselines` on the baseline update step. - The `changed` and `pr_url` outputs written to `$GITHUB_OUTPUT`, including the `changed=false` output in the no-op branch. - The "Notify #team-frontend about rules that hit a zero baseline" step, which computed zero-baseline rules from `apps/studio/.github/eslint-rule-baselines.json` and posted to `SLACK_DASHBOARD_WEBHOOK_URL`. The baseline update and PR creation/comment logic is unchanged. ## Review instructions 1. Confirm the workflow still runs the "Decrease ESLint ratchet baselines and open PR" step and that the no-change path still exits 0. 2. Confirm no remaining references to `steps.decrease-baselines` or `SLACK_DASHBOARD_WEBHOOK_URL` in this workflow. ## Checklist Check all before review: - [ ] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [ ] If I wrote a new docs topic or edited an existing topic, I used the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs [style guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide) |
||
|
|
0fdee0e487 |
feat(docs): post docs PRs to team-docs-alerts when ready for review (#53636)
## Problem Not every docs PR gets posted in #team-docs, so some never get noticed by the docs team. Tracked in [DOCS-1683](https://linear.app/supabase/issue/DOCS-1683), the first stage of the docs PR review workflow project. ## Solution A new workflow, `.github/workflows/docs-pr-alert.yml`, posts a one-line message to #team-docs-alerts whenever a PR that changes `apps/docs/**` becomes ready for review: | What happens | Posts? | | --- | --- | | Opened as a draft | No | | Draft marked ready for review | Yes | | Opened as ready (not a draft) | Yes, when it's opened | | Ready, then draft, then ready again | Yes, each time it's marked ready | The message links the PR title and says whether the PR is internal or external (from a fork): ``` #00000 Add RLS examples to the auth guide · External ``` Key choices: - **`pull_request_target`** so fork PRs can read the webhook secret. The workflow only reads the event payload: it never checks out or runs PR code, and has `permissions: {}`. It's added to the zizmor `dangerous-triggers` allowlist alongside `external-pr-comment.yml` and the other `pull_request_target` workflows. - **Path filter instead of the `documentation` label**, because the labeler adds the label in a separate run and it may not be there yet when this runs. - **Reuses the existing `SLACK_DOCS_WEBHOOK_URL` secret** from `docs-master-alert.yml` (#53366), which already posts to #team-docs-alerts. No new Slack app or secret is needed. The workflow still skips quietly if the secret is missing. ## Review instructions 1. Read `.github/workflows/docs-pr-alert.yml` and confirm it never checks out or executes PR code. 2. Confirm the `zizmor.yml` change only adds this workflow to the allowlist. Checked locally with actionlint, zizmor 1.26.1 (same config as CI), and Prettier. ## Checklist Check all before review: - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [ ] If I wrote a new docs topic or edited an existing topic, I used the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs [style guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide) 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
773b4f767c |
fix(common): skip the reduced-motion query when matchMedia is missing (#53613)
## Problem `Marketing site tests / build` fails on PRs that touch www, with `window.matchMedia is not a function` in `lib/sentry-capture.test.tsx`. `packages/common/helpers.ts` calls `window.matchMedia` when it is imported. jsdom does not implement it. #53294 made `common/consent-state` import `posthog-client`, which reaches `helpers.ts` through `telemetry-utils`. The www `sentry-browser` test project runs in jsdom without a `matchMedia` stub, so it now crashes on import. The break went unnoticed on `master` because the www workflow only runs on pull requests, and its path filter listed just two files in `packages/common`. This is the same problem several other places already work around: `consent-state.ts` duplicates `ensurePlatformSuffix` to avoid the import, and the `packages/common` and `kb` tests stub `window.matchMedia` before importing. ## Solution - Guard the call in `helpers.ts` with `typeof window.matchMedia === 'function'`, so `useReducedMotion` returns `false` where the API is missing. Browsers are unaffected. - Add `packages/common/helpers.test.ts`. It imports `helpers` and `consent-state` in jsdom without `matchMedia`, and checks that the query is still read where it exists. Both import tests fail on `master` with this error. - Run the Marketing site tests on changes to `packages/common/**/*.ts*` and its `package.json`, since www imports it widely. This part is independent of the fix and can be split out if you prefer. The `helpers.ts` change is identical to the one in #53589, so the two merge cleanly whichever lands first. This earlier attempt, #53596, was closed. Not changed: the per-test `matchMedia` stubs. They're harmless, and can be removed as a follow-up. ## Review instructions 1. From `packages/common`, run `pnpm exec vitest run helpers.test.ts` and check that all 3 tests pass. 2. Run `git checkout origin/master -- packages/common/helpers.ts` and run it again. Two tests should fail with `window.matchMedia is not a function`. Then run `git checkout HEAD -- packages/common/helpers.ts`. 3. Check that `Marketing site tests / build` passes on this PR and ran because of the `packages/common` path. ## 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 (not applicable) |
||
|
|
26d0aa5ec3 |
test: fix smoke tests by adding examples to sparse checkout (#53593)
## Problem Our docs smoke tests have been failing for months 😒 ## Solution Include examples directory on smoke tests to prevent them form failing. <!-- ## 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 _Pray for the CI gods_ ## 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) |
||
|
|
cf37022b6b | fix(self-hosted): sandbox Storage, REST and Functions responses at the API gateway (#53466) | ||
|
|
bd138001cc |
chore: Add slack alert workflows for docs team (#53366)
## Problem We have accumulated several additions to workflows in GitHub Actions, but we are not notified when they failed. ## Solution This PR adds two files to notify Docs-related and KB-related failures in our Slack team alerts channel. <!-- ## 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 ///// ## 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: Ali Waseem <waseema393@gmail.com> |
||
|
|
d7308d776c |
ci(kb): run the shadcn lint ratchet on kb (#51584)
## Problem kb has no eslint config and no `lint` script, so the shadcn tailwind rules that already check www, docs, design-system, ui-library and learn never run on it ## Solution - moved the `supabase/shadcn` block out of `eslint-config-supabase/next.js` into its own `eslint-config-supabase/shadcn.js` + `next.js` imports it, so the rules and settings stay in one file - added `apps/kb/eslint.config.cjs` + `lint` and `lint:ratchet` scripts - `.astro` files get linted too, not just `.ts`/`.tsx` - added kb to `lint-ratchet.yml` and `lint-ratchet-decrease.yml` <!-- ## 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 ./apps/kb run lint` and check for 5 warnings, all in `.astro` files 2. run `pnpm --filter ./apps/kb run lint:ratchet` and check it prints `Stable: No regressions for selected rules.` 3. add `className="p-[13px] bg-[#fff] foo-bar"` to any kb `.tsx` component and rerun step 3. it should fail with 3 new warnings ## 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) |
||
|
|
200cc3f65d |
[FE-3106] (part 1) – ci(studio): build and test tanstack start only (#53199)
First part of the FE-3106 cleanup (final pass of the TanStack Start migration): Studio now builds, runs and tests TanStack Start only. Retiring the Next build first is what lets the follow-up PRs in this stack delete `pages/**` files without breaking a still-built Next runtime, the Next E2E shard or Next previews. Part 1 of the stack, based on `master`. **Changed:** - `apps/studio/package.json` – `dev`/`build`/`start` run the Vite/Nitro build directly (the former `*:tanstack` scripts) - `apps/studio/vercel.ts` – always emits the TanStack Start config (`framework: null`, redirects, headers); no `STUDIO_FRAMEWORK` gate, so every Vercel project building Studio deploys the Nitro output - `apps/studio/Dockerfile` – single TanStack `build` stage; the image no longer defaults to Next - `.github/workflows/studio-e2e-test.yml` – one E2E run (2 shards) instead of a `next`/`tanstack` matrix; drops the `.next` cache step - `.github/workflows/studio-docker-build.yml` – one image build - `apps/studio/turbo.jsonc` – drops `STUDIO_FRAMEWORK` and the `.next` outputs - `apps/studio/AGENTS.md`, `apps/studio/TANSTACK_MIGRATION.md` – describe the TanStack-only runtime **Removed:** - `dev:next`/`build:next`/`start:next` scripts, `scripts/dispatch.js`, `scripts/lib/env.js`, the Turbopack cache `predev` script, and the root `build:studio:docker:tanstack` script Addresses [FE-3106](https://linear.app/supabase/issue/FE-3106/move-page-bodies-into-route-files-and-delete-pages). Before merging: branch protection lists `E2E tests (next, 1, 2)`/`(next, 2, 2)` and `E2E tests (tanstack, 1, 2)`/`(tanstack, 2, 2)` as required checks. The jobs are now `E2E tests (1, 2)`/`(2, 2)`, so the required checks need updating. Any Vercel project or self-hosted image still on Next switches to TanStack Start with this PR. ## To test - `pnpm dev:studio` without `STUDIO_FRAMEWORK` set – Vite dev server starts on :8082 - `pnpm build --filter=studio` – Vite/Nitro build succeeds, no `.next` output - Vercel previews (`studio`, `studio-self-hosted`, `studio-staging`) – build and serve the TanStack app - `Studio Docker Build` and E2E checks – pass with the single TanStack run Ran `vercel.test.ts`, studio typecheck, knip, ESLint on changed files, Prettier and the TanStack build locally. Docker and E2E are verified by CI only. --------- Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com> |
||
|
|
6236fa4ec5 |
chore: remove the Cloudflare R2 asset upload and asset CDN (#53148)
Removes the dead Cloudflare R2 asset upload and asset CDN code from Studio, docs and www. Every app now behaves as it did with `FORCE_ASSET_CDN=-1`: Vercel serves assets from the default path. Also fixes `.github/workflows/zizmor.yml` to download zizmor with `gh release download`: `curl -sSLO` saved GitHub error pages as the archive, which broke the attestation check. > [!WARNING] > Remove `FORCE_ASSET_CDN` from Vercel only after this deploys. **Worth a close look** - `apps/studio/vite.config.ts`: `SKIP_ASSET_UPLOAD` is kept because it still gates Sentry source map upload. - `apps/studio/turbo.jsonc`: `AWS_ACCESS_KEY_ID` / `AWS_SECRET_ACCESS_KEY` are kept because the Bedrock credential chain (`lib/ai/bedrock.ts`) can fall back to them. ## To test - [ ] On the Vercel previews for studio, docs and www, open a page with DevTools: JS, CSS and fonts load from the app's own origin (`/dashboard/assets/…` or `/dashboard/_vercel/immutable/…` for Studio, `/docs/_next/static/…` for docs, `/_next/static/…` for www), with no 404s or CSP errors in the console. --------- Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com> |
||
|
|
f0f2b57939 |
test(telemetry): cover every ad click id in first-touch attribution (#51774)
## Problem
The ad click ids we send to PostHog for first-touch attribution have no
direct tests. A typo in a param name (say `getParam('opref')`) would
silently drop that click id and CI would stay green. Also, nothing in CI
ran `packages/common` tests at all, apart from `sentry.test.ts`.
GROWTH-1326.
## Solution
- First-touch click ids are now one exported list,
`FIRST_TOUCH_CLICK_ID_KEYS`, instead of 11 hand-written `getParam`
lines. Same ids, same output.
- New `telemetry.test.ts` checks that list equals `CLICK_ID_KEYS` plus
`bfcid`, and that every id in it comes back from
`getFirstTouchAttributionProps`.
- `first-referrer-cookie.test.ts` checks `buildFirstReferrerData`
extracts every `CLICK_ID_KEYS` entry, and that `bfcid` stays out of that
pre-consent list.
- Added a `test` script to `packages/common` and a `pnpm --filter common
test` step to `library-tests.yml`, which already triggers on
`packages/common/**`.
## Review instructions
1. Check the Library checks job runs the common tests (13 files).
2. Add a made-up id to `FIRST_TOUCH_CLICK_ID_KEYS` only, then run `pnpm
--filter common test`. It fails.
## 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)
|
||
|
|
cc78424932 |
chore(www,docs,kb) - remove tracked sitemaps (#53036)
## Problem Moved to another repo |
||
|
|
1f75a630c2 |
fix: update Ask AI model (#52736)
OpenAI is retiring the pinned GPT-4o mini snapshot on January 14, 2027, but "Ask AI" on our site(s) still uses it. This PR replaces it with GPT-6 Luna at low reasoning, which is a similarly cost effective model. Its completion budget is increased to allow room for reasoning, while the total cap preserves the previous input allowance. I noticed the `packages/ai-commands` where this was defined also includes dead code from older versions of SQL and cron helpers, so this also removes them for housekeeping. I also upgraded the OpenAI SDK to support types for the new model. To test, try asking a question in "Ask AI" in the docs [preview](https://github.com/supabase/supabase/pull/52736#issuecomment-6618563374) build: <img width="568" height="583" alt="CleanShot 2026-11-03 at 7 22 29 PM@2x" src="https://github.com/user-attachments/assets/fe8f824f-3884-44b8-affd-5710343e0101" /> Note the "Rename with Supabase AI" feature doesn't work but that's an existing issue not related to this PR: https://github.com/supabase/supabase/issues/51438 **References** - https://developers.openai.com/api/docs/deprecations - https://developers.openai.com/api/docs/models/gpt-6-luna Closes AI-1397 |
||
|
|
9dfece25cc | fix(self-hosted): leave CORS on /functions/v1 to the function (#52709) | ||
|
|
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)
|
||
|
|
aec7aed134 |
ci(docs): fail PRs that remove a linked guide section (#52100)
Closes DOCS-1486 ## Problem Agents are slow to update what they remember about the docs, and nothing protects a section when it moves to another page. This leaves a trail when sections move: the PR fails unless the heading stays with a summary and a link to where the content went. ## Solution A new `Docs removed anchors` workflow runs `pnpm check:removed-anchors` from `apps/docs`. - **What it compares:** H2 and H3 anchors between the base branch and the PR, only on changed guide pages and pages that include a changed partial. Partials are expanded, nested ones too. - **When it fails:** a file anywhere in `apps`, `packages`, or `examples` still links to a removed anchor. That covers docs content, Studio, www and the blog, and kb, plus same-page `#anchor` links. Test files and generated output are skipped. The failure names each anchor and every linking `file:line`, and annotates those lines. - **How anchors are computed:** with `getAnchor` from `packages/ui`, the same function that sets rendered heading ids, so `## Title [#custom-id]` matches on the custom id. - **Bypass:** the `skip-anchor-check` label turns the errors into warnings and passes the check. The failure message names the label and the fixes. - **No `paths` filter:** a required check whose workflow never starts leaves unrelated PRs waiting. The job runs on every PR and exits before installing anything when docs content is unchanged. Out of scope: deleted or moved pages, and links from outside this repo. The workflow checks out text files across `apps`, `packages`, and `examples`, and skips images and video, so the search doesn't download them. The check only blocks merges once it's a required status check on `master`. That needs a repo admin. ## Skip the check For a deliberate removal: 1. Add the `skip-anchor-check` label to the PR. 2. The check re-runs and passes. The links it would have failed on show as warnings. Remove the label to turn the check back on. ## Manual testing 1. From `apps/docs`, delete `[#leaked-key]` from the heading in `content/guides/getting-started/api-keys.mdx`. 2. Run `pnpm check:removed-anchors`. It exits 1 and names `troubleshooting/rotating-anon-service-and-jwt-secrets-1Jq6yd.mdx:39`. 3. Run `PR_LABELS='["skip-anchor-check"]' pnpm check:removed-anchors`. It prints the same report and exits 0. 4. Run `pnpm vitest run scripts/check-removed-anchors.test.ts`. All tests pass. |
||
|
|
9b1ddcab93 |
chore: Remove old search code and add contributing documentation plus local dev flow (#52487)
## Problem We decided to keep the search_v2 experiment. ## Solution Delete all files related to the variant experimentation, old components and ingest flow. <!-- ## 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 docs preview 2. Search V2 should be the default search ## 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) |
||
|
|
ee8cc9cff1 |
test(docs): fail navigation levels with 10 or more items (#52190)
Closes DOCS-1462 ## Problem A navigation level with many items is hard to scan. Today, 18 levels in the docs navigation have 10 or more items, such as Platform > Platform Configuration. Nothing stops a PR from adding more. ## Solution - **Level size check:** `NavigationMenu.levels.nav-check.test.ts` walks the top nav and every sidebar. A level with 10 or more items fails the test, which names the level. - **Allowlist:** starts with today's 18 levels, so CI is green on merge. A level that drops below 10 items also fails until you remove it from the list. - **Option 1:** the check runs on the flagged navigation from #52049 too, with its own allowlist. - **Navigation checks workflow:** `docs-navigation-checks.yml` runs every test named `*.nav-check.test.ts`, only when the navigation config or a check changes. The general docs test job skips these tests. A later navigation guard only needs that file name. ## Manual testing 1. Run `pnpm --prefix="apps/docs" run test:nav-checks`. Both tests pass. 2. In `NavigationMenu.constants.ts`, add five items to Security > Product security, and run the command again. Both tests fail and list `Security > Product security`. |
||
|
|
051d5f79da |
chore(docs) - remove troubleshooting guides and rendering logic (#52339)
## Problem Dupe content and workflows when this content now all lives in the KB. ## Solution Removes various artifacts from the docs repo (content files, github workflows, etc.) from the docs app. These paths have already been redirected to /kb in #52095 and we haven't seen any meaningful 404 traffic indicating the redirects were done incorrectly. ## Preview links TBD |
||
|
|
94e0e1e7d2 |
chore: Move ingest to new table while pointing the search_v2 fn to the experiment one (#52370)
## Problem Currently we experience a lot of empty results responses from our new search_v2 experiment. We are improving our search logic on our frontend plus our search functions in the backend ot fix this. ## Solution Improve our search setup to follow this path: 1. Same as before, strict full text search. 1. If that returns zero results, we do prefixes via wild cards, ie: "edge fun" becomes "edge fun|*" so people don't have to type the full term. 1. If that returns zero results, then we run the terms under OR, which will give partial results for individual terms. 1. If that returns zero results then we are most probably under a typo/misspelling scenario, then we use `pg_trgm` extension with a `0.4` tier to return the closest bit, which is good cause it covers missing first letters like "dge functions" too. We will do this migration in three steps to not disrupt current users under the experiments, I will be posting the PRs here: 1. First, we will create a new search_v2 table on `supabase.com [LIVE]` project where production parts of our monorepo go + already implement the improvements I just mentioned. 1. Re-route the ingest script to populate once per day the database table in this new project. At this point we will have the data and the search function ready. 👈 **this PR is here** 1. Update the API search_v2 function to query from this new project, so users will experience no down time. <!-- ## 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 _Make sure ingest runs correctly after merge._ ## 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) |
||
|
|
60b51d74d5 |
Audit existing unit tests + Remove redundant ones (#52215)
## Context
_TLDR: Changes here speeds up unit tests on CI from ~14 minutes to ~3
minutes_ 😂
_TLDR 2: The file changes are solely only test files +
`studio-unit-tests.yml`_
We've currently got a lot of unit tests in the repository which while
great for coverage, hasn't been ideally written. There's a lot of
redundancy + overly specific tests that break easily, and our current
unit test takes about 15 minutes to run in the GHA per PR. Hence am
doing a audit clean up of all existing unit tests in the studio repo.
## Changes involved
- `.test.ts` files now run in `node`, `.test.tsx` in `jsdom`
- jsdom costs about 1s of setup per file. A `.ts` test that needs the
DOM opts in with `// @vitest-environment jsdom` (46 files do).
- Removed redundant and over-specific tests
- Duplicates are merged into `test.each`. Tests that only covered
libraries, existed for coverage, or asserted class names and snapshots
are deleted. 19 files are merged into a sibling or deleted.
- Fixed about 15 tests that couldn't fail
- Examples: unawaited assertions, fixtures equal to the default, and a
`semverGte` test calling `semverLte`.
- Sped up the slowest files
- Real sleeps are replaced with fake timers, `user.type` with paste, and
Radix option queries are scoped to the open listbox. For example,
`RestoringState` went from 18s to 0.3s and
`useTableEditorFiltersSort.navigation` from 20s to 3s.
- These ^ already shave down the unit tests time from 14 mins to 9 mins,
but am also sharding unit tests across 4 jobs to increase speed up
further which then shaves down time to 3 mins now
|
||
|
|
99fd573d1a |
feat(kb): add unit test CI, search API tests, and Playwright smoke tests (#52151)
kb's unit tests weren't run in CI and there were no functional tests. Adds a CI job for kb unit tests, unit tests for the search API, and a bare-bones Playwright suite (`e2e/kb`) that runs against the kb Vercel preview on PRs and against production daily. Fixes DOCS-1506 |
||
|
|
6cde55ae3c |
feat(api-types): generate fga-requirements.ts from OpenAPI specs (#52093)
## What Generates `packages/api-types/types/fga-requirements.ts`, a map from `'METHOD /path'` to the FGA permission groups that endpoint requires, from the `x-fga-permissions` annotations in the v1, v2, and platform OpenAPI specs. Groups are OR-of-AND (a caller needs every permission in at least one group) and are preserved verbatim. Keys are the path literals passed to openapi-fetch, so later work can type-check permission grants against fetch calls. - `codegen:prod` and the production drift check (`verify-production-types`) now generate and compare the new file. - Local `codegen` also generates it, from the local API (`LOCAL_API_URL`, defaults to `http://localhost:8080`). - Permission IDs are validated against the platform spec's `CreateScopedAccessTokenBody.permissions` enum. Generation fails on malformed annotations, empty groups, unknown IDs, or an endpoint annotated in two specs. An empty annotation (`[]`) is treated as ungated and omitted. - The drift-check workflow now also runs when `packages/api-types/scripts/` changes, so generator changes without regenerated output are caught. - Exported from `api-types` as `fgaRequirements`, with `FgaRequirements` and `FgaGuardedEndpoint` types. No Studio changes. ## Testing - `pnpm --filter=api-types test` - `pnpm --filter=api-types codegen:prod` regenerates the committed file with no diff. Resolves FE-4686 |
||
|
|
4c4471d264 |
chore(www,kb,docs) - convert sitemap URLs to JSON to reduce noise (#52082)
## Problem After running the pattern introduced in #51963 (output in #52079), can already see that this is far too noisy. ## Solution Moves generation to JSON as opposed to XML |
||
|
|
97676a8801 |
feat(www,docs,kb) - start tracking sitemap URLs in git (#51963)
## Problem It's actually _surprisingly_ hard to track URL changes over time b/c sitemaps aren't versioned. It's meant to be a flat source of truth for a specific point in time. This causes issues when trying to get the following information: - What URLs have changed? And which URLs have changed over a specific period of time? - Do those URLs require updates to other places? Or redirects? ## Solution Adds in the first commit of tracked sitemaps, as well as a GitHub action to automate this process monthly. So long as we can track what's changed between 2 points in time -- this way through a git diff -- we can pretty easily then set up automation to flag needed link updates or redirects across other properties (`/changelog`, `/blog`, `/docs`, `/kb`). Added benefit is we already have redirects versioned and tracked, so we can combine these sources of data together. ## Review instructions The git diff here is _much_ larger than the functional diff, b/c this PR contains the initial commit of the sitemaps. The functional diff is in `.github/workflows/refresh-sitemaps.yml` and `scripts/refresh-sitemaps.sh`, which is a GitHub action to run a small `pull and download sitemaps and PR them up` periodically. |
||
|
|
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> |
||
|
|
5c7638f08b |
ci(studio-e2e): reserve supabase ports from the ephemeral range (#51944)
<!-- CURSOR_AGENT_PR_BODY_BEGIN --> About a quarter of failed self-hosted Studio E2E runs in the last two weeks die at "Start supabase" (`supabase start --exclude studio,mailpit --workdir ./e2e/studio`) with `address already in use` binding `0.0.0.0:54322`, in a single shard, on both next and tanstack. The local ports in `e2e/studio/supabase/config.toml` sit inside Linux's ephemeral range, so an outbound connection during the image pull can take 54322; `ss -tlnp` only lists listeners, which is why diagnostics reported the port free. This reserves `54320-54329` before installs and image pulls, keeping any ports already reserved, and snapshots sockets on that range when `supabase start` fails. Follows up the diagnostics from #45637 and #46607. **Changed:** - `.github/workflows/studio-e2e-test.yml` – append `54320-54329` to `net.ipv4.ip_local_reserved_ports` before dependency install, Playwright install, and image pulls, so an outbound connect cannot occupy them and any ports the runner already reserved stay reserved. - `.github/workflows/studio-e2e-test.yml` – when `supabase start` fails, snapshot TCP sockets on `54320-54329` immediately, before the build finishes and a short-lived socket from the image pull is gone. - `.github/workflows/studio-e2e-test.yml` – pre-start diagnostics print the ephemeral port range and sockets on `54320-54329`; failure diagnostics use the same filter and group the last 300 log lines per container. ## To test - [x] "Reserve Supabase local ports" step prints `54320-54329` on every E2E shard - [x] All Studio E2E shards pass on next and tanstack - [ ] (on a future failure) the Start supabase step lists any socket on 54320-54329 <!-- CURSOR_AGENT_PR_BODY_END --> <div><a href="https://cursor.com/agents/bc-e6e0ed7f-4b63-547e-aa51-ae1b4588d445?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-e6e0ed7f-4b63-547e-aa51-ae1b4588d445&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> |
||
|
|
2b7f5ace51 |
chore(ci): run independent workflow steps in parallel (#51398)
Uses GitHub Actions' new [parallel / background steps](https://github.blog/changelog/2026-06-25-actions-steps-can-now-be-run-in-parallel/) to overlap independent CI steps. It works on Blacksmith runners, and zizmor accepts the new keys. **Changed:** - **Studio E2E:** Chromium install, `supabase start` and the Studio build now run concurrently. The build only inlines `NEXT_PUBLIC_*` vars, and the only one that comes from `supabase status` is the API URL, which `e2e/studio/supabase/config.toml` fixes. So the build runs against that URL, and the real runtime env is written once supabase is up. A `diff` fails the job if the inlined values don't match the real ones. - **Docs and www E2E:** deps and Chromium install while the Vercel preview poll runs in the background, instead of after it. - **Typecheck:** typecheck and lint run side by side on a 4 vCPU runner (up from 2), so a typecheck failure no longer hides lint errors. - **Docs tests:** the three prep steps run as a parallel group, and the workflow is added to its own `paths` filter so edits to it get validated. **Timings:** the baseline is the 10 most recent successful PR runs. "After" comes from this PR's runs, so the sample is small. | Workflow | Measured | Before (median) | After | Change | |---|---|---|---|---| | Studio E2E, next | setup (deps installed → tests start) | 162s | 112s, 138s | −23% | | Studio E2E, tanstack | setup (deps installed → tests start) | 110s | 59s, 66s | −43% | | Typecheck | job total | 168s | 68s, 110s | −47% | | Docs / www E2E | deps + Chromium | 20s / 30s | hidden behind the preview wait | ~6–7% of the job | | Docs tests | prep steps | ~4s | ~2s | negligible | On Studio E2E that's about 40–50s off each of the 4 shards. Whole-job totals are dominated by how long the Playwright run takes (±100s between runs), so the setup segment is the fair comparison. Typecheck numbers depend heavily on turbo cache hits, so treat them as directional. ## To test - [x] All Studio E2E shards pass on both frameworks, including the `NEXT_PUBLIC_*` env `diff` check - [x] Docs and www E2E go through the background wait. A temporary commit touching a docs page and a www page (now dropped) showed installs finishing during the wait, and `Resolve base URL` picked up the deployment output after the `wait`. The docs E2E failure on that run came from a11y violations on the probe page, not from this change - [x] Typecheck log shows both steps starting together ("Waiting for background step(s) to complete: Run TypeScript type check, Run Lint") - [x] Docs tests pass with the parallel prep group - [ ] After merge, check that the first Studio E2E runs on master stay green --------- Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com> Co-authored-by: Ali Waseem <waseema393@gmail.com> |
||
|
|
e4bf448352 | chore: Rotate GH app env vars name (#51627) | ||
|
|
9f7d28058b | chore: Rotate env vars name correctly (#51619) | ||
|
|
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) |
||
|
|
b13d6c2878 |
feat(chore): add a lint ratchet for shadcn rules (#51014)
## Problem shadcn lint rules has been soft landed in #50676 and are now on as warnings in every app, but nothing stops a PR from adding new violations linear: FE-4473 ## Solution - moved the ratchet script and its tests from `apps/studio/scripts` to `packages/eslint-config-supabase` so every app runs one copy - added a shared rule list, `packages/eslint-config-supabase/ratchet-rules.json` with the shadcn rules - www, docs, design-system, ui-library and learn get `lint-ratchet.yml` with one job per changed app (triggered by the app, `packages/**` or the lockfile) + a weekly `lint-ratchet-decrease.yml` (as for studio ratchet) - package tests run in `eslint-config-supabase-tests.yml` <!-- ## 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 ./apps/www run lint:ratchet` 2. add `p-[13px]` to a `className` in any www component and run it again. it fails with `shadcn/no-arbitrary-values` and the file name with `(+1)` 3. revert change 4. run `pnpm --filter eslint-config-supabase test` and see 6 tests pass 5. in ci, check `Ratchet studio lint checks` and the `ratchet (<app>)` jobs for the apps this pr touches ## 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) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Developer Improvements** * Expanded automated lint checks to cover additional apps and shared package changes. * Added checks for arbitrary Tailwind values, unknown classes, and raw colors across supported apps. * Added automated baseline updates that can open or update a pull request when lint counts change. * Added tests for the lint configuration and support for combining multiple rule files. * Updated Studio lint notifications to exclude Shadcn rules with zero-baseline counts. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
be976bec49 | fix: Add federeated content pre-step for search v2 ingestion (#51116) | ||
|
|
3f205627e0 |
feat(library): redesign the site around the block catalog (#50372)
## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. YES ## What kind of change does this PR introduce? Feature — the visual redesign itself. Part 5 of 6 in a stack that splits the library redesign into reviewable pieces. The four PRs beneath it carry the build, content and Markdown work; what's left here is layout, navigation and styling. ## What is the current behavior? The library is laid out like a documentation site: a sidebar tree of framework folders, a homepage that lists links, and a guide page that opens with prose. That shape suits reference material, but the library's job is to help someone find a block and install it — and the sidebar is the only way to discover one. ## What is the new behavior? The homepage is the catalog itself — blocks grouped by what they do (authentication, database, storage, realtime, messaging, AI, foundations) rather than by framework, each with a preview of what it renders, filterable by category. Navigation moves into a site header whose Explore menu opens the same categories, so the catalog is reachable from any page and the per-page sidebar tree is gone. A guide opens with what the reader came for: the block's name, the install command, and a preview pane with tabs — the running component and its files — before any prose. The file tree that used to sit mid-page under "Folder structure" is one of those tabs. Every guide also offers a copy of the agent prompt that points at its Markdown. Getting-started pages get the same treatment: the quickstart is now a framework-tabbed walkthrough rather than a wall of setup links. ## Additional context `BlockOverviewTabs` renders Preview and Files here. #50369, stacked on top of this one, adds the third "What's added" tab — it is the only part of the redesign that depends on the new resource analyzer, which is why it sits above this PR rather than below it. Also removes what the redesign orphaned: the table-of-contents component and its `remark` / `mdast-util-toc` dependencies, and the sidebar nav and command-item configuration the new header replaced. The block source changes are typography only — auth card titles move from `text-2xl` to `font-medium text-lg tracking-normal` — which is what regenerates the auth registry artifacts. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added a redesigned Supabase Library catalog with categorized blocks, framework-aware navigation, previews, file views, and installation actions. * Added framework-specific quickstart guides for Next.js, React, Vue, Nuxt, React Router, and TanStack Start. * Added copy-to-clipboard prompts, “Open in v0” actions, starter templates, and richer visual previews. * **Improvements** * Updated documentation layouts, FAQ content, typography, navigation, accessibility, and responsive behavior. * Improved mobile navigation, framework selection, and standardized block installation guidance. * Refined authentication and social-login block presentation with more consistent heading styles. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com> Co-authored-by: Danny White <3104761+dnywh@users.noreply.github.com> |
||
|
|
7f1df457f8 |
feat: Create action to upsert table for new search (#50683)
## Problem For the new search, we will scan all files present within the public/markdown directory, extract text nodes and upsert a new Supabase table in a new project to do FTS type search. ## Solution In this PR: - A new script directory is created with files to solve all the steps described above. - Unit tests added for the fundamental bits of the script. - A new workflow file is added so the action runs after push every time content is altered, added or removed. <!-- ## 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, testing this work is quite complex, but in case someone wants to: 1. Create a new Supabase project ton your personal space 1. Copy the id of the project and a secret key and add it to the new Search V2 environment variables as shown in the example file 1. Copy the content of the newly added `setup.sql` and run it on the SQL editor of your project. 1. Fetch this branch and on the search directory, run `search-v2:ingest` 1. Your project's table should have rows corresponding to the content from docs ## 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 references [WORD_LIST](https://github.com/supabase/supabase/blob/master/apps/docs/WORD_LIST.md) and the docs [CONTRIBUTING](https://github.com/supabase/supabase/blob/master/apps/docs/CONTRIBUTING.md) guide <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Documentation pages are now indexed for full-text search at the page and section level. - Search results can show the most relevant section from each page, with its title, heading, excerpt, and relevance score. - Search content is automatically refreshed when published Markdown documentation changes. - **Tests** - Added coverage for Markdown parsing, page structure, routing, and search-content generation. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
27af9ca162 |
chore(www): run production builds through Turbo (#50713)
www builds currently bypass Turbo. This caches Next.js compilation and sitemap generation while keeping content refreshes and asset uploads on every build, including cache hits. **Changed:** - Refresh content before Turbo hashes its inputs, and upload assets after Turbo saves or restores the build output. - Include generated content, shared code, environment settings, sitemaps, and the customer RSS feed in the cache configuration. - Remove the redundant `vercel.json` build override and consolidate public environment settings into `NEXT_PUBLIC_*`. Cache reuse requires the same commit and build inputs because production CDN URLs include the commit SHA. **Added:** - Build lifecycle tests covering cache restoration, input invalidation, root/app commands, and upload ordering and failure handling. ## To test - From `apps/www`, run `pnpm exec vitest run turbo-build.test.ts generate-sitemap.test.ts scripts/lib/githubStars.test.ts`. - Check the Vercel preview build runs content preparation before `build:next`, and verify the homepage, `/sitemap.xml`, and `/customers-rss.xml` load. - Rebuild with identical prepared content and environment settings to check compilation is cached. Asset uploads should still run when enabled. Validation: 63 tests passed, along with typecheck, ESLint for the new test, formatting, and a full local build. The local build used public example settings and placeholder survey configuration, with asset uploads disabled; Vercel deployment validation is still pending. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Build & Deployment** - Production builds now reuse cached outputs and restore generated assets when a cache is available. - Static assets upload after a successful build, and changes to content, documentation, configuration, or shared components trigger a fresh build. - **Documentation** - Added production build guidance covering caching, CDN uploads, overrides, and direct-build limitations. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com> |
||
|
|
0003958f70 |
chore(ci): notify #team-frontend when ratchet baseline hits zero (#50978)
<!-- ccr-slack-attribution --> _Requested by **Charis Lam** · [Slack thread](https://supabase.slack.com/archives/C0161K73J1J/p1790599888647059?thread_ts=1790599888.647059&cid=C0161K73J1J)_ ## Problem The weekly "Decrease studio lint ratchet baselines" workflow (`.github/workflows/studio-lint-ratchet-decrease.yml`) mechanically decreases each tracked ESLint rule's baseline count in `apps/studio/.github/eslint-rule-baselines.json` and opens/updates a PR. When a rule's count reaches exactly 0, there's nothing left to ratchet — a human (or agent) needs to remove it from ratchet tracking (`apps/studio/scripts/ratchet-rules.json` and the baseline file) and bump its ESLint severity to `error`, as was just done manually in #50977. Nobody is currently notified when this threshold is crossed, so it can sit unnoticed. ## Solution **Before:** the job silently commits the decreased baselines and opens/updates its PR with no signal that any rule just hit 0. **After:** a new step runs after the baseline commit/PR step, only when that step found changes (via a new `id: decrease-baselines` and a `changed` step output, added without touching the existing decrease logic itself — just capturing its existing control flow into an output). It parses the final `apps/studio/.github/eslint-rule-baselines.json` on disk for any rule whose count is exactly `0`. If any are found, it posts a Slack message via `curl` to a webhook, tagging `@Claude` in `#team-frontend` with the rule names and a link to the PR the job just created/updated, asking it to do the same triage as #50977 (remove from ratchet tracking, bump severity to `error`). If no rule is at 0, it skips silently. The webhook URL comes from a new repo secret, `secrets.SLACK_TEAM_FRONTEND_WEBHOOK_URL`, which **does not exist yet**. **A human needs to create a Slack incoming webhook for #team-frontend and add its URL as the `SLACK_TEAM_FRONTEND_WEBHOOK_URL` repository secret before this step will actually post anything.** Until then, the step detects the missing/empty secret and only logs a `::warning::`, exiting 0 — it will never fail the job. ## Review instructions 1. Read `.github/workflows/studio-lint-ratchet-decrease.yml`: confirm the existing decrease/commit/PR step is unchanged except for the added `id: decrease-baselines` and the two `echo ... >> "$GITHUB_OUTPUT"` lines that record whether anything changed and the PR URL. 2. Confirm the new final step only runs `if: steps.decrease-baselines.outputs.changed == 'true'`. 3. Confirm the new step parses `apps/studio/.github/eslint-rule-baselines.json`'s `rules` map for entries equal to `0`, and skips (exit 0, no curl) when none are found. 4. Confirm the `curl` call is gated on `SLACK_WEBHOOK_URL` being non-empty, and that a failed `curl` only emits `::warning::` rather than failing the step (`set -euo pipefail` is still safe because the failure is inside an `if !`). 5. Note that this PR alone does not make the notification fire: `SLACK_TEAM_FRONTEND_WEBHOOK_URL` must be provisioned as a repo secret (Settings → Secrets and variables → Actions) from a Slack incoming webhook for #team-frontend first. ## Checklist Check all before review: - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [ ] If I wrote a new docs topic or edited an existing topic, I used the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs [style guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide) 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01LZThbcWV5U1r5cvUDKPVQP --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Charis Lam <26616127+charislam@users.noreply.github.com> |
||
|
|
51a167d910 |
feat(www): partners landing page (#47874)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added a redesigned Partners page with partnership options, benefits, application steps, FAQs, integration resources, and featured partners. - Added an on-page partner application form with questions tailored to the selected partnership type. - Added a confirmation message with next steps and a link to the OAuth integration guide. - **Bug Fixes** - Updated partner application links to open the form on the Partners page. - Added support for checkbox-group fields in forms. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Alan Daniel <stylesshjs@gmail.com> Co-authored-by: Alex Hall <alex.hall@supabase.io> Co-authored-by: Dion Zeneli <101271736+Dionysos288@users.noreply.github.com> |
||
|
|
e5685126b8 |
ci(api-types): require production verification FE-4455 (#50781)
## Problem API type changes still use the api-deploy-required label and an informational comment even though production verification has proven reliable enough to block merges. ## Fix Remove the obsolete API label path, scope the remaining labeler workflow to docs changes, and update the API-types guidance. Master branch protection now requires the app-bound verify-production-api-types check. ## How to test - Confirm the labeler workflow only runs for changes under apps/docs. - Confirm API type changes no longer receive the api-deploy-required label or comment. - Confirm master branch protection lists verify-production-api-types as a required GitHub Actions check. - Expected result: production API type verification blocks mismatched generated types while unrelated pull requests receive a successful skipped verification job. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * API type verification is now a required merge check; guidance to run it before review and treat failures as production drift remains. * Removed the API deployment label rule and the automated comment triggered when that label was applied. * The pull request labeling workflow now runs only for changes affecting the documentation app. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
7ce4ee53ae |
chore(docs) Retire supa-mdx-lint (#50602)
Closes [DOCS-1289](https://linear.app/supabase/issue/DOCS-1289/get-the-linter-to-fix-what-it-flags-or-retirereplace-the-linter) Stacked on #50600, which points contributors at the authoring skills. Merge that one first. ## Problem Contributors experienced friction with the linter. They felt nickle and dimed for tiny nits and felt detracted from the work itself. PRs would become noisy with tiny one-word suggestions. Additionally, our homegrown linter is not very intelligent, causing frequent overrides. ## Solution This removes the linter entirely in favor of directing contributors to use SKILLS instead. The removal entails... - **CI.** Delete the three `docs_lint` workflows: the PR check, the external-PR comment companion, and the nightly `--fix` bot. Drop the stale `zizmor.yml` ignore entry for the deleted workflow. - **Tooling.** Delete `supa-mdx-lint.config.toml` and the 14 rule files. Drop the `lint:mdx` script and the `@supabase/supa-mdx-lint` dependency from docs, learn, and ui-library, and regenerate the lockfile. - **Content.** Remove the 181 directives. A separate commit carries Prettier's reformatting of the tables and blank lines those comments had suppressed, so the deletion commit stays readable. No prose changes. - **Style guide.** The word list states each rule directly instead of describing what the linter flagged. Every term survives, including the phrase groups that mirrored `Rule004ExcludeWords`. - **Skills.** `write-the-docs`, `edit-the-docs`, and `review-the-docs` drop `pnpm lint:mdx` from their self-review commands and check the word list directly. `ask-the-docs`'s CI reference drops both workflows. ## Manual testing 1. Run `git grep -i supa-mdx-lint -- . ':!pnpm-lock.yaml'`. No matches. 2. Run `pnpm install --frozen-lockfile --lockfile-only`. It passes, so the lockfile matches the three trimmed manifests. 3. Run `git diff master...HEAD --name-only --diff-filter=ACMR | grep -E '\.(md|mdx)$' | xargs npx prettier --config prettier.config.mjs --check`. All changed markdown passes. 4. Open the [reformatted filter table](https://docs-git-docs-retire-mdx-linter-supabase.vercel.app/docs/guides/observability/logs#filter-events) on the preview and compare it with [production](https://supabase.com/docs/guides/observability/logs#filter-events). The table renders the same. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Documentation guidance now uses manual prose and terminology review with the shared word list. * Clarified storage configuration and common Realtime channel mistakes. * Improved table formatting, text wrapping, and selected reference links. * Updated documentation authoring and review guidance. * **Chores** * Retired automated MDX linting from workflows and local validation commands. * Removed lint-suppression markers throughout documentation without changing instructions. * Added targeted documentation review guidance for pull requests. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
abbac3b852 |
refactor(library): resolve registry dependencies from one source of truth (#50367)
## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. YES ## What kind of change does this PR introduce? Refactor, bug fix. Part 1 of 6 in a stack that splits the library redesign into reviewable pieces. This one is the foundation the rest build on and has no visual change. ## What is the current behavior? Three build steps each reimplement "where does this registry file land in the user's project": `process-registry`'s `getDefaultPath`, `registry/utils`' `uniqBy` on `file.path`, and the Markdown exporter. They disagree, which produces real bugs: - A Vue block whose files come from `node_modules/@supabase/vue-blocks/` keeps its package path, so the installer writes the package folder into the user's project. - `registryItemAppend` builds its `docs` string from `(item.docs, items.flatMap(...))` — a comma expression, so the item's own docs are discarded. - A name collision between a block file and its client's file silently keeps one of the two. - Install commands guess the CLI family from substrings in the item name, so `infinite-query-composable` — a Vue block with neither "vue" nor "nuxtjs" in its name — gets the React CLI. - Production Vue installs use `@supabase/<name>`, but the `@supabase` namespace is registered with shadcn, not shadcn-vue. - `build:registry`, `build:content`, `build:markdown` and `build:llms` run in parallel, but the last three read `public/r`. ## What is the new behavior? `lib/registry-resolution.ts` owns installed-path derivation, first-party dependency naming, deduplication, and cycle detection, and every consumer calls it. `build-registry` validates the whole registry against shadcn's schema and resolves every item, so a broken reference fails the build instead of shipping. `clean-registry` throws rather than logging past a failure. Pages declare their install `framework` explicitly instead of it being inferred, and production Vue installs use the absolute registry URL. The build steps are serialized behind `build:prepare`, and a new `library-tests.yml` workflow runs the library's tests, checks the generated registry is committed, and builds the app. ## Additional context Regenerated registry artifacts are the mechanical result of the resolution fix — the Vue client items and the OAuth consent items that gained their client's docs. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added explicit React and Vue framework selection for library blocks and installation commands. * Improved registry resolution, dependency handling, path validation, and Vue file normalization. * Added support for reliable local, preview, and production registry URLs. * **Documentation** * Updated Vue and Nuxt installation documentation to identify the Vue framework explicitly. * **Bug Fixes** * Preserved combined documentation and validated generated registry content more consistently. * **Tests** * Added coverage for installation commands, registry resolution, dependency handling, and generated artifacts. * **Chores** * Added automated pull-request checks for library tests and builds. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com> Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com> |