Skip to content

feat(sidebar): add window navigation and user tmux config import#45

Open
redlotusaustin wants to merge 4 commits into
Frayo44:mainfrom
redlotusaustin:feature/sidebar-enhancements
Open

feat(sidebar): add window navigation and user tmux config import#45
redlotusaustin wants to merge 4 commits into
Frayo44:mainfrom
redlotusaustin:feature/sidebar-enhancements

Conversation

@redlotusaustin
Copy link
Copy Markdown

Summary

Two enhancements to the session management sidebar:

  1. Window navigation — Tmux windows appear as expandable sub-items under sessions in the sidebar. Press Right arrow or Enter to expand, Left arrow to collapse. Window indent indicators (/) show expand/collapse state. Active windows show a dot. The expandSidebar config auto-expands all sessions on load.

  2. Import user tmux config — A config toggle (c → "Import user tmux config") that sources the user's ~/.tmux.conf into Agent View's isolated tmux server. The user's config is sourced last so it takes full precedence over Agent View's default status bar, colors, and settings.

Both features are off by default — no behavior change for existing users.

Changes

  • src/core/types.ts — Added TmuxWindow interface
  • src/core/tmux.ts — Added listWindows(), selectWindowSync(), setUserTmuxImport()
  • src/core/tmux.conf — Added conditional source-file ~/.tmux.conf at end
  • src/core/config.ts — Added importUserTmuxConfig and expandSidebar config fields
  • src/tui/util/groups.ts — Extended GroupedItem with window type
  • src/tui/routes/home.tsx — Window expansion, navigation, indicators, collapse behavior
  • src/tui/component/dialog-settings.tsx — Settings entries for both new toggles

Keybinds

Key On session On window On group
Right/Enter Expand windows → attach Select + attach Expand
Left Collapse windows → collapse group Collapse windows Collapse
Up/Down Navigate items Navigate items Navigate items

Notes

  • listWindows() uses execFileAsync to avoid shell escaping issues with tmux format strings
  • Window items use a plain renderFlatItem() function instead of nested <Show> to avoid OpenTUI invisible text rendering bugs
  • expandSidebar auto-expand respects manual collapses via a collapsedSessions signal
  • User tmux config is sourced last; a note warns about reserved Ctrl+Q/K/L/T/O/]/\ keybinds

Ruben Ramirez added 4 commits April 2, 2026 21:31
Windows were only fetched once on expand, so newly created or deleted
tmux windows wouldn't appear until restarting AV. Now polls every 3s
for all currently-expanded sessions.
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