Repository navigation
Fix notification jump focus for nested tabs - #6416
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthrough
Surface ID → Panel ID Resolution
🎯 2 (Simple) | ⏱️ ~10 minutes Possibly Related PRs
Poem
🚥 Pre-merge checks | ✅ 21 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (21 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
Greptile SummaryFixes notification jump-to-unread focus when the notification target is a Bonsplit nested tab surface UUID rather than a panel UUID, by routing
Confidence Score: 5/5Safe to merge — the change is a single-line normalization that replaces a direct dictionary lookup with an already-proven helper used identically in focusTab. The production diff is four lines, all within focusTabFromNotification. The new resolution path mirrors focusTab's existing call to panelId(forSurfaceOrPanelId:in:), which already handles both panel IDs and Bonsplit surface IDs correctly. Nil-surfaceId fallback and notification dismissal logic are structurally unchanged. The regression test directly covers the previously-broken code path. No files require special attention. Important Files Changed
Sequence Diagram%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
participant N as Notification
participant TM as TabManager
participant PM as panelId(forSurfaceOrPanelId:in:)
participant W as Workspace
N->>TM: focusTabFromNotification(tabId, surfaceId)
TM->>PM: resolve surfaceId → panelId
PM-->>TM: requestedPanelId (panel UUID or nil)
alt surfaceId provided but unresolvable
TM-->>N: return false (log missingPanel)
else resolved or no surfaceId
TM->>W: clearSplitZoom()
TM->>TM: focusTab(tabId, surfaceId: desiredPanelId)
TM->>W: dismissNotificationOnDirectInteraction
TM-->>N: return true
end
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
participant N as Notification
participant TM as TabManager
participant PM as panelId(forSurfaceOrPanelId:in:)
participant W as Workspace
N->>TM: focusTabFromNotification(tabId, surfaceId)
TM->>PM: resolve surfaceId → panelId
PM-->>TM: requestedPanelId (panel UUID or nil)
alt surfaceId provided but unresolvable
TM-->>N: return false (log missingPanel)
else resolved or no surfaceId
TM->>W: clearSplitZoom()
TM->>TM: focusTab(tabId, surfaceId: desiredPanelId)
TM->>W: dismissNotificationOnDirectInteraction
TM-->>N: return true
end
Reviews (2): Last reviewed commit: "test: move notification focus regression..." | Re-trigger Greptile |
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.
Reviewed by Cursor Bugbot for commit 0ec0fae. Configure here.
…ettingsCore + wire 110 fork files Key upstream commits: - SSH ControlMaster PTY-resize fix (manaflow-ai#6432) - profiling capture action (manaflow-ai#6433) - hookless agent forking revert (manaflow-ai#6434) - notification jump-focus fix for nested tabs (manaflow-ai#6416) - ~100% CPU re-render loop fix - right-sidebar custom sidebar tabs (manaflow-ai#6430) — adds SurfaceKind.customSidebar - terminal scroll-speed multiplier (manaflow-ai#6422) - Settings recover from offscreen frames (manaflow-ai#5770) Strategy: - Default 3-way merge (no -X theirs) — only 15 conflicts vs Frankenstein corruption in P58's -X theirs attempt. - Took fork's TerminalController.swift wholesale (huge fork v2 handler surface). - Took upstream's pbxproj wholesale — re-added CMUXSessionDaemon + CMUXSettingsCore packages to BOTH cmux + cmux-cli targets (P58 only added cmux-cli, leaving CmuxSettingsRegistry symbols undefined at link time for the app). - Wired 110 fork-only Swift files (Sources/Herdr*, StableLayout/, etc.) lost when taking upstream's pbxproj. - Removed dup TerminalController+CustomSidebarCommands.swift (fork TC already has all v2CustomSidebar* handlers). - Removed dup titlebarShortcutHintShouldShow (now in RightSidebarChromeStyle.swift). - Added SurfaceKind.customSidebar + SessionBlueprintEncoder case for it. - Made Workspace.isProgrammaticSplit non-private (consumed by Workspace+CustomSidebarPane). Manual conflict resolutions: - AppDelegate.shortcut routing: kept fork's selectNext/PreviousTopLevelTab but composed with upstream's preferredMainWindowContextForShortcutRouting. - Workspace.swift session restore: combined fork's Claude restorability filter with upstream's Self.resumeBindingForSessionRestore helper. - WorkspaceContentView canvas mode: nested fork's shouldBypassTopBar branch inside the non-canvas arm. Build green: cmux app + cmuxTests both compile clean. Co-Authored-By: Claude <noreply@anthropic.com>

Summary
Testing
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Note
Low Risk
Small, targeted change to notification focus resolution aligned with existing
focusTabbehavior; test-only addition otherwise.Overview
Fixes notification jump-to-unread when the target is a nested Bonsplit tab whose UUID is a surface/tab id, not a panel key in
tab.panels.focusTabFromNotificationnow resolves the optionalsurfaceIdthroughpanelId(forSurfaceOrPanelId:in:)(same normalization asfocusTab), treats a provided id as missing only when that lookup fails, and focuses using the resolved panel id instead of passing the raw surface UUID through.Adds
TabManagerNotificationFocusRegressionTeststo assert that focusing by a third nested tab’s surface UUID selects the correct panel and Bonsplit selected tab.Reviewed by Cursor Bugbot for commit 0d35171. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by cubic
Fixes notification jump focus when a notification targets a nested Bonsplit tab. Surface/tab IDs now resolve to the owning panel before focusing, so the right panel is selected consistently.
Written for commit 0d35171. Summary will update on new commits.
Summary by CodeRabbit
Bug Fixes
Tests