Skip to content

[P1] [doc-drift] FR-3.1.7 row count — no exact or estimated count #402

Closed

Description

@EVWorth

[P1] [doc-drift] FR-3.1.7 row count — only truncated-flag shown, no exact/estimated count

Context

DESIGN_REQUIREMENTS FR-3.1.7: "Show total row count; for large result sets, show estimated count with option to get exact count".

Problem

Per docs/audits/results.md F9.

The implementation shows activeResult.rows.length plus a Results truncated to N rows warning. total_rows_available exists on the Rust struct but is never populated. For SELECT * FROM huge_table LIMIT 100, the user can't tell whether they have 100 of 1,000 or 100 of 10,000,000.

Files

  • src/components/grid/ResultsGrid.tsx:891-893
  • src-tauri/crates/mas-core/src/query/executor.rs:185-198 (total_rows_available: None)
  • src-tauri/crates/mas-core/src/models/query.rs:14-15

Repro (if applicable)

Static analysis only.

Expected

SELECT * FROM users LIMIT 100 against 50K-row table shows "Showing 100 of approximately 50,000 rows. Get exact count"; clicking shows "Showing 100 of 50,247 rows".

Proposed fix

Scope M. When row-limit triggers, do a second SELECT COUNT(*) FROM (sub) query (2s timeout) and populate total_rows_available; render in the truncation banner with a "Get exact count" button.

Acceptance

"Showing 100 of approximately 50,000" → click button → "Showing 100 of 50,247".

Needs human verify

Yes

Labels: audit, area/results, severity/p1, kind/doc-drift

Activity

  1. added
    audit
    severity/p1
    kind/doc-drift
    area/results
    on Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/resultsauditkind/doc-driftseverity/p1

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions