test(site/src): delete duplicate storybook stories - #29018
Conversation
281b52c to
6c015d4
Compare
ee4de9a to
258066c
Compare
258066c to
92393b8
Compare
92393b8 to
6572585
Compare
Each of these stories renders a visual state that a surviving story in the same file already captures for Pixel, or asserts behavior that an existing Vitest suite already covers. They add screenshot and test time without adding coverage. 70 deletion candidates were reviewed; 65 are deleted and 5 are kept as play-less visual stories whose assertions moved out of the play function so Pixel owns the visual state. Every duplicate relationship and cited test was verified against the code before deletion; the pixel-excluded stories are untouched. Fixtures and imports that only the deleted stories used are removed with them. Most files are under site/src/pages/AgentsPage; ModelSelector.stories.tsx moved to site/src/modules/aiModels upstream after this branch was cut.
6572585 to
a3bffac
Compare
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
For persisted chats created by older servers, successful start_workspace results can omit build_id, and this was the only story exercising that shape. The surviving StartWorkspaceCompleted always supplies a build ID, which makes StartWorkspaceTool render a collapsible build-log section; this legacy result is non-collapsible, so the screenshots are not duplicates, and no Vitest test covers this renderer path. Keep a play-less story for the legacy visual state or add equivalent coverage.
AGENTS.md reference: site/AGENTS.md:L73-L74
https://github.com/coder/coder/blob/a3bffacbbc0f87fdca9f866c9ce1522091e5e5e8/site/src/pages/AgentsPage/components/ChatElements/tools/Tool.stories.tsx#L2929
Retain coverage for build-ID-less create results
For historical successful create_workspace results without build_id, this was the only story covering the non-collapsible success renderer. The surviving successful story includes a build ID and therefore renders build-log content, while CreateWorkspaceAlreadyExists exercises the distinct created: false label branch; neither is equivalent to this legacy created: true state, and no Vitest test covers it. Preserve this visual state as a play-less story or add equivalent coverage.
AGENTS.md reference: site/AGENTS.md:L73-L74
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Each of these stories renders a visual state that a surviving story in the same file already captures for Pixel, or asserts behavior that an existing Vitest suite already covers. They add screenshot and test time without adding coverage.
70 deletion candidates were reviewed; 65 are deleted. The other five carry a visual state or security property with no surviving duplicate, so they are kept as play-less stories and Pixel owns them:
SubagentWaitTimedOutTitleFromMapandComputerArrayResult(Tool.stories.tsx): the subagentTitles map title and the array-form computer result rendered as an image.RunningEmptyQuestions(AskUserQuestionTool.stories.tsx): the live status region rendered instead of a form.StreamingExternalImageConsentGate(Response.stories.tsx): the Cure53 CDM-02-006 streaming consent gate; the placeholder must render instead of an<img>so no external request fires mid-stream. The static-mode gate is the survivingExternalImageConsentGatestory.RunningWithBackendError(ToolCall.stories.tsx): running-over-error icon precedence, inherently visual.Every duplicate relationship and cited test was verified against the code before deletion; the pixel-excluded stories are untouched. Fixtures and imports that only the deleted stories used are removed with them.
Where a deleted story held the only coverage of a hook-level behavior,
useFileAttachments.test.tsxgains a storage-retention test in this same PR, so the PR stays coverage-neutral on its own.Stacked on #29017; base branch set to that PR. Merge order: #29017, then this one.
Generated by Coder Agents on behalf of @DanielleMaywood.