Repository navigation
fix(composer): hide the sandbox control when an external agent is selected - #6704
Conversation
Astro-Han
left a comment
There was a problem hiding this comment.
I reviewed both changed files at 4eee7c0ccd8b853e305e0af9b82db23c3c3310be, the existing external-runtime launch settings, the maintainer's direction in #6702, and all three author-provided composer captures.
No confirmed P0–P2 finding. The composer now derives visibility from the active session backend, or the pending draft backend when there is no session. Only executor: external hides the sandbox selector; native/default and plugin-provided executors retain it. The patch changes presentation, not stored permissions or enforcement. The existing Claude/agy launch arguments and Codex sandbox requests substantiate the premise that these external runtimes do not use this session setting.
The actual extracted display predicate passes 20 controlled session/draft backend combinations plus two live backend switches. This uses controlled getters, not a rendered native interface. More directly, current CI job 128658003523 passes external_agents_ui_consent_native_catalog_cache_and_failure_isolation in 40.150s. I read the added real-Host/fixture-runtime assertions: the selector disappears after choosing the external backend and returns after choosing a native model. Its hosted checkout tree matches this reviewed head. The three captures show the external selector removed while the native/default capture retains Read only; they remain the author's images.
This head merges without conflicts into current rust-preview 74765152. Its CI 42456100713 is still a failure: the macOS desktop's first text-input wait fails with observed: Null (67.649s), also failing on its earlier 6fd base. I did not establish this display change as its cause. I did not run real external providers, a local native interface, or an independent native draft interaction. No schema or wire changes.
Automated review notice: This comment was posted by an automated review agent operated by Astro-Han. It is not an independent human review and does not replace one.
…ected External CLIs run outside the Maka session sandbox, so a conversation's sandbox setting doesn't restrict them. The composer kept showing the setting after an external model was chosen, which implied that it did. Hide the control while the selected backend is the external executor, for an existing conversation and for a new draft. It comes back when a native model is chosen. Generated-by: Claude Code
4eee7c0 to
e7acdb3
Compare
Astro-Han
left a comment
There was a problem hiding this comment.
I reviewed both changed files and the current composer/backend and permission-control paths at e7acdb3b0186f64c30c1fbbb636cd0e06f306d61, including the runtime launch settings and the maintainer's direction in #6702. Comparing the author changes with my earlier 4eee7c0c review shows identical added/removed lines; the surrounding platform API changed during the rebase. No confirmed P0–P2 finding.
The composer hides the control only for the external executor, using the existing session's backend or, when there is no session, the pending draft's backend. Native/default and plugin-provided executors retain it. This removes a misleading sandbox indication; it changes neither stored permissions nor external-runtime enforcement. I reran the predicate extracted from this head against 20 controlled session/draft combinations and two live backend switches. These are controlled getter checks, not a local rendered UI.
More directly, I read the current real-Host terminal UI regression log: external_agents_ui_consent_native_catalog_cache_and_failure_isolation passes in 36.320 seconds. Its new assertions require the composer to be mounted, the sandbox control to disappear after choosing the fixture external model, and the control to return after choosing a native model. I also read the hosted macOS and Windows logs: all 22 selected Desktop tests and both pixel tests pass on each platform (245.421/3.522 seconds on macOS; 320.122/1.280 seconds on Windows). These jobs use synthetic merge 9bd77415603df2386086794ab5cc5f4df1f79dd0; I verified its parents and source tree against my actual merge with rust-preview 09ca38c23ae9d46214c2743e182fe018c6544429.
CI 42614101649, attempt 1, nevertheless failed: rest-3 slice 1 reports 132 passed and one failure, where the 20-second wrapper in numeric_history_preserves_resident_commitments_counts_and_direct_metadata_seek expires. The entire engine subtree and that test's blob are unchanged from 09ca38c2; the same baseline case passes in 0.901 seconds. I have not established this composer change as the timeout's cause, and do not label the red run as a proven PR-caused P2 or as a successful overall check.
I did not run a local native desktop, real external providers, or an independent rendered draft interaction. The earlier author captures were made on an older baseline. No database-schema or wire change.
Automated review notice: This comment was posted by an automated review agent operated by Astro-Han. It is not an independent human review and does not replace one.
Summary
External CLIs (Claude Code, Codex, agy) run outside Maka's session sandbox, so a conversation's sandbox setting doesn't restrict them. The composer kept showing that setting after an external model was selected, so a conversation could read "Read only" while its model ran with full access.
As agreed in #6702, this hides the sandbox control while the selected backend is the external executor. It applies to an existing conversation and to a new draft, and the control comes back when a native model is chosen. The conversation's stored permissions don't change, and nothing new is enforced. Plugin-provided executors keep the control.
Fixes #6702
Verification
Desktop captures on
rust-preview6fd770539, in a read-only conversation, using the fixture Codex CLI:These come from a temporary native desktop test that isn't part of this PR. It skips
Desktop::open's text-input wait, because that wait currently times out onrust-previewwithobserved: Null, the same failure noted on #6700.cargo nextest run --locked -p maka-cli --test integration -E 'test(terminal::external_agents)'passes. The test now checks that the control disappears after the external model is selected and reappears after a native model is selected. Without theComposer.tsxchange, it fails at the new check (external_agents.rs:365).cargo run -p maka-workbench --example ui_types, thentsc -pon the generated config.node scripts/ci.mjs check formatpasses.Not run: the full root suite and the Windows and Linux suites.
AI use
Select exactly one:
Tool(s) and scope: Claude Code reproduced the issue, wrote the change and the test, captured the screenshots and ran the checks above. The commit carries
Generated-by: Claude Code.Checklist
Does this PR entail a change in behavior?