diff --git a/internal/ui/app.go b/internal/ui/app.go index 348ad34a..9aa231f1 100644 --- a/internal/ui/app.go +++ b/internal/ui/app.go @@ -841,6 +841,10 @@ func (m *AppModel) updateDashboard(msg tea.KeyMsg) (tea.Model, tea.Cmd) { case key.Matches(msg, m.keys.Queue): if task := m.kanban.SelectedTask(); task != nil { + // Don't allow queueing if task is already processing + if task.Status == db.StatusProcessing { + return m, nil + } // Immediately update UI for responsiveness task.Status = db.StatusQueued m.updateTaskInList(task) @@ -965,6 +969,10 @@ func (m *AppModel) updateDetail(msg tea.Msg) (tea.Model, tea.Cmd) { // Handle queue/close/retry from detail view if key.Matches(keyMsg, m.keys.Queue) && m.selectedTask != nil { + // Don't allow queueing if task is already processing + if m.selectedTask.Status == db.StatusProcessing { + return m, nil + } // Immediately update UI for responsiveness m.selectedTask.Status = db.StatusQueued if m.detailView != nil { diff --git a/internal/ui/detail.go b/internal/ui/detail.go index 145f630d..1375c4d7 100644 --- a/internal/ui/detail.go +++ b/internal/ui/detail.go @@ -735,7 +735,15 @@ func (m *DetailModel) renderHelp() string { desc string }{ {"↑/↓", "scroll"}, - {"x", "execute"}, + } + + // Only show execute when task is not currently processing + isProcessing := m.task != nil && m.task.Status == db.StatusProcessing + if !isProcessing { + keys = append(keys, struct { + key string + desc string + }{"x", "execute"}) } hasSession := m.hasActiveTmuxSession() @@ -754,12 +762,23 @@ func (m *DetailModel) renderHelp() string { }{"k", "kill"}) } + keys = append(keys, struct { + key string + desc string + }{"e", "edit"}) + + // Only show retry when task is not currently processing + if !isProcessing { + keys = append(keys, struct { + key string + desc string + }{"r", "retry"}) + } + keys = append(keys, []struct { key string desc string }{ - {"e", "edit"}, - {"r", "retry"}, {"c", "close"}, {"d", "delete"}, {"q/esc", "back"},