fix(dashboard): thread finishedAt through payload validator + test fixture

CI typecheck caught a DashboardCard fixture in dashboard-payload-validation.test.ts
missing the new finishedAt field; also validate finishedAt in the relay guard.
This commit is contained in:
Brennan Benson
2026-07-20 22:03:58 -07:00
parent 1976d61eec
commit 0bea678a45
2 changed files with 2 additions and 0 deletions
@@ -21,6 +21,7 @@ const SNAPSHOT = {
repoName: 'Orca',
worktreeName: 'Dashboard',
startedAt: 1_699_999_000_000,
finishedAt: null,
stateChangedAt: 1_699_999_500_000,
unseen: true,
askSummary: '{"question":"Proceed?"}'
@@ -77,6 +77,7 @@ function isDashboardCard(value: unknown): boolean {
isBoundedString(card.repoName, MAX_LABEL_LENGTH, true) &&
isBoundedString(card.worktreeName, MAX_LABEL_LENGTH, true) &&
isFiniteNumber(card.startedAt) &&
(card.finishedAt === null || isFiniteNumber(card.finishedAt)) &&
isFiniteNumber(card.stateChangedAt) &&
typeof card.unseen === 'boolean' &&
isOptionalBoundedString(card.askSummary, AGENT_STATUS_INTERACTIVE_PROMPT_MAX_LENGTH)