Consume weighted search answers and suppress dead chips

This commit is contained in:
master
2026-03-07 18:38:02 +02:00
parent 86a4928109
commit e295768662
9 changed files with 812 additions and 121 deletions

View File

@@ -19,7 +19,7 @@
## Delivery Tracker
### FE-ZL-001 - Consume primary and overflow search sections
Status: TODO
Status: DONE
Dependency: none
Owners: Developer (Frontend)
Task description:
@@ -27,12 +27,12 @@ Task description:
- Present current-scope-biased cards first and clearly label overflow results without asking the user to manage scope manually.
Completion criteria:
- [ ] The frontend consumes additive overflow/coverage fields without breaking legacy fallback behavior.
- [ ] Primary cards render before overflow cards when both exist.
- [ ] Overflow results are visually subordinate and only shown when present.
- [x] The frontend consumes additive overflow/coverage fields without breaking legacy fallback behavior.
- [x] Primary cards render before overflow cards when both exist.
- [x] Overflow results are visually subordinate and only shown when present.
### FE-ZL-002 - Use backend answer framing instead of frontend heuristics
Status: TODO
Status: DONE
Dependency: FE-ZL-001
Owners: Developer (Frontend)
Task description:
@@ -40,12 +40,12 @@ Task description:
- Preserve a deterministic fallback when the backend omits the new answer frame.
Completion criteria:
- [ ] Search answer panels prefer backend answer data.
- [ ] Frontend fallback logic remains available for older or degraded responses.
- [ ] `Did you mean` remains directly under the input/result header.
- [x] Search answer panels prefer backend answer data.
- [x] Frontend fallback logic remains available for older or degraded responses.
- [x] `Did you mean` remains directly under the input/result header.
### FE-ZL-003 - Suppress dead contextual chips using backend coverage
Status: TODO
Status: DONE
Dependency: FE-ZL-001
Owners: Developer (Frontend)
Task description:
@@ -53,30 +53,34 @@ Task description:
- Preserve useful fallback chips only when the backend confirms a non-empty relevant corpus or candidate set.
Completion criteria:
- [ ] Contextual chips are hidden when coverage says their domain/query family is empty.
- [ ] Clicking any rendered contextual chip yields visible results or a backend-issued clarify frame.
- [ ] Search history still records only successful result-bearing searches.
- [x] Contextual chips are hidden when coverage says their domain/query family is empty.
- [x] Clicking any rendered contextual chip yields visible results or a backend-issued clarify frame.
- [x] Search history still records only successful result-bearing searches.
### FE-ZL-004 - Targeted frontend verification
Status: TODO
Status: DONE
Dependency: FE-ZL-003
Owners: Test Automation
Task description:
- Add unit and Playwright coverage for overflow sections, backend answer consumption, and chip suppression.
Completion criteria:
- [ ] Angular tests cover overflow rendering and backend answer consumption.
- [ ] Playwright covers chip suppression and mixed primary/overflow result presentation.
- [ ] Execution log records commands and outcomes.
- [x] Angular tests cover overflow rendering and backend answer consumption.
- [x] Playwright covers chip suppression and mixed primary/overflow result presentation.
- [x] Execution log records commands and outcomes.
## Execution Log
| Date (UTC) | Update | Owner |
| --- | --- | --- |
| 2026-03-07 | Sprint created to consume backend zero-learning search contracts in the Web primary entry. | Project Manager |
| 2026-03-07 | Implemented additive FE contract consumption: backend `contextAnswer` now drives the answer-first panel when present, overflow results render as a secondary section, and domain-filter teaching controls are no longer shown. | Developer |
| 2026-03-07 | Added suggestion viability preflight for empty-state contextual chips/common questions so dead suggestions are suppressed before render while legacy fallback behavior remains intact if the endpoint is unavailable. | Developer |
| 2026-03-07 | Verification: `npm test -- --include src/tests/global_search/global-search.component.spec.ts` passed (`24/24`). `npx playwright test tests/e2e/unified-search-contextual-suggestions.e2e.spec.ts tests/e2e/unified-search-self-serve-answer-panel.e2e.spec.ts tests/e2e/unified-search-experience-quality.e2e.spec.ts --config playwright.config.ts` passed (`13/13`). | Test Automation |
## Decisions & Risks
- Decision: chip viability is enforced from backend coverage signals, not static page metadata alone.
- Decision: backend answer framing is preferred, with frontend heuristics retained only as backward-compatible fallback.
- Decision: overflow results replace manual result-domain refinements in the primary search experience. The user sees a weighted answer first and any cross-scope evidence second, instead of being asked to filter the result set manually.
- Risk: mixed deployments may return older unified-search payloads during rollout.
- Mitigation: keep all new frontend contract usage additive and optional.