azurenoops / azurenoops/spin_agent
[BUG] [Assessments] - Generate SAP UI shows 'No control baseline found' with no navigation path to fix — dead-end error
- Dominant language
- C#
- Stars
- 3
- Forks
- 1
- Avg merge
- 18h 9m
- Merged PRs (30d)
- 43
Description
## Bug Description
The **Generate SAP** button on the Assessments page UI correctly opens a confirmation modal, but when executed against a system with no control baseline configured, it returns an error: `"No control baseline found for system '92afdc15-bc6f-4648-8073-ad6af396cf97'. Select a baseline before generating a SAP."`
While the error message itself is actionable, **there is no path from this error to selecting a baseline** — the modal only shows Cancel/Generate SAP with no link or guidance to the Categorization page where baseline selection occurs.
Additionally, the MCP chat path (`compliance_generate_sap`) returns `"ℹ️ No assessment data found."` — a silent, non-actionable failure that provides no guidance (tracked in #549).
This creates a dead-end workflow for users attempting to generate a SAP without a prior baseline.
## Steps to Reproduce
1. Navigate to `/systems/92afdc15-bc6f-4648-8073-ad6af396cf97/assessments`
2. Click **Generate SAP**
3. In the modal, click **Generate SAP** to confirm
4. Observe the error message in the modal
## Expected Behavior
One of:
- The error includes a direct link to the Categorization page to select a baseline
- The Generate SAP button is disabled with a tooltip explaining the baseline prerequisite
- The UI workflow guides users through the required prerequisite before reaching SAP generation
## Actual Behavior
Error displayed in modal: `"No control baseline found for system '92afdc15-bc6f-4648-8073-ad6af396cf97'. Select a baseline before generating a SAP."`
No link or navigation hint to resolve the issue. User must manually navigate to Categorization.
## Screenshot Evidence
Generate SAP modal shows error with no navigation path forward.
## Console Errors
No JS errors in browser console.
## Browser/Environment
Dashboard: `ca-ato-copilot-dashboard-v2.blackwater-9393aa1a.centralus.azurecontainerapps.io`
System: Coastal Watch (92afdc15-bc6f-4648-8073-ad6af396cf97)
Browser: Chromium (Playwright/Hermes)
Date: 2026-06-24
Sweep: Automated 4-hour QA sweep
## Related Issues
- #549: MCP chat SAP generation also fails (different surface, same root cause — no baseline)
## Playwright Test Code
```typescript
test('[assessments] generate SAP shows actionable error with link when no baseline', async ({ page }) => {
await page.goto('/systems/92afdc15-bc6f-4648-8073-ad6af396cf97/assessments');
await page.click('button:has-text("Generate SAP")');
await page.click('dialog button:has-text("Generate SAP")');
// Should see error with navigation link
await expect(page.locator('dialog')).toContainText('No control baseline');
await expect(page.locator('dialog a[href*="categorization"]')).toBeVisible();
});
```
*Filed by Oracle — Automated 4-hour QA Sweep 2026-06-24T11:45:00Z*
Contributor guide
Assessment
This issue has not been assessed yet.