Files
supabase/apps/studio/data
oniani1 6b57d5f57a fix(studio): fix infinite pagination loop in queue messages (#44292)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

## What kind of change does this PR introduce?

Bug fix

## What is the current behavior?

The `getNextPageParam` function in
`database-queue-messages-infinite-query.ts` uses `<=` instead of `>=`,
which means pagination never stops. Since the result length is always
less than or equal to the page size, `hasNextPage` is always `true`,
causing infinite API requests when viewing queue messages in Studio.

Resolves #44291

## What is the new behavior?

Uses `>=` to correctly detect when there are more pages, consistent with
every other infinite query in the codebase:

- `database-cron-jobs-infinite-query.ts` uses `>=`
- `users-infinite-query.ts` uses `>=`
- `database-cron-jobs-runs-infinite-query.ts` uses `< PAGE_SIZE` to
return `undefined` (equivalent logic)

## Additional context

One character change: `<=` to `>=` on line 112.
2026-03-31 09:03:39 +00:00
..
2026-03-16 20:47:32 +01:00
2024-07-04 14:48:10 +08:00