Uh oh!
There was an error while loading. Please reload this page.
fix(files): restore horizontal scroll in CSV and XLSX preview tables - #6550
Conversation
#6125 moved the preview tables onto the markdown table chrome and gave both surfaces `width: 100%`. That is right for prose and wrong for data: a CSV with dozens of columns divides the frame between them, and since the same change added `overflow-wrap: anywhere`, every column was free to break down to a single character — so headers rendered as vertical columns of letters and the table never exceeded its frame, leaving `overflow-x-auto` with nothing to scroll. Split sizing out of the shared rule. Prose tables keep `width: 100%`; preview tables size to their content and scroll, with column bounds so no column collapses to a sliver and one long value wraps instead of pushing the rest off-screen. Chrome (borders, padding, typography, header fill) stays shared.
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview
Reviewed by Cursor Bugbot for commit c9e8174. Configure here. |
Greptile SummaryThe PR restores horizontal scrolling for CSV and XLSX previews while retaining shared visual styling with markdown tables.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/data-table.tsx | Removes the nested horizontal scroll container so existing bounded preview containers own both-axis scrolling. |
| apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/document-table.css | Separates prose and preview sizing, using content-width preview tables and bounded columns without changing shared table chrome. |
| apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/document-table.test.ts | Adds regression assertions for the distinct table sizing and preview column bounds. |
Reviews (4): Last reviewed commit: "fix(files): correct a stale reference to..." | Re-trigger Greptile
Uh oh!
There was an error while loading. Please reload this page.
waleedlatif1
commented
Aug 11, 2026
waleedlatif1
commented
Aug 11, 2026
@cursor review |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…ones DataTable owned `overflow-x-auto` while its caller owns the vertical scroll, so now that preview tables are actually wider than the frame the horizontal scrollbar rendered at the foot of the table rather than at the bottom of the viewport — up to 1,000 rows below it for the two callers whose container is a plain block (xlsx-preview, preview-panel). csv-table-preview escaped it only because its flex column compressed the wrapper to the frame height. Drop the inner overflow so the caller's bounded container scrolls both axes. All three callers now place the scrollbar at the viewport bottom.
waleedlatif1
commented
Aug 11, 2026
waleedlatif1
commented
Aug 11, 2026
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 2068d9a. Configure here.
The sizing comment still credited `.document-table`'s own `overflow-x-auto` for the horizontal scroll, which the previous commit removed in favour of the caller's container.
Summary
width: 100%. Right for prose, wrong for data — a CSV with dozens of columns divides the frame between them, and since that change also addedoverflow-wrap: anywhere, each column could break to a single character. The table never exceeded its frame, sooverflow-x-autohad nothing to scrollwidth: 100%; preview tables getwidth: max-content; min-width: 100%and scrollmin-width: 80px,max-width: 320px) so no column collapses to a sliver and one long value wraps instead of pushing the rest off-screen. 80px matches the tables grid'sCOL_WIDTH_MIN; 320px matches the capped content width used elsewhere in the appAffects all three
DataTableconsumers: the CSV preview, the inline CSV path inpreview-panel, and the XLSX preview.Type of Change
Testing
Two tests added to
document-table.test.ts, both confirmed to fail when the CSS is reverted. Full file-viewer suite passes (697 tests).jsdom does no table layout, so the tests only assert the declarations resolve. Verified the actual layout separately in headless Chromium against a 16-column CSV:
Not yet exercised in the running app against a real uploaded CSV.
Checklist