One function
jump_to_tmux_tab in androsovm/clorch
The author described this change as “Fix Ghostty tab navigation for linked tmux sessions”. It counts as a record because the check below fails on the code as it stood at 256791a43 and passes on db9af33f3, with nothing else changed between the two runs.
Projectandrosovm/clorch
Fix saved2026-03-29
Sharing licenceMIT · LICENSE
Change size+23 −1
What the code was meant to do, written into the code itself as a docstring
Activate the terminal tab whose tmux client is viewing *window*. Scans tmux clients (filtered to the session with an attached client) to find one whose active window matches, then maps its tty to a terminal tab via the active backend. Falls back to matching the window name in terminal tab titles. Returns `True` on success, `False` if no matching tab was found.
The change
| 32 | 32 | return backend.activate_tab(tab_ref) | |
| 33 | 33 | ||
| 34 | 34 | # Strategy 2: match window name in terminal tab titles | |
| 35 | - | return backend.activate_by_name(window) | |
| 35 | + | if backend.activate_by_name(window): | |
| 36 | + | return True | |
| 37 | + | ||
| 38 | + | # Strategy 3: match by client session name (handles terminals like | |
| 39 | + | # Ghostty where tabs are named after linked tmux sessions, not windows) | |
| 40 | + | result = tmux.run_command( | |
| 41 | + | "list-clients", | |
| 42 | + | "-F", "#{client_session}\t#{window_name}", | |
| 43 | + | check=False, | |
| 44 | + | ) | |
| 45 | + | if result.returncode == 0 and result.stdout.strip(): | |
| 46 | + | for line in result.stdout.strip().splitlines(): | |
| 47 | + | parts = line.split("\t", 1) | |
| 48 | + | if len(parts) == 2 and parts[1] == window: | |
| 49 | + | session_name = parts[0] | |
| 50 | + | if backend.activate_by_name(session_name): | |
| 51 | + | return True | |
| 52 | + | # Try suffix after last hyphen (e.g. "claude-surge" → "surge") | |
| 53 | + | suffix = session_name.rsplit("-", 1)[-1] | |
| 54 | + | if suffix != session_name and backend.activate_by_name(suffix): | |
| 55 | + | return True | |
| 56 | + | ||
| 57 | + | return False |
The check that tells the two apart
fail→pass·tests/test_jump_to_tmux_tab.py::TestStrategy3ClientSessionName::test_full_session_name_matches
Check file tests/test_jump_to_tmux_tab.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.
Origin and history
The code before it256791a434528c16337cf0b564978b66955ecb27
Broken version dated2026-03-29
Moduleclorch.tmux.navigator
Units changedjump_to_tmux_tab
Fingerprint7914be910b658b49
Checked2026-08-18 by goldset/0.1
Every field above is generated by our program. None of it is written by hand.
Other bugs found in androsovm/clorch
- 2026-03-17StateWatcher