Skip to content

fix(cql console): mark pagination counter as partial while server has more rows#1083

Open
digiserg wants to merge 2 commits into
mainfrom
fix/cql-pagination-counter
Open

fix(cql console): mark pagination counter as partial while server has more rows#1083
digiserg wants to merge 2 commits into
mainfrom
fix/cql-pagination-counter

Conversation

@digiserg

@digiserg digiserg commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Tabulator's built-in paginationCounter: 'rows' only counts rows currently loaded into the table, so a server-paged SELECT looked "complete" after the first chunk and the total silently grew with every "Next" click.
  • Adds a custom paginationCounter in renderer/js/utils/core.js that reads a new hasMorePending flag on the Tabulator instance and appends + ... (more available) while the server still has rows to fetch, switching to the exact count once isOutputCompleted is true.
  • events-get-connections.js now sets tabulatorObject.hasMorePending at table creation and on every subsequent page append, from the existing isOutputWithPaging/isOutputCompleted state (no change to IPC shapes or fetch mechanics).

Fixes #1082

Test plan

  • node --check on both changed files
  • Isolated jsdom test of the new paginationCounter function confirms distinct text for pending vs. complete vs. empty states
  • Manual click-through against a live cluster with a 300+ row table (not run in this session — no cluster available here)

Assisted-by: Claude Code

… more rows

Tabulator's local pagination counter only ever reflected rows already
loaded into the table, so a server-paged SELECT looked "complete"
after the first chunk and the page count silently grew on every
"Next" click instead of showing the true state up front.

Fixes #1082

Signed-off-by: Sergio Rua <sergio@axonops.com>
@digiserg
digiserg requested a review from millerjp as a code owner July 3, 2026 13:52
@digiserg
digiserg requested a review from hshimizu July 3, 2026 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: CQL results table pagination widget shows misleading row/page counts during server-side paging

2 participants