Skip to content

feat: close the popover when a pane click hands focus to its terminal - #6

Merged
snaka merged 1 commit into
mainfrom
feat/close-popover-on-jump
Sep 12, 2026
Merged

snaka merged 1 commit into
mainfrom
feat/close-popover-on-jump

Conversation

@snaka

@snaka snaka commented Sep 12, 2026 •

Copy link
Copy Markdown
Owner

What

Clicking a session row in the popover now closes the popover as it hands focus to the terminal.

Until now the click issued agent.focus and activated the hosting terminal, but the popover stayed open in front of the window it had just brought forward. NSPopover.behavior = .transient does not cover this: it closes on interaction outside the popover, and a row click is inside it.

How

  • Add MenuBarController.closePopover(), which calls performClose(nil) only while the popover isShown.
  • Call it at the top of AppCoordinator.jump(to:) — before the focus request and the terminal activation, so the window that comes forward is unobstructed.
  • The notification-activation path shares jump(to:), where the popover is normally already closed and the isShown guard makes the call a no-op.

This is AppKit window control rather than decision logic, so it lives in the app layer and not in KelpieCore.

Verification

  • xcodebuild -project Kelpie.xcodeproj -scheme Kelpie -configuration Debug -destination 'platform=macOS' ... build → BUILD SUCCEEDED
  • swift test → 128 tests in 17 suites passed (KelpieCore / KelpieClient are unchanged)
  • The click behaviour itself is a GUI interaction and still needs a manual check.

🤖 Generated with Claude Code

Clicking a row in the popover focuses the pane in herdr and activates the
hosting terminal, but the popover stayed in front of the window it had just
brought forward. `.transient` does not cover this: it closes on interaction
*outside* the popover, and the row click is inside it.

`jump(to:)` now closes the popover before the focus request, so the terminal
comes forward to an unobstructed screen. The notification-activation path
shares `jump(to:)`, where the popover is normally already closed and the
`isShown` guard makes the call a no-op.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@snaka
snaka merged commit 116fbe3 into main Sep 12, 2026
2 checks passed
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.

1 participant