Files
heidi/scripts
CatoandClaude Opus 5.5 6826743401 fix(portal): Mein Bereich answers "what do I do now" — and stops promising (#114)
Asked: "how much here is dysfunctional and does not have anything behind it.
why some things are promises but not actionable". Audited section by section,
by reading what each one reads and measuring whether it can ever fill:

  Daran hängen Sie gerade    works — as of #111. Before it, EMPTY FOREVER:
                             the learner model was discarded on every load.
  Zum Wiederholen            works, and already offers three doors when
                             nothing is due. Unchanged.
  Weitermachen               works.
  Was Sie jetzt können       same decoder bug — could never show anything
                             until #111 — and its empty state was a paragraph
                             with no button. Now it has one.
  Was Ihnen … begegnet       a promise with almost nothing behind it. It knows
                             FOUR sound rules, which explain 11 of the pack's
                             own 95 words (12%), and needs two of yours to share
                             one. The reporter has five saved words; its empty
                             state told them to come back "once you have kept a
                             few words". Measured, not guessed.
  Jump strip                 broken anchors: see below.

WHY THE PROMISES. Each panel was built to describe a state, and its empty
state was written as an explanation rather than a next step. Honest, and
inert. The patterns panel is the clearest case: it once rendered nothing when
empty, and was changed to explain itself BECAUSE the jump strip advertised
"Muster" and the link landed on nothing. The advertisement was the defect. The
strip no longer lists it; the panel renders nothing when empty and appears in
place the day it has something to show.

WHAT WAS ADDED: the per-situation strength map (#111) now leads the page. It
is the one panel that answers "what should I do now" by construction — every
row is a link and it names the weakest situation you have started — and it
renders nothing until something has been practised, so it adds no promise.

DUPLICATE IDS, SIX OF THEM. `focus`, `recent`, `words`, `groups`, `mastered`
and `patterns` were each the id of a section AND of the heading inside it, and
`review` was the target of its own `aria-labelledby`. The jump strip links by
id, so its anchors landed wherever the browser chose, and a screen reader was
told each section was labelled by itself. Invisible to every existing check:
the page only renders signed in, the panels mount after hydration, and server
HTML for a signed-out request contains none of them.
`dashboard-ids.test.ts` scans the page and every panel it places — its first
run found `focus`, which I had missed. Mutation-tested.

NOT VERIFIED IN A BROWSER, and saying so: this page only renders for a
signed-in reader, there is no local session, and I did not add an auth bypass
to get one. Checked by type-check, the id guard, and the fact that the map is
the same component already screenshotted on /situations.

Verified: verify exit 0 — 882 tests.

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-24 22:29:57 -07:00
..