Skip to content

Add multiple tmux panes to task detail view#451

Open
bborn wants to merge 1 commit intomainfrom
task/1295-add-multiple-tmux-panes-to-task-detail-v
Open

Add multiple tmux panes to task detail view#451
bborn wants to merge 1 commit intomainfrom
task/1295-add-multiple-tmux-panes-to-task-detail-v

Conversation

@bborn
Copy link
Owner

@bborn bborn commented Feb 12, 2026

Summary

This PR implements the ability to create multiple tmux panes (both shell and Claude) within a single task's detail view, allowing users to leverage the full power of tmux for parallel work.

Key Features

  • New Keybindings:

    • Ctrl+N: Create a new shell pane
    • Ctrl+Shift+N: Create a new Claude pane
  • Database Schema:

    • New task_panes table to track multiple panes per task
    • Support for pane types: claude, shell, claude-extra, shell-extra
    • Automatic cleanup via CASCADE on task deletion
  • Pane Management:

    • All panes are tracked in the database
    • Automatic cleanup when leaving detail view
    • Panes are "broken" (not killed) so they can be manually reattached later

Implementation Details

  1. Database Layer (internal/db/panes.go):

    • CRUD operations for task panes
    • Helper methods for getting primary panes
    • Sync function for backward compatibility
  2. UI Layer (internal/ui/pane_manager.go):

    • Functions to create new shell and Claude panes
    • Cleanup logic for extra panes
    • Integration with existing tmux pane management
  3. Tests (internal/db/panes_test.go):

    • Comprehensive test coverage for all pane operations
    • Tests for pane sync functionality
  4. Documentation (docs/multiple-panes.md):

    • User guide for the feature
    • Technical details and use cases

Use Cases

  • Run multiple shell sessions (dev server, git operations, log monitoring)
  • Have multiple Claude instances working on different aspects of a task
  • Leverage tmux layouts for better workspace organization

Backward Compatibility

The existing claude_pane_id and shell_pane_id columns remain for backward compatibility and track the primary panes.

Test Plan

  • Unit tests for database operations pass
  • Manual testing of pane creation and cleanup
  • Verified keybindings work correctly
  • Confirmed panes are properly broken on cleanup

🤖 Generated with Claude Code

This commit implements the ability to create multiple tmux panes
(both shell and Claude) within a single task's detail view.

Changes:
- Add task_panes table to track multiple panes per task
- Add DB layer for CRUD operations on task panes
- Add keybindings: Ctrl+N (new shell), Ctrl+Shift+N (new Claude)
- Implement pane creation and cleanup in detail view
- Add comprehensive tests for pane operations
- Add documentation for the feature

The feature allows users to leverage tmux's full power by creating
additional panes as needed, all tracked back to the task for proper
cleanup when navigating away.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
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