Skip to content

πŸ› mobile-shots: phone-ergonomics probe measures the progress pill's extended hit area - #17195

Merged
clubanderson merged 1 commit into
v5from
am-ergonomics-pill-hitrect
Nov 8, 2026
Merged

clubanderson merged 1 commit into
v5from
am-ergonomics-pill-hitrect

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Summary

After #17193 and #17183 both landed on v5, the tracker-phone-ergonomics probe fails at 390Γ—844 for every dashboard PR: the progress pill (#17183) paints at the 22px compact control height and extends its tap target to --tap-target with an absolutely positioned empty ::before, but the probe measured getBoundingClientRect() of the painted box and reported 17 controls under 44Γ—44 (seen on #17193's last mobile-shots run before it merged).

The probe now measures the hit area: when a control has an absolutely positioned empty ::before, its negative insets grow the measured rect. For the pill, 22px + 2 Γ— 11px = 44px. Controls without that pattern are measured as before.

Test-only (webstatic/testdata/), hence no-changelog.

…xtended hit area

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
@clubanderson clubanderson added the no-changelog No changelog fragment required label Nov 8, 2026
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Nov 8, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign nicholasjackson for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Changelog: this PR changes code but carries no changelog entry
(no changelog.d/ fragment and no CHANGELOG.md edit).

If it is user-visible β€” a feature, a fix an operator would notice, a
security change, a migration, a deprecation, or anything breaking β€”
please add a fragment file changelog.d/<category>-<pr-or-slug>.md
containing exactly your entry (see changelog.d/README.md; the
category is one of added/changed/deprecated/fixed/security). Please
do not append to CHANGELOG.md's ## Unreleased directly β€” that
shared section is the merge-conflict generator fragments replaced
(#5675). If it is a refactor, a test-only change, or dependency
churn, no entry is needed and you can ignore this.

This is a reminder, not a gate; it never blocks a merge.

@kubestellar-prow kubestellar-prow Bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Nov 8, 2026
@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v5

Conflicts are checked with every PR merged onto the current tip of v5, so a PR that only needs a rebase is not reported as conflicting with its siblings.

PR Title Relation Files
#17196 πŸ› mobile-shots: phone-ergonomics probe measures pseudo-element hit areas CONFLICT src/pkg/dashboard/webstatic/testdata/tracker-phone-ergonomics.js

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Hive status β€” updated in place; edits do not notify. Full history is in the Activity Monitor.

@clubanderson this PR is held at stage/071-needs-author and the hive will not merge it yet.

Failing checks:

  • mobile-shots

Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path.

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pill case is right, but hitRect also shrinks controls whose ::before has positive insets, and there are three of those in the section β€” so the probe would still fail at 390Γ—844, just with different names.

Verified against v5:

  • tracker.css:939 .ham-pill { position: relative; min-height: var(--control-compact-min-h) … } and :942 .ham-pill::before { content: ""; position: absolute; inset: calc((var(--control-compact-min-h) - var(--tap-target)) / 2) 0; } β†’ top/bottom resolve to βˆ’11px, so 22 βˆ’ (βˆ’11) βˆ’ (βˆ’11) = 44. βœ… That part does what the body says.
  • config-dialog.css:417 .config-info { … position: relative; } and responsive.css:397-400 (inside @media (max-width: 768px), line 45):
    .config-info::before { content: ""; position: absolute; inset: calc((var(--tap-target) - var(--tap-ring)) / 2); … }
    With --tap-target: 44px and --tap-ring: 28px (base.css:45), that is +8px on every side.
  • sections.js:80-82 inject three <button class="config-info section-settings-gear ham-header-tool …"> into the section header; tracker.css:1093 (inside the max-width: 640px phone tier at :1082) sizes #activity-monitor-section .ham-header-tool to var(--tap-target) = 44Γ—44. They are button elements, not excluded by inlineText/stripCell, so they are in controls.

For those three, hitRect returns 44 βˆ’ 8 βˆ’ 8 = 28 in both axes and small gets button.config-info.section-settings-gear.ham-header-tool.… 28Γ—28 three times. (tracker.css:501 only suppresses the ring for .ham-chevron-info.config-info, which the probe already excludes; .ham-acted.config-info at tracker-row-acted.js:168 has tabindex="0" and the same ring, so it is affected too.)

Suggested fix (one line): a pseudo box that sits inside the painted box does not reduce the tap target, so take the union rather than the pseudo rect:

return { width: Math.max(r.width, r.width - px(b.left) - px(b.right)), height: Math.max(r.height, r.height - px(b.top) - px(b.bottom)) };

or equivalently only apply the adjustment when the insets are negative.

Everything else in the diff β€” the position === 'static' guard, the content !== '""' check, leaving width alone for the pill β€” reads correctly to me.

β€” hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@github-actions github-actions Bot added the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Nov 8, 2026
@clubanderson
clubanderson merged commit 7b391e1 into v5 Nov 8, 2026
81 of 89 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the am-ergonomics-pill-hitrect branch November 8, 2026 03:54
@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Your PR has been merged.

We'd love to hear how your experience was: share feedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conflicts-with-open-pr Open PR has a merge conflict with another open PR dco-signoff: yes Indicates the PR's author has signed the DCO. no-changelog No changelog fragment required size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant