Repository navigation
docs(dart): derive reference sections from spec YAML section headers - #47994
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
6 Skipped Deployments
|
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe Dart reference generator now derives section metadata from ordered YAML entries, using header inheritance and explicit overrides. The Dart v2 specification adds taxonomy fields across authentication, functions, database, realtime, storage, and query APIs. ChangesDart reference taxonomy
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Pull request overview
This PR removes the Dart v2 reference generator’s dependency on the shared common-client-libs-sections.json section tree by sourcing each method’s @category / @subcategory directly from the Dart v2 YAML spec. This keeps the Dart v2 reference pipeline self-contained while preserving the generated output structure.
Changes:
- Added
category/subcategorymetadata to Dart v2 spec method entries so section placement is defined per entry. - Updated
generate-dart-reference.tsto read section metadata from YAML and removed the shared section-tree walk + overrides. - Kept header/overview/top-level entries excluded via
HEADER_IDS/SKIP_IDS, matching the existing partials-based rendering approach.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| apps/docs/spec/supabase_dart_v2.yml | Adds per-entry category / subcategory fields to drive navigation grouping from the spec itself. |
| apps/docs/scripts/generate-dart-reference.ts | Switches section derivation to YAML fields and removes the shared section-map + override logic. |
…ants, and July additions Adds Dart reference entries and enrichments for supabase-flutter features shipped July 8 to 15. Uses the new reference pipeline (stacked on #47994): sections come from category/subcategory fields on each YAML entry, so common-client-libs-sections.json is not touched. New entries: - storage: vector buckets (create/get/list/delete bucket, index management, and vector put/get/list/query/delete) under a new "Vector Buckets" section - storage: analytics (Iceberg) buckets and the analytics catalog accessor under a new "Analytics Buckets" section - storage: listPaginated (list files v2) - auth: signInWithWeb3 - auth: OAuth server listGrants and revokeGrant under a new "OAuth Server" section - database: stripNulls modifier Enrichments to existing entries: - storage: cacheNonce on getPublicUrl/createSignedUrl/download, and filter/sort/pagination options on listBuckets - auth: mfa.challenge channel, updateUser currentPassword, async getSession - functions: invoke abortSignal Adds partials for the three new subcategories (analytics-buckets, vector-buckets, oauth-server) and registers their group-header ids in HEADER_IDS so the converter treats them as section overviews. Excludes items already covered by #47728 (OAuth server authorization details, custom providers admin, explain format, realtime onHeartbeat and filter examples).
…ain reference updates Adds Dart reference entries for supabase-flutter features (parity with supabase-js). Uses the new reference pipeline (stacked on #47994): sections come from category/subcategory fields on each YAML entry, so common-client-libs-sections.json and the JS spec are not touched. - auth: OAuth 2.1 server authorization API (oauth.getAuthorizationDetails/ approveAuthorization/denyAuthorization) under a new "OAuth Server" section - auth admin: custom OIDC/OAuth providers admin API (admin.customProviders.list/create/get/update/delete) under a new "Custom Provider Admin" section - realtime: onHeartbeat, plus onPostgresChanges pattern/negated/multi-filter and column-selection examples - postgrest: explain() format option Adds partials for the two new subcategories (oauth-server, custom-provider-admin) and registers their group-header ids in HEADER_IDS. Source PRs: supabase-flutter #1499, #1516, #1517, #1519, #1526.
Previously the Dart v2 reference derived each method's section from common-client-libs-sections.json, which meant maintaining that nav file in lockstep with the spec YAML. This makes the spec YAML self-describing instead: each section-header entry (e.g. `auth-mfa-api`, `file-buckets`, and the new top-level `auth-api`, `database-api`, `functions-api`, `realtime-api`) carries the `category` and optional `subcategory` that every method after it inherits, up to the next header. Individual methods carry no section metadata, so authoring a new method just means placing it in the right section, and adding a section is one header entry plus its partial. `generate-dart-reference.ts` walks the spec in order, tracking the current section from the most recent header. A method may still override the section explicitly, and the converter errors if a method appears before any header. The generated navigation is byte-for-byte identical to before.
0f5d0ba to
9d12ca7
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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/generate-dart-reference.ts`:
- Around line 171-174: Update the subcategory selection in the method
inheritance logic so it checks whether fn.subcategory is explicitly provided,
independently of fn.category. Preserve currentSubcategory when no subcategory
override exists, while continuing to derive category from fn.category or
currentCategory.
In `@apps/docs/spec/supabase_dart_v2.yml`:
- Around line 5078-5079: Update the Database subcategory values in both affected
entries to title case, using “Using Modifiers” and “Using Filters” to match
their corresponding titles and the existing navigation label convention.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 2dd0766e-deab-43d3-8821-32768bf95a5c
📒 Files selected for processing (2)
apps/docs/scripts/generate-dart-reference.tsapps/docs/spec/supabase_dart_v2.yml
…ants, and July additions Adds Dart reference entries and enrichments for supabase-flutter features shipped July 8 to 15. Stacked on #47994: methods carry no section metadata and inherit it from the nearest section header. New sections are added as header entries (with category/subcategory) plus overview partials. New sections and entries: - storage: Vector Buckets section (create/get/list/delete bucket, index management, and vector put/get/list/query/delete) - storage: Analytics Buckets section (analytics catalog accessor and bucket create/list/delete) - storage: listPaginated (list files v2) under File Buckets - auth: signInWithWeb3 - auth: OAuth Server section with listGrants and revokeGrant - database: stripNulls modifier Enrichments to existing entries: - storage: cacheNonce on getPublicUrl/createSignedUrl/download, and filter/sort/pagination options on listBuckets - auth: mfa.challenge channel, updateUser currentPassword, async getSession - functions: invoke abortSignal Adds partials for the three new sections and registers their header ids in the converter's HEADER_IDS. Excludes items already covered by #47728.
…ain reference updates Adds Dart reference entries for supabase-flutter features (parity with supabase-js). Stacked on #47994: methods carry no section metadata and inherit it from the nearest section header. New sections are added as header entries (with category/subcategory) plus overview partials. - auth: OAuth 2.1 server authorization API (oauth.getAuthorizationDetails/ approveAuthorization/denyAuthorization) as a new "OAuth Server" section - auth admin: custom OIDC/OAuth providers admin API (admin.customProviders.list/create/get/update/delete) as a new "Custom Provider Admin" section - realtime: onHeartbeat, plus onPostgresChanges pattern/negated/multi-filter and column-selection examples - postgrest: explain() format option Adds partials for the two new sections and registers their header ids in the converter's HEADER_IDS. Source PRs: supabase-flutter #1499, #1516, #1517, #1519, #1526.
The converter ignored an explicit `subcategory` when a method did not also set `category`, so a subcategory-only override silently fell back to the inherited value. Check for `subcategory` presence directly.
…ain reference updates Adds Dart reference entries for supabase-flutter features (parity with supabase-js). Stacked on #47994: methods carry no section metadata and inherit it from the nearest section header. New sections are added as header entries (with category/subcategory) plus overview partials. - auth: OAuth 2.1 server authorization API (oauth.getAuthorizationDetails/ approveAuthorization/denyAuthorization) as a new "OAuth Server" section - auth admin: custom OIDC/OAuth providers admin API (admin.customProviders.list/create/get/update/delete) as a new "Custom Provider Admin" section - realtime: onHeartbeat, plus onPostgresChanges pattern/negated/multi-filter and column-selection examples - postgrest: explain() format option Adds partials for the two new sections and registers their header ids in the converter's HEADER_IDS. Source PRs: supabase-flutter #1499, #1516, #1517, #1519, #1526.
…ants, and July additions Adds Dart reference entries and enrichments for supabase-flutter features shipped July 8 to 15. Stacked on #47994: methods carry no section metadata and inherit it from the nearest section header. New sections are added as header entries (with category/subcategory) plus overview partials. New sections and entries: - storage: Vector Buckets section (create/get/list/delete bucket, index management, and vector put/get/list/query/delete) - storage: Analytics Buckets section (analytics catalog accessor and bucket create/list/delete) - storage: listPaginated (list files v2) under File Buckets - auth: signInWithWeb3 - auth: OAuth Server section with listGrants and revokeGrant - database: stripNulls modifier Enrichments to existing entries: - storage: cacheNonce on getPublicUrl/createSignedUrl/download, and filter/sort/pagination options on listBuckets - auth: mfa.challenge channel, updateUser currentPassword, async getSession - functions: invoke abortSignal Adds partials for the three new sections and registers their header ids in the converter's HEADER_IDS. Excludes items already covered by #47728.
Braintrust eval report
|
…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 -->
…ants, and July additions Adds Dart reference entries and enrichments for supabase-flutter features shipped July 8 to 15. Stacked on #47994: methods carry no section metadata and inherit it from the nearest section header. New sections are added as header entries (with category/subcategory) plus overview partials. New sections and entries: - storage: Vector Buckets section (create/get/list/delete bucket, index management, and vector put/get/list/query/delete) - storage: Analytics Buckets section (analytics catalog accessor and bucket create/list/delete) - storage: listPaginated (list files v2) under File Buckets - auth: signInWithWeb3 - auth: OAuth Server section with listGrants and revokeGrant - database: stripNulls modifier Enrichments to existing entries: - storage: cacheNonce on getPublicUrl/createSignedUrl/download, and filter/sort/pagination options on listBuckets - auth: mfa.challenge channel, updateUser currentPassword, async getSession - functions: invoke abortSignal Adds partials for the three new sections and registers their header ids in the converter's HEADER_IDS. Excludes items already covered by #47728.
…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 -->
What
Addresses @jeremenichelli's feedback that the Dart v2 reference required maintaining section metadata separately from the spec. The reference now derives every method's section from the spec YAML itself, with no per-method metadata.
How
Each section-header entry in
supabase_dart_v2.ymlcarries thecategoryand optionalsubcategorythat every method after it inherits, up to the next header:category/subcategory:auth-mfa-api,passkey-api,admin-api,admin-passkey-api,file-buckets,using-modifiers,using-filters.auth-api,functions-api,database-api,realtime-api.generate-dart-reference.tswalks the spec in order, tracking the current section from the most recent header, and tags each method's declaration with it. A method may still setcategory/subcategoryexplicitly to override, and the converter errors if a method appears before any header.Why this is less work
category/subcategoryfields, no nav file edit.category/subcategory) plus its overview partial.common-client-libs-sections.jsonis not touched (it still drives the legacy-pipeline SDKs).Verification
The generated navigation (
content/reference/dart/v2/sections.json,bySlug.json) is byte-for-byte identical to the previous output.pnpm codegen:references:newwrites 105 method declarations across 5 categories with no orphaned methods and no slug collisions.Supersedes the earlier per-method-
categoryapproach on this branch.Summary by CodeRabbit
Documentation
categoryandsubcategorytaxonomy for clearer grouping (Auth, Passkey, Edge Functions, Database, Realtime, Storage, and database modifiers/filters).Bug Fixes