Skip to content

feat(investigations): Add entry points to block comment threads - #127593

Merged
wedamija merged 2 commits into
masterfrom
danf/investigations-block-comments-entry
Oct 16, 2026
Merged

wedamija merged 2 commits into
masterfrom
danf/investigations-block-comments-entry

Conversation

@wedamija

Copy link
Copy Markdown
Member

We're adding comments to Investigations, and this is one of a series of frontend PRs that build the feature. Comments show in an Activity section at the bottom of the page, and block comments open in a thread drawer. Everything is behind the investigations flag.

This PR adds more ways to open a block's thread:

  • A comment button on each block. It stays visible when the block has comments, from a new comment-counts query.
  • In the Activity feed, "Name commented on " links the block name to that comment in the drawer.
  • These links switch an open drawer to the other thread instead of closing it.
  • Text blocks use a grid layout so the button sits in the header.

Stacked on #127590. This is the last PR in the series.

@wedamija
wedamija requested a review from a team as a code owner October 15, 2026 18:38
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Oct 15, 2026
@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Story previews

Preview the stories changed in this PR on the Vercel deployment:

Preview deployment: https://sentry-14vof8wx3.sentry.dev

@sentry

sentry Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Sentry Snapshot Testing

Name Added Removed Changed Renamed Unchanged Skipped Status
sentry-frontend
sentry-frontend
0 0 0 0 630 0 ✅ Unchanged

⚙️ sentry-frontend Snapshot Settings

@billyvg billyvg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🤖 AI review by Claude, an AI agent. I'm reviewing this stack at @billyvg's request and wrote the inline comments below. @wedamija, Billy will also go through these comments and the code, so please treat this as a first pass, not a final review.

This looks good overall. My notes are about the comment button on archived investigations, making the comment count available to screen readers, and two explanatory comments that the refactor dropped.

Comment thread static/app/views/investigations/detail/cell.tsx Outdated
},
];

const actionSize = block.kind === 'query' ? 'zero' : 'xs';

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🤖 Nit: This refactor dropped the comment that explained why query cells use zero ("A query cell's header is SeerEmbedBlock's band, which is sized to its zero toggle; an xs trigger would make it taller than an embed's."). It now applies to both buttons, so it's worth keeping on actionSize. The same goes for the comment on the placeholder's paddingBottom="xl" (line 314), which still applies.

Comment thread static/app/views/investigations/detail/index.tsx Outdated
Comment thread static/app/views/investigations/activity/investigationActivity.tsx
Comment thread static/app/views/investigations/detail/cell.tsx Outdated

@cursor cursor Bot left a comment •

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.

Stale Bugbot comment from a previous run.

Comment thread static/app/views/investigations/detail/cell.tsx

@cursor cursor Bot left a comment •

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.

Stale Bugbot comment from a previous run.

Comment thread static/app/views/investigations/detail/index.tsx
Base automatically changed from danf/investigations-block-comments-drawer to master October 16, 2026 03:27
Each block has a comment button that opens its thread. The button stays visible when the block has comments, and its label includes the count. In the Activity feed, the block name on a block comment links to that comment in the drawer. These links switch the open drawer to the new thread without closing it.
@billyvg

billyvg commented Oct 16, 2026

Copy link
Copy Markdown
Member

Visual QA

Screenshots from Scraps stories (fixture data, 1440×900, light theme). "Before" is the #127590 head with the same stories and data.

Story coverage: comment-counts wasn't handled by the stories' fixture, so the pinned button never showed. The fixture now serves counts, and detail/cell.stories.tsx has a "Comment button" story. That's in a local commit that isn't pushed yet.

Headless Chrome matches (hover: none), which triggers the cells' touch rule (actions always visible). Both sides of these pairs are in that mode:

before after
Text cells with actions at the bottom right Text cells with actions on the first line
Page where actions overlap the end of a text block Page with comment buttons in each block

With a mouse pointer (--blink-settings=primaryHoverType=2):

at rest hovering the first block
Comment button hidden without comments, pinned with Buttons shown while hovering
page at rest Activity link with a thread open
Pinned buttons on the two commented blocks Drawer switched to another thread

Checked in the browser:

  • The button is pinned on commented blocks and appears only on hover otherwise.
  • Block names in Activity are links. With a thread open, a link switches to the other block's thread instead of closing the drawer.
  • The text-block overlap ("…" over "time out.") is gone.

Nit: one-line text blocks grow about 3.6px. The action column is height="1lh" (19.6px), but one-line text content renders 16px tall, so the row grows to 19.6px and the button centres sit about 1.8px below the text's centre.

Text trims its half-leading, so a one-line block is shorter than 1lh. The actions column now takes its height from a hidden line of text, so one-line blocks no longer grow and the buttons center on the first line.

@cursor cursor Bot left a comment

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.

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.

Reviewed by Cursor Bugbot for commit bed73ab. Configure here.

<Flex area="1 / 1" height="0" alignSelf="center" align="center">
{actions}
</Flex>
</Grid>

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.

Actions miss first-line alignment

Low Severity

The overlay Flex sets height="0" so the hidden Text can size the row to one markdown line, but as a grid item it still has min-height: auto. That keeps the row as tall as the buttons, so they stay top-aligned instead of centering on the first line.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit bed73ab. Configure here.

@wedamija
wedamija merged commit ee2c6d2 into master Oct 16, 2026
77 checks passed
@wedamija
wedamija deleted the danf/investigations-block-comments-entry branch October 16, 2026 17:09

This branch was successfully deployed

1 active deployment
Preview — bed73abc Deployed Oct 16, 2026 by vercel[bot]
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