Skip to content

Keep a persistent cwt:worktrees explorer tab in tmux/zellij#43

Open
0dragosh wants to merge 1 commit intomainfrom
codex/add-persistent-worktrees-tab-eltme9
Open

Keep a persistent cwt:worktrees explorer tab in tmux/zellij#43
0dragosh wants to merge 1 commit intomainfrom
codex/add-persistent-worktrees-tab-eltme9

Conversation

@0dragosh
Copy link
Copy Markdown
Owner

Motivation

  • Keep the worktrees navigator open as a persistent explorer tab/window so users can keep it alongside per-worktree tabs and switch worktrees without leaving the multiplexer. This should work for both zellij and tmux.

Description

  • Add a shared constant WORKTREES_EXPLORER_NAME with value "cwt:worktrees" in src/tmux/pane.rs.
  • Add ensure_worktrees_explorer_tab() in src/tmux/pane.rs which renames the current multiplexer container using zellij action rename-tab or tmux rename-window depending on backend.
  • Call ensure_worktrees_explorer_tab() at startup from both interactive UIs in run_tui and run_forest_tui in src/main.rs when cwt is already inside a multiplexer, and treat rename failures as non-fatal warnings.

Testing

  • Ran formatting with cargo fmt --all and it completed successfully.
  • Built the project with cargo check and cargo clippy --all-targets --all-features with no errors or warnings blocking the change.
  • Ran the test suite with cargo test and all unit and integration tests passed (no failures).

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant