refactor(desktop): remove auto-open first file when opening changes tab#1427
Conversation
📝 WalkthroughWalkthroughThe SidebarControl component was refactored to remove extensive internal logic for workspace management, branch handling, file selection, and side effects. The onClick handler was simplified from a multi-step operation to a single toggleSidebar invocation, while the public API signature remains unchanged. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 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. 🎉 🧹 Recent nitpick comments
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
Changes
apps/desktop/src/renderer/screens/main/components/SidebarControl/SidebarControl.tsx: RemovedopenFirstFilecallback,FILE_CATEGORIESconstant,handleClickwrapper, and all supporting code (workspace/branch/status queries, store access, file viewer pane logic). The button now callstoggleSidebardirectly. (-110 lines)Test Plan
Summary by CodeRabbit