fix(confidence-engine): simplify active follow-up presentation

This commit is contained in:
2026-08-30 08:51:18 +01:00
parent 8bded90094
commit ae1201bb27
3 changed files with 121 additions and 19 deletions
+36
View File
@@ -2158,3 +2158,39 @@ Those are distinct presentation responsibilities. Separating them exposes a dupl
- Previous Learning single-owner presentation: CLOSED
- Previous Learning newest-first: CLOSED
- Post-answer promotion: PRESERVED
## v0.49 — ACTIVE FOLLOW-UP PRESENTATION SIMPLIFICATION
### Defect resolved
Selected follow-up candidate rendered twice inside "QUESTIONS THIS RAISES": once as a disabled `(current question)` row and again in the active continuation block above the textarea. Both rows contained the identical question text, creating visual redundancy.
### Fix summary
In `components/reasoning-workspace.jsx`, when `hasActiveFollowUp` is true (a follow-up has been selected), unselected candidates are still rendered with their existing selectable form (`→ pick this question`), but the candidate matching `focused.question` is filtered out from the candidate list entirely. The active continuation block already renders the selected question plus textarea + submit — no second rendering needed.
- Selected follow-up candidate now transforms into the active response block (single rendering).
- Duplicate `(current question)` / second-question rendering removed.
- Exactly one selected-question presentation.
- One textarea, Submit response visible.
- Completed Q/A provenance preserved.
- Previous Learning single-owner/newest-first preserved.
- Post-answer promotion preserved.
### Implementation detail
Production file changed: `components/reasoning-workspace.jsx` (candidate render boundary — lines ~275-300). No state added, no identity changes, no submit mechanics altered.
### Vitest config hygiene (from 8bded90)
vitest.config.js change classification: **A** — intentional and necessary (adds `environment: "jsdom"` required for React component testing in this repo).
### Tests
- Command: `npx vitest run tests/open-questions-vs-assumptions.test.jsx`
- Actual tests passed: **117** (up from 116 — one new regression test added)
- New regression assertion: verifies that after selecting a follow-up, the question text appears exactly once and no `(current question)` label is rendered.
### Build
- Result: PASS