Skip to content

Start task#64

Closed
Kitenite wants to merge 6 commits intomainfrom
start-task
Closed

Start task#64
Kitenite wants to merge 6 commits intomainfrom
start-task

Conversation

@Kitenite
Copy link
Copy Markdown
Collaborator

@Kitenite Kitenite commented Nov 11, 2025

Description

Related Issues

Type of Change

  • Bug fix
  • New feature
  • Documentation
  • Refactor
  • Other (please describe):

Testing

Screenshots (if applicable)

Additional Notes

Summary by CodeRabbit

  • New Features
    • Added "Start Task" functionality—hovering over tasks reveals a button to quickly initialize them with an automatically configured terminal
    • Terminals now support automatic command execution upon creation
    • Enhanced plan view with improved workspace and worktree context integration for better task management

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Nov 11, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This PR adds optional command execution to terminal creation, threading a command parameter through the IPC layer and tmux manager to execute commands post-initialization. Concurrently, the PlanView component gains workspace context and callbacks, enabling a new Start Task feature that spawns terminals with Claude commands. A models package manifest is also introduced.

Changes

Cohort / File(s) Summary
Terminal command execution
apps/desktop/src/main/lib/terminal-ipcs.ts, apps/desktop/src/main/lib/tmux-manager.ts
Added optional command parameter to terminal creation IPC and tmux manager. When provided, the command is executed on the newly created terminal after a 500ms delay.
Terminal component integration
apps/desktop/src/renderer/screens/main/components/MainContent/Terminal.tsx, apps/desktop/src/renderer/screens/main/components/MainContent/TabContent.tsx
Terminal component now accepts command prop and passes it through the terminal-create IPC message. TabContent propagates tab.command to Terminal.
PlanView component refactoring
apps/desktop/src/renderer/screens/main/components/PlanView/PlanView.tsx, apps/desktop/src/renderer/screens/main/components/PlanView/KanbanColumn.tsx
PlanView and KanbanColumn now accept workspace context props (currentWorkspace, selectedWorktreeId) and callbacks (onTabSelect, onReload, onUpdateTask). Props are threaded to child components.
Start Task feature
apps/desktop/src/renderer/screens/main/components/PlanView/TaskCard.tsx, apps/desktop/src/renderer/screens/main/components/PlanView/TaskPage.tsx
TaskCard gains hover state with a "Start Task" button; TaskPage adds handleStartTask that selects a worktree, creates a terminal with a Claude command, updates task status, and triggers reload. Both components accept workspace and callback props.
New models package
packages/models/package.json
Created new private TypeScript package "@superset/models" with dev dependencies.

Sequence Diagram(s)

sequenceDiagram
    participant User as User
    participant Renderer as Renderer (Task UI)
    participant Main as Main Process
    participant TmuxManager as TmuxManager
    participant Tmux as Tmux

    User->>Renderer: Click "Start Task"
    activate Renderer
    Renderer->>Renderer: Resolve target worktree
    Renderer->>Main: IPC: terminal-create with command="claude"
    deactivate Renderer
    
    activate Main
    Main->>TmuxManager: create({id?, cwd?, command?})
    activate TmuxManager
    TmuxManager->>Tmux: Create/attach session
    Tmux-->>TmuxManager: Session created
    TmuxManager->>TmuxManager: Schedule executeCommand after 500ms
    TmuxManager-->>Main: Return session ID
    deactivate TmuxManager
    Main-->>Renderer: IPC response with terminal ID
    deactivate Main
    
    activate TmuxManager
    TmuxManager->>TmuxManager: 500ms delay
    TmuxManager->>Tmux: executeCommand(sid, "claude")
    Tmux-->>TmuxManager: Command executing
    deactivate TmuxManager
    
    activate Renderer
    Renderer->>Renderer: Update task status to planning
    Renderer->>Renderer: Reload workspace data
    Renderer->>Renderer: Select new terminal tab
    deactivate Renderer
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Key areas requiring attention:
    • TaskCard.tsx and TaskPage.tsx: Review the handleStartTask logic for worktree resolution and error handling; verify IPC message structure and timing assumptions (500ms delay adequacy).
    • Terminal.tsx: Confirm command prop threading and IPC payload construction match backend expectations.
    • PlanView.tsx, KanbanColumn.tsx: Verify complete prop propagation chain; ensure no callback invocations are missing or incorrectly wired.
    • tmux-manager.ts: Validate the executeCommand scheduling and error handling if the terminal setup fails before the 500ms delay.

Possibly related PRs

  • start task #49 — Duplicates the terminal command execution feature and models package changes across the same backend and renderer files.
  • open new window #59 — Modifies the same terminal IPC and tmux manager codepaths, changing handler signatures and terminal creation workflows.
  • stuff #53 — Introduces and routes the startup command through terminal creation flows, overlapping with command execution logic.

Poem

🐰✨ A hop, a skip, commands now fly—
Tasks start with Claude reaching the sky!
Through PlanView's halls, callbacks cascade,
Terminals bloom in a workspace cascade.
This rabbit grins: the models are here! 🌱

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch start-task

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4492b5e and f412819.

📒 Files selected for processing (10)
  • apps/desktop/src/main/lib/terminal-ipcs.ts (1 hunks)
  • apps/desktop/src/main/lib/tmux-manager.ts (2 hunks)
  • apps/desktop/src/renderer/screens/main/components/MainContent/TabContent.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/MainContent/Terminal.tsx (3 hunks)
  • apps/desktop/src/renderer/screens/main/components/NewLayout/NewLayoutMain.tsx (1 hunks)
  • apps/desktop/src/renderer/screens/main/components/PlanView/KanbanColumn.tsx (3 hunks)
  • apps/desktop/src/renderer/screens/main/components/PlanView/PlanView.tsx (4 hunks)
  • apps/desktop/src/renderer/screens/main/components/PlanView/TaskCard.tsx (3 hunks)
  • apps/desktop/src/renderer/screens/main/components/PlanView/TaskPage.tsx (5 hunks)
  • packages/models/package.json (1 hunks)

Comment @coderabbitai help to get the list of available commands and usage tips.

@Kitenite Kitenite closed this Nov 11, 2025
@Kitenite Kitenite deleted the start-task branch November 12, 2025 18:20
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