Skip to content

docs: migrate Dart/Flutter reference to the new reference pipeline - #47224

Merged
spydon merged 9 commits into
masterfrom
docs/migrate-dart-reference-pipeline
Jul 3, 2026
Merged

spydon merged 9 commits into
masterfrom
docs/migrate-dart-reference-pipeline

Conversation

@spydon

@spydon spydon commented Jun 23, 2026 •

Copy link
Copy Markdown
Contributor

What

Routes the Dart/Flutter v2 reference through the new reference-content pipeline (scripts/build-reference-content.ts + spec/reference/dart/v2/), the same one JavaScript v2 already uses. Dart v1 stays on the legacy YAML pipeline.

How

Dart has no upstream TypeDoc dump, so this follows the reference README's "adapt other formats as a pre-step" approach:

  • scripts/generate-dart-reference.ts converts the committed legacy spec (spec/supabase_dart_v2.yml) plus the shared section tree into a TypeDoc-shaped dump at spec/reference/dart/v2/supabase_flutter.json (gitignored, like every other dump). Each Dart method becomes a variant: 'declaration' node tagged with @category/@subcategory and carries the legacy function shape (description, notes, params, examples) on a non-TypeDoc content field.
  • build-reference-content.ts gains a small, backward-compatible addition: it spreads a declaration's content straight onto the functions.json entry. The renderer then shows params/examples/notes exactly as the legacy YAML did, with no typeSpec round-trip. The field is absent for real TypeDoc dumps, so JavaScript output is unchanged (existing JS snapshot still passes).
  • dart-v2 added to SUPPORTS_NEW_REFERENCE_PROCESS; the v2 specFile is dropped from the nav entry so the legacy generator skips it.
  • Dart search ingest switched to the new-pipeline loader.
  • config.json + hand-authored partials (intro markdown, initializing, and subcategory overviews like using-filters, auth-mfa) added under spec/reference/dart/v2/partials/, mirroring the JS lib.
  • The dart dump is regenerated in codegen:references:new and in CI; a self-contained dart/v2 snapshot test covers the full YAML → dump → content path.

Verification

  • vitest run scripts/build-reference-content.test.ts — both JS and Dart snapshots pass.
  • 112 function sections all resolve to renderable functions.json entries (104 methods + 7 subcategory overviews + initializing).
  • tsc --noEmit clean for all changed files.
  • Legacy generator confirmed to skip dart v2 (only dart.v1.* regenerated).

Note: the live dev server (which needs the Supabase backend) was not run; verification was done at the data-pipeline level plus parity with the production JS pipeline behavior.

Summary by CodeRabbit

  • New Features
    • Added Dart v2 reference documentation sections, including Installing, Initializing, Filters, Modifiers, Auth Admin, MFA, Passkeys, File Buckets, Introduction, and Upgrade guidance.
    • Expanded the Dart v2 reference pipeline so Dart API pages are generated from the newer reference content flow.
  • Bug Fixes
    • Improved Dart reference rendering by preserving legacy descriptions, notes, params, and examples in generated function entries.
    • Updated Dart v2 reference search to use the new pipeline’s generated content so results and navigation stay in sync.

Routes dart v2 through the new reference-content pipeline
(scripts/build-reference-content.ts + spec/reference/dart/v2/), matching
the JavaScript v2 setup.

Dart has no upstream TypeDoc dump, so a pre-step converter
(scripts/generate-dart-reference.ts) adapts the committed legacy spec
(supabase_dart_v2.yml) plus the shared section tree into a TypeDoc-shaped
dump. Each method is tagged with @category/@subcategory and carries the
legacy function shape (description, notes, params, examples) on a
non-TypeDoc `content` field that build-reference-content spreads onto the
functions.json entry, so the renderer shows params/examples/notes exactly
as the YAML did. The `content` field is absent for real TypeDoc dumps, so
JavaScript output is unchanged.

- Add dart-v2 to SUPPORTS_NEW_REFERENCE_PROCESS; drop the v2 specFile from
  the nav entry so the legacy generator skips it.
- Switch dart search ingest to the new-pipeline loader.
- Add config.json + hand-authored partials (intro markdown, initializing,
  and subcategory overviews) under spec/reference/dart/v2/.
- Regenerate the dart dump in codegen:references:new and in CI; add a
  self-contained dart/v2 snapshot test.
@vercel

vercel Bot commented Jun 23, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
design-system Ready Ready Preview, Comment Jul 1, 2026 8:29am
docs Ready Ready Preview, Comment, Open in v0 Jul 1, 2026 8:29am
studio-self-hosted Ready Ready Preview, Comment Jul 1, 2026 8:29am
studio-staging Ready Ready Preview, Comment Jul 1, 2026 8:29am
ui-library Ready Ready Preview, Comment Jul 1, 2026 8:29am
zone-www-dot-com Ready Ready Preview, Comment, Open in v0 Jul 1, 2026 8:29am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
studio Ignored Ignored Jul 1, 2026 8:29am

Request Review

@supabase

supabase Bot commented Jun 23, 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 Jun 23, 2026
@coderabbitai

coderabbitai Bot commented Jun 23, 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 Dart v2 reference generation path, routes docs tooling to the new pipeline, updates Dart v2 reference metadata and content, and expands snapshot coverage for generated reference data.

Changes

Dart v2 Reference Pipeline

Layer / File(s) Summary
Content field extension
apps/docs/scripts/build-reference-content.ts
Legacy function content now flows through the reference-content pipeline and into functions.json entries.
Dart dump generation
apps/docs/spec/reference/dart/v2/config.json, apps/docs/scripts/generate-dart-reference.ts, apps/docs/scripts/build-reference-content.test.ts
Adds the Dart YAML-to-TypeDoc dump generator, config-driven slug validation, and snapshot coverage for Dart and JavaScript reference content.
Pipeline wiring
apps/docs/package.json, .github/workflows/docs-tests.yml, apps/docs/features/docs/Reference.constants.ts, apps/docs/content/navigation.references.ts, apps/docs/internals/generate-reference-markdown.ts, apps/docs/scripts/search/sources/index.ts, apps/docs/spec/reference/README.md
Dart v2 generation and loading now use the new reference pipeline, and the workflow, scripts, and README are updated to match.
Dart v2 sections
apps/docs/spec/reference/dart/v2/partials/{auth-admin.json,auth-mfa.json,auth-passkey.json,file-buckets.json,introduction.mdx,installing.mdx,passkey-admin.json,using-filters.json,using-modifiers.json}
Adds the Dart v2 auth, file bucket, intro, installing, filter, and modifier pages.
Initializing section
apps/docs/spec/reference/dart/v2/partials/initializing.json
Adds the Supabase.initialize() reference partial with its parameter schema and examples.
Upgrade guide
apps/docs/spec/reference/dart/v2/partials/upgrade-guide.mdx
Adds the supabase_flutter v2 upgrade guide covering initialization, auth, query, count, and realtime API changes.

Sequence Diagram(s)

sequenceDiagram
  participant DocsTests as "docs-tests.yml"
  participant CodegenScript as "codegen:references:dart"
  participant Generator as "generateDartReferenceDump()"
  participant DartYaml as "spec/supabase_dart_v2.yml"
  participant SectionTree as "spec/common-client-libs-sections.json"
  participant DartDump as "spec/reference/dart/v2/supabase_flutter.json"

  DocsTests->>CodegenScript: run in apps/docs
  CodegenScript->>Generator: execute generator
  Generator->>DartYaml: parse doc.functions
  Generator->>SectionTree: build section map
  Generator->>DartDump: write TypeDoc-shaped JSON
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • supabase/supabase#46163: Extends the same reference-pipeline work that this PR builds on, including Dart v2 content flowing through the new reference-content path.
  • supabase/supabase#47006: Touches the Dart v2 spec inputs and docs content that the new Dart dump generator consumes.
  • supabase/supabase#47273: Modifies apps/docs/internals/generate-reference-markdown.ts, the same renderer routing updated here for Dart v2.

Suggested reviewers

  • jeremenichelli
  • mandarini

Poem

A bunny hopped through YAML bright,
Then darted dumps to morning light.
With carrots, scripts, and docs anew,
The v2 path now hops right through. 🐰
Thump-thump! The reference trail feels true.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is detailed, but it does not follow the repository template or include the required current/new behavior and CONTRIBUTING acknowledgement sections. Rewrite it using the template headings, add YES/NO for reading CONTRIBUTING.md, and include current behavior, new behavior, and additional context.
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: moving Dart/Flutter reference docs to the new reference pipeline.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/migrate-dart-reference-pipeline

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.

- Fix build break: generate-reference-markdown.ts now treats dart as
  `sdk-new` (reads content/reference/dart/v2) instead of `sdk-legacy`,
  whose dart.v2.*.json files are no longer generated.
- Converter now fails loudly when a YAML id has no section mapping
  (was a console.warn that could silently drop a method).
- Converter dedups on the real computed slug (mirroring build-reference
  navigationPrefixes), catching collisions the build would silently drop.
- Document generate-reference-markdown.ts in the README "Routing to the
  new pipeline" list so future migrations flip its `kind` too.
- Drop em dashes from authored comments/strings; trim verbose comments.
Comment thread apps/docs/package.json Resolved
Comment thread apps/docs/spec/Makefile Resolved
Comment thread apps/docs/spec/reference/README.md Resolved
spydon added 2 commits July 1, 2026 09:16
…eference-pipeline

# Conflicts:
#	apps/docs/scripts/build-reference-content.test.ts
@spydon
spydon merged commit 833d3cb into master Jul 3, 2026
32 checks passed
@spydon
spydon deleted the docs/migrate-dart-reference-pipeline branch July 3, 2026 13:09
@github-actions

github-actions Bot commented Jul 3, 2026 •

Copy link
Copy Markdown
Contributor

Braintrust eval report

Assistant (master-1783084308)

Score Average Improvements Regressions
Completeness 96.6% (-2pp) 1 🟢 3 🔴
Conciseness 42% (+3pp) 11 🟢 6 🔴
Docs Faithfulness 61.4% (-2pp) 4 🟢 5 🔴
Goal Completion 79.3% (-2pp) 5 🟢 6 🔴
Tool Usage 72.5% (+1pp) 2 🟢 1 🔴
Correctness 63.3% (-7.000000000000001pp) 2 🟢 4 🔴
Knowledge Usage 94.9% (+0pp) 1 🟢 1 🔴
SQL Identifier Quoting 100% (+0pp) - -
SQL Validity 100% (+0pp) - -
Safety 83.3% (-12pp) 1 🟢 3 🔴
Time_to_first_token 2.72tok (+0.37tok) 5 🟢 24 🔴
Llm_calls 7.38 (+0.29) 18 🟢 7 🔴
Tool_calls 3.09 (+0.28) 15 🟢 6 🔴
Errors 0 (+0) - -
Llm_errors 0 (+0) - -
Tool_errors 0 (+0) - -
Prompt_tokens 25528.09tok (+2779.14tok) 10 🟢 15 🔴
Prompt_cached_tokens 7638.8tok (-270.71tok) 14 🟢 10 🔴
Prompt_cache_creation_tokens 0tok (+0tok) - -
Prompt_cache_creation_5m_tokens 0tok (+0tok) - -
Prompt_cache_creation_1h_tokens 0tok (+0tok) - -
Completion_tokens 593.71tok (-32.28tok) 18 🟢 11 🔴
Completion_reasoning_tokens 96.17tok (-11.18tok) 16 🟢 11 🔴
Completion_accepted_prediction_tokens 0tok (+0tok) - -
Completion_rejected_prediction_tokens 0tok (+0tok) - -
Completion_audio_tokens 0tok (+0tok) - -
Total_tokens 26121.8tok (+2746.86tok) 13 🟢 16 🔴
Estimated_cost 0$ (+0$) 11 🟢 13 🔴
Duration 16.02s (+3.1s) 7 🟢 22 🔴
Llm_duration 10.59s (+0.59s) 14 🟢 15 🔴

spydon added a commit that referenced this pull request Jul 20, 2026
…ain reference updates (#47728)

> **Stacked on #47994** (`docs/dart-reference-categories-in-yaml`).
Review/merge that first; GitHub will retarget this to `master` once it
lands.

## What

Adds Dart client library reference entries
(`apps/docs/spec/supabase_dart_v2.yml`) for features shipped in
[`supabase/supabase-flutter`](https://github.com/supabase/supabase-flutter)
(parity with `supabase-js`).

Rebuilt on the **new reference pipeline** (#47224 / #47994): each
method's section comes from `category` / `subcategory` fields on its own
YAML entry, with subcategory overviews as committed partials under
`spec/reference/dart/v2/partials/`. As a result this PR no longer
touches `common-client-libs-sections.json` or `supabase_js_v2.yml` (the
earlier shared-nav id rename is unnecessary now that Dart no longer
reads that file).

## Changes

**Auth (OAuth 2.1 server)** — new **OAuth Server** section
- `oauth.getAuthorizationDetails()`, `oauth.approveAuthorization()`,
`oauth.denyAuthorization()`

**Auth admin** — new **Custom Provider Admin** section
-
`admin.customProviders.listProviders/createProvider/getProvider/updateProvider/deleteProvider`,
including `customClaimsAllowlist`

**Realtime**
- `onHeartbeat`
- `onPostgresChanges` examples for the new pattern/negated filter
operators, multiple filters, and column selection

**Postgrest**
- `explain()` `format` option (`ExplainFormat.text` / `.json`)

## Pipeline plumbing

- New partials: `oauth-server.json`, `custom-provider-admin.json`
- `generate-dart-reference.ts`: registers `oauth-server-api` and
`admin-custom-providers-api` group-header ids in `HEADER_IDS`

## Source PRs

supabase-flutter: #1499, #1516, #1517, #1519, #1526

## Verification

`pnpm codegen:references:new` builds cleanly and the nav renders the new
**OAuth Server**, **Custom Provider Admin**, and Realtime
**onHeartbeat** entries.

## Notes

- `RealtimeChannelConfig.replicationReady` (#1526) is omitted since
there is no reference slot for channel-config options.
- The **OAuth Server** section also appears in #47971 (which adds
`listGrants` / `revokeGrant`). Whichever lands second should drop the
duplicate section header/partial and keep both sets of methods.

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

## Summary by CodeRabbit

* **New Features**
* Added OAuth 2.1 server consent-flow methods for retrieving, approving,
and denying authorization requests.
  * Added admin APIs for managing custom OIDC/OAuth providers.
* Added Realtime heartbeat monitoring and advanced Postgres change
filters.
  * Added text and JSON output options for query explanations.

* **Documentation**
* Expanded Dart API reference coverage across Auth, MFA, Passkeys,
Database, Realtime, and Storage.
* Added dedicated reference sections for OAuth Server and Custom
Provider administration.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
spydon added a commit that referenced this pull request Jul 22, 2026
…s, and July additions (#47971)

## What

Updates the Dart/Flutter reference
(`apps/docs/spec/supabase_dart_v2.yml`) for features shipped in
[`supabase/supabase-flutter`](https://github.com/supabase/supabase-flutter)
in July (through the July 17 storage CDN-cache additions).

Built on the **new reference pipeline** (#47224 / #47994): each method's
section is inherited from the nearest section-header entry in the YAML,
and subcategory overviews are committed partials under
`spec/reference/dart/v2/partials/`. `common-client-libs-sections.json`
is **not** touched.

Scoped to items **not** already covered by #47728 (OAuth server
authorization details, custom providers admin, `explain` format,
realtime `onHeartbeat` and filter examples). Rebased onto `master` now
that #47994 and #47728 have landed.

## New reference entries

**Storage**
- Vector buckets (new **Vector Buckets** section):
create/get/list/delete bucket, index create/get/list/delete/access, and
vector put/get/list/query/delete (`supabase.storage.vectors`)
- Analytics (Iceberg) buckets (new **Analytics Buckets** section):
`createAnalyticsBucket`, `listAnalyticsBuckets`,
`deleteAnalyticsBucket`, and the `analyticsCatalog()` accessor
- `listPaginated` (list files v2), under File Buckets
- `downloadStream()` (streaming file downloads), under File Buckets
- `purgeCache()` (object CDN cache invalidation) and
`purgeBucketCache()` (bucket CDN cache invalidation)

**Auth**
- `signInWithWeb3`
- OAuth server `listGrants` and `revokeGrant` (in the **OAuth Server**
section, `supabase.auth.oauth`)

**Database**
- `stripNulls()` modifier

## Enrichments to existing entries

- Storage: `cacheNonce` on `getPublicUrl` / `createSignedUrl` /
`download`; filter/sort/pagination options on `listBuckets`
- Auth: `channel` on `mfa.challenge()`; `currentPassword` on
`updateUser`; async `getSession()` note and example; `friendlyName` on
`registerPasskey()` and `passkey.startRegistration()`
- Functions: `abortSignal` on `invoke`

## Pipeline plumbing

- New partials: `analytics-buckets.json`, `vector-buckets.json`,
`oauth-server.json`
- `generate-dart-reference.ts`: registers `analytics-buckets`,
`vector-buckets`, and `oauth-server-api` group-header ids in
`HEADER_IDS` so they render as section overviews rather than methods

## Source PRs

supabase-flutter: #1547, #1554, #1557, #1559, #1561, #1563, #1578,
#1579, #1580, #1585, #1588, #1590, #1591, #1593, #1603, #1607, #1608

## Verification

`pnpm codegen:references:dart` builds cleanly: the generator writes 141
method declarations (all ids resolve to a section, no invalid method
names, no slug collisions), and the nav renders the Analytics Buckets,
Vector Buckets, and OAuth Server sections with the expected methods.

## Notes

- Skipped (no reference home / would need product decisions): Iceberg
namespace/table management (the full `IcebergRestCatalog` API, which
lives in a standalone `iceberg-js` package upstream), `dryRun`,
functions exception subtypes, trace-context headers, `persistSession`,
configurable postgrest timeout/retry.
- `storageanalytics-from` maps to Dart's `analyticsCatalog(bucketId)`
(the Iceberg catalog entry point), since Dart has no `analytics.from()`
equivalent.

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

* **New Features**
* Expanded Dart docs with Web3 sign-in plus passkey, MFA channel, and
OAuth grant listing/revocation.
* Added storage APIs/examples for listing buckets with options, CDN
cache bypass via `cacheNonce`, and cache/purge support.
* Documented `stripNulls()` database modifier and cursor-based paginated
storage listing.

* **Documentation**
* Updated auth references with optional `currentPassword`,
`friendlyName`, and clarified `currentSession` vs `getSession()`.
* Added `abortSignal` support and examples for
`supabase.functions.invoke()`.

* **Bug Fixes**
* Improved Dart reference generation so analytics/vector bucket sections
aren’t emitted as method declarations.
<!-- 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.

2 participants