Skip to content

🤖 tests: migrate Coder stories to co-located component stories#3046

Open
jaaydenh wants to merge 3 commits intomainfrom
storybook-nc99
Open

🤖 tests: migrate Coder stories to co-located component stories#3046
jaaydenh wants to merge 3 commits intomainfrom
storybook-nc99

Conversation

@jaaydenh
Copy link
Contributor

@jaaydenh jaaydenh commented Mar 23, 2026

Summary

Migrate Coder Storybook coverage out of the app-level App.coder.stories.tsx and into co-located component stories, removing AppWithMocks usage for this migration scope.

Background

The previous Coder stories rendered the full app shell and relied on broad integration setup. This made the stories heavier than needed for runtime-selector and Coder form behavior coverage.

Implementation

  • Added src/browser/features/Runtime/CoderControls.stories.tsx with component stories for:
    • CoderWorkspaceForm states (new/existing, parse errors, empty presets/workspaces, login header)
    • CoderAvailabilityMessage states (loading, outdated, unavailable-not-logged-in)
  • Added src/browser/features/ChatInput/CreationControls.stories.tsx with runtime-selector stories for:
    • Coder available
    • Coder missing
    • Coder outdated (disabled + version messaging)
  • Exported RuntimeButtonGroup and RuntimeButtonGroupProps from CreationControls.tsx so selector behavior can be tested directly at component scope.
  • Added shared typed fixtures in src/browser/stories/mocks/coder.ts.
  • Deleted src/browser/stories/App.coder.stories.tsx.

Validation

  • make typecheck
  • make lint
  • make static-check (blocked in this environment because hadolint is not installed: bash: hadolint: command not found)
  • Ran all other static-check substeps successfully:
    • make lint
    • make typecheck
    • make fmt-check
    • make check-eager-imports
    • make check-code-docs-links
    • make lint-shellcheck

Risks

Low risk. Changes are limited to Storybook stories and fixture wiring, plus exporting an existing internal runtime-selector component without behavior changes.


Generated with mux • Model: openai:gpt-5.3-codex • Thinking: xhigh • Cost: $10.26

@jaaydenh
Copy link
Contributor Author

@codex review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. Breezy!

ℹ️ 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".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant