fix(postgres): carry org, park class and park blocker on task list rows so a parked task's recovery link shows
This commit is contained in:
3 files changed
+9
-2
No files matched your search
@@ -609,7 +609,7 @@ const listTaskSummaries = `-- name: ListTaskSummaries :many
|
||||
SELECT id, owner, repo, issue_number, title, status, workflow,
|
||||
pr_number, tokens_used, iterations, attempt, park_reason, retry_count,
|
||||
created_at, updated_at, plan, plan_document, source, identity, binding_id, binding_version,
|
||||
outputs, review_gate, rereview_rounds
|
||||
outputs, review_gate, rereview_rounds, org_id, park_class, park_blocker
|
||||
FROM tasks
|
||||
WHERE ($1::text IS NULL OR org_id = $1)
|
||||
AND (cardinality($2::text[]) = 0 OR status = ANY($2::text[]))
|
||||
@@ -654,6 +654,9 @@ type ListTaskSummariesRow struct {
|
||||
Outputs string
|
||||
ReviewGate string
|
||||
RereviewRounds int64
|
||||
OrgID string
|
||||
ParkClass string
|
||||
ParkBlocker string
|
||||
}
|
||||
|
||||
// The dashboard's list. This projection is deliberately narrow: Plan gates
|
||||
@@ -706,6 +709,9 @@ func (q *Queries) ListTaskSummaries(ctx context.Context, arg ListTaskSummariesPa
|
||||
&i.Outputs,
|
||||
&i.ReviewGate,
|
||||
&i.RereviewRounds,
|
||||
&i.OrgID,
|
||||
&i.ParkClass,
|
||||
&i.ParkBlocker,
|
||||
); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ SELECT * FROM tasks WHERE owner = sqlc.arg(owner) AND repo = sqlc.arg(repo) AND
|
||||
SELECT id, owner, repo, issue_number, title, status, workflow,
|
||||
pr_number, tokens_used, iterations, attempt, park_reason, retry_count,
|
||||
created_at, updated_at, plan, plan_document, source, identity, binding_id, binding_version,
|
||||
outputs, review_gate, rereview_rounds
|
||||
outputs, review_gate, rereview_rounds, org_id, park_class, park_blocker
|
||||
FROM tasks
|
||||
WHERE (sqlc.narg(scope_org)::text IS NULL OR org_id = sqlc.narg(scope_org))
|
||||
AND (cardinality(@statuses::text[]) = 0 OR status = ANY(@statuses::text[]))
|
||||
|
||||
@@ -778,6 +778,7 @@ func (s *Store) TasksPage(ctx context.Context, page storecontract.TaskPage) ([]w
|
||||
Identity: r.Identity, BindingID: r.BindingID, BindingVersion: int(r.BindingVersion),
|
||||
Outputs: outputs,
|
||||
ReviewGate: r.ReviewGate, RereviewRounds: int(r.RereviewRounds),
|
||||
Org: org.OrgID(r.OrgID), ParkClass: r.ParkClass, ParkBlocker: r.ParkBlocker,
|
||||
})
|
||||
}
|
||||
return tasks, nil
|
||||
|
||||
Reference in new issue
Block a user