Skip to content

fix(web): empty ODS sheets show 0 columns instead of 1 - #42991

Merged
juliusmarminge merged 2 commits into
pingdotgg:mainfrom
only21mil:fix/web-ods-empty-sheet-zero-columns
Nov 25, 2026
Merged

juliusmarminge merged 2 commits into
pingdotgg:mainfrom
only21mil:fix/web-ods-empty-sheet-zero-columns

Conversation

@only21mil

Copy link
Copy Markdown
Contributor

Problem

An OpenDocument spreadsheet (.ods) sheet with no non-empty rows shows 0 rows · 1 column in the sheet status bar right above This sheet is empty. In openDocument (apps/web/src/components/files/extendedDocumentPreview.ts), the column count reduce started at 1, so an empty sheet reported one column. The CSV/TSV viewer already reports 0 columns for an empty file.

Change

In openDocument (apps/web/src/components/files/extendedDocumentPreview.ts), the column count is now 0 when the sheet has no rows (rows.length && ...) and otherwise keeps the existing floor of 1, so a sheet whose first value lies past the 500-row preview limit still shows one column as before. The regression test in apps/web/src/components/files/FilePreviewPanel.test.ts reads a workbook with an empty sheet, a 3-column sheet, and a sheet with 500 leading blank rows, and checks 0, 3 and 1 columns.

Scope

Small fix of an obvious display bug, so no issue is needed: the wrong count is visible on every empty sheet and the fix is one line.

Verification

An AI agent ran all automated and real-app checks (Claude Opus 5.5 orchestrated in T3 Code):

  • Base failure (4568a1b): the new test reports zero columns for an empty ODS sheet failed before the fix:
    - Expected
    + Received
    
      {
    -   "columns": 0,
    +   "columns": 1,
        "rowCount": 0,
      }
  • Head passes (5d266ff): the new test passed 3 of 3 runs (7 passed | 44 skipped (51) each run).
  • vp run check:changed: passed against 4568a1b (format, lint, knip, typecheck, test, react compiler).

Real-app check used a synthetic budget.ods with sheet "Empty" (one blank styled row repeated) and sheet "Budget" (2 rows x 3 columns):

Setup: Linux, isolated vp run dev with no seeded data in the T3 Code Browser panel, light theme, 2560x1600 viewport, one isolated dev server for both commits (base captured before the edit, head after the commit).
Steps: open budget.ods in the Files panel → read the status bar on sheet "Empty" → press Next sheet → read the status bar on sheet "Budget"

Base 4568a1b Head 5d266ff
Empty sheet: 0 rows · 1 column above "This sheet is empty."
Empty sheet: 0 rows · 1 column above "This sheet is empty."
Empty sheet: 0 rows · 0 columns above "This sheet is empty."
Empty sheet: 0 rows · 0 columns above "This sheet is empty."
Budget sheet: 2 rows · 3 columns
Budget sheet: 2 rows · 3 columns
Budget sheet: 2 rows · 3 columns (unchanged)
Budget sheet: 2 rows · 3 columns (unchanged)

Not shown: desktop and mobile were not run; the fix is in the shared web preview worker that desktop uses unchanged, and mobile does not use this preview.

Generated with Gemini 4 Neon in T3 Code Nightly

@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Nov 25, 2026
@coderabbitai

coderabbitai Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The ODS preview now reports zero columns when a sheet has no rows. Tests cover empty and populated sheets, including repeated blank rows and truncation.

Changes: ODS preview dimensions

Layer / File(s) Summary
ODS dimensions and tests
apps/web/src/components/files/extendedDocumentPreview.ts, apps/web/src/components/files/FilePreviewPanel.test.ts
Empty sheets now report zero columns. Nonempty sheets retain the maximum row width, with a minimum of one. Tests check empty and populated sheets, including truncation after repeated blank rows.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Suggested reviewers: marve10s, geezoria, michel-liao

Merge Risk: Minimal · up to c0c47

Merge Risk: ⚪ Minimal · up to c0c47

Empty ODS sheets now show 0 columns instead of 1, and populated sheets are unchanged. The change is small and tested, and no merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "fix(web): empty ODS sheets show 0 columns instead of 1" names the single change in the changeset. The one-line edit in extendedDocumentPreview.ts sets the ODS column count to 0 for sheets w…
Description check Passed The description follows the template. It has Problem, Change, Scope, and Verification sections. The Problem section gives the bug, the Change section explains the one-line fix and the regression test,…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "fix(web): empty ODS sheets show 0 columns instead of 1" names the single change in the changeset. The one-line edit in extendedDocumentPreview.ts sets the ODS column count to 0 for sheets with no rows, and the added test checks that behavior. The title is specific, follows conventional commit style, and matches the PR objectives.

Full details: Description check

Explanation

The description follows the template. It has Problem, Change, Scope, and Verification sections. The Problem section gives the bug, the Change section explains the one-line fix and the regression test, and the Scope section explains why no issue is linked. Verification lists the failing-then-passing test runs, the check:changed result, and a real-app before/after comparison with screenshots. It also states what was not run (desktop and mobile). The description does not link an issue, but it gives a reason, which the template allows for small obvious fixes. It also includes the model and harness, as the template asks.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 60eed62 and 5d266ff.

Files selected for processing: 2

  • apps/web/src/components/files/FilePreviewPanel.test.ts
  • apps/web/src/components/files/extendedDocumentPreview.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.

@juliusmarminge juliusmarminge added the takeover:in-progress A takeover lead is working on this PR label Nov 25, 2026
@juliusmarminge

Copy link
Copy Markdown
Member

Evidence

Real web app, Chromium, 1280×800, light theme, fresh isolated state on each commit. Seed the same two-sheet ODS workbook and Replay thread; open right panel → Files → workbook.ods; inspect Empty, switch to Data, then return to Empty.

Proven: the scenario fails on base and passes on head. Empty changes from “0 rows · 1 column” to “0 rows · 0 columns”; Data retains “2 rows · 3 columns”.

Capture Before — 60eed627d0 After — c0c47c2453
Empty sheet Before: empty sheet reports one column After: empty sheet reports zero columns
Populated sheet Before: two rows and three columns After: two rows and three columns
Recording Before interaction After interaction

Scenario and synthetic workbook generator

Not shown:

  • Truncated ODS sheets were not exercised; the reproduction workbook contains only empty and populated sheets.
  • XLSX and other spreadsheet formats were not exercised.

@juliusmarminge juliusmarminge added takeover:ready Takeover done; auto-lands when gates pass and removed takeover:in-progress A takeover lead is working on this PR labels Nov 25, 2026
@juliusmarminge
juliusmarminge merged commit dc5ae5c into pingdotgg:main Nov 25, 2026
57 checks passed
@juliusmarminge juliusmarminge removed the takeover:ready Takeover done; auto-lands when gates pass label Nov 25, 2026
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Nov 25, 2026
**v0.1.13-nightly.20261125.5258** · 69 changes from 19 contributors

- **Workflow subjects.** Link workflow runs to an issue or pull request and find them from its view.
- **Project drafts.** Add a project from a draft’s picker without leaving your typed draft behind.
- **Files panel refresh.** Refresh now checks only visible folders, reducing repeated work in large projects.
- **Citation dictation.** Clicking outside a citation comment no longer discards dictation in progress.
- **Cursor restart recovery.** Cursor requests interrupted before their first checkpoint are resent after a server restart.

### Plus 62 more bug fixes.

<details>
<summary>Full changelog</summary>

## What's Changed
* fix(web): GB18030 RTF files now preview instead of showing no preview by @only21mil in pingdotgg/t3code#42827
* fix(server): retain unfinished terminal sequences in attach history by @StiensWout in pingdotgg/t3code#42817
* fix(release): preserve the web asset manifest by @usedhonda in pingdotgg/t3code#42806
* fix(web): Changes pane explains a diff of only hidden test files by @juliusmarminge in pingdotgg/t3code#42851
* fix(web): panel resize handle no longer covers the chat scrollbar on touch devices by @juliusmarminge in pingdotgg/t3code#42852
* fix(server): linked workflow steps recover replies from older pages by @SoroushRF in pingdotgg/t3code#42818
* fix(web,mobile): Usage says "1 session", not "1 sessions" by @only21mil in pingdotgg/t3code#42837
* fix(web): clicking outside a citation comment keeps its dictation by @juliusmarminge in pingdotgg/t3code#42856
* fix(client-runtime): feedback trace shows "1 character", not "1 characters" by @only21mil in pingdotgg/t3code#42855
* fix(desktop): WSL-only backend no longer falls back to Windows when reg.exe is blocked by policy by @juliusmarminge in pingdotgg/t3code#42857
* fix(github): count team review requests in the Reviewing filter by @pedrosousa13 in pingdotgg/t3code#42835
* fix(web): timeline minimap no longer covers the Copy button when the chat lane is shifted left by @juliusmarminge in pingdotgg/t3code#42876
* perf(web): Files panel Refresh reads only the folders on screen by @juliusmarminge in pingdotgg/t3code#42870
* fix(web): Restart agent session toast says the conversation is kept by @juliusmarminge in pingdotgg/t3code#42880
* fix(mobile): / menu ranks an exact skill name above description matches by @juliusmarminge in pingdotgg/t3code#42879
* fix(server): EPUB attachment text no longer includes hidden passages by @only21mil in pingdotgg/t3code#42871
* fix(web): reopening a closed pull request tab keeps saved list filters by @AymanKhan9 in pingdotgg/t3code#42875
* fix(web,mobile): mixed add/delete review selections no longer show backwards line ranges by @only21mil in pingdotgg/t3code#42863
* fix(web): reading position survives a panel resize right after a thread opens by @juliusmarminge in pingdotgg/t3code#42915
* fix(web): web search result links follow Open links in by @juliusmarminge in pingdotgg/t3code#42882
* fix(server): preserve split terminal control sequences across scrollback clears by @StiensWout in pingdotgg/t3code#42810
* fix(web): update terminal labels when the language changes by @StiensWout in pingdotgg/t3code#42872
* fix(web): show Labs device preferences read-only for projects by @jsyt in pingdotgg/t3code#42884
* fix(server): t3 connect link says to restart a running server, not start t3 serve by @juliusmarminge in pingdotgg/t3code#42904
* fix(server): extensionless empty ZIP files are detected as application/zip by @only21mil in pingdotgg/t3code#42899
* fix(server): OpenCode /goal length rejection names the limit by @juliusmarminge in pingdotgg/t3code#42905
* fix(web,mobile): adding a project from a draft's picker no longer leaves the draft behind by @nikalezah in pingdotgg/t3code#42889
* fix(web): localize terminal excerpt line ranges by @StiensWout in pingdotgg/t3code#42886
* fix(server): separate nested EPUB list items in attachment text by @Lucenx9 in pingdotgg/t3code#42891
* fix(web): empty files and folders in archive previews show 0 bytes instead of 1 KB by @only21mil in pingdotgg/t3code#42900
* fix(web): Show more in Thread Details keeps every repository listed by @juliusmarminge in pingdotgg/t3code#42919
* test(web): Files panel Refresh test no longer fails on a late tree render by @t3dotgg in pingdotgg/t3code#42935
* fix(terminal): keep line breaks when joining a running terminal by @StiensWout in pingdotgg/t3code#42927
* fix(server): separate ruby readings in EPUB attachment text by @Lucenx9 in pingdotgg/t3code#42911
* fix(web): unsupported file preview no longer calls extensionless filenames a file type by @only21mil in pingdotgg/t3code#42932
* fix(server): Antigravity live sessions no longer overwrite default thinking levels by @jsyt in pingdotgg/t3code#42931
* fix(web): release terminal reply ownership when the drawer closes by @StiensWout in pingdotgg/t3code#42897
* fix(mobile): keep CSV headings below the iPad navigation bar by @xandev641 in pingdotgg/t3code#42928
* fix(web): comment timestamps follow 'Open links in' by @iamshadmantaqi in pingdotgg/t3code#42873
* fix(web): SQLite 1-byte BLOB previews show "[blob: 1 byte]" by @only21mil in pingdotgg/t3code#42950
* fix(server): preserve image descriptions in EPUB attachment text by @Lucenx9 in pingdotgg/t3code#42925
* fix(server): expired buffered signals no longer wake workflows by @SoroushRF in pingdotgg/t3code#42952
* fix(server): DOCX merged table cells no longer shift later columns in attachment text by @only21mil in pingdotgg/t3code#42955
* fix(terminal): keep other input out of large bracketed pastes by @StiensWout in pingdotgg/t3code#42948
* fix(server): resend a Cursor request a restart cut off before its first checkpoint by @grenmango51 in pingdotgg/t3code#42938
* test(scripts): WSL archive fixture works with Git Bash tar on Windows by @pauldupuyjr in pingdotgg/t3code#42962
* fix(server): EPUB attachments keep their table captions for agents by @KyrosHendrix in pingdotgg/t3code#42964
* fix(web): Antigravity settings show only the fields the chosen sign-in method uses by @SunkenInTime in pingdotgg/t3code#40494
* fix(contracts): pull request and issue errors reach clients behind T3 Connect by @juliusmarminge in pingdotgg/t3code#42956
* fix(web): exact 1,024-column CSV and TSV files no longer show the truncated-columns banner by @only21mil in pingdotgg/t3code#42973
* fix(web,mobile): a running Read's image shows a loading frame, not "Image unavailable" by @shivamhwp in pingdotgg/t3code#42921
* fix(shared): usage page says "record was skipped" for one malformed record by @only21mil in pingdotgg/t3code#42974
* fix(antigravity): keep child skills visible under a root SKILL.md by @Lucenx9 in pingdotgg/t3code#42971
* fix(web): PR timeline "Open activity on host" buttons honor 'Open links in' by @AymanKhan9 in pingdotgg/t3code#42914
* fix(server): images on drives Windows' native realpath cannot resolve preview again by @juliusmarminge in pingdotgg/t3code#42981
* fix(server): login-shell re-reads no longer pile up fnm multishell folders in PATH by @juliusmarminge in pingdotgg/t3code#42996
* fix(mobile): an Issues list with nothing more to load no longer spins forever by @juliusmarminge in pingdotgg/t3code#42992
* fix(server): Antigravity sessions no longer mark an unscanned folder's skills as scanned by @juliusmarminge in pingdotgg/t3code#43002
* fix(web): empty ODS sheets show 0 columns instead of 1 by @only21mil in pingdotgg/t3code#42991
* fix(shared): new thread titles no longer end with a space before "..." by @only21mil in pingdotgg/t3code#43014
* fix(server): stop reading Antigravity usage limits from Google's internal APIs by @juliusmarminge in pingdotgg/t3code#43026
* fix(web): recognize composerEmpty in keybinding settings by @v-khanna in pingdotgg/t3code#42986
* fix(terminal): finish shell startup after disconnect by @StiensWout in pingdotgg/t3code#42940
* fix(web): pressing Escape on the Environments map clears selection without closing Settings by @only21mil in pingdotgg/t3code#43017
* feat(workflows): a run can declare its subject and be found by it by @juliusmarminge in pingdotgg/t3code#42517
* fix(server): agents below Full access ask before a push runs repository hooks by @juliusmarminge in pingdotgg/t3code#42535
* fix(server): asset responses pick their sandbox from the type they serve by @juliusmarminge in pingdotgg/t3code#42999
* fix(server): Claude no longer gets MCP app notes again after a server restart by @juliusmarminge in pingdotgg/t3code#43008

## New Contributors
* @usedhonda made their first contribution in pingdotgg/t3code#42806
* @pedrosousa13 made their first contribution in pingdotgg/t3code#42835
* @jsyt made their first contribution in pingdotgg/t3code#42884
* @xandev641 made their first contribution in pingdotgg/t3code#42928
* @grenmango51 made their first contribution in pingdotgg/t3code#42938
* @v-khanna made their first contribution in pingdotgg/t3code#42986

**Full Changelog**: pingdotgg/t3code@v0.1.13-nightly.20261125.5245...v0.1.13-nightly.20261125.5258

</details>


Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.1.13-nightly.20261125.5258
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants