fix(web): ship degraded search readiness state

This commit is contained in:
master
2026-03-08 16:27:51 +02:00
parent 9f6fd0b4aa
commit f24d49ddeb
6 changed files with 145 additions and 2 deletions

View File

@@ -0,0 +1,25 @@
# Search Readiness Degraded Answer State UI
## Scope
- Verifies the top-bar search surface tells the truth when suggestion-viability preflight is unavailable and the active search response reports zero indexed matches.
- Confirms the UI renders environment-readiness copy instead of clarify guidance for that bounded degraded-readiness case.
## Files
- `src/Web/StellaOps.Web/src/app/layout/global-search/global-search.component.ts`
- `src/Web.StellaOps.Web/src/tests/global_search/global-search.component.spec.ts`
- `src/Web.StellaOps.Web/tests/e2e/unified-search-experience-quality.e2e.spec.ts`
- `docs/modules/ui/search-self-serve-contract.md`
- `docs/modules/ui/search-zero-learning-primary-entry.md`
## Verification
1. Focused Angular coverage:
- `npm test -- --watch=false --include src/tests/global_search/global-search.component.spec.ts`
- Result: `26/26` tests passed.
2. Deterministic Playwright coverage:
- `npx playwright test tests/e2e/unified-search-experience-quality.e2e.spec.ts --grep "search-readiness guidance" --workers=1`
- Result: `1/1` test passed.
## Outcome
- Search now refreshes suggestion viability on the same debounced query path that drives the search request instead of leaving the viability state stale for typed queries.
- When viability preflight is unavailable and the response diagnostics show zero indexed matches, the answer panel renders `Search needs live data` and suppresses clarify guidance.
- Docs now describe this as an environment-readiness problem, not an operator-query problem.