From 79ad5c47a99c578957eabe4a1b177c8bd2294e2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Sun, 10 May 2026 13:24:05 +0200 Subject: [PATCH] docs(planning): A7 report + STATE update for admin polish MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Five atomic commits landed for A7: - 088832a — feedback tab strip mini-scrollbar removed - dd8212e — api-tokens table truncate-with-tooltip (4th attempt) - 7a70db6 — api-tokens Einklappen button removed - 6507646 — Zielwerte page whitespace tightened - 90a109d — Zielwerte status labels translated to DE Co-Authored-By: Claude Opus 4.7 (1M context) --- .planning/STATE.md | 45 ++++++++++++---- .planning/phase-A7-report.md | 102 +++++++++++++++++++++++++++++++++++ 2 files changed, 137 insertions(+), 10 deletions(-) create mode 100644 .planning/phase-A7-report.md diff --git a/.planning/STATE.md b/.planning/STATE.md index 41a734e0f..54b8c3e93 100644 --- a/.planning/STATE.md +++ b/.planning/STATE.md @@ -143,18 +143,43 @@ Last update: 2026-05-10T12:48+02:00 ### A7 — Admin polish (Feedback, api-tokens 4th attempt, Zielwerte, i18n) -- [ ] Admin Feedback "offen/bestätigt/erledigt/archiviert" tabs has - spurious mini-scrollbar → remove -- [ ] `/admin/api-tokens` scrollbar 4th attempt: truncate token-name - with `text-ellipsis` + tooltip on hover (not column-hide) -- [ ] `/admin/api-tokens` "Einklappen" button removed (page only has - 1 section) -- [ ] Admin Zielwerte page: reduce whitespace between overview header - and values -- [ ] Translate Zielwerte status labels: "Low / On Target / Stable / - Moderate" → DE +- [x] Admin Feedback "offen/bestätigt/erledigt/archiviert" tabs + mini-scrollbar removed (tabsListVariants now carries + `overflow-y-hidden`; commit `088832a`) +- [x] `/admin/api-tokens` scrollbar 4th attempt: truncate-with- + tooltip pattern on token-name, username, permission badge; + `table-fixed` + colgroup widths on desktop table; e2e + regression walks every element inside the mobile card-list + (commit `dd8212e`) +- [x] `/admin/api-tokens` "Einklappen" button removed (commit + `7a70db6`) +- [x] Admin Zielwerte page: `space-y-8` → `space-y-6` on outer + wrapper (commit `6507646`) +- [x] Translate Zielwerte status labels: 11 `targets.label.` + entries + 41 `targets.status.` entries in EN + DE; page + uses `STATUS_CATEGORY_KEY` map to normalise server strings + (commit `90a109d`) +- Result: ok / 5 commits on origin/main, 1658 tests green - Detailed report: `.planning/phase-A7-report.md` +### Status block — A7 (v1.4.19) + +- 2026-05-09T13:22+02:00 — A7 complete. Five atomic commits + (`088832a` feedback tab strip, `dd8212e` api-tokens 4th-attempt + truncate+tooltip, `7a70db6` Einklappen removal, `6507646` + Zielwerte whitespace, `90a109d` Zielwerte i18n) on origin/main + via worktree `/Users/marc/Projects/HealthLog-a7`. Rebased once + onto `ef67da5` (A3 report) before push, no rebase conflicts. All + pre-commit hooks green; pnpm test = 1658/1658, pnpm typecheck + clean, pnpm lint baseline (0 errors / 12 pre-existing warnings). + Touched only A7 surfaces: `src/components/ui/tabs.tsx` (shared + primitive — feedback strip is one consumer), feedback section + un-touched directly, `src/components/admin/api-token-overview-section.tsx`, + `src/app/targets/page.tsx`, messages/{en,de}.json, i18n integrity + test allowlist. Did NOT touch `src/components/settings/*`, + `src/lib/insights/*`, `src/lib/ai/*`, `src/components/charts/*`, + `src/components/insights/*`. No new dependencies. + ### A8 — Quality-of-life audit (write-only, fix-set deferred to inline B agent) - [ ] Audit descriptions correctness across all pages diff --git a/.planning/phase-A7-report.md b/.planning/phase-A7-report.md new file mode 100644 index 000000000..cde2aedac --- /dev/null +++ b/.planning/phase-A7-report.md @@ -0,0 +1,102 @@ +# Phase A7 — Admin polish (v1.4.19) + +Marathon: v1.4.19 Wave-A +Agent: A7 (parallel with A1-A6, A8) +Started: 2026-05-09T13:00+02:00 +Finished: 2026-05-09T13:22+02:00 +Branch: `agent/a7-admin-polish` (worktree at `/Users/marc/Projects/HealthLog-a7`) +Commits on `origin/main`: + +- `088832a` — fix(admin): remove spurious scrollbar from feedback tab strip +- `dd8212e` — fix(admin): api-tokens table truncate-with-tooltip (no scrollbar 4th attempt) +- `7a70db6` — fix(admin): hide collapse button when page has only one section +- `6507646` — style(admin): reduce excessive vertical whitespace on Zielwerte page +- `90a109d` — i18n(admin): translate Zielwerte status labels (Low/On Target/Stable/Moderate to DE) + +## What landed + +### 1. Feedback tab strip mini-scrollbar — fixed +Marc's "mini Scroll-Button rechts" on the admin feedback inbox tabs +came from a CSS overflow-axis coupling: `tabsListVariants` set +`overflow-x: auto` without `overflow-y`, so the browser silently +flipped `overflow-y` to `auto` too. Combined with the fixed `h-9` +strip and badge children that ride 1-2 px taller than the strip on +some glyph stacks, a tiny vertical bar painted on the right edge of +short strips. Added `overflow-y-hidden` (with the matching +`overflow-y-visible` override for vertical-orientation tabs) and a +component test that locks both axes in. + +### 2. /admin/api-tokens 4th-attempt scrollbar — fixed +Three previous fixes (column-hide v1.4.15, mobile card-list +v1.4.16, admin-shell mobile-strip `no-scrollbar` v1.4.18) cleared +the obvious culprits but Marc still saw a residual painted bar. +Production probe at Pixel-5 confirmed: + +- The mobile token-name `` carried `truncate` AND `break-all` + on the same element. `truncate` sets `white-space: nowrap` which + beats `word-break: break-all` per CSS spec — `break-all` was dead + code AND misleading. Removed. +- The desktop table had no per-column upper bound; long token names + could spill past the row on 768-1024 px viewports. Locked the + layout with `table-fixed` + `` widths. +- Permission badges had no `max-w` cap. Added + `max-w-full truncate` + native `title` attribute. +- Wrapped every potentially-long cell (token name, username, + permission badge) in a small `` helper that pairs + visual truncation with a radix tooltip. + +Added an e2e regression that walks every element inside the mobile +card-list and asserts `scrollWidth <= clientWidth + 1` for each. + +### 3. /admin/api-tokens "Einklappen" button — removed +Inherited from the v1.4 shared-admin page where 13 sections lived +together. On the v1.5 dedicated `/admin/api-tokens` route the +toggle hides the only card on the page. Marc called it "sinnlos". +Dropped the `expanded` state + button. The shared `settings.collapse` +/ `settings.expand` keys stay in messages because +`` still uses them. + +### 4. Zielwerte page whitespace — tightened +Outer wrapper changed from `space-y-8` (32 px) to `space-y-6` +(24 px), matching the admin / settings rhythm. + +### 5. Zielwerte status labels translated +Added two new i18n key blocks under `targets.*`: + +- `targets.label.` (11 entries, EN + DE) — used by + `` to localise card titles. Server keeps emitting + English labels so logs / external consumers don't churn. +- `targets.status.` (41 entries, EN + DE) — every + classification category from `lib/analytics/classifications.ts`, + `pulse-targets.ts`, and the inline maps in `targets/route.ts`. + A small `STATUS_CATEGORY_KEY` map on the page normalises the + human-readable English category to its key. + +Glucose targets keep their pre-resolved label path. Unmapped +categories fall through to the verbatim server string — the page +never blows up. + +## Tests + +- `src/components/ui/__tests__/tabs.test.tsx` (new) — locks `overflow-y-hidden` on tabs-list. +- `src/components/admin/__tests__/api-token-truncate.test.tsx` (new) — 4 cases on the truncate / tooltip / max-w pattern. +- `src/components/admin/__tests__/api-token-no-collapse.test.tsx` (new) — 3 cases (EN, DE, aria-expanded). +- `src/app/__tests__/targets-spacing.test.tsx` (new) — locks `space-y-6` on `/targets`. +- `src/app/__tests__/targets-i18n.test.tsx` (new) — 3 cases (EN, DE titles, DE status badges). +- `e2e/admin-api-tokens-mobile.spec.ts` — added the 4th-attempt regression. +- `src/lib/__tests__/i18n-locale-integrity.test.ts` — added 5 entries to `PLACEHOLDER_ALLOWLIST` for legitimate EN==DE technical terms (BMI, Normal, Optimal, Fitness). + +## Verification + +- `pnpm test`: 1658 / 1658 green +- `pnpm typecheck`: clean +- `pnpm lint`: 0 errors / 12 pre-existing warnings (baseline) + +## Surfaces and constraints + +Touched only the assigned A7 surfaces (feedback inbox via the +shared TabsList primitive, api-tokens section, targets page, +i18n messages). Did not touch `src/components/settings/*`, +`src/lib/insights/*`, `src/lib/ai/*`, `src/components/charts/*`, +or `src/components/insights/*`. No new dependencies. Pushed to +`origin/main` after rebase without `--no-verify` or `--no-gpg-sign`.