Skip to content

feat(investigations): Post comments from the Activity section - #127574

Merged
wedamija merged 6 commits into
masterfrom
danf/investigations-activity-composer
Oct 15, 2026
Merged

wedamija merged 6 commits into
masterfrom
danf/investigations-activity-composer

Conversation

@wedamija

@wedamija wedamija commented Oct 15, 2026 •

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 posting comments:

  • A composer under the Activity feed. Enter sends the comment.
  • The metadata line shows the comment count ("Comment" when there are none) before the viewers. Clicking it moves focus to the composer; on archived investigations it scrolls to Activity.
  • Archived investigations do not show the composer.

Stacked on #127498. The next PR adds edit and delete.

@wedamija
wedamija requested a review from a team as a code owner October 15, 2026 17:39
@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-hdgbc242w.sentry.dev

@wedamija
wedamija requested review from billyvg and ryan953 October 15, 2026 17:43

@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 7b3c0df. Configure here.

Comment thread static/app/views/investigations/detail/index.tsx Outdated
Base automatically changed from danf/investigations-activity to master October 15, 2026 20:08
Add a composer under the Activity feed. Enter sends the comment. The header button shows the comment count and moves focus to the composer. Archived investigations do not show the composer.

@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.

One small correctness issue (the header count tops out at 100) and two minor UX notes.

Comment thread static/app/views/investigations/detail/index.tsx
Comment thread static/app/views/investigations/detail/index.tsx Outdated
Comment thread static/app/views/investigations/comments/commentComposer.tsx Outdated
Comment thread static/app/views/investigations/activity/investigationActivity.tsx Outdated
Comment thread static/app/views/investigations/comments/commentComposer.tsx Outdated
The count sits before the viewers instead of in the top bar. On archived investigations it scrolls to Activity, and it is hidden when there are no comments.
@wedamija
wedamija merged commit 1ab9494 into master Oct 15, 2026
73 checks passed
@wedamija
wedamija deleted the danf/investigations-activity-composer branch October 15, 2026 22:38
wedamija added a commit that referenced this pull request Oct 15, 2026
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 edit and delete for the comment's author:
- A "…" menu on your own comments with Edit and Delete.
- Edit opens the comment inline. Enter saves, Esc cancels.
- Delete asks for confirmation first.
- Edited comments show "(edited)".

Stacked on #127574. The next PR
adds block comments in a drawer.
@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 #127498 head with the same story and data.

Story coverage: the header comment button goes into TopBar.Slot, and stories have no top bar, so it never rendered. I added a small story top bar that renders the page's slots, plus POST …/comments/ in the fixture and archived states. That's in a local commit that isn't pushed yet. Comments posted in stories come from a fixed persona (Ada Lovelace), so the frames never show the signed-in account.

before after
Activity before the composer Activity with the composer

Header button with the count (no before frame, since stories had no top bar):

Investigation page with the 5 comments button

typing shows Comment after Enter
Composer with text and the Comment button Posted comment at the top of the feed

The header button scrolls the composer into view and focuses it:

Composer focused after clicking the header button

archived page archived Activity
Archived page with a disabled Comment button and no composer Archived Activity without a composer

Checked in the browser:

  • The button reads "5 comments" and focuses the composer.
  • Enter posts the comment: the count goes to 6 and the composer clears.
  • Archived: no composer, and the button reads "Comment" and is disabled.

billyvg added a commit that referenced this pull request Oct 19, 2026
### Why?

The comments PRs shipped without story coverage. The stories' fixture
API throws on any investigation endpoint it doesn't know, so since the
Activity section landed, every investigation page story shows a loading
error in Activity. Posting, editing, block threads, and the comment
entry points can't be reached from Scraps at all. A thread opened from a
story also rendered outside the fixture and requested the real API.

### How?

Teach the fixture API the comment endpoints and mount a drawer inside
it, then add stories for each comment state. There is one commit per
comments PR. Stories view the page as a fixed persona, so they look the
same for everyone.

Screenshots from these stories are in the visual QA comments on each PR:

- #127498
- #127574
- #127576
- #127590
- #127593

<sub>Generated with Claude Code</sub>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
RudraPatel2003 pushed a commit that referenced this pull request Oct 19, 2026
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 posting comments:
- A composer under the Activity feed. Enter sends the comment.
- The metadata line shows the comment count ("Comment" when there are
none) before the viewers. Clicking it moves focus to the composer; on
archived investigations it scrolls to Activity.
- Archived investigations do not show the composer.

Stacked on #127498. The next PR
adds edit and delete.
RudraPatel2003 pushed a commit that referenced this pull request Oct 19, 2026
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 edit and delete for the comment's author:
- A "…" menu on your own comments with Edit and Delete.
- Edit opens the comment inline. Enter saves, Esc cancels.
- Delete asks for confirmation first.
- Edited comments show "(edited)".

Stacked on #127574. The next PR
adds block comments in a drawer.
RudraPatel2003 pushed a commit that referenced this pull request Oct 19, 2026
### Why?

The comments PRs shipped without story coverage. The stories' fixture
API throws on any investigation endpoint it doesn't know, so since the
Activity section landed, every investigation page story shows a loading
error in Activity. Posting, editing, block threads, and the comment
entry points can't be reached from Scraps at all. A thread opened from a
story also rendered outside the fixture and requested the real API.

### How?

Teach the fixture API the comment endpoints and mount a drawer inside
it, then add stories for each comment state. There is one commit per
comments PR. Stories view the page as a fixed persona, so they look the
same for everyone.

Screenshots from these stories are in the visual QA comments on each PR:

- #127498
- #127574
- #127576
- #127590
- #127593

<sub>Generated with Claude Code</sub>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

This branch was successfully deployed

1 active deployment
Preview — 8d0f7919 Deployed Oct 15, 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