Skip to content

🐛 fix: wrap the row menu's consequence hints under their label - #15176

Merged
hivecommons-hive[bot] merged 1 commit into
v5from
fix/row-menu-hint-wrap
Oct 29, 2026
Merged

hivecommons-hive[bot] merged 1 commit into
v5from
fix/row-menu-hint-wrap

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Fixes #15175

What

The Activity Monitor row "⋯" menu's consequence hints ("merges #15118 into v5 now via hive's identity, attributed to you" / "records your approval; the hive's merge sweep merges #15118 on its next pass once CI is green and the head has soaked") ran ~1150px past the menu border, over the rows behind it.

Root cause

.ham-menu-item is a nowrap flex row with the hint inline after the label (reusing .ham-menu-more, the ▸ submenu affordance's class), sized for the short right-aligned "rescan" hint; the menu is capped at min(22em, …).

Fix (index.html only)

  • stageTrackerMenuHtml marks a menu with any hinted item .ham-menu-hinted → max-width: min(45em, calc(100vw - 2 * var(--sp-3))); stageTrackerMenuPosition already flips left from the measured width near the right edge, so the wider menu stays in the viewport.
  • A hinted item is .ham-menu-item-hinted (column, label on its own line); the hint is .ham-menu-hint (block, --text-faint, --fs-xs, white-space: normal; overflow-wrap: anywhere). The existing "Re-evaluate now / rescan" hint follows the same rule for consistent alignment.
  • Tokens only (--sp-*, --fs-xs, --text-faint) — TestStyleRatchet and the row-actions CSS token check pass.
  • TestStaticRowMenuHintWraps (webstatic) asserts the wrap rules and that text hints no longer reuse .ham-menu-more; the row-actions node suite asserts the hinted/unhinted markup.
  • Changelog fragment fixed-row-menu-hint-wrap.md.

Before / after

Rendered from the real tokens + menu CSS with the live menu copy (screenshots follow in a comment).

The row menu's hinted items were a nowrap flex row sized for the short
right-aligned 'rescan' hint, so the merge answers' sentence-length
consequence hints ran ~1150px past the menu border. A menu with hints is
now wider (capped to the viewport) and each hint stacks under its label
and wraps; the rescan hint follows the same rule.

Fixes #15175

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 Oct 28, 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

@kubestellar-prow kubestellar-prow Bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 28, 2026
@clubanderson

Copy link
Copy Markdown
Member Author

Before / after, rendered from the real tokens.css + the .ham-menu* rules with the live menu copy (1400px viewport, menu opened at x=700):

Before — hints inline, nowrap; the second runs off the right edge over the rows behind:

before: hints overflow the menu

After — menu is ham-menu-hinted (wider, viewport-capped); each hint wraps under its label, the rescan hint too:

after: hints wrap under their label inside the menu

@github-actions

github-actions Bot commented Oct 28, 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
#15085 ✨ Activity Monitor: Adopt now and Reroute to another clanker for PRs waiting on a contributor's clanker CONFLICT src/pkg/dashboard/static/index.html
#15104 🐛 Activity Monitor: Rebase, then merge as maintainer; fixer owns parked conflicting PRs; dismiss self-inflicted changes_requested same files src/pkg/dashboard/stage_tracker_row_actions_test.go
src/pkg/dashboard/static/index.html
#14807 ✨ dashboard: stream Job pod logs in the terminal pane for sandbox.runtime: job agents same files src/pkg/dashboard/static/index.html
#15134 🐛 Delegated decision on a capability gap: model the blocker, stop the un-park/re-park loop, name the missing App permission same files src/pkg/dashboard/stage_tracker_row_actions_test.go
src/pkg/dashboard/static/index.html
#15180 🐛 Audit contributor tier changes; refresh parked PRs' role tier each sweep same files src/pkg/dashboard/static/index.html
#15150 🐛 Activity Monitor: persist the merged count in a server ledger, pin the Merged chip, banner and bee flight on merge same files src/pkg/dashboard/static/index.html
#15122 🐛 Write-back containment: per-kind gate for every unsolicited GitHub write, with backfill guard same files src/pkg/dashboard/static/index.html
#15157 ✨ Conflict-aware merge train in the automerge lanes same files src/pkg/dashboard/static/index.html

@github-actions github-actions Bot added the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Oct 28, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

@clubanderson is auto-promoted for contributor-lane merging on this PR: the last 5 merged PRs by this author in this hive's repositories have no revert or sentinel-alert evidence. CI, reviewer verdict, diff fences, soak, holds and branch protection still apply.

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

Looks correct to me. Read the three new rules against the base styles on v5 and the two stageTrackerMenuItemHtml branches.

  • index.html:1682 gives .ham-menu max-width: min(22em, …); the new .ham-menu.ham-menu-hinted rule (two classes) outranks it, so the 45em cap applies only to hinted menus. index.html:1685 sets white-space: nowrap on .ham-menu-item; .ham-menu-item.ham-menu-item-hinted overrides it and switches to a column, and .ham-menu-hint is display: block; overflow-wrap: anywhere, so with align-items: flex-start the hint is fit-content-sized and wraps at the menu width rather than overflowing.
  • The submenu ▸ affordance (index.html:17341) still uses .ham-menu-more; only text hints move to .ham-menu-hint, and TestStaticRowMenuHintWraps pins that the two are not re-mixed.
  • stageTrackerMenuPosition is unchanged and measures the rendered width, so the wider menu still flips left near the right edge as the body says.

One typo, not blocking: the new comment in stageTrackerMenuItemHtml (index.html ~17337, "never overflows the menu (#15165)") cites #15165, which is an unrelated PR; the issue is #15175.

— hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

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

Looks correct to me. Read the menu CSS and the positioning path on v5, not just the diff.

  • Root cause checks out: .ham-menu is capped at min(22em, …) (index.html:1682) and .ham-menu-item is a white-space: nowrap flex row (:1685), so an inline hint in .ham-menu-more had nowhere to go but past the border.
  • The fix is safe for placement: both callers measure after insertion — stageTrackerMenuPosition(x, y, el.offsetWidth, el.offsetHeight, …) at index.html:17404 and :17614 — so the wider .ham-menu-hinted box (max-width: min(45em, calc(100vw - 2 * var(--sp-3)))) is what gets flipped/clamped at :17354. No stale-width assumption.
  • stageTrackerMenuItemHtml is used for submenu children too, so the "per PR" hint under Decide… gets .ham-menu-item-hinted/.ham-menu-hint as well, and stageTrackerMenuHasHints recurses into submenu — consistent with the updated assertion in stage_tracker_row_actions_test.go:624.
  • The ▸ submenu affordance keeps .ham-menu-more; only text hints move to .ham-menu-hint, and TestStaticRowMenuHintWraps pins that.

One info nit: the new JS comment in stageTrackerMenuItemHtml says "never overflows the menu (#15165)" — the issue is #15175 (CSS comment and tests cite it correctly). Worth fixing if you push again; not worth a push on its own.

Body matches the diff. Fixes #15175.

— hive: agent=reviewer 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 Oct 29, 2026
@hivecommons-hive
hivecommons-hive Bot merged commit c6125c1 into v5 Oct 29, 2026
84 of 87 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the fix/row-menu-hint-wrap branch October 29, 2026 00:12
@hivecommons-hive

Copy link
Copy Markdown
Contributor
Evidence bundle `#15176d84d409` sha256:1341a2a43d636e7dc3a73bee7c33066ce7e91bac9cdd8479b33888ad6157ffa7 — download from the dashboard or `hivectl review evidence #15176`.

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

@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

@hivecommons-hive hivecommons-hive Bot removed the role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) label Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/human A person pushed this PR themselves conflicts-with-open-pr Open PR has a merge conflict with another open PR dco All commits are DCO signed-off dco-signoff: yes Indicates the PR's author has signed the DCO. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐛 Activity Monitor: row menu consequence hints overflow the menu by ~1150px

1 participant