From d6315026b40ba3c8bc65b2a5f6fc1b957ca8811e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Thu, 14 May 2026 13:38:36 +0200 Subject: [PATCH] docs(planning): record W5 v1.4.25 Coach drawer polish phase report --- .../phase-W5-v1425-coach-polish-report.md | 185 ++++++++++++++++++ 1 file changed, 185 insertions(+) create mode 100644 .planning/phase-W5-v1425-coach-polish-report.md diff --git a/.planning/phase-W5-v1425-coach-polish-report.md b/.planning/phase-W5-v1425-coach-polish-report.md new file mode 100644 index 000000000..d8dab431d --- /dev/null +++ b/.planning/phase-W5-v1425-coach-polish-report.md @@ -0,0 +1,185 @@ +# Phase W5 — v1.4.25 Coach drawer polish + +**Date:** 2026-05-14 +**Branch:** develop +**Scope:** Seven polish items in the AI Coach drawer Marc flagged in +the v1.4.25 follow-up brief. + +## Commits + +| Sha | Subject | +| --- | --- | +| `1895fd3` | `fix(coach): suggested-prompt chips show user message before thinking placeholder` | +| `4c9c068` | `style(coach): drop redundant per-row source labels in evidence disclosure` | +| `330be96` | `feat(coach): default analysis window as user preference + per-conversation override` | +| `81b1d79` | `style(coach): unify X / cog / new-chat header buttons — same size + alignment` | +| `70fe5a5` | `refactor(coach): drop non-functional mic icon from composer` | +| `c7eb226` | `feat(coach): composer textarea auto-grows from 1 to 6 lines, Claude-web pattern` | +| `b50ebcc` | `feat(coach): distinct daily-limit vs provider-rate-limit error UX` | +| `36bf960` | `style(coach): prettier formatting on W5 surfaces` | + +## Per-commit summary + +### 1. Optimistic user bubble (`1895fd3`) + +`useSendCoachMessage` now exposes a `CoachOptimisticUserMessage` that +the drawer threads into `MessageThread`. The bubble paints immediately +when `send.send()` fires, so the chronological render order is now +`user message → "Thinking…" → assistant reply`. The optimistic copy +drops once the persisted twin lands via the invalidate-refetch the +SSE `done` frame triggers; we suppress the optimistic when the last +persisted user message has identical content (no double-render). + +Auto-scroll deps now include `optimisticUser?.localId` so the user +sees their own bubble land at the bottom. + +Tests: 2 new in `message-thread.test.tsx` covering render-order and +twin-suppression. + +### 2. Drop per-row source labels (`4c9c068`) + +The evidence disclosure ("What I'm looking at" / "Worauf bezieht sich +das?") used to prefix every row with `kv.label` (e.g. "avg7 systolic") +— framing the disclosure heading already supplies. Rows now lead with +the value + unit, with the window as a parenthetical tail. + +Existing tests updated to assert label absence. + +### 3. Default analysis window (`330be96`) + +- `coachPrefsSchema` gains `defaultWindow` (enum mirrors + `CoachScopeWindow`). Default = `"allTime"` so legacy persisted rows + read as the v1.4.24 behaviour. +- The Coach settings sheet (cog) gains a new picker section. +- The drawer header carries a `