Repository navigation
fix: route notification jumps to the originating session client - #141
Merged
mohak34 merged 8 commits intoOct 17, 2026
Merged
Conversation
kriss-spy
marked this pull request as ready for review
October 14, 2026 14:46
# Conflicts: # CHANGELOG.md
…atch KWin IDs on X11, publish route roots Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # CHANGELOG.md # src/tui.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #133: completion in an Obsidian or VS Code terminal can jump to unrelated Ghostty. KDE rejected KWin UUIDs, startup capture could select another foreground app, and V2's first-client claim could let a client without the completed session open own the notification and its click.
Delivery: client with the session family open → event claim → completed-session selection → captured host-window activation.
KDE capture accepts UUIDs and numeric IDs, prioritizes an explicit host ID, and otherwise resolves terminal/editor process ancestry with PID-constrained kdotool searches. Both V1 and V2 await bounded asynchronous capture. Ambiguous targets fail open with no jump action; failed activation does not choose another terminal. Captured IDs stay client-local instead of becoming inherited environment overrides.
V2 clients now publish their open tabs/current session route in private temporary presence files. Clients with the session family open take priority; the existing event claim still limits delivery to one eligible client per machine. If no eligible client has it open, a client falls back after a brief grace. Dead/stale presence, unusable storage and unavailable UI APIs preserve fail-open delivery. Presence is refreshed on events and every second, expires after five seconds, and is removed on disposal. A jump selects the event's session through the V2 tab/router API before activating its host window. focusOnClick=false leaves session navigation disabled.
Evidence
Merge Danger
Door: Two-way. No configuration migration.
Blast Radius: V2. This intentionally refines the prior first-client delivery policy to prefer an eligible client with the session open, while preserving fallback alerts and one-per-machine claims. V2 built-in jump-back also selects the completed session. V1 retains its delivery policy and window-only jump. KDE window targeting applies to both versions; server commands, configuration defaults, other window backends and pane checks retain their existing behavior. README, SPEC and CHANGELOG describe the policy and limitations.
The plugin does not switch between separate host-managed embedded terminals or supervise interactive clients. Linux popup action lifetime is addressed separately in #142.
Generated with GPT-6 in Codex.