Skip to content

feat(logs): moved LogsInfiniteTable inline with expand/contract button#109819

Merged
JoshuaKGoldberg merged 42 commits intomasterfrom
logs-infinite-table-expando
Apr 7, 2026
Merged

feat(logs): moved LogsInfiniteTable inline with expand/contract button#109819
JoshuaKGoldberg merged 42 commits intomasterfrom
logs-infinite-table-expando

Conversation

@JoshuaKGoldberg
Copy link
Copy Markdown
Member

@JoshuaKGoldberg JoshuaKGoldberg commented Mar 3, 2026

Previously the LogsInfiniteTable component generally took in a scrollContainer ref to bind its scrolling to its parent (or, by default, the window). Its internal virtualizer then switched between the container vs. window based on whether that was available.

This PR simplifies the whole situation by having the table manage its own height with an expanded piece of state & an "expando" button to toggle between collapsed & expanded. The expando button is hidden when the table has the embedded prop.

The functional changes are gated behind an organizations:ourlogs-table-expando feature flag but can also be enabled with a ?logsTableExpando=true query parameter. I couldn't reasonably gate all of the far-reaching layout changes behind that, but do think I got the experience equivalent in the default/off state.

Area & URL Before After
Issue Logs Drawer
/issues/*
image (same)
Explore > Logs
/explore/logs
image image image
Trace > Logs
/explore/traces/trace/*/?&tab=logs
image (same)
Trace > Log Details
/explore/metrics/trace/*
image (same)
Replay > Logs
  /explore/replays/*/?&t_main=logs
image (same)

A few unit tests around log UIs were failing because JSDom's default zero-sized containers result in zero rows being rendered. This PR adds a shared mockGetBoundingClientRect for them.

There is one known bug: LOGS-653 Logs table virtualization gets offset after expanding & contracting rows. It's an edge case that doesn't always show up, so we think this is only a blocker for releasing to prod, not releasing internally.

Fixes LOGS-173. Fixes LOGS-591.

@linear
Copy link
Copy Markdown

linear bot commented Mar 3, 2026

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Mar 3, 2026
Comment thread static/app/views/explore/logs/tables/logsInfiniteTable.tsx Outdated
Comment thread static/app/views/explore/logs/tables/logsInfiniteTable.tsx Outdated
Comment thread static/app/views/explore/logs/styles.tsx Outdated
Comment thread static/app/views/explore/logs/tables/logsInfiniteTable.tsx
@JoshuaKGoldberg JoshuaKGoldberg force-pushed the logs-infinite-table-expando branch from 2badb52 to 730ea6f Compare March 3, 2026 18:51
Comment thread static/app/views/explore/logs/tables/logsInfiniteTable.tsx
Comment thread static/app/utils/fixtures/virtualization.ts
@JoshuaKGoldberg JoshuaKGoldberg force-pushed the logs-infinite-table-expando branch from 969c42f to e425d6c Compare March 5, 2026 21:31
@JoshuaKGoldberg JoshuaKGoldberg changed the title feat(logs): switch LogsInfiniteTable to toggle-able bound scrolling feat(logs): moved LogsInfiniteTable inline with expand/contract button Mar 9, 2026
@JoshuaKGoldberg JoshuaKGoldberg force-pushed the logs-infinite-table-expando branch from e425d6c to 606ee67 Compare March 9, 2026 21:26
@JoshuaKGoldberg JoshuaKGoldberg force-pushed the logs-infinite-table-expando branch from 606ee67 to fd4fc5d Compare March 9, 2026 21:29
@JoshuaKGoldberg JoshuaKGoldberg changed the title feat(logs): moved LogsInfiniteTable inline with expand/contract button [Reference] feat(logs): moved LogsInfiniteTable inline with expand/contract button Mar 10, 2026
@JoshuaKGoldberg JoshuaKGoldberg force-pushed the logs-infinite-table-expando branch from fd4fc5d to 2773bdf Compare March 11, 2026 13:19
Comment thread static/app/views/explore/logs/styles.tsx
Comment thread static/app/views/explore/logs/tables/logsInfiniteTable.tsx
Comment thread static/app/views/explore/logs/styles.tsx
# Enable overlaying charts in logs
manager.add("organizations:ourlogs-overlay-charts-ui", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
# Enable the expand/collapse table height toggle in the logs UI
manager.add("organizations:ourlogs-table-expando", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ideally, these are broken up, it also helps in the case that a revert is needed the flag still lives on.

Comment thread static/app/views/explore/logs/tables/logsInfiniteTable.tsx Outdated
@media (max-width: ${p => p.theme.breakpoints.md}) {
display: none;
}
`;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't see the difference 😭

# Enable overlaying charts in logs
manager.add("organizations:ourlogs-overlay-charts-ui", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
# Enable the expand/collapse table height toggle in the logs UI
manager.add("organizations:ourlogs-table-expando", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There will also need to be a corresponding config PR for the flag.

Comment thread static/app/views/performance/newTraceDetails/traceOurlogs.tsx
Comment thread static/app/components/events/ourlogs/ourlogsDrawer.tsx
Comment thread static/app/views/explore/logs/tables/logsInfiniteTable.tsx Outdated
Comment thread static/app/views/explore/logs/styles.tsx
Comment thread static/app/views/explore/logs/styles.tsx
Comment thread static/app/views/explore/logs/content.tsx Outdated
Comment thread static/app/views/performance/newTraceDetails/traceOurlogs.tsx
Comment thread static/app/views/explore/logs/logsTab.tsx
z-index: 1;
opacity: ${p => (p.inReplay ? 1 : 0.9)};
${p => (p.inReplay ? 'top: 90px;' : 'top: 20px;')}
${p => (p.inReplay ? '' : p.tableLeft ? `left: ${p.tableLeft}px;` : 'left: 0;')}
Copy link
Copy Markdown
Member Author

@JoshuaKGoldberg JoshuaKGoldberg Apr 2, 2026

Choose a reason for hiding this comment

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

This JS-based setting of a left based on tableLeft is buggy in production. If you resize your window horizontally then the value doesn't update (until you scroll).

Image

This is still borked in this PR 😞

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.

Comment thread static/app/views/replays/detail/ourlogs/index.tsx
Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Comment thread static/app/views/explore/components/overChartButtonGroup.tsx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants