Repository navigation
Avoid menu resync on window activation - #1646
lawrencecchen wants to merge 2 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
📝 WalkthroughWalkthroughAppDelegate.swift adds a new Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
📝 Coding Plan
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 |
Summary
synchronizeActiveMainWindowContexton every window activationpreferredTabManagerlookup for menu/UI reads so focus changes reuse the already-updated active window contextTesting
./scripts/reload.sh --tag task-1641-window-focus-lag✅cmux DEV task-1641-window-focus-lagvia AppleScript and confirmed/tmp/cmux-debug-task-1641-window-focus-lag.logcontains0shortcut.syncentries on the activation pathIssues
Summary by cubic
Stop resyncing menu state on window activation by using a non‑mutating tab manager lookup and centralizing focus restore. This removes focus lag, stops redundant shortcut syncs, and reliably restores terminal focus (closes #1641).
AppDelegate.preferredTabManager(...)and switchedactiveTabManagerto use it with key/main window fallback, replacingsynchronizeActiveMainWindowContextfor menu/UI reads.AppDelegate(invoked ondidBecomeKey), removed the per-view observer inGhosttyTerminalView, and updatedsetActiveMainWindowto return context, avoid pointer churn when unchanged, and repair missing sidebar state only when nil.Written for commit 17c5ea6. Summary will update on new commits.
Summary by CodeRabbit
Release Notes