Skip to content

Let a reader open a sheet cell to read its whole text — every column is fixed at 160px with ellipsis today, and the xlsx and CSV grids offer no way past the cut while the assistant reads the whole cell #207

Closed

Description

@bencode

Problem

In the sheet and CSV grids, a cell whose text runs past 160 pixels is cut off with an ellipsis, and nothing in either reader shows the rest.

  • Every column renders at one fixed width — width: 160px; max-width: 160px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis on every th, td (ui-packages/web/src/features/reader/xlsx-reader/style.module.scss:72-81) — regardless of what the cell holds. There is no column resizing and no wrapping.
  • Each cell is a plain <td>{cellText(...)}</td> with no title, no click handler, no focus target (features/reader/xlsx-reader/sheet-grid.tsx:88-90). A "Notes" or comment column with a sentence per row reads as its first few words everywhere in the sheet.
  • cellText also collapses a cell's internal line structure to single spaces (formats/xlsx.ts:74-79), so even the fragment shown has already lost the author's breaks.
  • The same grid renders CSV (features/reader/csv-reader.tsx:32), so both formats clip.

The assistant reads what the reader cannot: sheet_read returns the whole cell (formats/xlsx.ts:110-122, features/assistant/xlsx/tools.ts), so asking "what does E12 say?" works while reading E12 directly does not — the asymmetry #68 filed for PDF search, in the grid. Every other long thing in the app opens to its full size: images in documents (#169), the lightbox, HTML pages; the clipped cell is the one content the reader can see but not reach.

Proposal

  • Make a cell openable: clicking or keyboard-activating a cell shows its whole text in a small popover anchored at the cell — wrapped and scrollable, headed by its coordinates (e.g. E12) in the same coordinate language the grid and the assistant already share. The app already leans on Radix Popover for this shape of detail (the sync status Details, features/source/sync-status.tsx:31-56).
  • Cells that fit their column behave exactly as today; the fixed 160px layout and the virtualized rows are unchanged.

Goal

After this, any cell in an xlsx or CSV grid whose text is cut by the ellipsis can be opened — by pointer and by keyboard — to its full content, and cells that fit are untouched; the grid no longer shows text the reader has no way to read.

Verification

grep -rEq "onClick|tabIndex|Popover" ui-packages/web/src/features/reader/xlsx-reader/sheet-grid.tsx
pnpm --filter @gamma-reader/web test --silent
pnpm --filter @gamma-reader/web exec vitest run --project unit src/features/reader/xlsx-reader/xlsx-reader.test.tsx
pnpm check

(the test to add with the change: render SheetGrid with a cell longer than 160px can hold, activate the cell, and assert the full text with its coordinates is shown — today the td has no activation and no such test can pass; a keyboard path to the same popover is part of the same test)

Refs

Activity

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

    @bencode
    OwnerAuthor

    Independent review — posted by the scheduled issue-reviewer loop (independent of the authoring session), against main@90b046f.

    Evidence audit: all citations confirmed.

    • ✅ style.module.scss:72-81 — every th, td fixed 160px, nowrap, ellipsis; sheet-grid.tsx:88-90 — the cell is a plain <td>{cellText(...)}</td>, no title, handler, or focus target.
    • ✅ formats/xlsx.ts:74-79 — cellText collapses internal whitespace (.replace(/\s+/gu, ' ')), so the shown fragment loses the author's breaks; csv-reader.tsx:32 renders CSV through the same SheetGrid.
    • ✅ The asymmetry is real — sheet_read (features/assistant/xlsx/tools.ts) returns the untruncated cell. One precision note: selectCells also routes through cellText, so the assistant reads the full-but-flattened text — the asymmetry is the 160px truncation, exactly as filed.
    • ✅ The Radix Popover precedent (sync-status.tsx, the Details component) and PRODUCT.md:35 ("Keep reading as the largest and quietest part of the workspace") both check out.

    Duplicate check: none — #161/#157/#170/#178 are about what a cell's value is; this is about reaching its text at all; #69 is sheet search; #169 is the cross-referenced images counterpart.

    Sensor + a defect found: lint ✓, but verify passed vacuously — xlsx-reader.test.tsx exists and is green on main while the feature is absent (no activation anywhere in the grid), the same suite-only Verification shape that burned #41/#55 and that this loop just fixed on #205/#206.

    Verification block edited (logged per policy): added as its first line

    grep -rEq "onClick|tabIndex|Popover" ui-packages/web/src/features/reader/xlsx-reader/sheet-grid.tsx

    — pointer activation, keyboard focusability, or the named Popover reuse: any implementation of an openable cell must add one of the three to this file (zero matches on main; onScroll on the container deliberately not matched). Re-linted ✓; verify now ✗ on main as it should be.

    Verdict: valid, keep open.

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