Exposed all server-authorized task lifecycle actions in the task detail header (/tasks/:id) via TaskRowActions.vue instead of restricting the header to ["archive", "merge"] and rendering StartNewRun.vue.
What Changed
ui/src/tasks/task-actions.ts: Added headerActionIds(task) to return all server-authorized actions (shownActionIds(task?.actions)) while omitting approve/reject when TaskApproval is active (approval === "plan" with non-empty plan) and omitting approve/rereview/reject when TaskReviewGate is active (status === "waiting_approval" with an active reviewGateOffer).
ui/src/tasks/TaskHeader.vue: Replaced HEAD_ACTIONS (["archive", "merge"]) and <StartNewRun compact :id="id" /> with headerActionIds(run.task) passed to TaskRowActions.
ui/src/tasks/task-run.ts, ui/src/tasks/use-task-run.ts, ui/src/tasks/StartNewRun.vue: Added branch, retry_mode, and source to TaskRecord so TaskRowActions has the fields needed for retry worktree mode selection and issue links; reset requestedAttempt in refreshAll() so new attempts become current on action completion; removed StartNewRun.vue and its unused retry state in use-task-run.ts.
ui/test/task-actions.test.ts: Added unit tests covering headerActionIds across parked, queued, running, waiting_approval (budget, plan, and review gate states), pr_open, and terminal states.
Verification
Ran pnpm --dir ui test (104/104 passing) and pnpm --dir ui typecheck.
Exposed all server-authorized task lifecycle actions in the task detail header (`/tasks/:id`) via `TaskRowActions.vue` instead of restricting the header to `["archive", "merge"]` and rendering `StartNewRun.vue`.
### What Changed
- `ui/src/tasks/task-actions.ts`: Added `headerActionIds(task)` to return all server-authorized actions (`shownActionIds(task?.actions)`) while omitting `approve`/`reject` when `TaskApproval` is active (`approval === "plan"` with non-empty `plan`) and omitting `approve`/`rereview`/`reject` when `TaskReviewGate` is active (`status === "waiting_approval"` with an active `reviewGateOffer`).
- `ui/src/tasks/TaskHeader.vue`: Replaced `HEAD_ACTIONS` (`["archive", "merge"]`) and `<StartNewRun compact :id="id" />` with `headerActionIds(run.task)` passed to `TaskRowActions`.
- `ui/src/tasks/task-run.ts`, `ui/src/tasks/use-task-run.ts`, `ui/src/tasks/StartNewRun.vue`: Added `branch`, `retry_mode`, and `source` to `TaskRecord` so `TaskRowActions` has the fields needed for retry worktree mode selection and issue links; reset `requestedAttempt` in `refreshAll()` so new attempts become current on action completion; removed `StartNewRun.vue` and its unused retry state in `use-task-run.ts`.
- `ui/test/task-actions.test.ts`: Added unit tests covering `headerActionIds` across `parked`, `queued`, `running`, `waiting_approval` (`budget`, `plan`, and `review` gate states), `pr_open`, and terminal states.
### Verification
- Ran `pnpm --dir ui test` (104/104 passing) and `pnpm --dir ui typecheck`.
- Ran `task check` (all gate commands passed).
---
*workflow: implement · 23 iterations · 641528 tokens (110856 fresh + 530672 cached)*
ui/src/tasks/use-task-run.ts:188: In provideTaskRun, taskList is initialized to undefined (pending) and typed as TaskRecord[] | null | undefined, where null represents a failed read consumed by TaskNotes.vue (if (run.taskList === null) -> "The task list could not be read, so the current status and operator controls are unavailable.").
However, loadTaskList()'s .catch() handler does nothing at all, so taskList.value is never set to null even when the initial /api/tasks request fails before any list has been loaded. As a result, run.taskList === null is unreachable and the warning banner in TaskNotes.vue is never shown on an initial task-list read failure.
Only preserving taskList.value when a list was already loaded (if (taskList.value === undefined) taskList.value = null;) keeps the last known list across refresh failures while still reporting an initial read failure.
Findings outside the diff:
- `ui/src/tasks/use-task-run.ts:188`: In `provideTaskRun`, `taskList` is initialized to `undefined` (pending) and typed as `TaskRecord[] | null | undefined`, where `null` represents a failed read consumed by `TaskNotes.vue` (`if (run.taskList === null)` -> `"The task list could not be read, so the current status and operator controls are unavailable."`).
However, `loadTaskList()`'s `.catch()` handler does nothing at all, so `taskList.value` is never set to `null` even when the initial `/api/tasks` request fails before any list has been loaded. As a result, `run.taskList === null` is unreachable and the warning banner in `TaskNotes.vue` is never shown on an initial task-list read failure.
Only preserving `taskList.value` when a list was already loaded (`if (taskList.value === undefined) taskList.value = null;`) keeps the last known list across refresh failures while still reporting an initial read failure.
sam
merged commit 47e3d8d837 into main2026-11-10 06:54:29 +00:00
sam
deleted branch feat/1000000000000000-expose-all-task-actions-in-the-task-detail-header2026-11-10 06:54:29 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Exposed all server-authorized task lifecycle actions in the task detail header (
/tasks/:id) viaTaskRowActions.vueinstead of restricting the header to["archive", "merge"]and renderingStartNewRun.vue.What Changed
ui/src/tasks/task-actions.ts: AddedheaderActionIds(task)to return all server-authorized actions (shownActionIds(task?.actions)) while omittingapprove/rejectwhenTaskApprovalis active (approval === "plan"with non-emptyplan) and omittingapprove/rereview/rejectwhenTaskReviewGateis active (status === "waiting_approval"with an activereviewGateOffer).ui/src/tasks/TaskHeader.vue: ReplacedHEAD_ACTIONS(["archive", "merge"]) and<StartNewRun compact :id="id" />withheaderActionIds(run.task)passed toTaskRowActions.ui/src/tasks/task-run.ts,ui/src/tasks/use-task-run.ts,ui/src/tasks/StartNewRun.vue: Addedbranch,retry_mode, andsourcetoTaskRecordsoTaskRowActionshas the fields needed for retry worktree mode selection and issue links; resetrequestedAttemptinrefreshAll()so new attempts become current on action completion; removedStartNewRun.vueand its unused retry state inuse-task-run.ts.ui/test/task-actions.test.ts: Added unit tests coveringheaderActionIdsacrossparked,queued,running,waiting_approval(budget,plan, andreviewgate states),pr_open, and terminal states.Verification
pnpm --dir ui test(104/104 passing) andpnpm --dir ui typecheck.task check(all gate commands passed).workflow: implement · 23 iterations · 641528 tokens (110856 fresh + 530672 cached)
Findings outside the diff:
ui/src/tasks/use-task-run.ts:188: InprovideTaskRun,taskListis initialized toundefined(pending) and typed asTaskRecord[] | null | undefined, wherenullrepresents a failed read consumed byTaskNotes.vue(if (run.taskList === null)->"The task list could not be read, so the current status and operator controls are unavailable.").However,
loadTaskList()'s.catch()handler does nothing at all, sotaskList.valueis never set tonulleven when the initial/api/tasksrequest fails before any list has been loaded. As a result,run.taskList === nullis unreachable and the warning banner inTaskNotes.vueis never shown on an initial task-list read failure.Only preserving
taskList.valuewhen a list was already loaded (if (taskList.value === undefined) taskList.value = null;) keeps the last known list across refresh failures while still reporting an initial read failure.