Skip to content

feat: Implement tmux control mode multi-pane management#96

Merged
eyelock merged 2 commits into
mainfrom
fix/tmux-panels
Apr 12, 2026
Merged

feat: Implement tmux control mode multi-pane management#96
eyelock merged 2 commits into
mainfrom
fix/tmux-panels

Conversation

@eyelock
Copy link
Copy Markdown
Owner

@eyelock eyelock commented Jan 28, 2026

Summary

Adds native multi-pane terminal rendering via tmux control mode (-CC), with a three-backend architecture giving users a clear choice between Direct, TMUX Attach, and TMUX Control sessions.

Backends

Backend Persistence Pane management
Direct Ephemeral — ends with app No
TMUX Attach Persistent across restarts No
TMUX Control Persistent across restarts Yes

Pane management

  • Real-time multi-pane layout via TmuxControlModeParser and list-panes
  • Single NSViewRepresentable owns all pane views and a separator overlay, guaranteeing correct AppKit z-order without SwiftUI ZStack ambiguity
  • Pane frames absorb the tmux 1-unit border gap so tiles are edge-to-edge with no dark gap
  • 1pt accent-colour focus rect wall-to-wall with window chrome; single-pane sessions have no border
  • Zoom detection hides sibling panes and suppresses phantom separator lines
  • Directional navigation queries list-panes after select-pane to keep activePaneId in sync (select-pane does not trigger %layout-change)

Logging

  • Add TermQLogger.swift: structured logging to Apple Unified Logging with categories tmux, pane, session, focus, io, ui
  • Replace all print()/NSLog() calls across utilities and services
  • Gate TermQLogger.io behind fileLoggingEnabled — terminal output is user data and must not reach Unified Logging unconditionally

Testing

  • make check passes
  • Split horizontal / vertical — new panes render correctly
  • Click-to-focus — border and keyboard focus update
  • Directional navigation (arrow buttons) — active pane changes
  • Zoom / un-zoom — sibling panes hide/show, no phantom separator lines
  • Close pane — layout contracts correctly
  • TMUX Attach mode unaffected — single pane, no controls toolbar
  • Ctrl+T respects defaultBackend setting

🤖 Generated with Claude Code

@eyelock eyelock changed the title feat: Three-backend architecture for terminal sessions feat: Implement tmux control mode multi-pane management Apr 12, 2026
@eyelock eyelock marked this pull request as ready for review April 12, 2026 10:18
David Collie and others added 2 commits April 12, 2026 11:26
Add native multi-pane terminal rendering via tmux control mode (-CC),
with a three-backend architecture giving users a clear choice between
Direct, TMUX Attach, and TMUX Control sessions.

Backends:
- Direct: ephemeral shell, ends with the app
- TMUX Attach: persistent sessions via regular tmux attach
- TMUX Control: persistent sessions with full pane management

Pane management:
- Real-time multi-pane layout via TmuxControlModeParser and list-panes
- Single NSViewRepresentable owns all pane views and a separator overlay,
  guaranteeing correct AppKit z-order without SwiftUI ZStack ambiguity
- Pane frames absorb the tmux 1-unit border gap so tiles are edge-to-edge
- Navigate arrows query list-panes after select-pane to update activePaneId
- Zoom detection via frame-equals-bounds; overlay filtered to active pane
  only when zoomed to suppress phantom separator lines

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add TermQLogger debugging reference to termq-dev skill: categories,
  levels, log streaming commands, and TERMQ_DEBUG file mode
- Update commit-conventions skill: lean toward 1-3 commits per PR under
  squash-merge; expose the final feature story, not the journey of fixes
- Add commit history review as step 1 in /push command

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@eyelock eyelock merged commit 04859e2 into main Apr 12, 2026
7 of 8 checks passed
@eyelock eyelock deleted the fix/tmux-panels branch April 12, 2026 10:37
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