Skip to content

fix(chat): restore table vertical scroll and cell word wrapping - #248

Open
mrohan-sq wants to merge 1 commit into
block:mainfrom
mrohan-sq:fix/table-text-cutoff
Open

fix(chat): restore table vertical scroll and cell word wrapping#248
mrohan-sq wants to merge 1 commit into
block:mainfrom
mrohan-sq:fix/table-text-cutoff

Conversation

@mrohan-sq

@mrohan-sq mrohan-sq commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

Tables in chat responses were cutting off text. Two CSS issues combined to cause this:

  1. overflow-y: hidden on the table scroll container overrode Streamdown's default overflow-y: auto, completely disabling vertical scrolling. Combined with Streamdown's default maxHeight: 300px, any table taller than 300px had its bottom rows clipped with no way to scroll.

  2. No overflow-wrap on td cells — long unbreakable strings (URLs, file paths, code identifiers) caused horizontal overflow instead of wrapping within cells.

PR #207 (smaller wrapping headers) made this worse: wrapping headers narrow columns → body text wraps more → rows get taller → more content falls below the 300px cutoff.

Changes

  • overflow-y: hiddenoverflow-y: auto on the table scroll container (globals.css)
  • Added overflow-wrap: break-word to td cells (globals.css)
  • Updated globals.streamdown-table.test.ts to assert the new behavior

Related issue

none found

Testing

  • All existing table-related tests pass (2 table style tests + 2 scrollbar tests + 9 message tests)
  • Pre-commit hooks passed (biome, typecheck, i18n, design-system checks, berdctl contract)

The table scroll container had overflow-y: hidden, which clipped rows
below Streamdown's 300px max-height with no way to scroll. This was
worsened by PR block#207 (smaller wrapping headers → narrower columns →
taller body rows). Long unbreakable strings in td cells also caused
horizontal overflow instead of wrapping.

- Change overflow-y: hidden → auto on the table scroll container
- Add overflow-wrap: break-word to td cells
- Update tests to match
@mrohan-sq
mrohan-sq requested a review from a team August 28, 2026 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant