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

supabase / supabase-flutter / 33188560437
89%

Build:
DEFAULT BRANCH: main
Ran 28 Aug 2026 04:10PM UTC
Jobs 10
Files 120
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

28 Aug 2026 04:08PM UTC coverage: 88.672% (+0.08%) from 88.591%
33188560437

push

github

web-flow
fix(realtime): parse Postgres array literals instead of splitting on commas (#1781)

## What

`toArray` in `supabase_realtime` decoded a Postgres array literal by
trying `json.decode` on the body and, when that threw, splitting the
string on every comma. Both paths carried a `TODO` and a `WARNING:
splitting on comma does not cover all edge cases`, and the edge cases
turn into wrong data in realtime payloads:

| Literal Postgres sends | Before | After |
| --- | --- | --- |
| `{"a,b",c}` | `['"a', ' b"', 'c']` (three elements) | `['a,b', 'c']` |
| `{NULL,a}` on `text[]` | `['NULL', 'a']` | `[null, 'a']` |
| `{"",a}` | `['""', 'a']` | `['', 'a']` |
| `{{1,2},{3,4}}` on `int4[]` | `[null, null, null, null]` | `[[1, 2],
[3, 4]]` |

A `text[]` column whose values contain commas is the common case here:
subscribers got extra elements with stray quote characters in them, and
nothing signalled that the value had been mangled.

This replaces both paths with a parser for the literal itself: comma
separated elements, optional double quotes where `\` escapes the next
character, whitespace around unquoted elements dropped, an unquoted
`NULL` as the null element (a quoted `"NULL"` stays the four character
string), and nested arrays keeping their shape. A literal that doesn't
parse now returns the raw string instead of data that looks structured
but isn't.

`{}`, `{1,2,3}` and quoted ranges like `{"[2021-01-01,2021-12-31)"}`
behave exactly as before — the existing tests cover those and are
unchanged.

## Note on parity with supabase-js

`realtime-js` still has the same `JSON.parse`-then-split logic
(`src/lib/transformers.ts`), including the same TODO and warning
comments, so after this change the Dart client parses these literals
where the JS client does not. I went with correctness here since the
current behaviour silently returns wrong values, but happy to align
differently if you'd rather keep the two in lockstep, and I can open the
matching issue on `realtime-js`... (continued)

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

1 existing line in 1 file now uncovered.

6098 of 6877 relevant lines covered (88.67%)

4.55 hits per line

Coverage Regressions

Lines Coverage ∆ File
1
84.41
-0.16% packages/supabase_auth/lib/src/auth_client.dart
Jobs
ID Job ID Ran Files Coverage
3 iceberg - 33188560437.3 28 Aug 2026 04:10PM UTC 6
68.52
GitHub Action Run
4 postgrest - 33188560437.4 28 Aug 2026 04:12PM UTC 11
84.75
GitHub Action Run
5 supabase_realtime - 33188560437.5 28 Aug 2026 04:12PM UTC 13
90.66
GitHub Action Run
6 supabase_storage - 33188560437.6 28 Aug 2026 04:12PM UTC 9
97.35
GitHub Action Run
7 supabase_auth - 33188560437.7 28 Aug 2026 04:13PM UTC 30
90.57
GitHub Action Run
8 supabase_flutter - 33188560437.8 28 Aug 2026 04:10PM UTC 11
82.22
GitHub Action Run
9 supabase - 33188560437.9 28 Aug 2026 04:13PM UTC 14
93.49
GitHub Action Run
10 supabase_functions - 33188560437.10 28 Aug 2026 04:10PM UTC 4
93.81
GitHub Action Run
5 yet_another_json_isolate - 32956931006.5 26 Aug 2026 10:12AM UTC 1
98.44
GitHub Action Run
9 supabase_common - 32951661159.9 26 Aug 2026 09:12AM UTC 21
86.96
GitHub Action Run
Source Files on build 33188560437
  • Tree
  • List 120
  • Changed 12
  • Source Changed 11
  • Coverage Changed 12
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #33188560437
  • 89925f1d on github
  • Prev Build on main (#33181427034)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc