Skip to content

feat: compact table counts and add count query actions - #926

Open
DevvoLazza wants to merge 1 commit into
libredb:mainfrom
DevvoLazza:fix/table-count-actions
Open

DevvoLazza wants to merge 1 commit into
libredb:mainfrom
DevvoLazza:fix/table-count-actions

Conversation

@DevvoLazza

@DevvoLazza DevvoLazza commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Description

Million-row catalog counts currently occupy too much space on desktop and use thousands-only formatting on mobile. Both explorers now use compact counts and offer an editable count query from the table menu.

Type of Change

  • New feature
  • Documentation update
  • Test addition or update

Related Issue

Closes #702

Changes Made

  • Share K/M/B/T formatting between desktop and mobile. Tooltips preserve the full reported figure and explain that catalog counts are estimates on most engines.
  • Add Generate Count Query beside Generate Query: qualified SQL with dialect quoting and terminators, COUNT_BIG on SQL Server, or MongoDB's count/filter document. Unsupported key grammars and derived prefix groupings receive no action.
  • Open an editable tab without executing the count, so users can add filters before Run. Preserve the embedded workspace's navigation guard during pending object edits.

Testing

  • Full suite with coverage: 545 files passed; 17,600 tests passed, 71 skipped. Twelve Helm files were not run because Helm is unavailable.
  • Format, lint, typecheck, knip, README parity, chart version, channel showcase, and security checks passed. Lint retains 240 existing warnings and has zero errors.
  • Production application build, library build, and package type-resolution checks passed.
  • Generated SQL counted a real SQLite table containing 1,553,900 rows; adding a filter returned 7. Browser validation using the actual explorer components and tab manager confirmed compact badges, explicit Run, MongoDB query generation, and the absent Redis count action.
  • Modified source files have 100% line coverage. The global coverage gate reports 99.99% solely because unchanged src/instrumentation.ts:32-36 is covered by a POSIX permission test skipped on Windows. Linux CI must verify the required 100% gate.

Environment: Windows, Node.js 24.16.0, Bun 1.4.2, LibreDB Studio 0.16.0. Browser catalog/provider data were fixtures; no live PostgreSQL/MySQL or MySQL catalog-drift verification was possible locally.

Checklist

  • Reviewed the diff and updated documentation and tests
  • New and existing available tests pass locally
  • No new warnings, dependency changes, lockfile changes, generated files, or local configuration included
  • Required CI test job passes the 100% line-coverage gate

@cevheri cevheri added loop:needs-info Maintainer-loop task blocked on human-reviewed clarification and removed loop:needs-info Maintainer-loop task blocked on human-reviewed clarification labels Sep 17, 2026
@codecov

codecov Bot commented Sep 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@cevheri cevheri added the loop:needs-info Maintainer-loop task blocked on human-reviewed clarification label Sep 17, 2026
@cevheri

cevheri commented Sep 17, 2026

Copy link
Copy Markdown
Member

rebase, fix CI

@DevvoLazza

Copy link
Copy Markdown
Contributor Author

Hi, I won’t be able to work on this today or tomorrow as I’m away from home. As soon as I’m back, I’ll continue and finish the remaining fixes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

loop:needs-info Maintainer-loop task blocked on human-reviewed clarification

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] nicer way to display and query the table count

2 participants