fix(coderd)!: only show task status for current build (#19966)

This changes the task get endpoint to omit app statuses for previous
'lifetimes' of a workspace.

It also introduces a [breaking
change](https://github.com/coder/coder/blob/release/2.26/codersdk/aitasks.go#L83)
to bring `TaskStateComplete` in line with
`WorkspaceAppStatusStateComplete`. I can alternatively revert this
change and add a conversion function between the two SDK types.
This commit is contained in:
Cian Johnston
2025-09-26 10:14:37 +01:00
committed by GitHub
parent 930bbaf035
commit eb55f0ab19
5 changed files with 71 additions and 27 deletions
+2 -2
View File
@@ -2907,7 +2907,7 @@ export interface TaskSendRequest {
}
// From codersdk/aitasks.go
export type TaskState = "completed" | "failed" | "idle" | "working";
export type TaskState = "complete" | "failed" | "idle" | "working";
// From codersdk/aitasks.go
export interface TaskStateEntry {
@@ -2918,7 +2918,7 @@ export interface TaskStateEntry {
}
export const TaskStates: TaskState[] = [
"completed",
"complete",
"failed",
"idle",
"working",