feat(ui): ship unified audit surfaces

This commit is contained in:
master
2026-03-08 02:16:20 +02:00
parent 6e00a48e00
commit 484abe0039
27 changed files with 673 additions and 55 deletions

View File

@@ -0,0 +1,123 @@
# Sprint 20260307-039 - Unified Audit Surfaces
## Topic & Scope
- Restore the dropped and weakly surfaced audit capability by making one canonical audit owner fully usable instead of leaving Evidence, Admin, and legacy aliases split.
- Ship a working `Evidence > Audit Log` surface with live route wiring, repaired internal navigation, bookmark-safe aliases, and real entry points from Admin, Mission Control, Ops, Releases, and quota drilldowns.
- Complete the audit flows end to end: dashboard, events, event detail, correlations, anomalies, module-specific views, and export.
- Working directory: `src/Web/StellaOps.Web/src/app/features/audit-log`.
- Allowed coordination edits: `src/Web/StellaOps.Web/src/app/routes/`, `src/Web/StellaOps.Web/src/app/core/navigation/`, `src/Web/StellaOps.Web/src/app/layout/`, `src/Web/StellaOps.Web/src/app/features/administration/`, `src/Web/StellaOps.Web/src/app/features/mission-control/`, `src/Web.StellaOps.Web/src/app/features/dashboard-v3/`, `src/Web.StellaOps.Web/src/app/features/platform/`, `src/Web.StellaOps.Web/src/app/features/quota-dashboard/`, `src/Web.StellaOps.Web/src/app/features/release-orchestrator/`, `docs/modules/ui/unified-audit-surfaces/`, `docs/features/checked/web/`, `docs/modules/ui/TASKS.md`, and `docs/modules/ui/implementation_plan.md`.
- Expected evidence: one mounted audit route family, working alias redirects, repaired internal links, secondary entry-point handoffs, targeted Angular tests, Playwright verification, and synced docs.
## Dependencies & Concurrency
- Depends on:
- `docs/modules/ui/component-preservation-map/RESTORATION_PRIORITIES.md`
- `docs/modules/ui/contextual-actions-patterns/README.md`
- `docs/modules/ui/triage-explainability-workspace/README.md`
- `src/Web/StellaOps.Web/src/app/routes/evidence.routes.ts`
- `src/Web.StellaOps.Web/src/app/features/audit-log/audit-log.routes.ts`
- `src/Web.StellaOps.Web/src/app/features/evidence-audit/evidence-audit-overview.component.ts`
- Safe parallelism:
- canonical ownership and alias contract must freeze before deep-link cleanup starts
- audit-shell internal link repairs can proceed in parallel with secondary entry-point rewiring once the canonical path is fixed
- docs sync can proceed in parallel with test authoring after route contracts are stable
## Documentation Prerequisites
- `docs/modules/ui/unified-audit-surfaces/README.md`
- `docs/modules/ui/component-preservation-map/RESTORATION_PRIORITIES.md`
- `docs/modules/ui/contextual-actions-patterns/README.md`
- `docs/modules/ui/implementation_plan.md`
## Delivery Tracker
### FE-AUD-001 - Freeze canonical audit owner and alias contract
Status: DONE
Dependency: none
Owners: Product Manager, FE Architect
Task description:
- Make `Evidence > Audit Log` the canonical owner for cross-module audit browsing and exports.
- Define and implement bookmark-safe redirects from stale `/admin/audit*` and related setup/admin entry points into the mounted evidence route family.
Completion criteria:
- [x] One canonical audit route family exists in the active router.
- [x] Legacy aliases land on working audit pages without losing query params.
- [x] Admin and Evidence navigation reference the same audit owner.
### FE-AUD-002 - Repair audit-shell internal navigation and subviews
Status: DONE
Dependency: FE-AUD-001
Owners: Developer, FE Architect
Task description:
- Update dashboard, event table, event detail, module-specific audit views, anomalies, timeline, correlations, and export pages so their internal navigation stays inside the canonical route family.
- Ensure module subviews remain usable rather than depending on stale absolute admin paths.
Completion criteria:
- [x] Every audit-log subview links to the canonical owner routes.
- [x] Event detail, correlations, and export flows work from the mounted shell.
- [x] No internal audit workflow requires the stale admin path family.
### FE-AUD-003 - Wire secondary entry points and contextual handoffs
Status: DONE
Dependency: FE-AUD-001
Owners: Developer, Product Manager
Task description:
- Repair audit entry points from Setup/Admin overview, Mission Control activity, dashboard activity cards, platform ops, quota detail, and release detail.
- Preserve filter context where practical so the receiving audit surface opens with the relevant release, tenant, or correlation context.
Completion criteria:
- [x] The main cross-shell audit links land on a usable canonical audit page.
- [x] Release and quota handoffs preserve their query/filter context.
- [x] Evidence overview exposes audit entry points as first-class shortcuts.
### FE-AUD-004 - Verify route cutover and operator journeys
Status: DONE
Dependency: FE-AUD-002
Owners: QA, Test Automation
Task description:
- Add targeted UI verification for canonical evidence routes, admin aliases, secondary entry points, and at least one in-shell navigation journey.
- Prove the restored audit functionality is usable, not only mounted.
Completion criteria:
- [x] Angular tests cover canonical routes, alias redirects, and representative entry points.
- [x] Playwright covers the core audit landing and alias journey.
- [x] Verification explicitly checks that stale admin links no longer strand the operator.
### FE-AUD-005 - Sync docs, archive the sprint, and record the shipped feature
Status: DONE
Dependency: FE-AUD-004
Owners: Documentation author, Project Manager
Task description:
- Update the audit UX dossier, checked-feature note, task board, and implementation plan to reflect the shipped canonical owner.
- Archive the sprint only after code and verification evidence are complete.
Completion criteria:
- [x] Shipped audit UX is documented with canonical routes and alias behavior.
- [x] Checked-feature note records the exact verification commands and outcomes.
- [x] Sprint is archived only after all delivery tasks are marked done.
## Execution Log
| Date (UTC) | Update | Owner |
| --- | --- | --- |
| 2026-03-07 | Sprint created to restore unified audit functionality by making Evidence the canonical owner and fixing stale admin-route fragmentation. | Project Manager |
| 2026-03-07 | Implemented canonical Evidence-owned audit routing, repaired stale `/admin/audit*` links inside the audit shell, and added bookmark-safe aliases from `admin` and `administration` entry points. | Developer |
| 2026-03-07 | Rewired admin navigation, quota handoff, and Evidence overview shortcuts so audit resolves into one mounted route family instead of split owners. | Developer |
| 2026-03-07 | Verified the cutover with targeted Angular tests (`npm test -- --watch=false --include src/tests/audit_log/unified-audit-log-viewer.behavior.spec.ts --include src/tests/evidence-audit/evidence-audit-routes.spec.ts --include src/tests/evidence-audit/evidence-audit-overview.component.spec.ts --include src/tests/administration/administration-routes.spec.ts --include src/tests/navigation/legacy-redirects.spec.ts`): 31 tests passed. | QA |
| 2026-03-07 | Added browser verification via `npx playwright test tests/e2e/unified-audit-surfaces.spec.ts --workers=1`: 2 tests passed. | QA |
| 2026-03-07 | Production build passed via `npm run build`; existing bundle budget warnings remain unchanged from the baseline. | QA |
## Decisions & Risks
- Decision: `Evidence > Audit Log` is the canonical owner for cross-module audit browsing and export. Admin remains a secondary surfacing point, not a separate product owner.
- Decision: `Audit Bundles` stay under Triage and the `Auditor Workspace` stays a separate artifact-focused surface; this sprint only unifies the cross-module audit log and its entry points.
- Risk: existing audit components hard-code `/admin/audit*` links, so a partial route fix would still leave in-shell navigation broken.
- Mitigation: repair internal links and add alias coverage in the same sprint.
- Risk: aliasing both `/admin/audit*` and `/administration/audit*` could cause hidden divergence if query params are dropped.
- Mitigation: use redirect helpers or legacy templates that preserve params and cover route variants explicitly.
- Delivery rule: this sprint is only complete when the canonical audit tree is mounted, secondary entry points work, and the main operator journeys are verified end to end.
- Reference design note: `docs/modules/ui/unified-audit-surfaces/README.md`.
- Docs synced:
- `docs/modules/ui/unified-audit-surfaces/README.md`
- `docs/features/checked/web/unified-audit-surfaces-ui.md`
- `docs/modules/ui/TASKS.md`
- `docs/modules/ui/implementation_plan.md`
## Next Checkpoints
- 2026-03-07: archived after implementation, verification, and docs sync completed.