Repository navigation
🐛 fix: wrap the row menu's consequence hints under their label - #15176
Conversation
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>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Before / after, rendered from the real Before — hints inline, nowrap; the second runs off the right edge over the rows behind: After — menu is |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
|
@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. |
There was a problem hiding this comment.
Looks correct to me. Read the three new rules against the base styles on v5 and the two stageTrackerMenuItemHtml branches.
index.html:1682gives.ham-menumax-width: min(22em, …); the new.ham-menu.ham-menu-hintedrule (two classes) outranks it, so the 45em cap applies only to hinted menus.index.html:1685setswhite-space: nowrapon.ham-menu-item;.ham-menu-item.ham-menu-item-hintedoverrides it and switches to a column, and.ham-menu-hintisdisplay: block; overflow-wrap: anywhere, so withalign-items: flex-startthe 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, andTestStaticRowMenuHintWrapspins that the two are not re-mixed. stageTrackerMenuPositionis 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
There was a problem hiding this comment.
Looks correct to me. Read the menu CSS and the positioning path on v5, not just the diff.
- Root cause checks out:
.ham-menuis capped atmin(22em, …)(index.html:1682) and.ham-menu-itemis awhite-space: nowrapflex row (:1685), so an inline hint in.ham-menu-morehad 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, …)atindex.html:17404and:17614— so the wider.ham-menu-hintedbox (max-width: min(45em, calc(100vw - 2 * var(--sp-3)))) is what gets flipped/clamped at:17354. No stale-width assumption. stageTrackerMenuItemHtmlis used for submenu children too, so the "per PR" hint under Decide… gets.ham-menu-item-hinted/.ham-menu-hintas well, andstageTrackerMenuHasHintsrecurses intosubmenu— consistent with the updated assertion instage_tracker_row_actions_test.go:624.- The ▸ submenu affordance keeps
.ham-menu-more; only text hints move to.ham-menu-hint, andTestStaticRowMenuHintWrapspins 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
|
merged by Hive trusted-author auto-merge: author @clubanderson holds role owner and GitHub permission admin on repo; CI green at d84d409. |
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |


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-itemis 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 atmin(22em, …).Fix (
index.htmlonly)stageTrackerMenuHtmlmarks a menu with any hinted item.ham-menu-hinted→max-width: min(45em, calc(100vw - 2 * var(--sp-3)));stageTrackerMenuPositionalready flips left from the measured width near the right edge, so the wider menu stays in the viewport..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.--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.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).