Skip to content

feat(investigations): Add a read-only Activity section - #127498

Merged
wedamija merged 1 commit into
masterfrom
danf/investigations-activity
Oct 15, 2026
Merged

wedamija merged 1 commit into
masterfrom
danf/investigations-activity

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 the Activity section, which only displays comments for now:

  • It uses the issue activity feed's timeline layout.
  • Each comment shows as "Name commented (on ) • time", with the avatar on the timeline, newest first.
  • The last row is "Investigation first created".
  • It shows the latest 100 comments, with a note when there are older ones.

Later PRs in this stack add posting comments, then edit and delete.

Show investigation comments in an Activity section at the bottom of the page, using the issue activity feed's timeline layout. Posting, editing and deleting come in follow-ups.
@wedamija
wedamija requested a review from a team as a code owner October 14, 2026 23:57
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Oct 14, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Story previews

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

Preview deployment: https://sentry-c2nsosdpd.sentry.dev

@wedamija
wedamija merged commit cd85b05 into master Oct 15, 2026
74 checks passed
@wedamija
wedamija deleted the danf/investigations-activity branch October 15, 2026 20:08

@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 merged while I was reviewing, so the two nits below are optional follow-ups, not blockers.

Overall this looks good. Reusing the issue activity timeline pieces keeps the feed consistent with issues, and moving getBlockDisplayTitle out of the cell is a good way to share it. I only have two small, optional nits.

Comment thread static/app/views/investigations/activity/investigationActivity.tsx
Comment thread static/app/views/investigations/activity/investigationActivity.tsx
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 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.
@billyvg

billyvg commented Oct 16, 2026

Copy link
Copy Markdown
Member

Visual QA

Screenshots from Scraps stories (fixture data, 1440×900, light theme).

Story coverage: the stories' fixture API (__stories__/investigationFixtureApi.tsx) throws on any investigation path it doesn't know, including /comments/. So on this branch, 9 of the existing Detail stories show "There was an error loading data" in the new Activity section. I added comment handling to the fixture (none by default), Activity stories, and a full-page comments story, in a local commit that isn't pushed yet.

before (base 092b744) this branch as-is with the fixture fix
Active manual notebook story on base Activity shows There was an error loading data Empty Activity section

New stories

Page and block comments More than 100 comments
Page comment, block comments, deleted block, deleted author Older comments note

On a full investigation page:

Activity section at the bottom of an investigation page

Newest first, "on <block>", "on a deleted block" and "Unknown user" all render as described.

Nit: "Showing the latest 100 comments." sits 3px above the centre of its timeline marker. The text is a bare 16px Text, while comment rows wrap theirs in a Flex with minHeight="22px" and align="center"; the same wrapper would line it up.

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>

This branch was successfully deployed

1 active deployment
Preview — 9d8d6be7 Deployed Oct 14, 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