Skip to content

fix(insights): Fix agents trace table horizontal overflow and empty state layout#110843

Merged
priscilawebdev merged 4 commits intomasterfrom
priscilawebdev/fix/agents-trace-table-overflow
Mar 18, 2026
Merged

fix(insights): Fix agents trace table horizontal overflow and empty state layout#110843
priscilawebdev merged 4 commits intomasterfrom
priscilawebdev/fix/agents-trace-table-overflow

Conversation

@priscilawebdev
Copy link
Copy Markdown
Member

@priscilawebdev priscilawebdev commented Mar 17, 2026

When the platformized AI agents overview is enabled, the traces table had a horizontal scrollbar due to hardcoded column widths (the agents column was fixed at 600px).

This fixes the overflow by:

  • Using COL_WIDTH_UNDEFINED for the agents column so it fills available space instead of a fixed 600px
  • Removing fit: max-content which prevented the table from fitting its container

Additionally fixes the empty state ("No results") layout where the message appeared at the top of the widget instead of being vertically centered:

  • TableWrapper now uses flex: 1 to fill remaining vertical space in the widget card
  • Grid now sets grid-template-rows: auto 1fr when height is set and both thead/tbody are present, keeping the header compact while the body fills remaining space

Before

Screen.Recording.2026-03-17.at.13.31.48.mov

After

Screen.Recording.2026-03-17.at.13.43.47.mov

closes https://linear.app/getsentry/issue/TET-2081/agent-monitoring-dashboard-horizontal-scrollbar-on-table

…tate layout

Use COL_WIDTH_UNDEFINED for the agents column instead of a hardcoded
600px width, skip the CellExpander hack in frameless/dashboard mode,
remove fit: max-content to prevent forced overflow, and ensure the
table body fills remaining vertical space for proper empty state
centering.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Mar 17, 2026
@linear-code
Copy link
Copy Markdown

linear-code bot commented Mar 17, 2026

priscilawebdev and others added 3 commits March 17, 2026 13:45
Revert the conditional CellExpander rendering — the frameless
check was not needed to fix the overflow issue.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
const TableWrapper = styled('div')`
margin-top: ${p => p.theme.space.lg};
min-height: 0;
flex: 1;
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this fixes the table not taking up the whole available vertical space.

const additionalGridProps = frameless
? {
bodyStyle: FRAMELESS_STYLES,
fit: 'max-content' as const,
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removing this allows the columns to shrink

export const DEFAULT_TRACES_TABLE_WIDTHS = [110, 600, 140, 110, 110, 110, 120, 110, 110];
export const DEFAULT_TRACES_TABLE_WIDTHS = [
110,
COL_WIDTH_UNDEFINED,
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is set to 600, the table becomes wider than its container and no longer fits. This should be flexible.

Comment on lines +102 to +104
&:has(> thead + tbody) {
grid-template-rows: auto 1fr;
}
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without this, the header stretches as well, but only the content should.

@priscilawebdev priscilawebdev marked this pull request as ready for review March 17, 2026 12:53
@priscilawebdev priscilawebdev requested review from a team as code owners March 17, 2026 12:53
Copy link
Copy Markdown
Member

@obostjancic obostjancic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@priscilawebdev priscilawebdev merged commit f82dac9 into master Mar 18, 2026
65 checks passed
@priscilawebdev priscilawebdev deleted the priscilawebdev/fix/agents-trace-table-overflow branch March 18, 2026 07:34
JonasBa pushed a commit that referenced this pull request Mar 18, 2026
…tate layout (#110843)

When the platformized AI agents overview is enabled, the traces table
had a horizontal scrollbar due to hardcoded column widths (the agents
column was fixed at 600px).

This fixes the overflow by:
- Using `COL_WIDTH_UNDEFINED` for the agents column so it fills
available space instead of a fixed 600px
- Removing `fit: max-content` which prevented the table from fitting its
container

Additionally fixes the empty state ("No results") layout where the
message appeared at the top of the widget instead of being vertically
centered:
- `TableWrapper` now uses `flex: 1` to fill remaining vertical space in
the widget card
- `Grid` now sets `grid-template-rows: auto 1fr` when `height` is set
and both `thead`/`tbody` are present, keeping the header compact while
the body fills remaining space



**Before**


https://github.com/user-attachments/assets/2553c168-a69b-406e-8d06-c10fa35e9ede



**After**


https://github.com/user-attachments/assets/f1c88a11-e2a3-4c48-8c1e-c4bdaa09d090



closes
https://linear.app/getsentry/issue/TET-2081/agent-monitoring-dashboard-horizontal-scrollbar-on-table

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants