fix: project status link missing and inventory source last job status link malformed #3686
All Vouch review confidence checks passed
Residual risk 0.24 = Change Risk (0.45) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.45 · 415 lines diff across 5 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.361
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #3686"
general
weight: 0.35
h-kataria
Summary
Fixes — Two related bugs in the AAP UI where status links in list views are broken:
1. Inventory Source "Last Job Status" link is malformed with literal
:id: The<Link>wrapper inuseInventorySourceColumns.tsxwas unconditionally rendered regardless of whetherlast_jobexisted insummary_fields. Whenlast_jobis undefined (e.g., inventory source has never been synced),summary_fields?.last_job?.idevaluates toundefined, leaving the:idroute parameter unsubstituted. This produced URLs like/execution/jobs/inventory/:id/output.Fix: Use
StatusCell's built-intoanddisableLinksprops (matchinguseProjectStatusColumnpattern) with alastJob?.idguard. When no last job id exists,toisundefinedso the status renders as plain text without a link.2. Project status link is missing: The
useProjectStatusColumn.tsxcould render a link with an invalid URL whensummary_fields.current_joborlast_jobexisted as objects but contained no validid. This caused thegetPageUrlcall to produce a URL with literal:id, which rendered as a non-functional or missing link.Fix: Extracted
jobIdvariable and simplified the guard toreturn jobId ? (linked) : (unlinked).Changes from previous PR #3537
Addresses all reviewer feedback from PR #3537:
StatusCell.to/disableLinksinstead of<Link>wrapper (matchesuseProjectStatusColumnpattern)options?.disableLinksthrough so confirmation/select dialogs suppress linksoptions?.disableLinkstouseMemodeps(current_job || last_job) && jobIdto justjobIdType of Change
Risk Analysis - REQUIRED
Testing
Automated Testing
useInventorySourceColumns.test.tsx— 4 test cases:-
last_job.idpresent → link href contains that id withjob_type: inventory- no
last_job→ not a link-
last_jobobject withoutid→ not a link (the actual bug)-
disableLinks: true→ no link even when id existsuseProjectStatusColumn.test.tsx— 4 test cases:-
current_job.idpresent → link uses that id- only
last_job.id→ uses last job id- job object(s) without
id→ no link- neither job → unlinked status
Manual Testing
1. Navigate to Infrastructure → Inventories → [Inventory] → Sources
2. Verify that synced inventory sources show a clickable status link pointing to
/execution/jobs/inventory/<id>/output3. Verify that inventory sources that have never been synced show a status badge without a link
4. Navigate to Resources → Projects
5. Verify that synced projects show a clickable status link pointing to the correct job output page
6. Verify that projects with no sync history show a status badge without a link
---