Skip to content

πŸ› mobile-shots: phone-ergonomics hit-rect only grows and uses layout size - #17199

Merged
clubanderson merged 3 commits into
v5from
am-ergonomics-hitrect-grow
Nov 8, 2026
Merged

clubanderson merged 3 commits into
v5from
am-ergonomics-hitrect-grow

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Summary

Follow-up to #17195, whose hitRect helper regressed the tracker-phone-ergonomics probe in two ways (seen on its own mobile-shots run):

  • The ?/βš™ header marks draw their ring on an absolutely positioned ::before with positive insets inside the --tap-target square (responsive.css); the helper subtracted them and reported 28Γ—28 for 44Γ—44 controls. The pseudo box can now only grow the measured rect, never shrink it.
  • .ham-pill-moved runs a one-shot scale(.94) animation; getBoundingClientRect() mid-animation reported 43px. The helper now measures layout size (offsetWidth/Height), which transforms do not affect.

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

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 clubanderson 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
Generated by changelog-fragment-guard from the PR title (#5675).
Edit the wording freely, or replace this file with the no-changelog
label if the change is not user-visible.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: clubanderson <407614+clubanderson@users.noreply.github.com>
@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
#17198 ✨ dashboard: card-per-row Activity monitor layout on phones CONFLICT src/pkg/dashboard/webstatic/testdata/tracker-phone-ergonomics.js
#17196 πŸ› mobile-shots: phone-ergonomics probe measures pseudo-element hit areas same files src/pkg/dashboard/webstatic/testdata/tracker-phone-ergonomics.js

@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.

docs-currency: the PR body says "Test-only (webstatic/testdata/), hence no-changelog" and the PR carries the no-changelog label β€” but the diff also adds changelog.d/fixed-17199.md:1. Per changelog.d/README.md ("test-adjacent code like testdata/… put a no-changelog label on such PRs" / "A non-user-visible change wants no fragment and the no-changelog label instead"), the fragment should not exist. src/scripts/check-changelog-fragment.sh:111-112 passes on the label alone and does not reject a stray fragment, so this file will be folded into CHANGELOG.md's ### Fixed at the next release as an operator-facing entry about a mobile-shots test probe (and in title-echo form, not the narrative style the README asks for β€” compare changelog.d/fixed-17105.md).

Fix: delete the fragment (the sibling #17195 correctly shipped without one).

--- a/changelog.d/fixed-17199.md
+++ /dev/null
@@ -1 +0,0 @@
-- mobile-shots: phone-ergonomics hit-rect only grows and uses layout size (#17199)

β€” hive: agent=ci-maintainer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive

hivecommons-hive Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

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

Review findings from adjudicator-4 (folded here because this head already carries its hive review):

Intent alignment: the probe change does what the body says. Verified against the CSS it reasons about: the ?/βš™ ring uses a positive inset (static-src/css/responsive.css:400), the pill's ::before is vertical-negative only (static-src/css/tracker.css:942), and .ham-pill-moved is a pure transform keyframe (tracker.css:952-954) that offsetWidth/offsetHeight ignores β€” so hitRect at tracker-phone-ergonomics.js:39-43 now reports 44Γ—44 for all three cases.

One gap between body and diff:

Changelog fragment contradicts the stated no-changelog intent β€” the body says "Test-only (webstatic/testdata/), hence no-changelog" and the PR carries that label, but the diff also adds changelog.d/fixed-17199.md. changelog.d/README.md (the "What qualifies" bullet) says testdata/ changes get the label instead of a fragment; with the fragment present, compile-changelog.sh will fold a "mobile-shots probe" bullet into the user-facing ### Fixed section at the next release. Fix: delete changelog.d/fixed-17199.md (the label already satisfies check-changelog-fragment.sh).

--- a/changelog.d/fixed-17199.md
+++ /dev/null
@@ -1 +0,0 @@
-- mobile-shots: phone-ergonomics hit-rect only grows and uses layout size (#17199)

Review findings from adjudicator-5 (folded here because this head already carries its hive review):

Style review (head e945e4b) β€” one in-scope issue.

Stray changelog fragment contradicts the PR's own no-changelog intent β€” changelog.d/fixed-17199.md:1

The body says "Test-only (webstatic/testdata/), hence no-changelog" and the label is on the PR, but head e945e4b also adds changelog.d/fixed-17199.md. Commit e945e4b is the guard's autofix ("Generated by changelog-fragment-guard from the PR title"), pushed 30 s after the label landed β€” a race, not a decision. changelog.d/README.md ("What qualifies") puts testdata/ changes in the no-fragment bucket, and the precedent follow-up #17195 landed with the label only. As-is, compile-changelog.sh will fold a title-copy bullet about a test probe into the user-facing ### Fixed section at the next release, in the terse form the README says not to use ("one - bullet in the same rich narrative style…").

Fix: delete the file.

--- a/changelog.d/fixed-17199.md
+++ /dev/null
@@ -1 +0,0 @@
-- mobile-shots: phone-ergonomics hit-rect only grows and uses layout size (#17199)

Advisory (readability, no verdict impact) β€” src/pkg/dashboard/webstatic/testdata/tracker-phone-ergonomics.js:39 packs the layout-size read plus its client-rect fallback into one 140-char line with the fallback duplicated per axis. A small helper reads closer to the comment above it:

    const layout = (off, rect) => off || el.getBoundingClientRect()[rect];
    const r = { width: layout(el.offsetWidth, 'width'), height: layout(el.offsetHeight, 'height') };

Review findings from reviewer (folded here because this head already carries its hive review):

Read the probe against the CSS it measures; both regressions the body describes are real and the fix matches them.

  • static-src/css/responsive.css:397-400 β€” .config-info::before is position: absolute with a positive inset: calc((var(--tap-target) - var(--tap-ring)) / 2). The old hitRect subtracted that inset from the client rect, so a 44px control reported as the inner ring. The new grow = Math.max(0, -inset) only widens for negative insets, so the pill's inset: calc((compact - tap) / 2) 0 (tracker.css:954) still grows and the ring no longer shrinks.
  • static-src/css/tracker.css:964-966 β€” .ham-pill-moved runs scale(.94) once; getBoundingClientRect() reflects the transform, offsetWidth/Height do not. The fallback to the client rect when offsetWidth is 0 keeps SVG/inline-less elements measurable.

Test-only change (webstatic/testdata/), no-changelog label is appropriate even though a fragment was added. Looks correct to me.

Note for the maintainer: #17196 (same author, same file) also rewrites this helper to stop shrinking on positive insets, but keeps getBoundingClientRect() and so does not address the scale(.94) case; it is currently dirty. If this one lands, #17196 looks superseded. I have not closed anything.

@clubanderson
clubanderson merged commit 7f604c2 into v5 Nov 8, 2026
79 of 80 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the am-ergonomics-hitrect-grow branch November 8, 2026 04:12
@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