Skip to content

test(site/src): delete duplicate storybook stories - #29018

Merged
DanielleMaywood merged 1 commit into
mainfrom
delete-duplicate-agentspage-stories
Sep 9, 2026
Merged

test(site/src): delete duplicate storybook stories#29018
DanielleMaywood merged 1 commit into
mainfrom
delete-duplicate-agentspage-stories

Conversation

@DanielleMaywood

@DanielleMaywood DanielleMaywood commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

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:

  • SubagentWaitTimedOutTitleFromMap and ComputerArrayResult (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 surviving ExternalImageConsentGate story.
  • 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.tsx gains 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.

@DanielleMaywood
DanielleMaywood force-pushed the delete-duplicate-agentspage-stories branch from 281b52c to 6c015d4 Compare September 7, 2026 08:11
@DanielleMaywood
DanielleMaywood force-pushed the delete-duplicate-agentspage-stories branch 3 times, most recently from ee4de9a to 258066c Compare September 8, 2026 15:27
@DanielleMaywood
DanielleMaywood force-pushed the delete-duplicate-agentspage-stories branch from 258066c to 92393b8 Compare September 9, 2026 08:45
@DanielleMaywood DanielleMaywood changed the title test(site/src/pages/AgentsPage): delete duplicate storybook stories test(site/src): delete duplicate storybook stories Sep 9, 2026
@DanielleMaywood
DanielleMaywood force-pushed the delete-duplicate-agentspage-stories branch from 92393b8 to 6572585 Compare September 9, 2026 08:46
Base automatically changed from remove-assertion-only-play-functions to main September 9, 2026 09:05
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.
@DanielleMaywood
DanielleMaywood force-pushed the delete-duplicate-agentspage-stories branch from 6572585 to a3bffac Compare September 9, 2026 09:05
@DanielleMaywood
DanielleMaywood marked this pull request as ready for review September 9, 2026 09:11
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 9, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-09T09:22:04.124477Z a3bffac Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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

Ship it

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review


P2 Badge Retain coverage for build-ID-less start results

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
P2 Badge 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".

@DanielleMaywood
DanielleMaywood merged commit cdfcbab into main Sep 9, 2026
31 checks passed
@DanielleMaywood
DanielleMaywood deleted the delete-duplicate-agentspage-stories branch September 9, 2026 09:25
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 9, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants