Release asset upload follows the #619 hidden-input idiom (Fix #621) #622

Merged
crueber merged 1 commit from fix/issue-621 into main 2026-09-16 11:50:04 +00:00
Owner

Fixes #621 (follow-up flagged by the #619 review). Release.jsx asset upload used hidden-in-label file input with no keyboard passthrough — restructured to the #619 shape verbatim (peer sr-only input + #533 focus ring on the visible span). uploadLabel/onFile/disabled semantics byte-identical. Verified: new test 4/4, full-minus-smoke 1601/1601, vite+esbuild green, go vet clean.

Fixes #621 (follow-up flagged by the #619 review). Release.jsx asset upload used hidden-in-label file input with no keyboard passthrough — restructured to the #619 shape verbatim (peer sr-only input + #533 focus ring on the visible span). uploadLabel/onFile/disabled semantics byte-identical. Verified: new test 4/4, full-minus-smoke 1601/1601, vite+esbuild green, go vet clean.
Author
Owner

INDEPENDENT REVIEW — PR #622 (fix/issue-621, 7c3260a) vs Forgejo #621: APPROVED, no fix commits needed.

Verified against origin/main..origin/fix/issue-621 (3 files +77/-3) in /tmp/walhub-621:

  1. peer sr-only input (Tab-reachable): Release.jsx:347 input is type=file class="peer sr-only", first child of the label so the peer selector resolves — display:none gone. PASS
  2. .btn primary + #533 ring both themes: span carries btn primary cursor-pointer + peer-focus-visible:ring-2 / ring-emerald-500 / ring-offset-2 / ring-offset-white / dark:ring-offset-zinc-900 — token-for-token the #619 ring from Repos.jsx (a85e006). PASS
  3. Visuals EXACT: old label's full class set (btn primary cursor-pointer + busy pointer-events-none opacity-50) is carried intact on the new span — nothing dropped, primary variant and busy dim preserved; only the focus-ring tokens added. PASS
  4. Shrink-wrap / no layout shift: old label.btn was inline-flex; new plain label is inline-flex wrapping a single .btn span, and sr-only is absolutely-positioned (zero layout contribution) — same intrinsic size inside the flex flex-wrap items-center gap-2 row. PASS
  5. uploadLabel/onFile/disabled byte-identical: {getUpload() ? uploadLabel() : Upload asset}, onChange={onFile}, disabled={getBusy()} all present; disabled input still blocks the picker when busy, same as before. PASS
  6. Drag-drop affordance untouched: muted 'or drop a file here' span and parent getDrag() ring unchanged in diff. PASS
  7. role=button: kept on the span — redundant inside a label, but the same deliberate call as #619, so consistent. PASS
  8. Law 12 docs: amendment appended to docs/go/12_web_ui.md Decisions section in the same change. PASS
  9. Law 1 no new CSS/deps: no ui.css or package.json changes; test pins no upload-scoped CSS and the four pinned runtime deps. PASS
  10. Tests fail pre-fix: main has class="hidden" with no #621 marker, so the new pins fail there; on-branch 4/4 green, full-minus-smoke 1601/1601 green, vite build green (smoke.test.js excluded per convention — needs a live server; it 403s with no backend running). PASS

Note: my vite build probe emptied web/dist and removed the tracked .keep placeholder; restored via git checkout — worktree left clean, no content changes. No defects found, nothing to fix.

INDEPENDENT REVIEW — PR #622 (fix/issue-621, 7c3260a) vs Forgejo #621: APPROVED, no fix commits needed. Verified against origin/main..origin/fix/issue-621 (3 files +77/-3) in /tmp/walhub-621: 1. peer sr-only input (Tab-reachable): Release.jsx:347 input is type=file class="peer sr-only", first child of the label so the peer selector resolves — display:none gone. PASS 2. .btn primary + #533 ring both themes: span carries btn primary cursor-pointer + peer-focus-visible:ring-2 / ring-emerald-500 / ring-offset-2 / ring-offset-white / dark:ring-offset-zinc-900 — token-for-token the #619 ring from Repos.jsx (a85e006). PASS 3. Visuals EXACT: old label's full class set (btn primary cursor-pointer + busy pointer-events-none opacity-50) is carried intact on the new span — nothing dropped, primary variant and busy dim preserved; only the focus-ring tokens added. PASS 4. Shrink-wrap / no layout shift: old label.btn was inline-flex; new plain label is inline-flex wrapping a single .btn span, and sr-only is absolutely-positioned (zero layout contribution) — same intrinsic size inside the flex flex-wrap items-center gap-2 row. PASS 5. uploadLabel/onFile/disabled byte-identical: {getUpload() ? uploadLabel() : Upload asset}, onChange={onFile}, disabled={getBusy()} all present; disabled input still blocks the picker when busy, same as before. PASS 6. Drag-drop affordance untouched: muted 'or drop a file here' span and parent getDrag() ring unchanged in diff. PASS 7. role=button: kept on the span — redundant inside a label, but the same deliberate call as #619, so consistent. PASS 8. Law 12 docs: amendment appended to docs/go/12_web_ui.md Decisions section in the same change. PASS 9. Law 1 no new CSS/deps: no ui.css or package.json changes; test pins no upload-scoped CSS and the four pinned runtime deps. PASS 10. Tests fail pre-fix: main has class="hidden" with no #621 marker, so the new pins fail there; on-branch 4/4 green, full-minus-smoke 1601/1601 green, vite build green (smoke.test.js excluded per convention — needs a live server; it 403s with no backend running). PASS Note: my vite build probe emptied web/dist and removed the tracked .keep placeholder; restored via git checkout — worktree left clean, no content changes. No defects found, nothing to fix.
Sign in to join this conversation.
No description provided.