• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / supabase-flutter / 28390347724
86%

Build:
DEFAULT BRANCH: main
Ran 29 Jun 2026 05:25PM UTC
Jobs 3
Files 31
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

29 Jun 2026 05:23PM UTC coverage: 85.139%. First build
28390347724

push

github

web-flow
fix(storage): preserve sortBy defaults when list receives a partial sortBy (#1490)

## What

`storage.from(bucket).list()` rejected a partially-specified `SortBy`
with a 400.

`SortBy`'s constructor had no default for `column`/`order`, so
`SortBy(column: 'updated_at')` left `order` as `null`. Since
`SearchOptions.toMap()` always emits both keys and the storage client
serializes with `json.encode` (which keeps nulls), the request body
sent:

```json
"sortBy": { "column": "updated_at", "order": null }
```

The Storage server requires both `column` and `order`, so it returned a
400.

This mirrors supabase-js
[#2454](https://github.com/supabase/supabase-js/pull/2454) (commit
`42b7bbc`), which deep-merges the partial `sortBy` onto the defaults.

## Fix

Give `SortBy` constructor defaults so any partially-specified `SortBy`
fills in the missing field, which is the idiomatic Dart equivalent of
the JS deep-merge and works wherever `SortBy` is constructed:

```dart
const SortBy({this.column = 'name', this.order = 'asc'});
```

Behavior:

- `SortBy(column: 'updated_at')` → `{column: 'updated_at', order:
'asc'}`
- `SortBy(order: 'desc')` → `{column: 'name', order: 'desc'}`
- `list()` with no options → `{column: 'name', order: 'asc'}`
(unchanged)

No breaking change for callers passing a complete `SortBy`.

## Tests

Added a `list sortBy defaults` group in `client_test.dart` (using the
in-memory `CustomHttpClient` to inspect the request body) covering
partial column, partial order, no options, and complete sortBy.

Closes SDK-1089

3 of 3 new or added lines in 1 file covered. (100.0%)

1014 of 1191 relevant lines covered (85.14%)

2.91 hits per line

Jobs
ID Job ID Ran Files Coverage
1 supabase_flutter - 28390347724.1 29 Jun 2026 05:26PM UTC 11
78.27
GitHub Action Run
2 storage_client - 28390347724.2 29 Jun 2026 05:26PM UTC 5
92.97
GitHub Action Run
3 supabase - 28390347724.3 29 Jun 2026 05:24PM UTC 15
81.8
GitHub Action Run
Source Files on build 28390347724
  • Tree
  • List 31
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #28390347724
  • c68a9645 on github
  • Prev Build on main (#28380795187)
  • Next Build on main (#28404057994)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc