Repository navigation
Description
Problem
An Excel sheet states its own orientation: <sheetView><pane ySplit="1" topLeftCell="A2" activePane="bottomLeft" state="frozen"/></sheetView> in xl/worksheets/*.xml is where the author froze a header row, a label column, or both. The preview never reads it.
readSpreadsheetgoes through read-excel-file, whoseSheetresult is only{ sheet, data }(node_modules/read-excel-file/types/Sheet.d.ts); theWorksheettype carries justnameandrows(ui-packages/web/src/formats/xlsx.ts:3), andreadSpreadsheetmaps straight onto that (formats/xlsx.ts:127-131). The pane declaration never reaches the reader.SheetGridrenders every data row as a plain virtualized<tr>(ui-packages/web/src/features/reader/xlsx-reader/sheet-grid.tsx:81-94); sticky positioning is applied only to the column-letter header and the row-number gutter (xlsx-reader/style.module.scss:83-109).
So on a sheet taller than the viewport — a case the code itself anticipates ("a ten thousand row sheet", formats/xlsx.ts:56-57) — the author's frozen header row scrolls off after one row, and every value below loses its column name until the reader scrolls back to check. Scrolling right on a wide sheet (the grid already expects 100+ columns, sheet-grid.tsx:51-55) carries the label column away too, leaving only the row numbers pinned. The assistant does not share the loss: sheet_read returns the column letters with every read (selectCells, formats/xlsx.ts:110-122), so asking "what is this number?" works while reading it directly does not — the same reader-vs-assistant asymmetry #68 filed for PDF search.
Proposal
- Read each sheet's
<pane>splits — frozen row and column counts — alongside the values, the waymarkUnconvertedContentalready opens package XML with JSZip (ui-packages/web/src/formats/docx-unconverted.ts:90-97); carry them onWorksheet. - In
SheetGrid, render the frozen rows inside the sticky header area, and the frozen columns asposition: stickycells at cumulative left offsets — the fixed 160px column width makes those offsets trivial (style.module.scss:72-74). - Ignore split-but-not-frozen panes; sheets without a pane render exactly as today.
Goal
After this, opening a workbook whose sheets freeze header rows or label columns keeps them pinned while the body scrolls, vertically and horizontally, with the file's own pane declaration as the only input — nothing is guessed — and sheets without frozen panes are unchanged.
Verification
grep -rEq "pane|ySplit|xSplit" ui-packages/web/src/formats/xlsx.ts
pnpm --filter @gamma-reader/web test --silent
pnpm --filter @gamma-reader/web exec vitest run --project unit src/formats/xlsx.test.ts
pnpm check(the fixtures and tests to add with the change: a workbook with ySplit/xSplit frozen panes whose readSpreadsheet result carries the frozen counts, and a SheetGrid render where the frozen header row stays mounted while the virtualizer scrolls — today Worksheet has no field to hold a pane, and no such test can pass)
Refs
- ui-packages/web/src/formats/xlsx.ts:3,127-131 —
Worksheetas name+rows, mapped straight from read-excel-file's{sheet, data}(node_modules/read-excel-file/types/Sheet.d.ts), so panes are dropped at the door - ui-packages/web/src/features/reader/xlsx-reader/sheet-grid.tsx:81-94 — every data row a plain virtualized row
- ui-packages/web/src/features/reader/xlsx-reader/style.module.scss:83-109 — sticky reserved for the letter header and the number gutter
- ui-packages/web/src/features/reader/xlsx-reader/sheet-grid.tsx:51-55 — the over-100-columns notice; wide horizontal scrolling is an expected case
- ui-packages/web/src/formats/docx-unconverted.ts:90-97 — JSZip already reads OOXML package parts in this codebase
- Let the reader search inside a PDF — Ctrl+F sees only the page on screen, while the assistant has a search tool #68 — the same reader-vs-assistant asymmetry for PDF search: the assistant has what the reader lacks
- Remember where the reader stopped — reopen documents at their page or scroll position #40, Keep the Files tree where the reader left it — every panel close or phone-layout switch folds all folders back shut today #195 — the same "stay where the reader is" principle for documents and the Files tree
- Show spreadsheet numbers as the sheet states them — a percent cell reads 0.153 where Excel says 15.3%, for reader and assistant alike #161, Show spreadsheet cells that hold an error or an unsolved formula — today both render blank to reader and assistant #157, Show a merged cell as merged — its value stops at the top-left square today, leaving blank runs that reader and assistant both read as empty #170 — other fidelity gaps in this grid, about values; this one is about place
Activity
bencode commentedon Oct 23, 2026
Independent review — posted by the scheduled issue-reviewer loop (independent of the authoring session), against
main@90b046f.Evidence audit: all citations confirmed.
formats/xlsx.ts:3—Worksheet = { name: string; rows: readonly SheetRow[] };readSpreadsheetmaps read-excel-file's result straight onto it, andnode_modules/read-excel-file/types/Sheet.d.tsis exactly{ sheet, data }— panes are dropped at the door, as filed.sheet-grid.tsx:81-94— every data row a plain virtualized<tr>; sticky positioning exists only forthead thand.rowNumber(style.module.scss:83-109); the fixed 160px cell width (:72-74) and the over-100-columns notice both confirmed.docx-unconverted.ts:90-97— the JSZip-reads-OOXML precedent is real;selectCellsdoes return letter labels with every read (the reader-vs-assistant asymmetry).Duplicate check: none — #161/#157/#170 are value fidelity in the same grid and correctly cross-referenced, not overlaps; #69 is sheet search.
Sensor + a defect found: lint ✓, but
verifypassed vacuously — the original Verification block was suite-runs only (test/vitest run/check), which passes on any green main. The feature is demonstrably absent (Worksheethas no pane field, no frozen rendering exists), so a passing verify here is a false positive of the same family that burned #41/#55 — left alone, a future beat would close this as "implemented".Verification block edited (logged per policy): added as its first line
grep -rEq "pane|ySplit|xSplit" ui-packages/web/src/formats/xlsx.ts— the proposal mandates reading each sheet's
<pane>splits in the format layer, andpane/ySplit/xSplitare OOXML's own names, not implementer vocabulary; zero matches on main today. Re-linted ✓; verify now ✗ on main as it should be.Verdict: valid, keep open. One edge worth a sentence when implementing:
maximumPreviewColumns = 100clamps the grid — a frozen label column past column 100 has no cell to pin, so panes only bind within the visible set.bencode commentedon Oct 25, 2026
Re-audit — posted by the scheduled issue-reviewer loop (independent of the authoring session), against
main@90b046f.No commits since the 2026-10-23 review (HEAD unchanged), so this beat confirms:
formats/xlsx.tsstill contains nopane/ySplit/xSplithandling — frozen panes remain dropped at theWorksheetboundary, as filed.grep -rEq "pane|ySplit|xSplit" ui-packages/web/src/formats/xlsx.ts, OOXML's own vocabulary) is doing its job: verify fails while the feature is absent and flips only when it lands.Verdict unchanged: valid, keep open. The implementer edge from the prior review still applies:
maximumPreviewColumns = 100clamps the grid, so panes only bind within the visible column set. No action this beat.bencode commentedon Oct 26, 2026
Closing as not planned. The preview keeps the column letters and row numbers pinned, and we're not reading frozen panes from the workbook.
To check what a value is deep in a sheet, ask the assistant, which reads cells by row and column, for example "what is the value in row 120 under Revenue?"