-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Summary
Add a toggleable preview panel that displays the content of the selected tmux session's active pane.
Behavior
- Toggle: Press
vto show/hide the preview panel - Layout: When visible, splits the content area 50/50 with the session list
- Content: Shows the active pane of the currently selected session
- Auto-refresh: Uses fast polling (300-500ms) to keep content up-to-date
- Selection change: When selecting a different session, preview updates to show that session's content
Settings
| Setting | Type | Default | Description |
|---|---|---|---|
preview_layout |
string | vertical |
Layout direction: vertical (list top, preview bottom) or horizontal (list left, preview right) |
preview_max_lines |
int | 50 |
Maximum lines to capture (actual lines shown depends on available terminal space) |
Technical Approach
Capturing tmux content
# Get active window.pane for session
tmux display-message -p -t <session> '#{window_index}.#{pane_index}'
# Capture last N lines from active pane
tmux capture-pane -p -t <session>:<window>.<pane> -S -<lines>Refresh strategy
Fast polling at 300-500ms interval while preview is visible. Simple, reliable, and effectively indistinguishable from true streaming for this use case.
UI Mockup
Vertical layout (default)
┌─────────────────────────────────┐
│ Session List │
│ ───────────────────────────── │
│ > session-1 [Working] │
│ session-2 [Idle] │
│ session-3 [Waiting] │
├─────────────────────────────────┤
│ Preview (session-1) │
│ ───────────────────────────── │
│ $ claude │
│ > Working on feature... │
│ ... │
└─────────────────────────────────┘
Horizontal layout
┌────────────────┬────────────────┐
│ Session List │ Preview │
│ ──────────── │ ──────────── │
│ > session-1 │ $ claude │
│ session-2 │ > Working... │
│ session-3 │ ... │
└────────────────┴────────────────┘
Tasks
- Add
preview_layoutandpreview_max_linesto settings - Add tmux client method to capture pane content
- Create preview panel UI component
- Implement toggle logic with
vkey - Add polling mechanism for auto-refresh
- Update help screen with new shortcut
- Calculate visible lines based on available terminal space
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels