Skip to content

test(investigations): Cover comments in Scraps stories - #127769

Open
billyvg wants to merge 7 commits into
masterfrom
billyvg/test/investigations-comments-stories
Open

billyvg wants to merge 7 commits into
masterfrom
billyvg/test/investigations-comments-stories

Conversation

@billyvg

@billyvg billyvg commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

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:

Generated with Claude Code

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Oct 16, 2026
@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

📊 Type Coverage Diff

Metric Before After Delta
Coverage 95.75% 95.75% ±0%
Typed 142,205 142,246 🟢 +41
Untyped 6,309 6,310 🔴 +1
🔍 1 new type safety issue introduced

any-typed symbols (1 new)

File Line Detail
static/app/views/investigations/__stories__/investigationFixtureApi.tsx 472 blockId (var)

This is informational only and does not block the PR.

Base automatically changed from danf/investigations-block-comments-entry to master October 16, 2026 17:09
billyvg and others added 5 commits October 16, 2026 14:31
The detail stories' fixture API threw on the new comments endpoint, so every
investigation page story rendered an error in its Activity section. Serve
comments from the fixture (none by default), and add stories for the Activity
states and for comments on a full investigation page.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Let the fixture API accept new comments, posted as a fixed story persona so the
stories look the same for everyone. Add a top bar to page stories that need
one, since the comment button lives in the app's top bar, which stories don't
render, and cover the archived state.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Let the fixture API edit and delete comments, and give the story persona's
comments the signed-in user's id so the author-only actions show. Add a story
for your own comments, including an edited one.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Drawers render where GlobalDrawer is mounted, so a thread opened from a story
read the real organization and API and failed to load. Mount a GlobalDrawer
inside the fixture, filter comments by block, and give the query block a thread
to open.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Serve per-block comment counts from the fixture API so page stories show the
pinned comment button, and add a cell story for the button with and without
comments.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@billyvg
billyvg force-pushed the billyvg/test/investigations-comments-stories branch from 312af70 to 09a3abb Compare October 16, 2026 18:34
@billyvg
billyvg marked this pull request as ready for review October 16, 2026 18:41
@billyvg
billyvg requested a review from a team as a code owner October 16, 2026 18:41
…ndex

The Scraps "On this page" index lists every heading in a story, so each
Activity section, chart title, and the thread drawer added an entry. Mark the
fixture's contents as demo content, which the index skips.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Only the fixture API uses it, so knip flagged the export.

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

This branch was successfully deployed

1 active deployment
Preview — 8159d1d3 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.

2 participants