Files
ersatztv/web/src
timothy f0da323a41 fix(734): portal the panel out of the card clip; correct three wrong copy claims
Cold adversarial review returned BLOCKED on four findings. All four fixed, plus
the reviewer's medium/low items.

BLOCKER — the panel was clipped away near a card bottom. `.ctv-card` sets
`overflow: hidden`, which clips a positioned descendant whatever its z-index, so
`z-index: 60` bought nothing. Measured on the reference screen: "Target
loudness" showed 12px of a 92px paragraph and "Scaling behavior" sat at exactly
0px of slack. Not an edge case — the Audio card's last row always carries a
`detail`, so one field's explainer was destroyed in every state of that card.

The panel is now portalled to `document.body` with `position: fixed`, placed
from the trigger's viewport rect in a layout effect that flips it above when it
would run off the bottom and clamps it inside the horizontal edges. Re-measured
across all seven rendered triggers: every panel fully visible, three flipped to
`top` automatically, none out of viewport. The portal cost the wrapper's
`mouseleave` as a proxy for "pointer still in this widget", so the panel now
owns its own hover state; the walk was re-measured on a flipped panel
(`[1]x12`, negative control 0).

Copy — three claims were wrong about the software they describe, which is the
exact drift §15 exists to prevent:
- loudnorm was compared to a dynamic-normalization mode this fork does not have
  (`NormalizeLoudnessMode` is `{ Off, LoudNorm }`).
- scaling was described as a binary choice, silently dropping `Stretch` — the
  only option that distorts the picture.
- `1..63` extra hardware frames were asserted known-bad, where
  `ffmpeg.qsv-extra-hw-frames-floor` states in terms that only `0` and `64` were
  measured and the rest are untested. The level-1 summary was already correct.
All three are corrected in the app and in the design mirror; a checker that
proves it read every key confirms the six shared strings stay byte-identical.

Also from the review:
- The `preventDefault` justification was false: per spec a label's activation
  behaviour is skipped for interactive-content targets, verified in Chromium.
  The call stays as belt-and-braces; the doc, the code comment and the test name
  no longer claim it fixes an observed bug.
- `role="note"` is not a live region and announced nothing. `aria-describedby`
  on the trigger, set only while open, is what reads the paragraph out.
- `aria-controls`/`aria-describedby` are omitted while collapsed rather than
  pointing at an id that is not in the document.
- Escape/outside-press are armed only when pinned or focused; armed on hover, a
  document-level Escape stole focus whenever a pointer rested on an info icon.
- The trigger joined the shared `--ring-focus` list instead of the UA default.
- `box-sizing: border-box` — the panel rendered 344px against a 320px max-width.
- `FIELD_HELP` is `as const`, so a mistyped key is a build error rather than a
  trigger with an empty panel.
- Added the missing decision record `spa.field-progressive-disclosure` and
  regenerated the catalog; §§8-13 each have one and §15 was the outlier.

Four new tests, each mutation-proved to fail for its own reason: portalling,
panel-owned hover, hover-scoped Escape, and collapsed-state aria. Restored
control green.

refs #734
2026-08-26 19:30:16 +02:00
..