Skip to content

fix(composer): Access menu's allowed rules sit on the mode rows' columns, and only their × lights - #27579

Merged
teamleaderleo merged 5 commits into
feat-cmux-nextfrom
leo/access-grants-columns
Oct 29, 2026
Merged

teamleaderleo merged 5 commits into
feat-cmux-nextfrom
leo/access-grants-columns

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Leo (2026-10-28, standing order): "I feel like you guys could be doing more audits of the app. Like there's some amount of, like, satisfying and pretty stuff that can happen that we're not quite taking full advantage of." And today: "you can also just look at things and notice things and see how we want to improve things."

Found in a polish audit of the composer's menus on the Linux gallery.

What was wrong

The composer's Access (permission mode) menu lists the chat's allowed rules under the modes ("Granted access": "Trusted cmux-tui", "Allow git grep in cmux for this session"), each with a remove ×.

  • The section is a <fieldset>, and only its top padding was set, so the browser's own fieldset padding (0.35em 0.75em) stayed. The heading started 6.25px left of the modes' text, each rule 4px left of it, and the × centered 21px inside the modes' number and check column. Three text columns and two trailing columns in one menu.
  • Hovering a rule lit its whole row, around a small × that is the only control on it, and the × drew its own pill inside that wash. The rulebook: "A hover or press highlight covers only the control it belongs to, never the whole row around a small control" (Leo, 2026-10-27: "why are you giving it the entire row when it's only this small little section? Just don't do that. Don't ever do that.").

What changed (composerLocation.css, plus one design-token baseline row)

  • The fieldset's padding is set whole (8px 0 0), not just its top.
  • The heading and each rule start on the mode rows' text column: 24px in (the shield's 16 + 8) when the modes draw their shield, flush when they don't (Claude Code's iconless look), chosen with :has() on the menu.
  • A rule row is a two-column grid like the mode rows; the × (22px hit box) centers on the modes' 16px trailing column, 16px from the menu's edge, where a mode's number or the check sits (design/grid.md: every row type starts its text on text and centers its trailing mark on trail).
  • The row's hover wash is gone; the × keeps its own hover pill.
  • The 24px lead is padding-inline-start, so a right-to-left menu keeps the same columns from its right edge.
  • The rule row's old 2px 8px 2px 10px padding is gone, and its baselined design-token entry goes with it. The row keeps its 28px min-height (the pane is border-box), so its height and centering do not change.

Nothing else moves: the separator, the modes, the menu's width, colours and glass are unchanged. No behavior or default changes.

New test/access-grants-columns.test.ts (Chromium and WebKit; dark, light, and right-to-left): the heading and every rule start on the modes' text column (measured from the inline start), every × centers on the modes' trailing column, and hovering a rule or its × leaves the row unlit. Red on base (the heading is 6.25px off), green here.

Screenshots

Gallery: agent-pane.composer-pickers/access-grants, agent-pane.composer-pickers/permission-menu

Before (base gallery, Linux Chromium, dark): "Granted access" at 218px, its rules at 220px, the modes' text at 224px; the × at 461px against the modes' "2" and check at 482px; hovering a rule washes the whole row. After: all three on 224px, the × on 482px, only the × lights. The gallery advisory run's receipt carries both images, dark and light.

Verification

  • CMUX_BROWSER_TESTS=1 bun test test/access-grants-columns.test.ts test/access-chip-pending-warning.test.tsx at 80bf789: 17 pass, 0 fail, and check:design-tokens passes (fast checks run 40956122298).
  • Red/green: with base's stylesheet the LTR cases fail (heading 6.25px off, run 40953539490). With the physical-left-padding stylesheet (9471dc5) the RTL cases fail (heading 24px off) and LTR passes (run 40955574369).
  • vp fmt --check and the browser-test lane check pass.

Risk: low. Styles for one section of one menu. :has() is already used across the pane's stylesheets and is in the app's WebKit. #27144 (draft, on HOLD) moves this menu to a native popup in the app; the DOM menu stays as its fallback, and this changes none of the lines it touches.

🤖 Generated with Claude Code

Agent session: agent session


Summary by cubic

Fixes the composer's Access permission menu so the allowed rules align with the mode rows' columns and only their remove × lights on hover.

The "Granted access" rules were a fieldset whose default padding sat the heading and rules a few pixels off from the modes' text column, with each × misplaced against the trailing number/check column. Hovering a rule also washed the whole row around its small ×, against the rule that a hover highlight covers only the control it belongs to.

  • The fieldset's padding is now set whole, and the heading and rules start on the mode rows' text column (24px when modes draw a shield, flush when not, via :has()).
  • The lead is inline-start padding, so right-to-left menus keep the same columns from their right edge.
  • Each rule is a two-column grid; its 22px × hit box centers on the modes' 16px trailing column.
  • The row's hover wash is gone; only the × keeps its hover pill.
  • The rule row's block padding drops off the design-token spacing scale.

Adds a browser test (Chromium and WebKit; dark, light, and RTL) covering the alignment and hover behavior, which fails on the base styles.

Written for commit 80bf789. Summary will update on new commits.

View guided diff Turn on auto-fix

teamleaderleo and others added 3 commits October 29, 2026 13:41
…mns, and only their x lights

The permission menu's "Granted access" rules are a fieldset, and the
fieldset's own padding (0.35em 0.75em) put the heading 6px and each rule
4px left of the modes' text, with the remove x 21px inside the modes'
number and check column. The rule row also took a hover wash around its
small x. Clear the fieldset padding, start the heading and rules on the
modes' text column (with or without the shield column), center the x on
the trailing column, and drop the row wash: the x keeps its own pill.

Agent-Session: https://cmux.com/deeplink/agent?id=aid-fb75b7af9902231028aa
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…es are all there

Agent-Session: https://cmux.com/deeplink/agent?id=aid-fb75b7af9902231028aa
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

cmux status (one comment, edited in place; each line is updated by the job that owns it)

Review 80bf789: HQ feed card · gallery before/after runs · checks

App of this head (app.zip, kept 1 day)

gh workflow run reload-build.yml -R manaflow-ai/cmux --ref feat-cmux-next -f tag=pr27579 -f ref=leo/access-grants-columns -f platform=macos -f backend_mode=local

Gallery before/after for 80bf789: 2 states rendered, 4 images differ (picked by the Gallery: line in the PR body). Images are in the run's artifact, not on this public PR.

gh run download 40957998519 -R manaflow-ai/cmux -n gallery-advisory-27579-80bf789e3364ca5142a70f2a9418f71e4fa0fc14 (then read gallery-review.json)

States
State Theme Status Diff Picked by
agent-pane.composer-pickers/access-grants Apple System Colors Light changed 0% pr-body
agent-pane.composer-pickers/access-grants Apple System Colors changed 0% pr-body
agent-pane.composer-pickers/permission-menu Apple System Colors Light changed 4.69% pr-body
agent-pane.composer-pickers/permission-menu Apple System Colors changed 4.29% pr-body

Pick other states with a Gallery: entry.id, entry.id/variant line in the PR body.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Owned by an agent session · session

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Owned by an agent session · session

@github-actions github-actions Bot added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 29, 2026
@blacksmith-sh

blacksmith-sh Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Found 6 test failures on Blacksmith runners:

Failures

Test View Logs
/tmp/tmp9ogi4p_6/summary-missing.json (live):/summary-missing.json (live): View Logs
/tmp/tmpsj_ozfqy/summary-fail.json (live):/summary-fail.json (live): View Logs
[new_workspaces] debug.new_workspace timed 0 of 50 new workspace rows/
[new_workspaces] debug.new_workspace timed 0 of 50 new workspace rows
View Logs
[new_workspaces] the window draws no frames/[new_workspaces] the window draws no frames View Logs
[tabs] debug.tab_switch timed 0 of 40 switches/
[tabs] debug.tab_switch timed 0 of 40 switches
View Logs
[tabs] the window draws no frames/[tabs] the window draws no frames View Logs

Fix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

The rule row's 2px block padding was off the design-token scale. The pane is
border-box and the row has a 28px min-height, so dropping it keeps the row's
height and centering; the old 2px 8px 2px 10px entry leaves the baseline.

Agent-Session: https://cmux.com/deeplink/agent?id=aid-fb75b7af9902231028aa
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…enus keep the columns

The 24px lead was physical left padding. In a right-to-left menu the grid's
columns reverse but that padding stayed on the left, so the heading and rules
missed the modes' text column by 24px and the remove x sat off their trailing
column. padding-inline-start follows the direction; the test now also measures
a right-to-left menu from its inline start.

Agent-Session: https://cmux.com/deeplink/agent?id=aid-fb75b7af9902231028aa
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@teamleaderleo
teamleaderleo merged commit e3d7290 into feat-cmux-next Oct 29, 2026
158 of 166 checks passed
@teamleaderleo
teamleaderleo deleted the leo/access-grants-columns branch October 29, 2026 21:27
@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

teamleaderleo added a commit that referenced this pull request Nov 1, 2026
…Session Info (carry #28580) (#28617)

* cmux NEXT: the mode menu lists only the modes; grants are revoked in Session Info

Leo, 2026-10-29: "What the hell is this? Why the fuck is this? Grant access,
trust this. What is this bottom fucking bullshit? ... It's not fucking good."

The composer's permission-mode menu drew a "Granted access" section under the
modes (a "Trusted <folder>" row and an "Allow for this chat" row, each with an
x), added in #20339. The menu now lists the modes alone. The two grants move
to Session Info's Environment section as rows with Revoke, through the same
callbacks (folder trust undo, chat.permission_chat.revoke). Chats that offer
no modes no longer draw a lock-only Access chip for a grant.

Removes access-grants-columns.test.ts (#27579), which measured only the
section's columns, and the LockIcon left without a caller.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Agent-Session: https://cmux.com/deeplink/agent?id=aid-f2206f5448805d85f14b

* cmux NEXT: Environment gallery shows grants with Revoke; drop stale grant comments

Adds the Environment gallery's granted variant (folder trust and a chat
allowance, each with Revoke), updates three comments that still placed grants
in the mode menu, and removes the now-unused permission.grants string.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-f2206f5448805d85f14b

* cmux NEXT: grants stay revocable from the chat menu; Session Info's Revoke shows on its row's hover

Review of #28617 at 617a991 (P1): with default settings Session Info is off (Debug Settings
`agent.inspector`), and once trust is decided the trust bar is gone, so a trusted folder had no
visible way back. The chat menu (…), in every chat, now ends its tools rows with Revoke Granted
Access when the chat has grants: a submenu naming each one (the folder's trust, a chat-wide
allowance), whose pick revokes it through the same callbacks. Never the composer's mode menu
(Leo, 2026-10-29: "What is this bottom fucking bullshit?").

header/grantsMenu.ts builds the grants once for both places. chat-menu-revoke-access.test.tsx:
with Session Info off and a decided trust grant, the chat menu lists the grant and picking it
revokes (red with no row, green with it).

P2: Session Info's Environment shows a grant's Revoke only while that row is hovered or holds
focus, at once with no fade, as the pull request chips' x does (#28533); it stays in the Tab order.

Gallery: header-tools `menu-revoke-access`; environment-save `granted-hover`. The design-token
baseline shrinks by the access-grants height the first commit removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-63b9964940c20354b639

* test(session info): only the hovered or focused grant row shows its Revoke

Pins inspector.css: a grant's Revoke is transparent at rest and lights only on
its own row's :hover/:focus-within (456cd87), so a list of grants never
repeats a lit Revoke on every row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-63b9964940c20354b639

* style(test): format inspector-grant-revoke-hover.test.ts (vp fmt)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-63b9964940c20354b639

* fix(next): exempt the grant row's plain Revoke from the popup hover-reveal check

Revoke is a plain button that revokes on click and opens no popup, so it needs no
:has([data-popup-open]) twin; check:popup-hover-reveals was red at 2dc4161.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-63b9964940c20354b639

* test(session info): the grants test calls renderSessionInfo after the rename (#29921)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-63b9964940c20354b639

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: cmux-bot[bot] <348531757+cmux-bot[bot]@users.noreply.github.com>

This branch was previously deployed

1 inactive deployment
ci-routing-agent — 80bf789e Deployed Oct 29, 2026 by teamleaderleo via cmux-tui tree preflight #78274
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant