{{ message }}
fix(site/src): repair failing Storybook stories - #28462
Merged
Merged
Conversation
jakehwll
approved these changes
Aug 24, 2026
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ea16a6b747
ℹ️ 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".
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Repair the Storybook interaction and Pixel failures currently present on
main. The failures came from organization-scoped model changes leaving stories with incomplete providers and query fixtures, product copy and route changes leaving stale assertions, and several interaction tests depending on implementation details or teardown timing.Broken stories and fixes
Organization-scoped chat models
PR #27960 introduced organization-scoped chat models and the following regressions:
OrganizationModelsLayout / Switch Organization Preserves Auxiliary Parameters,Invalid Requested Organization Falls Back To Default,Invalid Requested Organization Denies Add,Duplicate Display Names Are Disambiguated, andNo Readable Organization Is Not Found: the stories only populated permission query keys for individual organizations, while the accessible-organization lookup requests authorization for all visible organization IDs together. The unmatched/api/v2/authcheckrequest returned a Storybook proxy 502, so the layout rendered an error instead of the intended picker, fallback, denied, disambiguation, or not-found state. Add fixtures for the combined organization-permission keys, preserve the intentionally denied permission map, and return an explicit empty authorization result for the no-readable-organization case.ModelFormProviderConfig / Provider Config Open AI,Provider Config Anthropic, andProvider Config Open AI Web Search:ModelFormbegan consumingOrganizationModelsContext, but these stories were not wrapped in its provider and rendered the router error boundary. Add the same organization-model context decorator used by the sibling model form stories.AgentChatPage / Queued For Capacity After Polling: the story retained a manually assembled chat-and-messages fixture after the page gained organization-model, provider, workspace, prompt, diff, chat-list, and authorization dependencies. Those missing queries prevented the polling request from being reached. Replace the partial fixture list with the sharedbuildQueries()setup.DashboardLayout / Custom Organization Role Can Open Models,DashboardLayout / ACL Readable Member Can Open Models, andNavbarView / For Member With Model Access: these stories also landed in feat: use organization-scoped chat models #27960 and inherited Pixel's tablet-and-desktop matrix, but their play functions exercise the desktopModelslink. Pixel's 744px tablet viewport renders that link inside the closed mobile menu, so the desktop query always failed there. Restrict these authorization-to-navigation stories to the desktop matrix; mobile Models navigation remains covered by the dedicatedMobileMenustory.Premium copy and navigation
DeploymentSidebarView / Premium Tab VisibleandPremium Tab Hidden: PR feat: Premium Page CTA updates and form handling #28226 renamed the production navigation item fromPremiumtoTrial Upgrade, but added stories that still queried the old name. Update both the positive and negative assertions so the hidden-state story cannot pass while the real CTA is present.PremiumPageView / No License: PR feat: Premium Page CTA updates and form handling #28226 changed the production heading toStart an unlimited 30-day Coder trialwhile the story asserted the previous Premium wording. Update the accessible heading assertion to the rendered copy.AgentChatPageView / Queued For Capacity Community Admin: PR fix(site): point queued-capacity trial link to /deployment/premium #28437 intentionally moved the trial CTA fromhttps://coder.com/trialto the internal/deployment/premiumroute, leaving the story's href assertion stale. Update the expected route while retaining the link-name and callout checks.MCP server refetch behavior
AgentCreateForm / MCP Servers Error Shows Alert And Disables SendandMCP Servers Refetch Error Keeps Send Enabled: the MCP coverage was introduced in feat!: org-scope MCP server configs with RBAC #27942. PR feat!: scope chat model override settings to organizations #28442 later added a second unconditional MCPErrorAlert, so a background refetch error appeared even when cached MCP data remained usable. The refetch story also calledrefetchQueries()without a key, which began refetching unrelated active model queries as the form's query surface expanded and produced unmatched API failures. Remove the duplicate unconditional alert, refetch only the organization's MCP query, and use semantic alert and heading assertions. Initial-load failures still disable Send, while background failures with cached data keep Send enabled without replacing the form with an error.Interaction and teardown stability
IconField / Open Picker: PR test: fix failing storybook stories #27674 changed this story to wait for theem-emoji-pickercustom element. That implementation-specific query races the lazy-loaded picker chunk and violates the component's observable contract. Keep the button state assertion and wait for the visible dialog instead.AgentChatPage / Slash Compact Command SubmitsandSlash Compact Yields To Personal Skill: the command story added in feat: add manual chat compaction via /compact #27081 waited on cmdk'sCommandsgroup heading, which is accessibility-hidden, while the skill variant queried raw implementation text. Menu placement and visibility are asynchronous, especially after the positioning changes in fix(site): improve chat slash menu enter handling, anchoring, and placement #28411. Wait for the visible selectable options by role before pressing Enter.AgentChatPageView / Terminal Focus On Tab Switch: the focus coverage added in fix(site): focus agents terminal on tab switch #24677 exposed an xterm teardown race rather than a product navigation regression. xterm queues its initial viewport synchronization, but Storybook could synchronously dispose the terminal first, leaving the queued callback to read a cleared renderer and report an unhandled error. Clear React state immediately, defer xterm disposal by one timer turn, query the labeled terminal textbox semantically, and remove the unnecessary empty WebSocket message fixture.