🤖 tests: migrate right-sidebar stories to isolated co-located components#2997
🤖 tests: migrate right-sidebar stories to isolated co-located components#2997
Conversation
|
@codex review |
|
Codex Review: Didn't find any major issues. 🎉 ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bfa36922f8
ℹ️ 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".
|
@codex review |
1 similar comment
|
@codex review |
|
Codex Review: Didn't find any major issues. Another round soon, please! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
f40f7d1 to
4d33ed0
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4d33ed0127
ℹ️ 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".
src/browser/features/RightSidebar/CodeReview/ImmersiveReviewView.stories.tsx
Show resolved
Hide resolved
|
@codex review Resolved both P2 threads — these are acknowledged design trade-offs of migrating to component-level isolation. The isolated stories now test component behavior directly without app-shell wiring, while app-level integration testing for Artifacts→Plan file and ReviewPanel→ImmersiveReview flows is covered by E2E tests and other app-level stories. The migration plan explicitly chose component-level isolation to improve story maintainability and speed. |
|
Codex Review: Didn't find any major issues. Hooray! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Summary
Migrates all three right-sidebar Storybook story modules from app-level
AppWithMockswrappers to isolated, co-located component stories that render components directly with minimal provider scaffolding.Background
The existing right-sidebar stories (
App.rightSidebar.stories.tsx,App.rightSidebar.planPreview.stories.tsx,App.rightSidebar.immersiveReview.stories.tsx) render through the fullAppWithMocks→AppLoadershell, coupling them to the entire application context. This makes stories slow, fragile, and hard to maintain. Moving to isolated component-level stories:AppWithMocks,AppLoader)Implementation
Provider shell pattern: Each story file introduces a lightweight provider shell that wraps children in the full app provider stack (
ThemeProvider→APIProvider→RouterProvider→ProjectProvider→WorkspaceProvider→ExperimentsProvider→ ... →ThinkingProvider→BackgroundBashProvider), withWorkspaceStoresynced to the mock client.Three migration targets (27 stories total):
src/browser/stories/App.rightSidebar.stories.tsxsrc/browser/features/RightSidebar/RightSidebar.stories.tsxsrc/browser/stories/App.rightSidebar.planPreview.stories.tsxsrc/browser/features/RightSidebar/PlanFileDialog.stories.tsxsrc/browser/stories/App.rightSidebar.immersiveReview.stories.tsxsrc/browser/features/RightSidebar/CodeReview/ImmersiveReviewView.stories.tsxNew story added:
ImmersiveReviewComplete— tests the review completion state when all hunks are marked as read (ported from upstream main).Play function adaptation:
expandRightSidebar()calls (components render directly)PlanFileDialogrenders withopen={true}directly instead of requiring click-throughImmersiveReviewViewreceives parsed diff data as props instead of flowing through the appRisks
Low: Stories now bypass app-level routing and workspace selection, which means any future bugs in how the app wires these components wouldn't be caught by these stories. However, this is the expected trade-off for component-level testing, and app-level integration is covered by other test layers (E2E tests, remaining app-level stories).
Generated with
mux• Model:anthropic:claude-opus-4-6• Thinking:xhigh• Cost:$15.42