Repository navigation
the permission-mode menu lists only the modes; grants are revoked in Session Info (carry #28580) #28617
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
the permission-mode menu lists only the modes; grants are revoked in Session Info (carry #28580) #28617
Changes from 3 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
234f147
cmux NEXT: the mode menu lists only the modes; grants are revoked in …
teamleaderleo 617a991
cmux NEXT: Environment gallery shows grants with Revoke; drop stale g…
teamleaderleo 456cd87
cmux NEXT: grants stay revocable from the chat menu; Session Info's R…
teamleaderleo c1fdf2e
Merge remote-tracking branch 'origin/feat-cmux-next' into lane/ux-car…
teamleaderleo 9fab10f
Merge origin/feat-cmux-next into lane/ux-carry-28580
teamleaderleo e89ba08
test(session info): only the hovered or focused grant row shows its R…
teamleaderleo 5aa5e55
style(test): format inspector-grant-revoke-hover.test.ts (vp fmt)
teamleaderleo 280becc
Merge branch 'feat-cmux-next' into lane/ux-carry-28580
cmux-bot[bot] 2dc4161
Merge branch 'feat-cmux-next' into lane/ux-carry-28580
cmux-bot[bot] c10205d
fix(next): exempt the grant row's plain Revoke from the popup hover-r…
teamleaderleo 9479bcd
Merge remote-tracking branch 'origin/feat-cmux-next' into lane/ux-car…
teamleaderleo b120bb2
Merge origin/feat-cmux-next into lane/ux-carry-28580
teamleaderleo f8e0741
test(session info): the grants test calls renderSessionInfo after the…
teamleaderleo 4ee378d
Merge remote-tracking branch 'origin/feat-cmux-next' into HEAD
teamleaderleo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,7 +3,7 @@ import { useEffect, useMemo, useState } from "react"; | |
| import { componentEntry } from "../../gallery/format"; | ||
| import type { Play } from "../../gallery/play"; | ||
| import type { AcpmuxSnapshot } from "./model"; | ||
| import { ComposerPickers, type ComposerPermissionGrant } from "./ComposerPickers"; | ||
| import { ComposerPickers } from "./ComposerPickers"; | ||
| import { BUNDLED_MODEL_CATALOG, buildPickerCatalog } from "./modelCatalogData"; | ||
| import { ChatAccountsContext, readChatAccounts, type ChatAccounts } from "./chatAccounts"; | ||
| import { rememberFullAccess } from "./startMode"; | ||
|
|
@@ -198,10 +198,6 @@ function GalleryComposerPickers({ claude, accounts, managed }: Props) { | |
| const [mode, setMode] = useState(initialSnapshot.summary!.modes!.currentModeId!); | ||
| const [effort, setEffort] = useState("medium"); | ||
| const [fast, setFast] = useState("off"); | ||
| const [grants, setGrants] = useState<ComposerPermissionGrant[]>([ | ||
| { id: "folder", label: "Trusted cmux-tui", onRemove: () => setGrants((current) => current.slice(1)) }, | ||
| { id: "git-grep", label: "Allow git grep in cmux for this session", onRemove: () => setGrants([]) }, | ||
| ]); | ||
| const snapshot = useMemo<AcpmuxSnapshot>( | ||
| () => ({ | ||
| ...initialSnapshot, | ||
|
|
@@ -243,7 +239,6 @@ function GalleryComposerPickers({ claude, accounts, managed }: Props) { | |
| <ComposerPickers | ||
| snapshot={snapshot} | ||
| {...(pickerCatalog ? { pickerCatalog } : {})} | ||
| permissionAccess={{ grants }} | ||
| onModel={setModel} | ||
| onMode={setMode} | ||
| onEffort={(id, value) => (id === "fast-mode" ? setFast(value) : setEffort(value))} | ||
|
|
@@ -415,20 +410,13 @@ const managedMode: Play = async (ctx) => { | |
| throw new Error("Full access must say it is managed by the organization"); | ||
| }; | ||
|
|
||
| const accessGrants: Play = async (ctx) => { | ||
| const trigger = ctx.find({ role: "button", name: "Mode" }); | ||
| if (trigger.textContent?.includes("Trusted")) throw new Error("Trust state leaked into the Access trigger"); | ||
| // The allowed rules live in the menu only; the trigger shows no count beside the mode. | ||
| if (trigger.querySelector(".acpmux-access-grant-count") || /\d/.test(trigger.textContent ?? "")) | ||
| throw new Error("Access trigger shows an allowed-rule count"); | ||
| // The mode menu lists the modes alone (Leo, 2026-10-29): granted access is revoked from the chat | ||
| // menu's Revoke Granted Access (header/grantsMenu.ts), never from this menu. | ||
| const modesOnly: Play = async (ctx) => { | ||
| await ctx.click({ role: "button", name: "Mode" }); | ||
| await ctx.waitFor(() => ctx.document.querySelector(".acpmux-access-grants") !== null); | ||
| const grants = [...ctx.document.querySelectorAll<HTMLElement>(".acpmux-access-grant")]; | ||
| if (grants.length !== 2) throw new Error(`Expected two allowed rules, found ${grants.length}`); | ||
| if (!grants.every((row) => row.querySelector(".acpmux-access-grant-remove"))) | ||
| throw new Error("Allowed rules must each have a remove button"); | ||
| await ctx.click({ selector: ".acpmux-access-grant-remove" }); | ||
| await ctx.waitFor(() => ctx.document.querySelectorAll(".acpmux-access-grant").length === 1); | ||
| await ctx.waitFor(() => ctx.document.querySelector('[role="menuitemradio"]') !== null); | ||
| if (ctx.document.querySelector(".acpmux-access-grants, .acpmux-access-grant")) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P3: Prompt for AI agents |
||
| throw new Error("The mode menu shows granted access"); | ||
| await ctx.press("Escape"); | ||
| }; | ||
|
|
||
|
|
@@ -542,10 +530,10 @@ export default componentEntry<Props>({ | |
| props: { managed: true }, | ||
| play: managedMode, | ||
| }, | ||
| "access-grants": { | ||
| note: "Allowed folder and chat rules stay inside Access; the footer shows only a compact count and the menu offers removal.", | ||
| "modes-only": { | ||
| note: "The mode menu lists the modes alone: no Granted access section (Leo, 2026-10-29); grants are revoked from the chat menu's Revoke Granted Access.", | ||
| props: {}, | ||
| play: accessGrants, | ||
| play: modesOnly, | ||
| }, | ||
| "permission-focus": { | ||
| note: "The numeric mode shortcut picks Full access; Escape from a reopen returns focus to Mode.", | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: Read-only subagent panes still receive
accessGrantsin Session Info and the chat menu. Guard both surfaces withreadOnlySubagentso a subagent cannot display or revoke the parent chat's grants.Prompt for AI agents