Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions internal/ui/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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 {
Expand Down
25 changes: 22 additions & 3 deletions internal/ui/detail.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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"},
Expand Down