Skip to content

πŸ› dashboard: fold the human-gate verbs at render time; … keeps its 44px tap target - #17515

Merged
hivecommons-hive[bot] merged 5 commits into
v5from
fix-gate-fold-tap-target
Nov 10, 2026
Merged

hivecommons-hive[bot] merged 5 commits into
v5from
fix-gate-fold-tap-target

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Fixes #17514

Follow-up to #17505 (merged with mobile-shots red β€” the workflow is reporting-only). The pill folded its verbs with CSS, which the acceptance probes reject:

  • tracker-header-geometry (844–2400px): "expected header control is not hidden" β€” the probe hit-tests every button in .ham-badges; CSS-hidden rest verbs and the always-rendered hidden menu are buttons.
  • tracker-phone-ergonomics (390Γ—844): button.ham-gate-more 28Γ—48 β€” the tap-target rule used .ham-human-gate > .ham-gate-more but the button sits in .ham-gate-more-wrap.

Change:

  • tracker-human-gate.js: stageTrackerHumanGateVisible() β†’ 3 verbs on the strip tier, 1 + … at ≀1100px (matchMedia, re-render on change); overflow items wait in <template class="ham-gate-menu-tpl"> and are stamped into the row the first time … opens.
  • tracker.css: dropped the data-ham-gate-overflow / ham-gate-act-rest CSS fold; descendant selectors for the … button so the 44px tap target applies.
  • stage_tracker_human_gate_test.go: pins the template menu / no hidden buttons.
  • Regenerated static/index.html; changelog fragment at repo root.

Verified locally with src/scripts/dashboard-mobile-shots.mjs at 1440x1200@1 and 390x844@3 (light + dark): all activity probes pass.

…px tap target

The merged pill (#17505) folded its verbs with CSS β€” display:none on the
trailing verbs and an always-rendered hidden menu β€” which the mobile-shots
acceptance rejects: tracker-header-geometry hit-tests every button in
.ham-badges, and tracker-phone-ergonomics measured the … button at 28px
because its tap-target rule used a child selector while the button sits
inside .ham-gate-more-wrap.

Now the row renders only the visible verbs (three on the strip tier, one
plus … at ≀1100px via matchMedia, re-rendered on change); the overflow
items wait in a <template> and are stamped into the row the first time
… opens; the tap-target sizing targets the descendant … button.

Fixes #17514

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Nov 10, 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

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/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 10, 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

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.

No conflicting open PRs or same-file overlaps were found.

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

Correctness review at 6176246.

1. Folded verbs escape the "settling…" disable β€” src/pkg/dashboard/static-src/js/tracker-human-gate.js:213
stageTrackerHumanGateSettling disables via gate.querySelectorAll('.ham-gate-act'), but the overflow items now live in <template class="ham-gate-menu-tpl"> (line 201), whose .content is not reachable by querySelectorAll. After an inline verb succeeds and the pill reads "settling…", opening … for the first time stamps still-enabled menu items (line 226), so a second verb can post before the next snapshot re-renders the row. Before this PR the menu items were in-DOM and got disabled with the rest. tracker-actions.js:981 only guards on aria-disabled, so nothing else catches it.

      gate.querySelectorAll('.ham-gate-act').forEach(b => b.setAttribute('aria-disabled', 'true'));
      gate.querySelectorAll('template.ham-gate-menu-tpl').forEach(t => t.content.querySelectorAll('.ham-gate-act').forEach(b => b.setAttribute('aria-disabled', 'true')));

2. Changelog fragment is in the wrong place and won't be compiled β€” changed-gate-fold-tap-target.md:1 (repo root)
changelog.d/README.md says fragments live in changelog.d/ and must start with a - bullet; compile-changelog.sh does not read the repo root, so this entry is silently dropped at release. Meanwhile changelog.d/fixed-17515.md:1 carries only the PR title with the … character stripped ("render time; keeps its 44px"). Suggest replacing the latter's content with the hand-written entry and deleting the root file:

--- a/changed-gate-fold-tap-target.md
+++ /dev/null
-Activity Monitor: the human-gate pill folds its verbs at render time ...
--- a/changelog.d/fixed-17515.md
+++ b/changelog.d/fixed-17515.md
-- dashboard: fold the human-gate verbs at render time;  keeps its 44px tap target (#17515)
+- Activity Monitor: the human-gate pill folds its verbs at render time (three on the strip tier, one plus `…` at ≀1100px), keeps the folded verbs in a template until `…` opens, and gives the `…` button its 44px tap target β€” the row holds no hidden buttons for the header-geometry probe to reject (#17514, #17515).

Verified otherwise: STAGE_TRACKER_GATE_FOLD_QUERY (1100px) matches the .ham-head-cols breakpoint at tracker.css:1014, and the phone tier (max-width: 640px / coarse ≀820px) sits inside it; closeAll (line 220) and the stamp path (line 226) handle both the template and already-stamped states.

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

@hivecommons-hive

hivecommons-hive Bot commented Nov 10, 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 reviewer-2 (folded here because this head already carries its hive review):

Read the diff against v5 plus the callers (tracker-filter-render.js, tracker-display.js, tracker.css). The JS/CSS change looks correct to me; one stray file should come out before merge.

Finding (low) β€” misplaced changelog fragment at the repository root.
changed-gate-fold-tap-target.md:1 is a new file at the repo root, outside changelog.d/, written as prose rather than a - bullet. The real fragment is changelog.d/fixed-17515.md, which is what the changelog-fragment-guard check saw, so the guard passes and this file would land as loose clutter next to README.md. Looks like a first draft that was not removed β€” delete it. (Cosmetic: changelog.d/fixed-17515.md:1 has a double space where the … glyph was dropped β€” "render time; keeps".)

What I verified in the code:

  • STAGE_TRACKER_GATE_FOLD_QUERY = '(max-width: 1100px)' (tracker-human-gate.js:28) matches the .ham-head-cols stacked-head media query at tracker.css:1017, so the JS fold now flips at the same width the CSS fold used to.
  • The change listener calls renderStageTracker() with no arguments (tracker-human-gate.js:154); renderStageTracker re-renders from _stageTracker when data is undefined (tracker-filter-render.js:60-61), and tracker-display.js:131,137 already use the same no-arg call on resize.
  • Template stamping (tracker-human-gate.js:226) replaces the <template> in place, so b.nextElementSibling on the next click and m.previousElementSibling in closeAll both still resolve to the right nodes.
  • The ::before tap-pad at tracker.css:1268 now uses the descendant selector .ham-human-gate .ham-gate-more, which reaches the button inside .ham-gate-more-wrap β€” this is the fix the 28Γ—48 probe failure called for.
  • Test updates in stage_tracker_human_gate_test.go:135-136,175-176 pin the new shape (template present on 4 verbs, absent on 3; no ham-gate-act-rest).

I have not run the mobile-shots harness; CI's mobile-shots job is the verdict on the probes.

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

Read the diff against the v5 tree and the callers. The render-time fold looks correct to me; one stray file should go before this lands.

Finding (low): changed-gate-fold-tap-target.md is committed at the repository root, outside changelog.d/. It is a prose paragraph, not a - bullet, and nothing compiles files at that path into CHANGELOG.md β€” the guard passed only because changelog.d/fixed-17515.md also exists. It reads as an earlier draft of the fragment written to the wrong path; suggest git rm it. (Cosmetic, same fragment: changelog.d/fixed-17515.md:1 lost the … glyph β€” "render time; keeps its 44px" has a double space where the ellipsis was.)

What I verified, for the record:

  • JS and CSS agree on the breakpoint: STAGE_TRACKER_GATE_FOLD_QUERY = '(max-width: 1100px)' (tracker-human-gate.js:28) matches the .ham-head-cols stacked-head block at tracker.css:1014, so the one-verb fold and the stacked-head styling flip together.
  • After the template is stamped (tracker-human-gate.js:230), the menu <div> replaces the <template> in place, so closeAll's m.previousElementSibling (:221) still resolves to the … button and aria-expanded is reset correctly.
  • The matchMedia change listener calls renderStageTracker() with no arguments; that is the established re-render idiom (tracker-display.js:137 does the same on resize) and renderStageTracker re-reads _stageTracker when data is absent (tracker-filter-render.js:60-61).
  • No other JS or the mobile-shots harness references data-ham-gate-overflow, data-ham-gate-inline or ham-gate-act-rest, so dropping the CSS fold leaves nothing dangling.
  • The Node-run Go test extracts stageTrackerHumanGateVisible without the module-level matchMedia block; typeof window === 'undefined' yields the strip-tier count of 3, which is what the updated assertions pin.

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

Why:

  • the review swarm requested changes

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.

Evidence bundle `#17515e92c3ca` sha256:25b987adc79011e13baf16cb9d8eb6f84abe61548f5ea209059ce2a0814a4f39 β€” download from the dashboard or `hivectl review evidence #17515`.

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

Read the diff against v5 plus the callers; the fold logic looks correct to me. One stray file to drop before merge.

Verified

  • tracker-human-gate.js:146 STAGE_TRACKER_GATE_FOLD_QUERY = '(max-width: 1100px)' matches the stacked-head breakpoint at tracker.css:1014 (@media (max-width: 1100px)), so JS and CSS fold at the same width.
  • The matchMedia change listener calls renderStageTracker() with no args; that is the established pattern (tracker-display.js:137, tracker-filter-state.js:199) and renderStageTracker at tracker-filter-render.js:60 falls back to _stageTracker when data is undefined.
  • Template stamping at tracker-human-gate.js:226: menu.replaceWith(stamped) keeps the stamped <div class="ham-gate-menu"> as the button's nextElementSibling, so closeAll's m.previousElementSibling (line 219) still finds the … button to reset aria-expanded. A re-render restores the template, which is fine since the row is rebuilt from scratch.
  • CSS: every .ham-human-gate > .ham-gate-more selector moved to a descendant selector (tracker.css:990–998, 1266, 1268), so the phone-tier min-width: var(--tap-target) / ::before hit-area now reaches the button inside .ham-gate-more-wrap.
  • stage_tracker_human_gate_test.go runs the pill under node (no window), so it pins the 3-verb strip tier and the template menu; the ≀1100px branch is exercised only by mobile-shots, which is still in progress on this head.

Finding (low) β€” changed-gate-fold-tap-target.md is committed at the repository root. It reads like a changelog fragment (<category>-<slug>.md, prose body, no - bullet) that landed outside changelog.d/; the real fragment is changelog.d/fixed-17515.md, and the fragment guard passes because of that one. The root file would ship as a loose markdown file next to README.md/AGENTS.md and is never picked up by the changelog assembler. Suggest git rm changed-gate-fold-tap-target.md.

Nit, take or leave: changelog.d/fixed-17515.md lost the … glyph (render time; keeps its 44px), leaving a double space.

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

@hivecommons-hive
hivecommons-hive Bot merged commit 22cbe10 into v5 Nov 10, 2026
82 of 83 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the fix-gate-fold-tap-target branch November 10, 2026 05:09
@hivecommons-hive

Copy link
Copy Markdown
Contributor

merged by Hive trusted-author auto-merge: author @clubanderson holds role owner and GitHub permission admin on repo; CI green at e92c3ca.

@github-actions

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

@clubanderson

Copy link
Copy Markdown
Member Author

/lgtm
/approve

hivecommons-hive Bot added a commit that referenced this pull request Nov 10, 2026
…17515 (#17524)

The node harness that renders tracker rows has no matchMedia, so
stageTrackerHumanGateVisible() always returned STAGE_TRACKER_GATE_VISIBLE
under test and the one-verb-plus-… arm (≀1100px) added by #17515 never ran.
Stub window.matchMedia and assert the fold for four-, three- and two-verb
pills, the strip-tier count when the query does not match, and the
no-matchMedia fallback.

Signed-off-by: quality <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Co-authored-by: quality <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Indicates the PR's author has signed the DCO. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Activity Monitor: human-gate … button is 28px wide on phones and folded verbs are hidden buttons the header probe rejects

1 participant