Skip to content

feat(storage): support filter/sort/pagination options on listBuckets() - #1557

Merged
spydon merged 7 commits into
mainfrom
worktree-SDK-1271
Jul 10, 2026
Merged

spydon merged 7 commits into
mainfrom
worktree-SDK-1271

Conversation

@spydon

@spydon spydon commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds optional filter, sort, and pagination arguments to StorageBucketApi.listBuckets(), matching the supabase-js options. Calling listBuckets() with no arguments keeps the current behavior, so this is non-breaking.

The new ListBucketsOptions supports limit, offset, search, sortColumn (BucketSortColumn), and sortOrder (BucketSortOrder). These are serialized into the bucket request query string (limit, offset, search, sortColumn, sortOrder), mirroring the JS listBucketOptionsToQueryString behavior.

Outcome: implemented

Reference

supabase-js StorageBucketApi.listBuckets(options?: ListBucketOptions) in packages/core/storage-js/src/packages/StorageBucketApi.ts.

Compliance matrix

storage.file_buckets.list_file_buckets → implemented (was partially_implemented).

Tests

Added mock-http-client tests in packages/storage_client/test/basic_test.dart covering: no options (no query string), empty options, all options set, and limit/offset of zero. dart analyze and the storage_client mock tests pass.

Linear: SDK-1271

@spydon
spydon requested a review from a team as a code owner July 8, 2026 12:52
@github-actions github-actions Bot added the storage This issue or pull request is related to storage label Jul 8, 2026
spydon added 2 commits July 8, 2026 15:08
Register the BucketSortColumn constructor under the canonical
storage.file_buckets.list_file_buckets feature so the capability-matrix symbol
check passes, and run dart format on the storage_client test.
Register the full set of new public symbols (ListBucketsOptions, BucketSortColumn,
BucketSortOrder and their members) under storage.file_buckets.list_file_buckets.
@spydon
spydon changed the base branch from main to worktree-enums July 8, 2026 14:16
…extension

BucketSortColumn hardcoded a value field that was just the snake_case of
the entry name, so it is now a plain enum relying on the existing
Enum.snakeCase extension. BucketSortOrder keeps its value field since its
asc/desc values cannot be derived from the entry names.
@spydon
spydon changed the base branch from worktree-enums to main July 8, 2026 14:23
@spydon

spydon commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

@copilot please fix the merge conflicts in this pull request.

Copilot AI commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

@copilot please fix the merge conflicts in this pull request.

Resolved — the only conflict was in storage_bucket_api.dart where origin/main changed FetchOptions to take headers as a positional argument. I kept the ListBucketsOptions changes and updated the constructor call to FetchOptions(headers) to match. Fixed in commit fix(storage): resolve merge conflict in storage_bucket_api.dart.

@spydon
spydon merged commit b72739e into main Jul 10, 2026
28 checks passed
@spydon
spydon deleted the worktree-SDK-1271 branch July 10, 2026 08:33
grdsdev added a commit to supabase/supabase that referenced this pull request Aug 4, 2026
## Summary

Updates SDK reference docs and the client-side tracing guide based on
recent releases across all six Supabase SDKs.

## SDKs analyzed

| SDK | Repo | Latest commit | Latest tag |
|-----|------|--------------|------------|
| js | supabase/supabase-js | `e4e8864` | v3.0.0-next.29 |
| dart | supabase/supabase-flutter | `c3e3602` |
yet_another_json_isolate-v2.1.1 |
| py | supabase/supabase-py | `6570638` | v3.0.0a1 |
| swift | supabase/supabase-swift | `ebef170` | v2.51.0 |
| kt | supabase-community/supabase-kt | `e23df20` | 3.7.0-beta-1 |
| csharp | supabase-community/supabase-csharp | `3fad62f` | v1.1.2 |

## Documentation changes

### `apps/docs/spec/supabase_dart_v2.yml`

- **OAuth Server API**
([supabase-flutter#1561](supabase/supabase-flutter#1561)):
Added `oauth-server-api` group stub and `listGrants()` / `revokeGrant()`
method entries, matching the existing `common-client-libs-sections.json`
nav IDs.
- **`listBuckets()` options**
([supabase-flutter#1557](supabase/supabase-flutter#1557)):
Added example showing `ListBucketsOptions` with `search`, `limit`,
`offset`, `sortColumn`, and `sortOrder`.

### `apps/docs/spec/supabase_py_v2.yml`

- **`on_postgres_changes` `select` param**
([supabase-py#1524](supabase/supabase-py#1524)):
Added `listening-to-selected-columns` example for the new `select=["id",
"name"]` parameter.
- **Expanded filter operators**
([supabase-py#1524](supabase/supabase-py#1524)):
Updated `listening-to-row-level-changes` note to list all supported
operators (`eq`, `neq`, `lt`, `lte`, `gt`, `gte`, `in`, `like`, `ilike`,
`is`, `match`, `imatch`, `isdistinct`) plus `not.` prefix and comma-AND.

### `apps/docs/spec/supabase_swift_v2.yml`

- **OpenTelemetry tracing setup**
([supabase-swift#1101](supabase/supabase-swift#1101)):
Added `initialize-client-with-opentelemetry` example under the
`initializing` section documenting the `OpenTelemetry` SwiftPM package
trait, provider wiring, and known `_invokeWithStreamedResponse`
limitation.

### `apps/docs/content/guides/telemetry/client-side-tracing.mdx`

- **Merged Swift and Dart tracing docs** into the existing JS guide
([supabase-swift#1101](supabase/supabase-swift#1101),
[supabase-flutter#1564](supabase/supabase-flutter#1564)).
- **Converted to tabbed layout** (`<Tabs queryGroup="language">`) with
JavaScript / Swift / Dart tabs, matching the pattern used across other
multi-SDK guides.
- Updated title to "Client-side tracing" and nav label accordingly.

## SDKs with no doc-worthy changes

- **js**: Bug fixes only (auth session clearing, realtime heartbeat
suppression) — no new API surface.
- **kt**: PKCE for `resend()` — behavioral enhancement, no new spec
entry needed.
- **csharp**: Chore/compliance/maintenance only.

---

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

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

* **Documentation**
* Added Dart “OAuth Server” API docs for listing OAuth grants and
revoking grants (including signed-in context and the `clientId`
parameter), with examples.
* Extended Dart Storage docs with a new `listBuckets` example using
`ListBucketsOptions` for filtering, pagination, and sorting.
* Updated Python Realtime docs with generalized PostgREST-style row
filter operators and added examples for listening to selected columns.
* Reworked the “Client-side tracing” guide across JS, Swift, and Dart,
including expanded configuration and troubleshooting (trace propagation
and `traceparent` details).
  * Renamed the telemetry navigation label to “Client-side tracing.”
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude Sonnet 4.6 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

storage This issue or pull request is related to storage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants