Skip to content

Commit 6db2ed8

Browse files
committed
refactor: Remove Thinking status from worktree kanban
- Remove StatusThinking from status enum - Reorder kanban columns: Active, Waiting, Done, Paused - Change Waiting icon from 💬 to ⧗ - Update detection logic to prioritize Waiting status - Update all tests for new layout
1 parent 15f3cdb commit 6db2ed8

File tree

6 files changed

+29
-55
lines changed

6 files changed

+29
-55
lines changed

internal/plugins/worktree/agent.go

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ func detectStatus(output string) WorktreeStatus {
478478
text := strings.Join(checkLines, "\n")
479479
textLower := strings.ToLower(text)
480480

481-
// Waiting patterns (agent needs user input) - check first as these are definitive
481+
// Waiting patterns (agent needs user input) - highest priority
482482
waitingPatterns := []string{
483483
"[y/n]", // Claude Code permission prompt
484484
"(y/n)", // Aider style
@@ -531,22 +531,6 @@ func detectStatus(output string) WorktreeStatus {
531531
}
532532
}
533533

534-
// Thinking patterns (agent actively reasoning)
535-
// Check after waiting/done/error since those are more definitive signals
536-
thinkingPatterns := []string{
537-
"<thinking>", // Claude extended thinking block
538-
"</thinking>", // Claude extended thinking end (still processing)
539-
"<internal_monologue>", // Alternative thinking format
540-
"thinking...", // Generic thinking indicator
541-
"reasoning about", // Aider-style reasoning
542-
}
543-
544-
for _, pattern := range thinkingPatterns {
545-
if strings.Contains(textLower, pattern) {
546-
return StatusThinking
547-
}
548-
}
549-
550534
// Default: active if we have output
551535
return StatusActive
552536
}

internal/plugins/worktree/kanban.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
package worktree
22

33
// kanbanColumnOrder defines the order of columns in kanban view.
4-
var kanbanColumnOrder = []WorktreeStatus{StatusActive, StatusThinking, StatusWaiting, StatusDone, StatusPaused}
4+
var kanbanColumnOrder = []WorktreeStatus{StatusActive, StatusWaiting, StatusDone, StatusPaused}
55

66
// getKanbanColumns returns worktrees grouped by status for kanban view.
77
// StatusError worktrees are grouped with StatusPaused since they require user intervention.
88
func (p *Plugin) getKanbanColumns() map[WorktreeStatus][]*Worktree {
99
columns := map[WorktreeStatus][]*Worktree{
10-
StatusActive: {},
11-
StatusThinking: {},
12-
StatusWaiting: {},
13-
StatusDone: {},
14-
StatusPaused: {},
10+
StatusActive: {},
11+
StatusWaiting: {},
12+
StatusDone: {},
13+
StatusPaused: {},
1514
}
1615
for _, wt := range p.worktrees {
1716
status := wt.Status

internal/plugins/worktree/kanban_test.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ func TestSyncListToKanban(t *testing.T) {
6060

6161
p.syncListToKanban()
6262

63-
if p.kanbanCol != 3 { // Done column (after Active, Thinking, Waiting)
64-
t.Errorf("expected kanbanCol=3 (Done), got %d", p.kanbanCol)
63+
if p.kanbanCol != 2 { // Done column
64+
t.Errorf("expected kanbanCol=2 (Done), got %d", p.kanbanCol)
6565
}
6666
if p.kanbanRow != 0 { // First item in Done column
6767
t.Errorf("expected kanbanRow=0, got %d", p.kanbanRow)
@@ -79,8 +79,8 @@ func TestSyncListToKanbanWithErrorStatus(t *testing.T) {
7979

8080
p.syncListToKanban()
8181

82-
if p.kanbanCol != 4 { // Paused column (index 4, after Active, Thinking, Waiting, Done)
83-
t.Errorf("expected kanbanCol=4 (Paused), got %d", p.kanbanCol)
82+
if p.kanbanCol != 3 { // Paused column (index 3)
83+
t.Errorf("expected kanbanCol=3 (Paused), got %d", p.kanbanCol)
8484
}
8585
if p.kanbanRow != 0 {
8686
t.Errorf("expected kanbanRow=0, got %d", p.kanbanRow)
@@ -113,7 +113,7 @@ func TestSyncKanbanToList(t *testing.T) {
113113
{Name: "wt3", Status: StatusDone},
114114
{Name: "wt4", Status: StatusPaused},
115115
},
116-
kanbanCol: 2, // Waiting column (after Active, Thinking)
116+
kanbanCol: 1, // Waiting column
117117
kanbanRow: 0, // First item (wt2)
118118
selectedIdx: 0,
119119
}
@@ -130,7 +130,7 @@ func TestSyncKanbanToListEmptyColumn(t *testing.T) {
130130
worktrees: []*Worktree{
131131
{Name: "wt1", Status: StatusActive},
132132
},
133-
kanbanCol: 2, // Waiting column (empty, after Active, Thinking)
133+
kanbanCol: 1, // Waiting column (empty)
134134
kanbanRow: 0,
135135
selectedIdx: 0,
136136
}
@@ -244,7 +244,7 @@ func TestSelectedKanbanWorktree(t *testing.T) {
244244
{Name: "wt1", Status: StatusActive},
245245
{Name: "wt2", Status: StatusWaiting},
246246
},
247-
kanbanCol: 2, // Waiting column (after Active, Thinking)
247+
kanbanCol: 1, // Waiting column
248248
kanbanRow: 0,
249249
}
250250

@@ -262,7 +262,7 @@ func TestSelectedKanbanWorktreeEmptyColumn(t *testing.T) {
262262
worktrees: []*Worktree{
263263
{Name: "wt1", Status: StatusActive},
264264
},
265-
kanbanCol: 2, // Waiting column (empty, after Active, Thinking)
265+
kanbanCol: 1, // Waiting column (empty)
266266
kanbanRow: 0,
267267
}
268268

internal/plugins/worktree/types.go

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,11 @@ const (
5151
type WorktreeStatus int
5252

5353
const (
54-
StatusPaused WorktreeStatus = iota // No agent, worktree exists
55-
StatusActive // Agent running, recent output
56-
StatusThinking // Agent actively thinking/processing (extended reasoning)
57-
StatusWaiting // Agent waiting for input
58-
StatusDone // Agent completed task
59-
StatusError // Agent crashed or errored
54+
StatusPaused WorktreeStatus = iota // No agent, worktree exists
55+
StatusActive // Agent running, recent output
56+
StatusWaiting // Agent waiting for input
57+
StatusDone // Agent completed task
58+
StatusError // Agent crashed or errored
6059
)
6160

6261
// String returns the display string for a WorktreeStatus.
@@ -66,8 +65,6 @@ func (s WorktreeStatus) String() string {
6665
return "paused"
6766
case StatusActive:
6867
return "active"
69-
case StatusThinking:
70-
return "thinking"
7168
case StatusWaiting:
7269
return "waiting"
7370
case StatusDone:
@@ -86,10 +83,8 @@ func (s WorktreeStatus) Icon() string {
8683
return "⏸"
8784
case StatusActive:
8885
return "●"
89-
case StatusThinking:
90-
return "◐"
9186
case StatusWaiting:
92-
return "💬"
87+
return ""
9388
case StatusDone:
9489
return "✓"
9590
case StatusError:

internal/plugins/worktree/types_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,7 @@ func TestWorktreeStatusIcon(t *testing.T) {
122122
}{
123123
{StatusPaused, "⏸"},
124124
{StatusActive, "●"},
125-
{StatusThinking, "◐"},
126-
{StatusWaiting, "💬"},
125+
{StatusWaiting, "⧗"},
127126
{StatusDone, "✓"},
128127
{StatusError, "✗"},
129128
}
@@ -144,7 +143,6 @@ func TestWorktreeStatusString(t *testing.T) {
144143
}{
145144
{StatusPaused, "paused"},
146145
{StatusActive, "active"},
147-
{StatusThinking, "thinking"},
148146
{StatusWaiting, "waiting"},
149147
{StatusDone, "done"},
150148
{StatusError, "error"},

internal/plugins/worktree/view_kanban.go

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,16 @@ func (p *Plugin) renderKanbanView(width, height int) string {
4646

4747
// Column headers and colors
4848
columnTitles := map[WorktreeStatus]string{
49-
StatusActive: "● Active",
50-
StatusThinking: "◐ Thinking",
51-
StatusWaiting: "💬 Waiting",
52-
StatusDone: "✓ Ready",
53-
StatusPaused: "⏸ Paused",
49+
StatusActive: "● Active",
50+
StatusWaiting: "⧗ Waiting",
51+
StatusDone: "✓ Ready",
52+
StatusPaused: "⏸ Paused",
5453
}
5554
columnColors := map[WorktreeStatus]lipgloss.Color{
56-
StatusActive: styles.StatusCompleted.GetForeground().(lipgloss.Color), // Green
57-
StatusThinking: lipgloss.Color("183"), // Light purple (processing)
58-
StatusWaiting: styles.StatusModified.GetForeground().(lipgloss.Color), // Yellow
59-
StatusDone: lipgloss.Color("81"), // Cyan
60-
StatusPaused: lipgloss.Color("245"), // Gray
55+
StatusActive: styles.StatusCompleted.GetForeground().(lipgloss.Color), // Green
56+
StatusWaiting: styles.StatusModified.GetForeground().(lipgloss.Color), // Yellow
57+
StatusDone: lipgloss.Color("81"), // Cyan
58+
StatusPaused: lipgloss.Color("245"), // Gray
6159
}
6260

6361
// Calculate column widths (account for panel borders)

0 commit comments

Comments
 (0)