Skip to content

test(frontend/mobile): regression coverage for #989 44x44 touch minimums on .btn-small / .toggle-password / .modal-confirm-close (refs #983) - #1499

Merged
cristim merged 2 commits into
mainfrom
fix/983-touch-targets
Jul 23, 2026
Merged

cristim merged 2 commits into
mainfrom
fix/983-touch-targets

Conversation

@cristim

@cristim cristim commented Jul 22, 2026

Copy link
Copy Markdown
Member

Summary

Issue #983 asked for min-height: 44px on .btn-small, .toggle-password, and .modal-confirm-close to meet the iOS HIG / WCAG 2.5.5 44x44 touch-target minimum.

Investigation found this is already fixed: PR #989 (merged 2026-06-08, three days after #983 was filed) added a generic rule to frontend/src/styles/responsive.css:

@media (pointer: coarse) {
  .btn, button, [role="button"], input[type="submit"], input[type="button"],
  input[type="reset"], select, input[type="checkbox"], input[type="radio"] {
    min-height: 44px;
    min-width: 44px;
  }
}

All three selectors render as plain <button> elements in the markup (recommendations.ts, auth.ts, confirmDialog.ts), and no other CSS rule sets min-height/min-width/height/width on any of them (verified with a postcss AST scan across all style files), so they already inherit the 44x44 minimum on touch devices without a class-specific rule. Adding a duplicate rule would just shadow the existing one.

Fix

No production CSS change. Adds a regression test to frontend/src/__tests__/css.test.ts:

Test plan

  • npx tsc --noEmit clean
  • npx jest src/__tests__/css.test.ts passes (82/82)
  • Confirmed the new test fails when a regressing min-height override is manually injected into .btn-small, and passes once reverted
  • Full npx jest run shows the same 8 pre-existing failures (locale/Intl formatting, unrelated) with and without this change

Closes #983

…ums on .btn-small / .toggle-password / .modal-confirm-close (refs #983)

Issue #983 asked for min-height:44px on these three selectors. Verified
they already inherit the 44x44 minimum on touch devices from the
generic `button` rule PR #989 added under @media (pointer: coarse),
since all three render as plain <button> elements and no rule
overrides min-height/min-width on them. Add a regression test so a
future edit can't silently reintroduce a sub-44px override.
@coderabbitai

coderabbitai Bot commented Jul 22, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 16 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 15910a72-db39-417e-9504-a070cea571fe

📥 Commits

Reviewing files that changed from the base of the PR and between 70c9a7b and 95b9bc1.

📒 Files selected for processing (1)
  • frontend/src/__tests__/css.test.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/983-touch-targets

Comment @coderabbitai help to get the list of available commands.

@cristim cristim added type/chore Maintenance / non-user-visible priority/p3 Polish / idea / may never ship severity/low Minor harm urgency/eventually No deadline impact/internal Team-internal only triaged Item has been triaged labels Jul 22, 2026
@cristim

cristim commented Jul 22, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 22, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

…983)

The test.each list asserting .btn-small / .toggle-password /
.modal-confirm-close declare no sizing props collides with PR #985
(bottom-sheet modal), which gives .modal-confirm-close its own explicit
min-width/min-height: 44px (needed since it is absolutely positioned,
not sized by content). With both merged, this test goes red.

Drop .modal-confirm-close from the list: its explicit 44x44 is a
stronger, more direct guarantee than inheriting from the generic
coarse-pointer rule, not a regression. .btn-small and .toggle-password
still verify against the shared rule as before.
@cristim

cristim commented Jul 23, 2026

Copy link
Copy Markdown
Member Author

Adversarial review finding (MEDIUM) and fix

An adversarial Opus review flagged that this PR's frontend/src/__tests__/css.test.ts adds test.each(['.btn-small', '.toggle-password', '.modal-confirm-close']) asserting each selector declares no sizing props. PR #1497 (bottom-sheet modal, issue #985) adds min-width: 44px; min-height: 44px directly to .modal-confirm-close (it's absolutely positioned, not sized by content, so it needs its own explicit minimum). With both PRs merged, this test goes red for the .modal-confirm-close case. Neither branch's own CI catches it since each only tests its own tree.

Fix: dropped .modal-confirm-close from the test.each list. Its explicit 44x44 from #1497 is a stronger, more direct guarantee than inheriting the minimum from the generic coarse-pointer button rule, not a regression, so asserting its absence was the wrong invariant. .btn-small and .toggle-password still verify against the shared rule as before. Updated the surrounding comment to explain the exclusion.

Cross-PR interaction with #1497: verified in a local merge simulation (fetch both branches, merge #1499's branch onto #1497's branch) that the merge is clean and the full css.test.ts suite (84 tests) passes after both land.

Gates run locally: npm run typecheck, npx jest --no-coverage src/__tests__/css.test.ts — all green.

@cristim

cristim commented Jul 23, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 23, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@cristim
cristim merged commit e1a3172 into main Jul 23, 2026
21 checks passed
@cristim
cristim deleted the fix/983-touch-targets branch July 27, 2026 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

impact/internal Team-internal only priority/p3 Polish / idea / may never ship severity/low Minor harm triaged Item has been triaged type/chore Maintenance / non-user-visible urgency/eventually No deadline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mobile: touch targets below 44pt on .btn-small, .toggle-password, .modal-confirm-close

1 participant