Skip to content

Let readers find a value in a sheet — the grid renders only the rows on screen, so Ctrl+F finds nothing #69

Open

Description

@bencode

Problem

Gamma Reader's sheet grid cannot be searched by the person reading it. The grid virtualizes rows with @tanstack/react-virtual (sheet-grid.tsx:1,34-42) — only the rows in the viewport (plus 12 overscan) exist in the DOM at all, so the browser's Ctrl+F finds nothing outside the visible slice; the rest of the sheet's text is simply not there to match. And there is no product-level find: zero matches for search, find, or filter across features/reader/xlsx-reader/.

Locating a value is the act spreadsheets exist for — the one account in the export, the outlier row, the SKU a receipt names. With multi-sheet workbooks (the reader keeps a chosen sheet per workbook, index.tsx), the only path today is clicking sheet to sheet and scrolling each one — every CSV now lands here too (#41 shipped it into this grid).

The product's own candor notice states the asymmetry: "Showing the first N of M columns. The assistant reads them all." (sheet-grid.tsx:53) — the assistant can see the whole sheet; the reader cannot search a single row of it.

Proposal

  • Add a find field to the sheet reader: type a value, matches count "n of m" across all sheets of the workbook, Enter / Shift+Enter steps through them, and the grid jumps to the row (the virtualizer's scrollToIndex exists for exactly this; switching sheets follows the match).
  • Match on the cell text the grid already renders (cellText over the in-memory SheetRow[]) — plain, case-insensitive contains. No index to build: the data is loaded before the first render.
  • Whole-cell matching, regex, sorting, and row filtering stay out of scope — this is locating, not reorganizing.

Goal

After this, finding where a value lives in an imported workbook is one query with a match count and a jump — not a sheet-by-sheet manual scroll — and the browser-copy of a spreadsheet is fully readable, not just assistant-readable.

Verification

grep -rqiE "search|find" ui-packages/web/src/features/reader/xlsx-reader --include='*.tsx' --exclude='*test*'
pnpm --filter @gamma-reader/web test --silent
pnpm check

Refs

Activity

  1. added
    enhancement
    source:scheduled
    on Oct 2, 2026
  2. bencode commented on Oct 2, 2026

    @bencode
    OwnerAuthor

    Independent review — posted by the scheduled issue-reviewer loop (a session separate from the one that files these issues), under the maintainer's standing instruction to evaluate, sharpen, or retire source:scheduled proposals.

    Evidence audit (against main@d94348b): all citations confirmed.

    • ✅ Virtualization confirmed to the line — useVirtualizer with overscan: 12 (sheet-grid.tsx:1,34-42); only the viewport's rows are in the DOM, so browser Ctrl+F structurally cannot find off-screen values. No search/find/filter anywhere in the grid's non-test tsx.
    • ✅ Reuse is real: cellText/clampColumns (core/xlsx.ts:58,74), rows in memory before first render, per-workbook selected sheet state exists, and the virtualizer's scrollToIndex is the natural jump primitive.
    • ✅ The candor-asymmetry quote ("The assistant reads them all", sheet-grid.tsx:53) verified.
    • ✅ Sensor: lint passed; verify fails today → stays open.

    Verdict: valid, keep open. Same reading act as #68 (PDF find), correctly scoped to its own surface and mechanism (in-memory scan + virtualizer jump vs. text anchors). Not a duplicate — cross-referenced as a family.

    Credit where due: the anchor (search|find|filter across non-test tsx) is the broadened, deliverable-shaped form this queue's two anchor failures (#41, #55) argued for — it passes for any implementation vocabulary.

  3. bencode commented on Oct 21, 2026

    @bencode
    OwnerAuthor

    Re-audit — posted by the scheduled issue-reviewer loop (independent of the authoring session), against main@ebb0ee0 (25+ commits since the last review at d94348b).

    Evidence audit: premises confirmed to the exact line; one path drift.

    • ✅ sheet-grid.tsx:1,34-42 — useVirtualizer with overscan: 12, exactly as cited; viewport-only DOM unchanged.
    • ✅ sheet-grid.tsx:51-54 — the candor notice still reads "Showing the first N of M columns. The assistant reads them all."
    • 🔁 Path drift: core/xlsx.ts → formats/xlsx.ts (the layering refactor); clampColumns at :58 and cellText at :74 kept their line numbers.
    • ✅ Per-workbook sheet state confirmed — xlsx-reader/index.tsx:44 seeds the selected sheet from the saved position; scrollToIndex remains the virtualizer's built-in jump primitive (no in-repo caller yet, as expected).
    • ✅ No find/search/filter anywhere in features/reader/xlsx-reader/ non-test tsx.

    Verdict: valid, keep open. Sensor: lint ✓, verify ✗ (not implemented on main). The Verification anchor is deliverable-shaped and needs no edit; no duplicate among open or closed issues.

    Family note: sibling #68 re-audited this beat too — its Verification anchor was tightened (see its thread); this issue's anchor was already the right shape.

  4. bencode commented on Oct 24, 2026

    @bencode
    OwnerAuthor

    Re-audit — posted by the scheduled issue-reviewer loop, independent of the authoring session. Against main@90b046f (20 commits since the last review at ebb0ee0).

    Evidence audit: all premises hold to the exact line; none of the 20 commits touches features/reader/xlsx-reader/ or formats/xlsx.ts.

    • ✅ sheet-grid.tsx:34-38 — useVirtualizer with overscan: 12, as cited; viewport-only DOM unchanged.
    • ✅ sheet-grid.tsx:53 — the notice still reads "…The assistant reads them all."
    • ✅ formats/xlsx.ts:58,74 — clampColumns / cellText unchanged.
    • ✅ Verification anchor still discriminates: search|find|filter has zero matches across features/reader/xlsx-reader non-test tsx at HEAD.

    Sensor: lint ✓; verify ✗ → not implemented on main.

    Verdict: valid, keep open. No duplicate among open or closed issues (sibling #68 stays the PDF variant — different surface and mechanism). No sharpening needed this pass: the citations are exact and the anchor is deliverable-shaped; nothing to act on until main moves in this area.

  5. bencode commented on Oct 27, 2026

    @bencode
    OwnerAuthor

    Re-audit — posted by the scheduled issue-reviewer loop, independent of the authoring session. Prior review audited main@90b046f; this beat re-checks against main@dbf9cb6 (the sheet/cell-bar work landed in between).

    Anchor drift since 90b046f (premises all stand, lines moved):

    • useVirtualizer block now sheet-grid.tsx:94-100 (was :34-42) — viewport-only DOM, overscan: 12, unchanged.
    • Candor notice "…The assistant reads them all." now at :124 (was :53) — text verbatim.
    • clampColumns/cellText now formats/xlsx.ts:70/:86 (was :58/:74); note the body's Refs cite core/xlsx.ts, a path that does not exist — the file is formats/xlsx.ts (flagged here, not edited).
    • Strengthened premise: virtualizer.scrollToIndex now exists on main at sheet-grid.tsx:149 (the cell-bar arrow keys, 05fcd10) — the Proposal's jump mechanism is in place.

    Sensor repaired (logged here per policy): verify falsely passed on unmodified main — 05fcd10's className.filter(Boolean).join(' ') (:46, :191) matched the filter alternative; no find/search UI exists (search|find alone: zero matches). Same disease as #175's beforeunload match. Edited only the Verification block: search|find|filter → search|find. Re-linted ✓; verify now ✗ on main ✓.

    Verdict: valid, keep open. One sharpening: the find field now lands beside the cell bar — arrow keys already move a cell selection (05fcd10), so Enter/Shift+Enter stepping and the selection keys share a keyboard surface; the test should pin their interplay (typing in the find field must not move the selection, and vice versa).

  6. bencode commented on Nov 2, 2026

    @bencode
    OwnerAuthor

    Posted by the scheduled issue-reviewer loop, independent of the authoring session.

    Re-audit at d05b6b6 — 4 commits since the last @ dbf9cb6 (the plugins series), none touching features/reader/xlsx-reader/ or formats/xlsx.ts (git diff --stat dbf9cb6..HEAD over both is empty). Valid, stays open; no edits.

    • Anchors re-verified, zero drift: useVirtualizer with overscan: 12 at sheet-grid.tsx:94-100; the candor notice verbatim at :124 ("Showing the first N of M columns. The assistant reads them all."); clampColumns at formats/xlsx.ts:70, cellText at :86. Viewport-only DOM unchanged — browser Ctrl+F still structurally cannot see off-screen rows.
    • Verification anchor still discriminates: the search|find grep (repaired from search|find|filter after 05fcd10's false green, logged in the prior review) has zero matches across features/reader/xlsx-reader/ non-test tsx at HEAD. Sensor: lint ✓; verify ✗ on main ✓.
    • Duplicate check refreshed (open + closed): clean — sibling Let the reader search inside a PDF — Ctrl+F sees only the page on screen, while the assistant has a search tool #68 (PDF find) re-audited at d05b6b6 this loop two beats ago and remains the other half of the family; nothing new filed since.
    • Standing sharpening, unchanged by the quiet window: the prior review's note that the find field will land beside the cell bar (05fcd10) — pin their keyboard interplay (typing in find must not move the cell selection, arrow keys must not reach the find field) — still the one test worth writing first.
  7. bencode commented on Nov 13, 2026

    @bencode
    OwnerAuthor

    Posted by the scheduled issue-reviewer loop, independent of the authoring session.

    Re-audit at d05b6b6 — stalest review in the queue this beat (12 days). HEAD still unchanged since 2026-10-28; valid, stays open; no edits.

    Verdict unchanged: valid, keep open. Standing sharpening holds: pin the find field's keyboard interplay with the cell bar (05fcd10) — typing in find must not move the cell selection, arrow keys must not reach the find field.

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

    enhancementsource:scheduled

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions