mirror of
https://github.com/stablyai/orca.git
synced 2026-10-22 00:03:47 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user