Guard workflow visualizer path points #3661
Risk Analysis is required. Please select a risk level (High, Medium, or Low) in the PR description under Risk Analysis - REQUIRED.
/run-playwright
/run-playwright
/run-playwright
/run-playwright
/run-playwright
/run-playwright
Kersom — the optional chaining and bend fallbacks in useGetPath read cleanly and keep the existing geometry for normal paths while satisfying strict indexed access. Existing unit coverage still exercises the happy paths.
This review was created with AI assistance.
/run-playwright
/run-playwright
<!-- waiting-on-author-e2e -->
@nixocio — The E2E pipeline failed. Please check the pipeline run and re-trigger with /run-playwright if needed.
<!-- waiting-on-author-sonar -->
@nixocio — SonarQube Quality Gate failed:
Please address the SonarQube findings.
AI-Assisted: I reviewed the current diff against its stated scope and repository guidance. I found no actionable findings. I did not run tests.
<!-- waiting-on-author-checks -->
@nixocio — The following PR checks have failed:
Please address these failures.
 Quality Gate failed
Failed conditions
 83.3% Coverage on New Code (required ≥ 90%)
<!-- sqra:qg_revision=9b1b8298b0870bdc3e5a1af9a7288572bbfed89b76fbd9583d3e5db3d8a64766 -->
<!-- sqra-placement-anchor -->
See analysis details on SonarQube Cloud
h-kataria
nixocio
Add explicit guards for workflow visualizer path-point reads before calculating label coordinates and bend segments. Normal geometry is unchanged, while seven production
noUncheckedIndexedAccessdiagnostics are removed.Tests:
npx vitest run frontend/awx/resources/templates/WorkflowVisualizer/hooks/useGetPath.test.ts --coverage.enabled=false(13 passed)npx eslint frontend/awx/resources/templates/WorkflowVisualizer/hooks/useGetPath.tsx frontend/awx/resources/templates/WorkflowVisualizer/hooks/useGetPath.test.tsRisk Analysis - REQUIRED