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

supabase / supabase / 27764037638 / 1 – studio-tests
73%
master: 73%

Build:
DEFAULT BRANCH: master
Ran 18 Jun 2026 01:52PM UTC
Files 98
Run time 3s
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

18 Jun 2026 01:47PM UTC coverage: 72.967%. Remained the same
studio-tests – 27764037638.1

push

github

web-flow
fix(studio): paginate queue messages on a unique cursor (#47016)

Closes #47015

## What kind of change does this PR introduce?

Bug fix.

## What is the current behavior?

The queue message list paginates with `WHERE enqueued_at > <last>` and
`ORDER BY enqueued_at`. `enqueued_at` is not unique: pgmq defaults it to
`now()`, so every message sent in one `send_batch` shares a timestamp.
When a group of same-timestamp messages straddles a page boundary, the
strict cursor skips the rest of that group, so those messages never
appear in the grid even though they are still in the queue. With 40
messages from one batch, only 30 render.

## What is the new behavior?

Pagination uses a composite `(enqueued_at, msg_id)` keyset cursor and
orders by the same pair. `msg_id` is unique within each queue/archive
table and breaks the tie, so no rows are dropped between pages. After
the change, all 40 messages render. This mirrors the cron-runs query,
which already paginates on a unique key.

## Additional context

Added a test in
`apps/studio/data/database-queues/database-queue-messages-infinite-query.test.ts`
asserting next pages use the composite cursor and order by `enqueued_at,
msg_id`.


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

## Summary by CodeRabbit

* **Bug Fixes**
* Improved database queue message pagination to reliably retrieve all
messages, including those with identical enqueued timestamps, preventing
potential message skipping during pagination.

* **Tests**
  * Added test coverage for database queue message pagination behavior.

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

Co-authored-by: Ali Waseem <waseema393@gmail.com>

1023 of 1419 branches covered (72.09%)

Branch coverage included in aggregate %.

1552 of 2110 relevant lines covered (73.55%)

248.41 hits per line

Source Files on job studio-tests - 27764037638.1
  • Tree
  • List 98
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 27764037638
  • 3d101e24 on github
  • Prev Job for on master (#27763011784.1)
  • Next Job for on master (#27767570175.1)
  • 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