Files
loki/scripts
CatoandClaude Opus 5 0dfdbd059f feat(projects): the row can hold controls, so health becomes a real one (#832)
The row WAS a single <Link> wrapping everything, with aria-label="Open {name}".
HTML forbids interactive content inside an anchor, so the row had ZERO
interactive children BY CONSTRUCTION — which is the actual reason every number
on it led to the same generic destination, and the reason the health chip could
only ever be a dead <span> explained by a hover `title`: invisible on touch, a
bare "7/10" to a screen reader.

THE CAPABILITY WAS NEVER MISSING. HealthScoreBar has always had an
`interactive` mode — a real button, aria-expanded, a panel naming each missing
point with an inline edit that writes it, and a draft-from-the-brief action.
The list could not use one line of it. Ten named checks, each with its rule and
the exact field that earns it, sat behind a structural prohibition.

Stretched link instead: the project NAME is the anchor and its ::after covers
the row, so the whole row remains one click target while the row itself is no
longer an <a>. Two things improve at once — a screen reader now announces a
link whose text is the project's name rather than an aria-label bolted to a
wrapper, and anything needing its own click sits above the overlay via
.ui-projects-row-actions.

Both classes live in globals.css, per the rule that styling has one home; the
test asserts they are DEFINED there, because a class the CSS does not define
would leave the row unclickable everywhere except the name — a silent, large
usability regression that nothing else would catch.

Caught by the repo's own lint while writing this: `brief` must be the CLEANED
description, never the raw column, or the gap-fill would draft a mission from
the bulk-import placeholder ("Local repository imported from loki-ui"). Good
rule; it fired exactly where it should.

Guarded by scripts/test/project-row-can-hold-controls.ts (6 checks). This is a
STRUCTURAL invariant, not a style preference: collapsing the row back to a
wrapping anchor would silently re-delete every control inside it — the page
would still render, nothing would fail to compile, and the disclosure would
just quietly stop existing again. Mutation-tested: dropping `interactive` fails
the payoff check.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-22 02:53:50 -07:00
..
2026-08-31 09:23:30 +00:00
2026-08-31 09:23:30 +00:00
2026-08-31 09:23:30 +00:00
2026-08-31 09:23:30 +00:00
2026-08-31 09:23:30 +00:00