fix(FEAT-009-FIX-001): resolve 3 blocking issues from integration user testing

1. Fix TypeError in run history: fetchValidationRuns now correctly
   destructures .runs from paginated API response {runs, total, offset}

2. Fix assertions panel rendering: inline fetch calls in loadMissionDetail
   and toggleMilestoneExpanded to avoid forward-reference of callback hooks.
   Added Array.isArray guard to prevent .map on undefined state values.

3. Add missing UI components:
   - Clickable lineage indicator for fix features (navigates to source)
   - Retry budget 'Attempt X of Y' display on feature cards
   - 'No fix features generated' empty state
   - Milestone validation state badge in header (already existed, now
     loads correctly)
   - Validation rollup badge with coverage bar in milestone header

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
This commit is contained in:
gsxdsm
2026-04-12 09:37:05 -07:00
parent b3abc3004c
commit f7f69b5ae6
2 changed files with 84 additions and 13 deletions

View File

@@ -3652,13 +3652,22 @@ export function fetchValidationLoopState(featureId: string, projectId?: string):
return api<MissionFeatureLoopSnapshot>(withProjectId(`/missions/features/${encodeURIComponent(featureId)}/validation-loop`, projectId));
}
/** Paginated response wrapper for validation runs */
export interface ValidationRunsResponse {
runs: MissionValidatorRun[];
total: number;
limit: number;
offset: number;
}
/** List validation runs for a feature */
export function fetchValidationRuns(featureId: string, options?: { limit?: number; offset?: number }, projectId?: string): Promise<MissionValidatorRun[]> {
const params = new URLSearchParams();
if (options?.limit !== undefined) params.set("limit", String(options.limit));
if (options?.offset !== undefined) params.set("offset", String(options.offset));
const suffix = params.size > 0 ? `?${params.toString()}` : "";
return api<MissionValidatorRun[]>(withProjectId(`/missions/features/${encodeURIComponent(featureId)}/validation-runs${suffix}`, projectId));
return api<ValidationRunsResponse>(withProjectId(`/missions/features/${encodeURIComponent(featureId)}/validation-runs${suffix}`, projectId))
.then((response) => response.runs);
}
/** Get a single validator run */