Skip to content

start task#49

Merged
Kitenite merged 6 commits intomainfrom
start-task
Nov 9, 2025
Merged

start task#49
Kitenite merged 6 commits intomainfrom
start-task

Conversation

@Kitenite
Copy link
Copy Markdown
Collaborator

@Kitenite Kitenite commented Nov 9, 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

    • Terminals can be opened pre-populated with an initial command.
    • Plan view and task pages now offer a "Start Task" action that opens a terminal tab, updates task status, and focuses the new tab.
    • Kanban and task views surface workspace/worktree selection and reload controls to parent views.
  • Chores

    • Added foundational package metadata for internal models.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Nov 9, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Adds a new package @superset/models and introduces workspace-aware task start flows: UI components now accept workspace/worktree handlers and can request terminal tabs with an initial command; IPC and tmux manager were extended to accept and execute an optional initial command.

Changes

Cohort / File(s) Summary
Package Setup
packages/models/package.json
New package manifest for @superset/models (private, version 0.0.1) with devDependencies: @superset/typescript, @types/node, bun-types, and typescript.
IPC / Tmux backend
apps/desktop/src/main/lib/terminal-ipcs.ts, apps/desktop/src/main/lib/tmux-manager.ts
Terminal-create IPC handler and TmuxManager.create signature updated to accept optional command?: string; tmux manager now, when provided a command, waits ~500ms after session attach/create and executes the command via existing execute flow.
Renderer — Terminal component
apps/desktop/src/renderer/screens/main/components/MainContent/TabContent.tsx, apps/desktop/src/renderer/screens/main/components/MainContent/Terminal.tsx
Terminal prop `command?: string
Renderer — Plan / Task flows
apps/desktop/src/renderer/screens/main/components/NewLayout/NewLayoutMain.tsx, apps/desktop/src/renderer/screens/main/components/PlanView/PlanView.tsx, .../PlanView/KanbanColumn.tsx, .../PlanView/TaskCard.tsx, .../PlanView/TaskPage.tsx
PlanView and children now accept currentWorkspace, selectedWorktreeId, onTabSelect, onReload props; KanbanColumn, TaskCard, and TaskPage also accept onUpdateTask. TaskCard and TaskPage implement handleStartTask which resolves a worktree, calls terminal-create IPC with command, updates task status to planning, triggers reload, and selects the new tab (with small delay). UI adds Start Task controls and hover/button behavior.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant UI as Renderer (TaskPage / TaskCard)
  participant IPC as Renderer → Main IPC
  participant TMUX as Main (TmuxManager)
  participant Shell as tmux shell/session

  Note over UI,IPC: User clicks "Start Task"
  UI->>IPC: terminal-create { workspaceId, worktreeId, name, type, command }
  IPC->>TMUX: create(options { id, cwd, cols, rows, command })
  alt session created/attached
    TMUX->>Shell: attach/create session
    TMUX-->>Shell: wait 500ms
    TMUX->>Shell: execute(command)  %% highlighted new step
    Shell-->>TMUX: command output
  end
  TMUX-->>IPC: sessionId
  IPC-->>UI: session/tab created
  Note over UI: UI updates task status -> planning, triggers onReload, then onTabSelect after delay
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

  • Areas needing extra attention:
    • tmux-manager: timing and reliability of the 500ms wait + command execution path and any race conditions.
    • IPC payload shape changes (ensure backward compatibility with callers).
    • Task start flow: worktree selection logic and error handling in TaskPage/TaskCard.
    • Prop drilling across PlanView/KanbanColumn/TaskCard/TaskPage and effects on re-renders/state.

Possibly related PRs

  • Plan view feature #37 — Overlaps UI changes to PlanView/new-layout and touches the same components (PlanView, TaskCard, KanbanColumn, TaskPage, NewLayoutMain), likely related feature work.

Poem

🐰 I found a branch and gave a hop,
A terminal launched — I did not stop.
Commands dispatched with careful cheer,
Worktrees hum and tasks appear.
Hop, hop — new models spring this year! 🥕

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description lists bullet points but leaves all template sections empty; it lacks meaningful context about the changes, related issues, testing, and reasoning. Complete the Description, Related Issues, Type of Change, and Testing sections with substantive information explaining the purpose and validation of the changes.
Title check ❓ Inconclusive The title 'start task' is vague and generic, providing no meaningful information about the actual changes made to the codebase. Replace with a descriptive title that reflects the main change, such as 'Add @superset/models package configuration' or similar.
✅ Passed checks (1 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

📜 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 bd29c0c and f412819.

📒 Files selected for processing (9)
  • 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)

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

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
packages/models/package.json (2)

8-8: Replace wildcard version with a pinned or caret range.

Using "*" for @superset/typescript allows any version, including breaking changes, which can lead to unpredictable behavior and difficult debugging. Consider pinning to a specific version range (e.g., "^0.0.1" or "^1.0.0") or at minimum matching the patterns used for other dependencies.

-		"@superset/typescript": "*",
+		"@superset/typescript": "^0.0.1",

6-6: Consider filling in the empty scripts object or removing it.

The scripts object is empty. If no build or utility scripts are planned, consider removing this key entirely to keep the manifest minimal. If scripts are planned for future use, add them now or add a TODO comment.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c898e5e and bd29c0c.

📒 Files selected for processing (1)
  • packages/models/package.json (1 hunks)
🧰 Additional context used
🪛 GitHub Actions: CI
packages/models/package.json

[error] 11-13: Formatter would have printed corrections (e.g., formatting changes) but were not applied. Review formatting changes and re-run the formatter.

🔇 Additional comments (1)
packages/models/package.json (1)

1-13: Verify formatter compliance; file appears correctly formatted.

The file uses Biome's default tab indentation and appears properly formatted. However, since Biome's JSON formatter defaults to tab indentation and the current file already uses tabs, I cannot verify the specific formatter corrections mentioned in the CI pipeline without running the formatter directly. Manually run biome format packages/models/package.json to confirm no changes are needed, or if changes are required, apply and commit them before merging.

@Kitenite Kitenite merged commit fe01d0a into main Nov 9, 2025
1 of 5 checks passed
@Kitenite Kitenite deleted the start-task branch November 9, 2025 20:24
@Kitenite Kitenite restored the start-task branch November 11, 2025 23:07
This was referenced 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