fix: focus Ghostty tab for tmux sessions#43
Merged
wxtsky merged 1 commit intowxtsky:mainfrom Apr 8, 2026
Merged
Conversation
Ghostty often reports a generic working directory under tmux, so CWD-based matching can fail and only activate the app. When a tmux pane is available, derive the tmux session/window key and match Ghostty terminal titles first (tmuxcc-style fallback).\n\nAlso persist the raw TMUX env var from hooks and pass it to tmux subprocesses so we target the correct tmux server/socket.
42195ba to
0d2d8e4
Compare
nguyenvanduocit
pushed a commit
to nguyenvanduocit/CodeIsland
that referenced
this pull request
Apr 9, 2026
Scouted wxtsky/CodeIsland v1.0.10–v1.0.16 and vibeislandapp/vibe-island (April 7–9 2026). Added 5 kanban tasks for actionable v1.0.16 changes: - T-011: Warp terminal misdetection fix (bundle ID over TERM_PROGRAM) - T-012: Stuck session auto-reset + hook exec PID fix - T-013: Ghostty+tmux tab focus fix (PR wxtsky#43) - T-014: Menu bar icon when panel is auto-hidden (PR wxtsky#39) - T-015: Clickable session card to jump to terminal (wxtsky#37) Updated CLAUDE.md scouted-but-unsynced notes. Skipped: CI/DMG build fixes (v1.0.10–15), notarization/signing, Copilot CLI, open PR wxtsky#42 (SSH). https://claude.ai/code/session_01XNkMdQ4G4cwFZHX1TdNFM9
heiboy0070
pushed a commit
to heiboy0070/CodeIsland
that referenced
this pull request
Apr 13, 2026
fix: focus Ghostty tab for tmux sessions
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.
Problem
When multiple Ghostty tabs are open under tmux, Ghostty often reports a generic AppleScript "working directory" (e.g.
~) for all terminals. CodeIsland's CWD-based matching can therefore fail and the Ghostty button only activates the app instead of focusing the correct tab.Fix
tmux display-message(e.g.#{session_name}:#{window_index}:#{window_name}) and prefer matching Ghostty terminal titles first (with a tmuxcc-style fallback: title starts with<session>:).TMUXenv var from hook payload (_tmux) and pass it to tmux subprocesses, so GUI-launched CodeIsland targets the correct tmux server/socket./usr/bin/osascriptout-of-process.Tests
swift test