Skip to content

test(macapp): a bell row selects the tab that raised it, pinned to #598's focus guard - #609

Merged
joelmoss merged 1 commit into
masterfrom
fix/607-bell-notification-routing
Nov 8, 2026
Merged

joelmoss merged 1 commit into
masterfrom
fix/607-bell-notification-routing

Conversation

@joelmoss

@joelmoss joelmoss commented Nov 8, 2026

Copy link
Copy Markdown
Owner

🤖 Opened by Claude Code.

Summary

#607: clicking a bell row for a notification raised by another tab of the workroom in front left the front tab selected. #598 (f20ab36) already fixed this on master. #607 was seen on the #597 branch, whose base (e2d2a81) predates #598.

bell row tap → WindowRegistry.open → ownerOf(tabID:) → AppStore.openTerminal → applyLocation → terminals.focus(Terminal 1)   ✓ always right
  popover closes → AppKit restores first responder to Terminal 3 → .focused → focus back to Terminal 3                ✗ before #598
                                                              → isFocusBeingShown guard (#598) ignores it              ✓ now

The bell, toast, menu-bar popover, ⇧⌘N and needs-you rows all take this route and pass the same guard. Only the same workroom was affected: across workrooms, the stale .focused belongs to another target.

This PR changes no behaviour. It pins the fix with tests and names the notification path in the guard's comment.

Evidence

  • Unit test NotificationRoutingTests.testOpeningANotificationSelectsTheBackgroundTabThatRaisedIt: with the guard disabled, Tests: Failed - 7 passed, 1 failed (of 8); on master, 8/8.
  • UI test WorkroomWorkflowUITests.testABellRowFromAnotherTabOfTheSameWorkroomSelectsThatTab, which follows the issue's steps in a Tart guest: it fails with the guard disabled and passes on master. The whole class passes 4/4.
  • Closed-tab fallback: testANotificationWhoseTabClosedOpensItsWorkroomOnTheTabInFront guards against regressions.
  • Gates: make app-test gave Tests: Passed - 3398 passed, 0 failed, 106 skipped (of 3504). make app-format, app-build and app-lint are clean.

Merge Danger

Door: two-way. Blast Radius: none; tests and one comment.

Fixes #607

🤖 Generated with Claude Code

https://claude.ai/code/session_01QxGw2gUmeT3FCNK7RnCdky

…'s focus guard (#607)

Clicking a bell row for a notification raised by another tab of the workroom
in front left the front tab selected. The routing was always right (the record
carries its tab id; WindowRegistry.open -> openTerminal -> applyLocation
focuses it), but the closing popover handed first responder back to the old
pane, whose .focused took focus back. #598's isFocusBeingShown guard fixed
that mechanism; #607 was seen on a branch cut before #598.

No behaviour change: NotificationRoutingTests and a WorkroomWorkflowUITests
case pin it (both red with the guard disabled, green on master), plus a
closed-tab fallback test, and the guard's comment names the notification path.

Fixes #607

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QxGw2gUmeT3FCNK7RnCdky
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-08T19:21:07.983058Z 68ba094 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@joelmoss
joelmoss merged commit 13d122e into master Nov 8, 2026
10 checks passed
@joelmoss
joelmoss deleted the fix/607-bell-notification-routing branch November 8, 2026 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Opening a notification from the bell list marks it read but doesn't switch to the tab that raised it

1 participant