test(web): cover the right panel toggle opening and closing the panel - #10642
test(web): cover the right panel toggle opening and closing the panel#10642andreivcodes wants to merge 1 commit into
Conversation
The header toggle for the right panel has regressed several times (pingdotgg#8016, pingdotgg#9517, pingdotgg#9591) with nothing guarding it. This mounts the real control against the real right-panel store and checks that one press opens the panel, the next closes it, surfaces survive a close, the toggle only touches its own thread, and an unavailable toggle stays disabled. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This PR adds focused unit coverage for the existing right-panel toggle and does not modify production code, product defaults, or static-analysis configuration. Its effects are confined to the web test harness. Notes:
You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe PR adds tests for ChangesRight panel toggle validation
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This change adds regression coverage for right-panel toggle behavior without altering production behavior. No current merge-readiness risk remains. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
The right panel toggle in the chat header has regressed several times (#8016, #9517, #9591) and nothing in the suite exercises it. Every one of those was a click that never reached the button, so the store never changed.
This adds a test that mounts the real
PanelLayoutControls(real base-ui button) against the real right-panel store and presses the button the way ChatView and the pull-requests route wire it. It checks that one press opens the panel for the thread, the next press closes it, an open surface survives a close and comes back on reopen, the toggle only touches its own thread, and an unavailable toggle stays disabled. Verified the test fails when the handler double-fires.The three past breakages were Electron drag-region hit-testing, which only a real browser can reproduce; this covers everything below that layer.
Work done by Claude Fable 5.1 in Claude Code.
🤖 Generated with Claude Code
Note
Add test coverage for right panel toggle in
PanelLayoutControlsAdds a test module in PanelLayoutControls.test.tsx that mounts
PanelLayoutControlsvia a probe component and exercises the right-panel toggle button. Tests cover opening and closing the panel, preserving the active diff surface across close/reopen, state isolation between threads, and disabled behavior when the panel is unavailable. Each test resets the right-panel store and cleans up the renderer.Macroscope summarized a80da74.
Summary by CodeRabbit