fix(desktop): prevent setFocusedPane from clearing loading state#1373
Conversation
setFocusedPane was unconditionally setting pane status to "idle", which falsely cleared "working" status when clicking on a pane. Extract acknowledgedStatus() helper to shared/tabs-types and use it in setActiveTab, setFocusedPane, and clearWorkspaceAttentionStatus.
📝 WalkthroughWalkthroughA centralized Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🧹 Preview Cleanup CompleteThe following preview resources have been cleaned up:
Thank you for your contribution! 🎉 |
Summary
setFocusedPanewas unconditionally setting pane status to"idle", which falsely cleared"working"state when clicking on an active paneacknowledgedStatus()helper to centralize status-acknowledgment logic and prevent future inconsistenciesChanges
apps/desktop/src/shared/tabs-types.ts: AddedacknowledgedStatus()— resolves what a pane status should become when the user acknowledges it (review→idle,permission→working,working/idleunchanged)apps/desktop/src/renderer/stores/tabs/store.ts: Replaced inline status transition logic insetActiveTab,setFocusedPane, andclearWorkspaceAttentionStatuswith the new helperTest Plan
"working""review"status clears to"idle""permission"transitions to"working"Summary by CodeRabbit