Summary
Add an alternative sidebar view mode — Task Mode — that groups all worktrees across projects by workflow status (Todo, In Progress, Needs Review, Done, Cancelled) instead of the current project-hierarchical grouping.
Inspired by craft-agents-oss session status workflow.
Data Model
Existing WorktreeStatus (keep as-is)
Runtime health: active | inactive | unavailable
New WorkflowStatus (new field on Worktree)
public enum WorkflowStatus: String, Codable, Sendable, CaseIterable {
case todo // Created, not started yet
case inProgress // Actively working on it
case needsReview // Work done, awaiting review (PR submitted, agent done)
case done // Merged / completed
case cancelled // Abandoned / closed
}
Why 5 states:
needsReview is a critical handoff point — you stop coding, someone else acts
cancelled distinguishes "intentionally dropped" from "finished" — important for cleanup
- Maps 1:1 to PR lifecycle: draft → open → review → merged/closed
Status semantics — tracks "who needs to act next":
| Scenario |
Status |
Why |
| PR open as draft, still coding |
inProgress |
You're the one acting |
| PR open, waiting for reviewer |
needsReview |
Someone else acts next |
| PR reviewed, changes requested, fixing |
inProgress |
Back to you |
| PR approved, waiting on CI/merge |
needsReview |
Still waiting |
| PR merged |
done |
Nothing left to do |
A worktree can bounce between inProgress ↔ needsReview multiple times during a review cycle.
Persistence
Add workflowStatus: WorkflowStatus to Worktree model. Persisted via existing JSON store. Backwards-compatible via decodeIfPresent defaulting to .todo.
Status Transitions
Manual (primary)
- Right-click context menu → "Status" submenu
- Command palette → "Set Worktree Status"
- CLI:
mori status <worktree> inProgress
Auto-transition (single rule)
| Transition |
Signal |
Confidence |
todo → inProgress |
First git commit on branch, OR agent starts working, OR terminal has uncommitted changes (modifiedCount > 0 || stagedCount > 0) |
High — you clearly started |
All other transitions are manual. No PR polling, no heuristics for ambiguous states.
Defaults
| Action |
Default Status |
| Create new worktree |
todo |
| Remove/delete worktree |
(just gone) |
| Everything else |
User sets manually |
Task Mode Sidebar View
View Toggle
Segmented control or icon toggle at sidebar top: Tree | Tasks
- Tree mode (current):
Project → Worktrees → Windows
- Task mode (new):
Status Group → Worktrees → Windows
Task Mode Layout
▼ In Progress (3)
feature/auth · mori
fix/crash · api
main · mori
▼ Needs Review (1)
feature/i18n · mori
▶ Todo (2)
...
▶ Done (5)
...
- 4 visible groups: In Progress, Needs Review, Todo, Done (in this priority order)
- Cancelled hidden by default (show via filter toggle)
- Done collapsed by default
- Each row shows: branch name + project
shortName as subtle badge
- Within each group, sorted by
lastActiveAt descending
- Clicking a worktree selects it and switches terminal (same behavior as tree mode)
- Windows still nest under each worktree
Interaction
- All existing context menu actions (Open in editor, Reveal in Finder, Remove) still work
- Context menu gains "Status" submenu with all 5 options
- Drag-and-drop between groups (stretch goal, not required for v1)
Scope
In scope
Out of scope (future)
- PR state polling via
gh
- Auto-transition for other status changes
- Drag-and-drop reordering
- Custom user-defined statuses
- Kanban board view (columns instead of list)
Summary
Add an alternative sidebar view mode — Task Mode — that groups all worktrees across projects by workflow status (
Todo,In Progress,Needs Review,Done,Cancelled) instead of the current project-hierarchical grouping.Inspired by craft-agents-oss session status workflow.
Data Model
Existing
WorktreeStatus(keep as-is)Runtime health:
active | inactive | unavailableNew
WorkflowStatus(new field onWorktree)Why 5 states:
needsReviewis a critical handoff point — you stop coding, someone else actscancelleddistinguishes "intentionally dropped" from "finished" — important for cleanupStatus semantics — tracks "who needs to act next":
inProgressneedsReviewinProgressneedsReviewdoneA worktree can bounce between
inProgress↔needsReviewmultiple times during a review cycle.Persistence
Add
workflowStatus: WorkflowStatustoWorktreemodel. Persisted via existing JSON store. Backwards-compatible viadecodeIfPresentdefaulting to.todo.Status Transitions
Manual (primary)
mori status <worktree> inProgressAuto-transition (single rule)
todo→inProgressmodifiedCount > 0 || stagedCount > 0)All other transitions are manual. No PR polling, no heuristics for ambiguous states.
Defaults
todoTask Mode Sidebar View
View Toggle
Segmented control or icon toggle at sidebar top: Tree | Tasks
Project → Worktrees → WindowsStatus Group → Worktrees → WindowsTask Mode Layout
shortNameas subtle badgelastActiveAtdescendingInteraction
Scope
In scope
WorkflowStatusenum in MoriCoreworkflowStatusfield toWorktreemodel (backwards-compatible)TaskSidebarViewin MoriUI)mori statussubcommandtodo→inProgresson first activityOut of scope (future)
gh