Skip to content

Commit ec78814

Browse files
committed
ui/js: hide retry button for done tasks, keep for cancelled
1 parent d428a8c commit ec78814

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ui/js/modal.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,10 +288,10 @@ async function openModal(id) {
288288
const cancellable = ['backlog', 'in_progress', 'waiting', 'failed'];
289289
cancelSection.classList.toggle('hidden', !cancellable.includes(task.status));
290290

291-
// Retry section (done / failed / waiting / cancelled)
291+
// Retry section (failed / waiting / cancelled)
292292
const retrySection = document.getElementById('modal-retry-section');
293293
const retryResumeRow = document.getElementById('modal-retry-resume-row');
294-
if (task.status === 'done' || task.status === 'failed' || task.status === 'waiting' || task.status === 'cancelled') {
294+
if (task.status === 'failed' || task.status === 'waiting' || task.status === 'cancelled') {
295295
retrySection.classList.remove('hidden');
296296
document.getElementById('modal-retry-prompt').value = task.prompt;
297297
if (task.session_id) {

ui/js/render.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ function buildCardActions(t) {
156156
parts.push(`<button class="card-action-btn card-action-resume" onclick="event.stopPropagation();quickResumeTask('${t.id}',${t.timeout || 15})" title="Resume in existing session">&#8635; Resume</button>`);
157157
}
158158
parts.push(`<button class="card-action-btn card-action-retry" onclick="event.stopPropagation();quickRetryTask('${t.id}')" title="Move back to Backlog">&#8617; Retry</button>`);
159-
} else if (t.status === 'done' || t.status === 'cancelled') {
159+
} else if (t.status === 'cancelled') {
160160
parts.push(`<button class="card-action-btn card-action-retry" onclick="event.stopPropagation();quickRetryTask('${t.id}')" title="Move back to Backlog">&#8617; Retry</button>`);
161161
}
162162
if (!parts.length) return '';

0 commit comments

Comments
 (0)