Skip to content

fix: prevent incident table horizontal overflow from long summaries#6085

Open
Aladex wants to merge 1 commit intokeephq:mainfrom
Aladex:fix/incident-table-overflow
Open

fix: prevent incident table horizontal overflow from long summaries#6085
Aladex wants to merge 1 commit intokeephq:mainfrom
Aladex:fix/incident-table-overflow

Conversation

@Aladex
Copy link
Contributor

@Aladex Aladex commented Mar 9, 2026

Summary

Fixes #6083

When an incident has a long AI-generated summary, the "Incident" column stretches the table beyond the viewport.

FormattedContent renders summary as HTML via dangerouslySetInnerHTML, producing block-level elements (<p>, <ul>) that create their own block formatting context. line-clamp on the outer container cannot penetrate into these child elements, so the text is never clamped — and the table cell grows unbounded.

Changes

  • FormattedContent.tsx: Add plain prop that strips HTML tags and renders as plain inline text, allowing line-clamp to work correctly
  • incidents-table.tsx: Use plain prop on FormattedContent for the summary, add overflow-hidden on the <td> via meta.tdClassName to prevent the cell from stretching the table

Test plan

  • Open Incidents list with long AI-generated summaries — table no longer overflows
  • Summary shows up to 2 lines with ellipsis truncation
  • Incident detail page still renders full HTML summary (no regression from plain prop, which is only used in the table)

@vercel
Copy link

vercel bot commented Mar 9, 2026

@Aladex is attempting to deploy a commit to the KeepHQ Team on Vercel.

A member of the Team first needs to authorize it.

@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. UI User interface related issues labels Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S This PR changes 10-29 lines, ignoring generated files. UI User interface related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[🐛 Bug]: Incident table stretches horizontally when summary is long

1 participant