fix(desktop): avoid hidden mosaic tabs with persistence#774
Conversation
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. 📝 WalkthroughWalkthroughThis PR removes the Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
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
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 |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
This PR is being reviewed by Cursor Bugbot
Details
You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| modifiedEditor.layout(); | ||
| } | ||
| }); | ||
| }, [isTabVisible, isMonacoReady, isEditorMounted]); |
There was a problem hiding this comment.
DiffViewer layout calls wrong editor reference
Medium Severity
The new effect for triggering Monaco layout on tab visibility changes calls modifiedEditor.layout() instead of diffEditorRef.current?.layout(). For a diff editor, calling layout on just the modified (right-side) editor won't properly resize the original (left-side) editor or recalculate the split between panes. The diffEditorRef.current holds the IStandaloneDiffEditor which manages the entire split view and is the correct target for layout calls.
🧹 Preview Cleanup CompleteThe following preview resources have been cleaned up:
Thank you for your contribution! 🎉 |
Links
apps/desktop/plans/20260114-2050-workspace-scoped-tabs-state.mdSummary
TabViewtrees when terminal persistence is enabled.Before:


Why / Context
Terminal persistence kept multiple tab UIs mounted with
visibility: hidden. That stack of hidden Mosaic windows could corrupt toolbar/header state when switching tabs, leading to blank or partially rendered file viewer panes. Rendering only the active tab UI avoids hidden Mosaic state while keeping terminal persistence behavior intact.How It Works
TabViewis mounted.isTabVisibleto file/diff viewers so Monaco layouts only run when visible.Manual QA Checklist
Terminal Features
File Operations
Testing
bun run typecheck --filter=@superset/desktopbun run lintbun test apps/desktop/src/renderer/stores/tabs/utils.test.tsDesign Decisions
Follow-ups
Risks / Rollout / Rollback
fix(desktop): avoid hidden mosaic tabs.Summary by CodeRabbit
Bug Fixes
Refactor
Tests
✏️ Tip: You can customize this high-level summary in your review settings.
Note
Eliminates hidden
TabViewstacks and related visibility plumbing, simplifying tab rendering and improving terminal/editor stability.TabsContentto render only the active tab; removes warm terminal persistence path andisTabVisibleacrossTabView,TabPane, andTerminalTerminalto focus based onisFocused, drop visibility-based input gating, adjust attachpriority, and streamline write/resize handlingDiffViewerafter mount/visibility to avoid stale sizingexitevent promiseWritten by Cursor Bugbot for commit a94428a. This will update automatically on new commits. Configure here.