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

supabase / supabase-flutter / 36978546799
92%

Build:
DEFAULT BRANCH: main
Ran 02 Oct 2026 07:27AM UTC
Jobs 11
Files 173
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

02 Oct 2026 07:26AM UTC coverage: 91.289% (-0.004%) from 91.293%
36978546799

push

github

web-flow
fix(supabase): replace an already streamed row on a realtime insert (#1908)

Fixes
[SDK-2000](https://linear.app/supabase/issue/SDK-2000/stream-builder-duplicates-rows-when-an-insert-lands-just-after-a).

`stream(primaryKey:)` appended every realtime insert without checking
the primary key. After a reconnect, the stream refetches the rows over
PostgREST. When a row is inserted around that time, the refetch can
already return it before its insert event arrives, and the event then
added the row a second time. The database has one row, but the stream
shows two until the next refetch.

This showed up in the flutter-chat example while adding attachments
(https://github.com/supabase-community/flutter-chat/pull/17). The file
picker sends the app to the background, and the message is inserted a
few seconds after the resume, so the sender saw every file message
twice.

An insert is now handled like an update: it replaces the row with the
same primary key, and is appended when there is none.

## Testing

- New `test/stream_insert_test.dart` built on `MockRealtimeTransport`
and `MockSupabaseHttpClient`. An insert event for a row the fetch
already returned now leaves one copy, and failed with two copies before
the fix. An insert of a new row is still appended.
- `stream_integration_test.dart` passes against the local stack, along
with `mock_test.dart`, `stream_filter_test.dart` and
`typed_table_schema_test.dart`.
- `dart analyze` and `dcm analyze` find no issues.

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

## Summary by CodeRabbit

* **Bug Fixes**
* Prevented duplicate rows in streamed data when an insert arrives after
a reconnect refetch. Matching rows are now updated, while inserts with
new IDs are added as usual.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

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

9075 of 9941 relevant lines covered (91.29%)

4.99 hits per line

Jobs
ID Job ID Ran Files Coverage
3 supabase_flutter - 36978546799.3 02 Oct 2026 07:28AM UTC 15
81.0
GitHub Action Run
4 iceberg - 36978546799.4 02 Oct 2026 07:27AM UTC 6
68.52
GitHub Action Run
5 supabase_functions - 36978546799.5 02 Oct 2026 07:27AM UTC 4
96.0
GitHub Action Run
6 supabase_storage - 36978546799.6 02 Oct 2026 07:29AM UTC 9
97.83
GitHub Action Run
7 supabase - 36978546799.7 02 Oct 2026 07:31AM UTC 18
94.22
GitHub Action Run
8 supabase_typegen - 36978546799.8 02 Oct 2026 07:29AM UTC 24
95.81
GitHub Action Run
9 postgrest - 36978546799.9 02 Oct 2026 07:30AM UTC 29
93.43
GitHub Action Run
10 supabase_auth - 36978546799.10 02 Oct 2026 07:31AM UTC 32
92.07
GitHub Action Run
11 supabase_realtime - 36978546799.11 02 Oct 2026 07:30AM UTC 13
90.66
GitHub Action Run
6 yet_another_json_isolate - 36864123641.6 01 Oct 2026 12:48PM UTC 1
98.44
GitHub Action Run
1 supabase_common - 36864123641.1 01 Oct 2026 12:48PM UTC 22
87.5
GitHub Action Run
Source Files on build 36978546799
  • Tree
  • List 173
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #36978546799
  • 1eefe0ee on github
  • Prev Build on main (#36977860469)
  • Next Build on main (#37280549742)
  • 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