Fix #568: systemic .link sweep — one shared rule (option a) #571

Merged
crueber merged 1 commit from fix/issue-568 into main 2026-09-15 13:47:34 +00:00
Owner

Follow-up to #566 (deliberately unbundled). The .link class had zero CSS rules in shipped web/src/ui.css; Tailwind v4 preflight reset all 25 remaining uses (10 files: Pull review dismiss/remove, thread resolve/expand toggles, staged remove, Checks links/expand, Team member remove, Settings token revoke + webhook ping/deliveries/delete, back-links in PullFiles/PullCommits/CheckDetail/Team/Invitations, Commit checks toggle, NotificationTray actions) to plain muted text. #566 fixed only the two composer Cancels (.btn); #567 review fixed StagedCard (same .btn).

Treatment: option (a) — ONE shared .link component rule in ui.css @layer components (emerald accent both themes, hover underline + hover color shift, cursor-pointer) per the #405 opaque-popover precedent: one rule fixes all sites including future ones. Deliberately a class, never a bare a rule — scoped link styles keep their contexts and <A class="link"> composes instead of fighting (no base a accent exists). Button-shaped actions stay .btn (#566/#567 idioms hold). Zero JSX changes.

Law 12: docs/go/12_web_ui.md FIXED (#568) amendment + docs/style-guideline.md §2 canonical .link entry (with the .btn boundary), same commit.

Verify: new web/test/unit/link-sweep-568.test.js (16 tests) + #568-scoped updates to two stale pins; targeted 52 pass; full-minus-smoke 1387/1387 pass (smoke needs live server, pre-existing); vite build green with .link in compiled CSS (web/dist/.keep restored); esbuild SDK bundle green; go vet ./internal/... clean (no Go change). Text-level change, no layout impact — 390px reasoned.

Follow-up to #566 (deliberately unbundled). The `.link` class had zero CSS rules in shipped `web/src/ui.css`; Tailwind v4 preflight reset all 25 remaining uses (10 files: Pull review dismiss/remove, thread resolve/expand toggles, staged remove, Checks links/expand, Team member remove, Settings token revoke + webhook ping/deliveries/delete, back-links in PullFiles/PullCommits/CheckDetail/Team/Invitations, Commit checks toggle, NotificationTray actions) to plain muted text. #566 fixed only the two composer Cancels (.btn); #567 review fixed StagedCard (same .btn). Treatment: option (a) — ONE shared `.link` component rule in `ui.css` @layer components (emerald accent both themes, hover underline + hover color shift, cursor-pointer) per the #405 opaque-popover precedent: one rule fixes all sites including future ones. Deliberately a class, never a bare `a` rule — scoped link styles keep their contexts and `<A class="link">` composes instead of fighting (no base `a` accent exists). Button-shaped actions stay `.btn` (#566/#567 idioms hold). Zero JSX changes. Law 12: `docs/go/12_web_ui.md` FIXED (#568) amendment + `docs/style-guideline.md` §2 canonical `.link` entry (with the .btn boundary), same commit. Verify: new `web/test/unit/link-sweep-568.test.js` (16 tests) + #568-scoped updates to two stale pins; targeted 52 pass; full-minus-smoke 1387/1387 pass (smoke needs live server, pre-existing); `vite build` green with `.link` in compiled CSS (`web/dist/.keep` restored); `esbuild` SDK bundle green; `go vet ./internal/...` clean (no Go change). Text-level change, no layout impact — 390px reasoned.
25 class="link" sites across 10 files rendered as plain muted text
(Tailwind v4 preflight reset, zero .link rules in shipped ui.css).
ui.css @layer components gains one shared .link rule (emerald accent
both themes, hover underline + cursor-pointer) per the #405 precedent;
zero JSX changes, button actions stay .btn (#566/#567 idioms hold).
Style-guideline §2 gains the canonical .link entry; 12_web_ui.md
amended (law 12). Cover: link-sweep-568.test.js + #568-scoped updates
to two stale pins; full-minus-smoke 1387 pass; vite + esbuild green.
Author
Owner

REVIEW — APPROVE (independent review of fix/issue-568 @ 828d9fe against #568).

Acceptance holds: ONE systemic treatment (option (a)) applied repo-wide — a single shared .link rule in ui.css @layer components fixes all 25 sites with zero JSX changes.

Verified independently in /tmp/walhub-568:

  • Census re-run myself: grep -rn 'class="link' web/src = exactly 25 across 10 files (Team 2, Settings 4, PullFiles 2, PullCommits 1, Pull 5, Invitations 1, Commit 1, Checks 5, CheckDetail 2, NotificationTray 2) — matches the test EXPECTED map, no site missed. Zero single-quote class='link variants.
  • Rule tokens (ui.css:101): cursor-pointer + text-emerald-700/dark:text-emerald-400 (markdown-link accent language, both themes) + hover:underline + hover/dark:hover color shift. No bare a{} rule added (checked); scoped styles (.markdown-body a, .blob-num a, .diff-num a) intact; composes rather than fights (no base-a accent exists).
  • Zero-JSX-change claim holds: git diff origin/main..HEAD touches no pages/components JSX — pure CSS addition + tests + docs.
  • Shared-pattern justification (AGENTS.md Tailwind rule): 25 sites/10 files qualifies; comment cites the #405 opaque-popover precedent and records the class-vs-bare-a rationale. Justified.
  • #566/#567 .btn surfaces untouched by design: no JSX diff; tests pin conversation + Files-tab Cancels and StagedCard edit/remove still on 'btn ml-2 px-2 py-0.5 text-xs', with no .link in StagedCard.
  • Style-guideline §2 entry names the canonical .link reference and states the .btn boundary (#566/#567). 12_web_ui.md carries the FIXED (#568) amendment (law 12, same commit).
  • No new deps: package.json still exactly the 4 allowed runtime deps (law 1).
  • Tests fail pre-fix: origin/main ui.css has zero .link matches, so link-sweep-568 fails there by construction. Targeted run on-branch: 52/52 pass (link-sweep + composer-dismiss-566 + staged-inline-567).
  • Stale-pin updates justified, not weakenings: composer-dismiss-566 no-rule pin correctly inverted to rule-exists + both-themes + Cancels-still-.btn (the follow-up landed); staged-inline-567 keeps its assertion, message-only update.
  • Pre-existing nit (out of scope, not introduced here): neighboring guideline ui.css line refs (.btn/.pill/.tab-badge/.icon) were already stale on main; the new .link ref (85-101) is accurate. Left alone deliberately.

No fix commits needed — no defects found. web/dist untouched, no Go files touched.

REVIEW — APPROVE (independent review of fix/issue-568 @ 828d9fe against #568). Acceptance holds: ONE systemic treatment (option (a)) applied repo-wide — a single shared .link rule in ui.css @layer components fixes all 25 sites with zero JSX changes. Verified independently in /tmp/walhub-568: - Census re-run myself: grep -rn 'class="link' web/src = exactly 25 across 10 files (Team 2, Settings 4, PullFiles 2, PullCommits 1, Pull 5, Invitations 1, Commit 1, Checks 5, CheckDetail 2, NotificationTray 2) — matches the test EXPECTED map, no site missed. Zero single-quote class='link variants. - Rule tokens (ui.css:101): cursor-pointer + text-emerald-700/dark:text-emerald-400 (markdown-link accent language, both themes) + hover:underline + hover/dark:hover color shift. No bare a{} rule added (checked); scoped styles (.markdown-body a, .blob-num a, .diff-num a) intact; <A class="link ..."> composes rather than fights (no base-a accent exists). - Zero-JSX-change claim holds: git diff origin/main..HEAD touches no pages/components JSX — pure CSS addition + tests + docs. - Shared-pattern justification (AGENTS.md Tailwind rule): 25 sites/10 files qualifies; comment cites the #405 opaque-popover precedent and records the class-vs-bare-a rationale. Justified. - #566/#567 .btn surfaces untouched by design: no JSX diff; tests pin conversation + Files-tab Cancels and StagedCard edit/remove still on 'btn ml-2 px-2 py-0.5 text-xs', with no .link in StagedCard. - Style-guideline §2 entry names the canonical .link reference and states the .btn boundary (#566/#567). 12_web_ui.md carries the FIXED (#568) amendment (law 12, same commit). - No new deps: package.json still exactly the 4 allowed runtime deps (law 1). - Tests fail pre-fix: origin/main ui.css has zero .link matches, so link-sweep-568 fails there by construction. Targeted run on-branch: 52/52 pass (link-sweep + composer-dismiss-566 + staged-inline-567). - Stale-pin updates justified, not weakenings: composer-dismiss-566 no-rule pin correctly inverted to rule-exists + both-themes + Cancels-still-.btn (the follow-up landed); staged-inline-567 keeps its assertion, message-only update. - Pre-existing nit (out of scope, not introduced here): neighboring guideline ui.css line refs (.btn/.pill/.tab-badge/.icon) were already stale on main; the new .link ref (85-101) is accurate. Left alone deliberately. No fix commits needed — no defects found. web/dist untouched, no Go files touched.
Sign in to join this conversation.
No description provided.