fix(css): 48 px touch targets for the add-channel dialog buttons (#249) - #264
Conversation
test-touch-targets.js renders #chGenerateBtn, #chPskAddBtn and #chHashtagBtn in their real dialog rows and requires 48x48, a centred label and no overflow out of the dialog. The Kpa-clawbot#2052 E2E checks the same in the real DOM at 320, 390, 640 and 768 px with touch, and pins the desktop height at 32 px, since the fix is touch-only. Red on master: all three buttons render 32 px tall. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#chGenerateBtn, #chPskAddBtn and #chHashtagBtn were 32 px tall next to their 48 px inputs. Under (pointer: coarse) they now get min-height: 48px, like the Kpa-clawbot#630 coarse-pointer block. The labels stay centred, the rows stay 48 px tall, and desktop is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rapport — CS-pve-agent3 PR#264 #249 — head e2ac1b5Status: All three add-channel dialog buttons are 48 px tall on touch at 320–768 px, and desktop is unchanged. Tests went red first; 5 of 5 mutants are killed; CI is green on the first run. Still a draft. Evidence: [T] test run here · [A] ad-hoc measurement or screenshot here · [K] from the issue or another PR, not re-run. Setup [T]: worktree from Acceptance criteria (#249)
Measurements, before → after (real DOM, dialog open) [A]
Same probe, before and after, at every viewport [A]:
The only computed change is the button height. Tests [T]
5 of 5 killed. M2 and M3 are caught only by the real-DOM E2E, because the harness runs a single phone context. Screenshots [A]Taken at 390×844 touch in light and dark, before (master
Rules [T]
CI, run 37325849948 [T]
No re-runs were needed; the known flaky test #256 did not fail. Remainders
|
Review — CS-pve-agent1 PR#264 — head e2ac1b5Dom: APPROVE Evidence: [T] test run here · [A] ad-hoc measurement, screenshot or code reading here · [K] from the issue, the PR or CI, not re-run. Setup [T]:
Findings
There are no blocking findings. The review points
Tests and mutants [T]On the merged tree:
E2E against the local server, all exit 0:
Own mutants: each was applied to the rule in
4 of 4 killed by at least one test. R4 is caught only by the real-DOM E2E, the same as the author's M3. CI, run 37325849948 on
Neither known flake (#256, #267) fired. Rules [T][A]
Not verified
🤖 Generated with Claude Code |
Relates to #249
The add-channel dialog's three primary buttons were 32 px tall on touch, below the 48 px house minimum (Kpa-clawbot#2052). This raises them to 48 px under
(pointer: coarse), the same scope as the Kpa-clawbot#630 coarse-pointer block that #239 raised. Tests are written first: they go red on master, and the fix turns them green.public/style.css, placed after the dialog close button's≤640pxblock from fix(css): raise the remaining 44 px controls to the 48 px touch-target minimum (#235) #239. It sets onlymin-height: 48px. No colours, tokens, JS or markup change..github/is not in the diff; fork guards unchanged (9 indeploy.yml, 1 inrelease-fast-path.yml).scripts/check-xss-sinks.sh --diff origin/masteris clean.Plan
4df9ecc9): add the three buttons totest-touch-targets.jsin their real dialog rows, and totest-issue-2052-touch-target-e2e.jsin the real DOM at 320, 390, 640 and 768 px with touch, plus a desktop check at 1440.e2ac1b5b):@media (pointer: coarse) { #chGenerateBtn, #chPskAddBtn, #chHashtagBtn { min-height: 48px; } }.Measurements
Real DOM, add-channel dialog open, master → this branch:
#chGenerateBtn#chPskAddBtn#chHashtagBtnThe inputs next to the buttons, and Scan QR, were already 48 px on master (global rules), so each dialog row stays 48 px tall. The dialog's height doesn't change at any width, and neither does its width or any button's width. Labels stay centred (offset 0.0/0.0 px), and the dialog and page have no horizontal scroll at any width. Background, text colour, padding, font size and radius are the same as on master.
Why touch-only: the issue asks for the touch minimum, and #239 kept desktop as it was. Under
(pointer: coarse), a 768 px touch tablet is covered too, which amax-width: 640pxrule would miss. On desktop the buttons stay 32 px next to 48 px inputs, as on master. If you'd rather align desktop too, removing the media wrapper does it, and the desktop pin in the E2E would then need updating.Screenshots
390×844 touch, before = master
0572e7f9, after = this branch. They're on an evidence-only branch that isn't meant to be merged: https://github.com/dborup/CoreScope/tree/codex/issue-249-screenshotsTests
test-touch-targets.js(CI E2E step, no server, iPhone 13): renders the three buttons with their real ids and labels in their real.ch-modal .ch-modal-rowmarkup, each next to its input (the hashtag row has its#prefix too). It asserts ≥48×48, a label centred within 1 px, and the button inside the dialog. On master all 3 fail.test-issue-2052-touch-target-e2e.js, real DOM: at 320, 390, 640 and 768 px with touch, each button is ≥48×48, visible, unclipped and hit at its centre. Each has a centred label and sits inside the dialog, and neither the dialog nor the page scrolls sideways. At 1440 px without touch, the buttons keep their 32 px height, which pins the touch-only scope. On master the 4 touch steps fail.Mutants, each must fail a test:
#chPskAddBtndropped from the rule (back to 32 px)@media (max-width: 640px)min-height: 44pxdisplay: flex; align-items: flex-start)Not changed here
#chSuggestBtn, the optional Suggest button in the same dialog, only shows when public channel suggestions are enabled. It is also 32 px on touch (95.2×32 at 390 px), but #249 doesn't list it, so it is left for a follow-up.Perf
No hot path: one static CSS rule, no JS.
🤖 Generated with Claude Code