Skip to content

docs: improve SDK automation build step on docs - #46163

Merged
mandarini merged 15 commits into
masterfrom
jeremias/docs-733-consume-new-tsdoc-output-in-docs-project-round-2
Jun 3, 2026
Merged

mandarini merged 15 commits into
masterfrom
jeremias/docs-733-consume-new-tsdoc-output-in-docs-project-round-2

Conversation

@jeremenichelli

@jeremenichelli jeremenichelli commented May 20, 2026 •

Copy link
Copy Markdown
Contributor

Second try of making a new better process for SDK automation

Instead of building a new pipeline. We will take the lessons learned form round 1, plus the good design and improvement on DX quality for drop-in file as a single step required from SDK team and produce almost identical set of files as used right now to render using the current pipeline.

Summary by CodeRabbit

  • New Features

    • New reference-content pipeline producing per-library reference artifacts and integrating into prebuilds, search ingestion, and rendering (type-aware examples).
  • Documentation

    • Added comprehensive JavaScript SDK v2 reference content and partials (Auth MFA, passkeys, admin, TypeScript support, filters, modifiers, Installing, Initializing, Buckets, etc.).
  • Tests & CI

    • Added regression snapshot test and updated workflows to refresh reference snapshots and ensure spec downloads.
  • Chores

    • Updated ignore rules, build scripts, Makefile targets, and package lifecycle hooks.

@jeremenichelli
jeremenichelli requested a review from mandarini May 20, 2026 13:38
@vercel

vercel Bot commented May 20, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment, Open in v0 Jun 2, 2026 3:50pm
6 Skipped Deployments
Project Deployment Actions Updated (UTC)
studio Ignored Ignored Jun 2, 2026 3:50pm
design-system Skipped Skipped Jun 2, 2026 3:50pm
studio-self-hosted Skipped Skipped Jun 2, 2026 3:50pm
studio-staging Skipped Skipped Jun 2, 2026 3:50pm
ui-library Skipped Skipped Jun 2, 2026 3:50pm
zone-www-dot-com Skipped Skipped Jun 2, 2026 3:50pm

Request Review

@coderabbitai

coderabbitai Bot commented May 20, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds a TypeDoc-driven reference content pipeline, seeds javascript-v2 partials and config, introduces an opt-in runtime switch and per-library JSON outputs, updates build scripts/tests/CI to generate snapshots, and wires search/crawler/loaders to consume the new artifacts.

Changes

Reference Content Pipeline & JavaScript v2 Documentation

Layer / File(s) Summary
Build script implementation and artifacts
apps/docs/scripts/build-reference-content.ts, apps/docs/scripts/build-reference-content.test.ts, apps/docs/features/docs/Reference.constants.ts, apps/docs/.gitignore, apps/docs/package.json
New TypeScript build script collects functions and type metadata from TypeDoc JSON, builds bySlug, flat, sections, functions, and typeSpec outputs, seeds MDX partials, exposes collectReferenceContent, adds a regression snapshot test, registers SUPPORTS_NEW_REFERENCE_PROCESS, and gitignores generated output.
JavaScript v2 spec and partials
apps/docs/spec/reference/javascript/v2/config.json, apps/docs/spec/reference/javascript/v2/partials/*, apps/docs/docs/ref/javascript/*
Adds JS v2 config plus numerous JSON/MDX partials (auth, passkey, MFA, installing, TypeScript support, filters/modifiers, buckets, vector, etc.) and runtime MDX pages (auth-mfa, passkey-admin).
Runtime loaders and opt-in flag
apps/docs/features/docs/Reference.generated.singleton.ts, apps/docs/features/docs/Reference.utils.ts, apps/docs/features/docs/Reference.constants.ts
Introduces generatedReferencePath(...), per-lib typeSpec caching, switches runtime getters/loaders to optionally read content/reference/<lib>/<ver>/* when SUPPORTS_NEW_REFERENCE_PROCESS opts in, and re-exports the opt-in constant.
TypeSpec helpers & tests
apps/docs/features/docs/Reference.typeSpec.ts, apps/docs/features/docs/Reference.typeSpec.test.ts
Exports TypeSpec parsing helpers/constants (Comment, KIND_*, normalizeComment, parseType, etc.) for reuse and removes the old snapshot test that serialized parse output.
Navigation & legacy generator adjustments
apps/docs/features/docs/Reference.navigation.client.tsx, apps/docs/features/docs/Reference.generated.script.ts
Simplifies Collapsible content to render child links only; legacy generator now skips opt-in SDK/version pairs and no longer writes typeSpec.json.
Search ingestion loader
apps/docs/scripts/search/sources/reference-doc.ts, apps/docs/scripts/search/sources/index.ts
New loadClientLibReferenceFromNewPipeline reads sections.json, functions.json, and typeSpec.json, merges data into function definitions, flattens sections, and is used by the JS reference search source.
Docs crawler examples
apps/docs/app/api/crawlers/route.ts
Crawler fetches versioned typeSpec and passes types into example rendering; example rendering prefers hand-authored fn.examples and falls back to TypeDoc @example content.
Workflows & Makefile
.github/workflows/docs-js-libs-update.yml, .github/workflows/docs-tests.yml, apps/docs/spec/Makefile
CI steps updated to download TypeDoc v2 dumps, refresh reference-content snapshot via vitest, and Makefile changed to write v2 dumps into reference/javascript/v2 and remove dereference/combine targets.
Reference pipeline docs
apps/docs/spec/reference/README.md
New README documents pipeline layout, partial rules, config options, generated outputs, runtime opt-in, and onboarding checklist.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Suggested reviewers

  • ChrisChinchilla
  • gregorvand
  • 4L3k51

"🐰
I hopped through TypeDoc trees by moonlight,
Collected refs and slugs to set docs right,
Partials planted, snapshots kept in line,
An opt‑in flag makes new content shine,
Hooray — the docs will blossom, byte by byte!"

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive The PR description explains the motivation (second attempt applying lessons learned) and the approach (producing identical files using current pipeline), but lacks details on implementation, testing, and migration steps required by the template. Add explicit sections for current behavior, new behavior, and testing/validation details to match the template structure and provide reviewers with comprehensive context.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'docs: improve SDK automation build step on docs' directly describes the main change—improving the SDK automation build process for documentation generation.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jeremias/docs-733-consume-new-tsdoc-output-in-docs-project-round-2

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@supabase

supabase Bot commented May 20, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project xguihxuzqibwxjnimxev because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label May 20, 2026
@jeremenichelli
jeremenichelli force-pushed the jeremias/docs-733-consume-new-tsdoc-output-in-docs-project-round-2 branch from 3bd927c to 0159c1c Compare May 26, 2026 21:50

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/docs/features/docs/Reference.generated.singleton.ts (1)

27-33: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

getTypeSpec() still reads legacy output and is inconsistent with the new reference pipeline.

This file switches JS v2 reference data to content/reference/..., but getTypeSpec() remains pinned to features/docs/generated/typeSpec.json. That can break/refuse signature lookups for refs produced by the new pipeline.

Suggested fix direction
-    const rawJson = await readFile(
-      join(process.cwd(), 'features/docs', './generated/typeSpec.json'),
-      'utf-8'
-    )
+    // Load typeSpec from the same source layout used by the active reference pipeline.
+    // (Either per sdk/version on demand, or through a compatibility fallback.)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/docs/features/docs/Reference.generated.singleton.ts` around lines 27 -
33, The _typeSpecSingleton() (and by extension getTypeSpec()) still reads the
legacy features/docs/generated/typeSpec.json; update it to load the new
reference pipeline output (e.g., content/reference/generated/typeSpec.json) so
signature lookups match the new JS v2 pipeline, and ensure getTypeSpec()
delegates to or uses _typeSpecSingleton()'s parsed result rather than the old
file path; locate the file-loading logic in _typeSpecSingleton() and replace the
join/process.cwd path to point at the new content/reference/...
generated/typeSpec.json.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/docs/package.json`:
- Around line 30-31: The predev npm script is missing the new reference
generation step and can cause javascript-v2 pages to fail; update the "predev"
script in package.json to also run codegen:references:new (just like "prebuild"
does) so that pnpm dev generates content/reference/... files when
SUPPORTS_NEW_REFERENCE_PROCESS is enabled.

---

Outside diff comments:
In `@apps/docs/features/docs/Reference.generated.singleton.ts`:
- Around line 27-33: The _typeSpecSingleton() (and by extension getTypeSpec())
still reads the legacy features/docs/generated/typeSpec.json; update it to load
the new reference pipeline output (e.g.,
content/reference/generated/typeSpec.json) so signature lookups match the new JS
v2 pipeline, and ensure getTypeSpec() delegates to or uses
_typeSpecSingleton()'s parsed result rather than the old file path; locate the
file-loading logic in _typeSpecSingleton() and replace the join/process.cwd path
to point at the new content/reference/... generated/typeSpec.json.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: e8643071-ed59-4664-a5b3-412a479d5c57

📥 Commits

Reviewing files that changed from the base of the PR and between 87408ed and 0c62892.

📒 Files selected for processing (32)
  • apps/docs/.gitignore
  • apps/docs/docs/ref/javascript/auth-mfa.mdx
  • apps/docs/docs/ref/javascript/passkey-admin.mdx
  • apps/docs/features/docs/Reference.constants.ts
  • apps/docs/features/docs/Reference.generated.singleton.ts
  • apps/docs/features/docs/Reference.navigation.client.tsx
  • apps/docs/features/docs/Reference.utils.ts
  • apps/docs/package.json
  • apps/docs/scripts/build-reference-content.ts
  • apps/docs/spec/reference/javascript/v2/config.json
  • apps/docs/spec/reference/javascript/v2/functions.json
  • apps/docs/spec/reference/javascript/v2/gotrue.json
  • apps/docs/spec/reference/javascript/v2/partials/analytics-buckets.json
  • apps/docs/spec/reference/javascript/v2/partials/auth-admin.json
  • apps/docs/spec/reference/javascript/v2/partials/auth-mfa.json
  • apps/docs/spec/reference/javascript/v2/partials/auth-passkey.json
  • apps/docs/spec/reference/javascript/v2/partials/auth.json
  • apps/docs/spec/reference/javascript/v2/partials/file-buckets.json
  • apps/docs/spec/reference/javascript/v2/partials/initializing.mdx
  • apps/docs/spec/reference/javascript/v2/partials/installing.mdx
  • apps/docs/spec/reference/javascript/v2/partials/introduction.mdx
  • apps/docs/spec/reference/javascript/v2/partials/oauth-admin.json
  • apps/docs/spec/reference/javascript/v2/partials/oauth-server.json
  • apps/docs/spec/reference/javascript/v2/partials/passkey-admin.json
  • apps/docs/spec/reference/javascript/v2/partials/typescript-support.mdx
  • apps/docs/spec/reference/javascript/v2/partials/using-filters.json
  • apps/docs/spec/reference/javascript/v2/partials/using-modifiers.json
  • apps/docs/spec/reference/javascript/v2/partials/vector-buckets.json
  • apps/docs/spec/reference/javascript/v2/postgrest.json
  • apps/docs/spec/reference/javascript/v2/realtime.json
  • apps/docs/spec/reference/javascript/v2/storage.json
  • apps/docs/spec/reference/javascript/v2/supabase.json
💤 Files with no reviewable changes (1)
  • apps/docs/features/docs/Reference.navigation.client.tsx

Comment thread apps/docs/package.json Resolved

@mandarini mandarini left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new rendered page looks good. I am curious about the partials. These are not auto-generated right? We should add clear instructions on what's going on, to help with maintainability

@jeremenichelli
jeremenichelli force-pushed the jeremias/docs-733-consume-new-tsdoc-output-in-docs-project-round-2 branch from 28a3423 to 139146c Compare May 28, 2026 11:52
@jeremenichelli jeremenichelli changed the title [DOCS-733] Improve SDK automation build step on Docs [DOCS-962] [DOCS-963] [DOCS-964] [DOCS-965] [DOCS-966] [DOCS-968] [DOCS-969] Improve SDK automation build step on Docs May 28, 2026
@jeremenichelli
jeremenichelli marked this pull request as ready for review May 28, 2026 12:09
@jeremenichelli
jeremenichelli force-pushed the jeremias/docs-733-consume-new-tsdoc-output-in-docs-project-round-2 branch from 139146c to 486f75b Compare May 28, 2026 12:12

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/docs/spec/reference/README.md`:
- Around line 11-13: The paragraph about the legacy pipeline is malformed and
must explicitly list its components; update the text so it reads as one clear
sentence stating that the legacy pipeline comprises the YAML files matching
spec/supabase_*_v*.yml, the JSON file spec/common-client-libs-sections.json, and
the script features/docs/Reference.generated.script.ts, and mention that SDKs
that haven’t migrated can opt in via the "Routing to the new pipeline" section;
replace the three broken lines with that single clarified sentence.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 86f2ecd2-94f8-42d4-a99d-927a76bcb0d0

📥 Commits

Reviewing files that changed from the base of the PR and between 0c62892 and 139146c.

📒 Files selected for processing (2)
  • apps/docs/package.json
  • apps/docs/spec/reference/README.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/docs/package.json

Comment thread apps/docs/spec/reference/README.md Resolved

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

♻️ Duplicate comments (1)
apps/docs/spec/reference/README.md (1)

11-13: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Fix the broken paragraph structure.

Lines 11-13 still contain malformed text despite being marked as addressed in previous reviews. The opening parenthesis on line 11 is never properly closed, and line 13 starts with "The YAML-driven" creating a fragmented sentence structure. This makes it impossible for readers to understand what files constitute the legacy pipeline.

📝 Proposed fix
-The legacy pipeline (`spec/supabase_*_v*.yml` + `spec/common-client-libs-sections.json`
-
-The YAML-driven `features/docs/Reference.generated.script.ts`) still exists for SDKs that haven't migrated yet — see "Routing to the new pipeline" below for how a lib opts in.
+The legacy pipeline (comprising `spec/supabase_*_v*.yml`, `spec/common-client-libs-sections.json`, and the YAML-driven `features/docs/Reference.generated.script.ts`) still exists for SDKs that haven't migrated yet — see "Routing to the new pipeline" below for how a lib opts in.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/docs/spec/reference/README.md` around lines 11 - 13, The paragraph
describing the legacy pipeline is malformed: the opening parenthesis after "The
legacy pipeline" is never closed and the sentence is split so "The YAML-driven
`features/docs/Reference.generated.script.ts`" becomes a fragment. Fix the
paragraph by combining the pieces into one coherent sentence that lists all
legacy files and tools and properly closes the parenthesis; e.g., mention
"`spec/supabase_*_v*.yml` and `spec/common-client-libs-sections.json`" together
in the parentheses and then continue with "and the YAML-driven
`features/docs/Reference.generated.script.ts`" before the clause about SDKs and
the "Routing to the new pipeline" note so the sentence reads as a single,
complete statement.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Duplicate comments:
In `@apps/docs/spec/reference/README.md`:
- Around line 11-13: The paragraph describing the legacy pipeline is malformed:
the opening parenthesis after "The legacy pipeline" is never closed and the
sentence is split so "The YAML-driven
`features/docs/Reference.generated.script.ts`" becomes a fragment. Fix the
paragraph by combining the pieces into one coherent sentence that lists all
legacy files and tools and properly closes the parenthesis; e.g., mention
"`spec/supabase_*_v*.yml` and `spec/common-client-libs-sections.json`" together
in the parentheses and then continue with "and the YAML-driven
`features/docs/Reference.generated.script.ts`" before the clause about SDKs and
the "Routing to the new pipeline" note so the sentence reads as a single,
complete statement.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: ccf75d66-eaae-4b5e-abdc-4a7dc5a1ee8a

📥 Commits

Reviewing files that changed from the base of the PR and between 139146c and 486f75b.

📒 Files selected for processing (33)
  • apps/docs/.gitignore
  • apps/docs/docs/ref/javascript/auth-mfa.mdx
  • apps/docs/docs/ref/javascript/passkey-admin.mdx
  • apps/docs/features/docs/Reference.constants.ts
  • apps/docs/features/docs/Reference.generated.singleton.ts
  • apps/docs/features/docs/Reference.navigation.client.tsx
  • apps/docs/features/docs/Reference.utils.ts
  • apps/docs/package.json
  • apps/docs/scripts/build-reference-content.ts
  • apps/docs/spec/reference/README.md
  • apps/docs/spec/reference/javascript/v2/config.json
  • apps/docs/spec/reference/javascript/v2/functions.json
  • apps/docs/spec/reference/javascript/v2/gotrue.json
  • apps/docs/spec/reference/javascript/v2/partials/analytics-buckets.json
  • apps/docs/spec/reference/javascript/v2/partials/auth-admin.json
  • apps/docs/spec/reference/javascript/v2/partials/auth-mfa.json
  • apps/docs/spec/reference/javascript/v2/partials/auth-passkey.json
  • apps/docs/spec/reference/javascript/v2/partials/auth.json
  • apps/docs/spec/reference/javascript/v2/partials/file-buckets.json
  • apps/docs/spec/reference/javascript/v2/partials/initializing.mdx
  • apps/docs/spec/reference/javascript/v2/partials/installing.mdx
  • apps/docs/spec/reference/javascript/v2/partials/introduction.mdx
  • apps/docs/spec/reference/javascript/v2/partials/oauth-admin.json
  • apps/docs/spec/reference/javascript/v2/partials/oauth-server.json
  • apps/docs/spec/reference/javascript/v2/partials/passkey-admin.json
  • apps/docs/spec/reference/javascript/v2/partials/typescript-support.mdx
  • apps/docs/spec/reference/javascript/v2/partials/using-filters.json
  • apps/docs/spec/reference/javascript/v2/partials/using-modifiers.json
  • apps/docs/spec/reference/javascript/v2/partials/vector-buckets.json
  • apps/docs/spec/reference/javascript/v2/postgrest.json
  • apps/docs/spec/reference/javascript/v2/realtime.json
  • apps/docs/spec/reference/javascript/v2/storage.json
  • apps/docs/spec/reference/javascript/v2/supabase.json
💤 Files with no reviewable changes (1)
  • apps/docs/features/docs/Reference.navigation.client.tsx
✅ Files skipped from review due to trivial changes (16)
  • apps/docs/features/docs/Reference.constants.ts
  • apps/docs/spec/reference/javascript/v2/partials/auth.json
  • apps/docs/spec/reference/javascript/v2/partials/passkey-admin.json
  • apps/docs/spec/reference/javascript/v2/partials/analytics-buckets.json
  • apps/docs/spec/reference/javascript/v2/partials/initializing.mdx
  • apps/docs/.gitignore
  • apps/docs/spec/reference/javascript/v2/partials/vector-buckets.json
  • apps/docs/spec/reference/javascript/v2/partials/oauth-admin.json
  • apps/docs/spec/reference/javascript/v2/partials/oauth-server.json
  • apps/docs/spec/reference/javascript/v2/partials/auth-admin.json
  • apps/docs/spec/reference/javascript/v2/config.json
  • apps/docs/spec/reference/javascript/v2/partials/using-filters.json
  • apps/docs/spec/reference/javascript/v2/partials/auth-mfa.json
  • apps/docs/spec/reference/javascript/v2/partials/introduction.mdx
  • apps/docs/docs/ref/javascript/auth-mfa.mdx
  • apps/docs/spec/reference/javascript/v2/partials/installing.mdx
🚧 Files skipped from review as they are similar to previous changes (7)
  • apps/docs/docs/ref/javascript/passkey-admin.mdx
  • apps/docs/spec/reference/javascript/v2/partials/auth-passkey.json
  • apps/docs/features/docs/Reference.generated.singleton.ts
  • apps/docs/spec/reference/javascript/v2/partials/using-modifiers.json
  • apps/docs/features/docs/Reference.utils.ts
  • apps/docs/spec/reference/javascript/v2/partials/typescript-support.mdx
  • apps/docs/scripts/build-reference-content.ts

mandarini added a commit that referenced this pull request Jun 1, 2026
…46502)

Builds on top of #46163.

## What changed

- Drop the legacy global `typeSpec.json` extraction (`parseTypeSpec` +
`combined.json`); JS v2 now reads typespec from the new per-lib
pipeline.
- Wire `getTypeSpec` through `SUPPORTS_NEW_REFERENCE_PROCESS` so all
four reference getters use one routing flag.
- Extend `build-reference-content.ts` to emit rich `typeSpec.json`
(comments, examples, altSignatures, params with descriptions).
- Skip libs in `SUPPORTS_NEW_REFERENCE_PROCESS` from the legacy
`Reference.generated.script.ts` → no `supabase_js_v2.yml` read in the
render path.
- Drop the dead `specFile: 'supabase_js_v2'` field from JS v2's nav
entry.
- Migrate search/embeddings ingest for JS v2 onto the new pipeline
(`loadClientLibReferenceFromNewPipeline`). Fixes a silent search-quality
bug where JS reference pages were indexed with near-empty content.
- Gitignore downloaded TypeDoc dumps under
`spec/reference/<lib>/<ver>/*.json`; `codegen:references:ensure`
auto-fetches on first build via `make download.tsdoc.v2`. Single refresh
command for devs and CI.
- Fix `/api/crawlers` to render TSDoc-extracted `@example` blocks
(matches what the visual renderer already does).
- Delete now-orphaned scripts: `validate-typespec-refs.ts`,
`find-undocumented.ts`, `validate-references.ts`.
- Drop unused `dereference/combine.tsdoc.v2` Makefile targets.
- Add snapshot test for the new pipeline as regression coverage.
- Update `spec/reference/README.md` with the full pipeline diagram,
gitignore policy, and migration checklist.
@mandarini mandarini changed the title [DOCS-962] [DOCS-963] [DOCS-964] [DOCS-965] [DOCS-966] [DOCS-968] [DOCS-969] Improve SDK automation build step on Docs docs: improve SDK automation build step on docs Jun 1, 2026
@mandarini
mandarini requested a review from ChrisChinchilla June 1, 2026 14:17
@ChrisChinchilla ChrisChinchilla added the do-not-merge Not ready to be merged yet; pending other dependencies label Jun 1, 2026
jeremenichelli and others added 3 commits June 2, 2026 18:08
…46502)

Builds on top of #46163.

- Drop the legacy global `typeSpec.json` extraction (`parseTypeSpec` +
`combined.json`); JS v2 now reads typespec from the new per-lib
pipeline.
- Wire `getTypeSpec` through `SUPPORTS_NEW_REFERENCE_PROCESS` so all
four reference getters use one routing flag.
- Extend `build-reference-content.ts` to emit rich `typeSpec.json`
(comments, examples, altSignatures, params with descriptions).
- Skip libs in `SUPPORTS_NEW_REFERENCE_PROCESS` from the legacy
`Reference.generated.script.ts` → no `supabase_js_v2.yml` read in the
render path.
- Drop the dead `specFile: 'supabase_js_v2'` field from JS v2's nav
entry.
- Migrate search/embeddings ingest for JS v2 onto the new pipeline
(`loadClientLibReferenceFromNewPipeline`). Fixes a silent search-quality
bug where JS reference pages were indexed with near-empty content.
- Gitignore downloaded TypeDoc dumps under
`spec/reference/<lib>/<ver>/*.json`; `codegen:references:ensure`
auto-fetches on first build via `make download.tsdoc.v2`. Single refresh
command for devs and CI.
- Fix `/api/crawlers` to render TSDoc-extracted `@example` blocks
(matches what the visual renderer already does).
- Delete now-orphaned scripts: `validate-typespec-refs.ts`,
`find-undocumented.ts`, `validate-references.ts`.
- Drop unused `dereference/combine.tsdoc.v2` Makefile targets.
- Add snapshot test for the new pipeline as regression coverage.
- Update `spec/reference/README.md` with the full pipeline diagram,
gitignore policy, and migration checklist.
@mandarini
mandarini force-pushed the jeremias/docs-733-consume-new-tsdoc-output-in-docs-project-round-2 branch from f78dfc3 to 6fd1cc5 Compare June 2, 2026 15:09

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/docs/scripts/build-reference-content.test.ts`:
- Around line 14-22: The snapshot test for build-reference-content is failing
because the collected output from collectReferenceContent (referencing bySlug,
flat, sections, functionsList, typeSpec) has changed upstream (new dispose
method and AuthRefreshDiscardedError) — re-run the failing test to regenerate
the baseline snapshot (e.g., run the test suite for build-reference-content with
the Jest/runner --updateSnapshot flag), verify the updated snapshot includes the
new entries, and commit the regenerated snapshot file so CI will pass.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 81299624-af8e-4efa-88e9-ed31572913fc

📥 Commits

Reviewing files that changed from the base of the PR and between f78dfc3 and 6fd1cc5.

⛔ Files ignored due to path filters (2)
  • apps/docs/features/docs/__snapshots__/Reference.typeSpec.test.ts.snap is excluded by !**/*.snap
  • apps/docs/scripts/__snapshots__/build-reference-content.test.ts.snap is excluded by !**/*.snap
📒 Files selected for processing (56)
  • .github/workflows/docs-js-libs-update.yml
  • .github/workflows/docs-tests.yml
  • apps/docs/.gitignore
  • apps/docs/app/api/crawlers/route.ts
  • apps/docs/content/navigation.references.ts
  • apps/docs/docs/ref/javascript/auth-mfa.mdx
  • apps/docs/docs/ref/javascript/passkey-admin.mdx
  • apps/docs/features/docs/Reference.constants.ts
  • apps/docs/features/docs/Reference.generated.script.ts
  • apps/docs/features/docs/Reference.generated.singleton.ts
  • apps/docs/features/docs/Reference.navigation.client.tsx
  • apps/docs/features/docs/Reference.sections.tsx
  • apps/docs/features/docs/Reference.typeSpec.test.ts
  • apps/docs/features/docs/Reference.typeSpec.ts
  • apps/docs/features/docs/Reference.utils.ts
  • apps/docs/package.json
  • apps/docs/scripts/build-reference-content.test.ts
  • apps/docs/scripts/build-reference-content.ts
  • apps/docs/scripts/find-undocumented.ts
  • apps/docs/scripts/search/sources/index.ts
  • apps/docs/scripts/search/sources/reference-doc.ts
  • apps/docs/scripts/validate-references.ts
  • apps/docs/scripts/validate-typespec-refs.ts
  • apps/docs/spec/Makefile
  • apps/docs/spec/enrichments/tsdoc_v2/combined.json
  • apps/docs/spec/enrichments/tsdoc_v2/combined_raw.json
  • apps/docs/spec/enrichments/tsdoc_v2/functions.json
  • apps/docs/spec/enrichments/tsdoc_v2/functions_dereferenced.json
  • apps/docs/spec/enrichments/tsdoc_v2/gotrue.json
  • apps/docs/spec/enrichments/tsdoc_v2/gotrue_dereferenced.json
  • apps/docs/spec/enrichments/tsdoc_v2/postgrest.json
  • apps/docs/spec/enrichments/tsdoc_v2/postgrest_dereferenced.json
  • apps/docs/spec/enrichments/tsdoc_v2/realtime.json
  • apps/docs/spec/enrichments/tsdoc_v2/realtime_dereferenced.json
  • apps/docs/spec/enrichments/tsdoc_v2/storage.json
  • apps/docs/spec/enrichments/tsdoc_v2/storage_dereferenced.json
  • apps/docs/spec/enrichments/tsdoc_v2/supabase.json
  • apps/docs/spec/enrichments/tsdoc_v2/supabase_dereferenced.json
  • apps/docs/spec/reference/README.md
  • apps/docs/spec/reference/javascript/v2/config.json
  • apps/docs/spec/reference/javascript/v2/partials/analytics-buckets.json
  • apps/docs/spec/reference/javascript/v2/partials/auth-admin.json
  • apps/docs/spec/reference/javascript/v2/partials/auth-mfa.json
  • apps/docs/spec/reference/javascript/v2/partials/auth-passkey.json
  • apps/docs/spec/reference/javascript/v2/partials/auth.json
  • apps/docs/spec/reference/javascript/v2/partials/file-buckets.json
  • apps/docs/spec/reference/javascript/v2/partials/initializing.mdx
  • apps/docs/spec/reference/javascript/v2/partials/installing.mdx
  • apps/docs/spec/reference/javascript/v2/partials/introduction.mdx
  • apps/docs/spec/reference/javascript/v2/partials/oauth-admin.json
  • apps/docs/spec/reference/javascript/v2/partials/oauth-server.json
  • apps/docs/spec/reference/javascript/v2/partials/passkey-admin.json
  • apps/docs/spec/reference/javascript/v2/partials/typescript-support.mdx
  • apps/docs/spec/reference/javascript/v2/partials/using-filters.json
  • apps/docs/spec/reference/javascript/v2/partials/using-modifiers.json
  • apps/docs/spec/reference/javascript/v2/partials/vector-buckets.json
💤 Files with no reviewable changes (5)
  • apps/docs/scripts/validate-typespec-refs.ts
  • apps/docs/scripts/validate-references.ts
  • apps/docs/features/docs/Reference.typeSpec.test.ts
  • apps/docs/features/docs/Reference.navigation.client.tsx
  • apps/docs/scripts/find-undocumented.ts
✅ Files skipped from review due to trivial changes (14)
  • apps/docs/spec/reference/javascript/v2/config.json
  • apps/docs/spec/reference/javascript/v2/partials/auth.json
  • apps/docs/spec/reference/javascript/v2/partials/auth-passkey.json
  • apps/docs/spec/reference/javascript/v2/partials/vector-buckets.json
  • apps/docs/docs/ref/javascript/passkey-admin.mdx
  • apps/docs/spec/reference/javascript/v2/partials/file-buckets.json
  • apps/docs/spec/reference/javascript/v2/partials/auth-admin.json
  • apps/docs/.gitignore
  • apps/docs/spec/reference/javascript/v2/partials/passkey-admin.json
  • apps/docs/docs/ref/javascript/auth-mfa.mdx
  • apps/docs/spec/reference/javascript/v2/partials/using-filters.json
  • apps/docs/spec/reference/javascript/v2/partials/using-modifiers.json
  • apps/docs/spec/reference/javascript/v2/partials/analytics-buckets.json
  • apps/docs/spec/reference/javascript/v2/partials/typescript-support.mdx
🚧 Files skipped from review as they are similar to previous changes (17)
  • .github/workflows/docs-tests.yml
  • apps/docs/features/docs/Reference.constants.ts
  • apps/docs/spec/reference/javascript/v2/partials/oauth-admin.json
  • apps/docs/features/docs/Reference.sections.tsx
  • apps/docs/scripts/search/sources/index.ts
  • apps/docs/spec/reference/javascript/v2/partials/initializing.mdx
  • .github/workflows/docs-js-libs-update.yml
  • apps/docs/spec/reference/javascript/v2/partials/introduction.mdx
  • apps/docs/package.json
  • apps/docs/spec/reference/javascript/v2/partials/installing.mdx
  • apps/docs/spec/reference/javascript/v2/partials/oauth-server.json
  • apps/docs/features/docs/Reference.generated.singleton.ts
  • apps/docs/content/navigation.references.ts
  • apps/docs/features/docs/Reference.utils.ts
  • apps/docs/features/docs/Reference.generated.script.ts
  • apps/docs/features/docs/Reference.typeSpec.ts
  • apps/docs/scripts/build-reference-content.ts

@jeremenichelli jeremenichelli removed the do-not-merge Not ready to be merged yet; pending other dependencies label Jun 2, 2026
@mandarini mandarini added do-not-merge Not ready to be merged yet; pending other dependencies and removed do-not-merge Not ready to be merged yet; pending other dependencies labels Jun 2, 2026
@mandarini
mandarini merged commit f20cd22 into master Jun 3, 2026
37 of 40 checks passed
@mandarini
mandarini deleted the jeremias/docs-733-consume-new-tsdoc-output-in-docs-project-round-2 branch June 3, 2026 08:46
imor pushed a commit that referenced this pull request Jun 3, 2026
# Second try of making a new better process for SDK automation

Instead of building a new pipeline. We will take the lessons learned
form round 1, plus the good design and improvement on DX quality for
drop-in file as a single step required from SDK team and produce almost
identical set of files as used right now to render using the current
pipeline.



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

* **New Features**
* New reference-content pipeline producing per-library reference
artifacts and integrating into prebuilds, search ingestion, and
rendering (type-aware examples).

* **Documentation**
* Added comprehensive JavaScript SDK v2 reference content and partials
(Auth MFA, passkeys, admin, TypeScript support, filters, modifiers,
Installing, Initializing, Buckets, etc.).

* **Tests & CI**
* Added regression snapshot test and updated workflows to refresh
reference snapshots and ensure spec downloads.

* **Chores**
* Updated ignore rules, build scripts, Makefile targets, and package
lifecycle hooks.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Katerina Skroumpelou <[email protected]>
Co-authored-by: Katerina Skroumpelou <[email protected]>
mandarini added a commit that referenced this pull request Jun 3, 2026
…46611)

The embeddings workflow started failing after #46163 with `ENOENT: ...
content/reference/javascript/v2/sections.json`. That PR routed the JS v2
search ingest through the new reference pipeline
(`loadClientLibReferenceFromNewPipeline` in
`apps/docs/scripts/search/sources/reference-doc.ts`), and updated
`predev` and `prebuild` to run both `codegen:references` and
`codegen:references:new`, but missed `preembeddings`. This chains
`codegen:references:new` into `preembeddings` so `pnpm run embeddings`
(and the `:nimbus` / `:refresh` variants that fan out to it) produces
the new pipeline output before the search ingest reads it.
tomaspozo pushed a commit that referenced this pull request Jun 4, 2026
# Second try of making a new better process for SDK automation

Instead of building a new pipeline. We will take the lessons learned
form round 1, plus the good design and improvement on DX quality for
drop-in file as a single step required from SDK team and produce almost
identical set of files as used right now to render using the current
pipeline.



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

* **New Features**
* New reference-content pipeline producing per-library reference
artifacts and integrating into prebuilds, search ingestion, and
rendering (type-aware examples).

* **Documentation**
* Added comprehensive JavaScript SDK v2 reference content and partials
(Auth MFA, passkeys, admin, TypeScript support, filters, modifiers,
Installing, Initializing, Buckets, etc.).

* **Tests & CI**
* Added regression snapshot test and updated workflows to refresh
reference snapshots and ensure spec downloads.

* **Chores**
* Updated ignore rules, build scripts, Makefile targets, and package
lifecycle hooks.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Katerina Skroumpelou <[email protected]>
Co-authored-by: Katerina Skroumpelou <[email protected]>
tomaspozo pushed a commit that referenced this pull request Jun 4, 2026
…46611)

The embeddings workflow started failing after #46163 with `ENOENT: ...
content/reference/javascript/v2/sections.json`. That PR routed the JS v2
search ingest through the new reference pipeline
(`loadClientLibReferenceFromNewPipeline` in
`apps/docs/scripts/search/sources/reference-doc.ts`), and updated
`predev` and `prebuild` to run both `codegen:references` and
`codegen:references:new`, but missed `preembeddings`. This chains
`codegen:references:new` into `preembeddings` so `pnpm run embeddings`
(and the `:nimbus` / `:refresh` variants that fan out to it) produces
the new pipeline output before the search ingest reads it.
mandarini added a commit that referenced this pull request Jun 8, 2026
…ned (#46737)

The `Update JS Client Libraries Docs` workflow's "Refresh
reference-content snapshot" step fails because `npx vitest run --update
scripts/build-reference-content.test.ts` is treated as a filter, not a
restriction, under Vitest 4, so all docs tests
run. `CodeSample.test.ts` then fails with ENOENT on
`apps/docs/examples/_internal/fixtures/*` because the workflow bypasses
the `pretest` npm hook that runs `codegen:examples`.
  
This is a regression of #44943 (commit 28ef62c), reintroduced by
#46163 when the snapshot step was renamed and rewritten back to the
file-path form.
  
Fixes:
- Workflow: use `--dir scripts` so only the snapshot test runs.
- Tests: add a vitest globalSetup that mirrors `codegen:examples`, so
`npx vitest`, `pnpm test:local`, and IDE single-test runs no longer
depend on the `pretest` lifecycle hook being triggered first.

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

## Summary by CodeRabbit

* **Chores**
* Updated test infrastructure configuration and initialization process
for improved test suite management.
* Refined test execution workflow to efficiently manage test discovery
and execution across project directories.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants