Skip to content

feat(app): add per-session permission mode to composer footer - #53739

Closed
opencode-agent[bot] wants to merge 2 commits into
devfrom
composer-permission-dropdown
Closed

opencode-agent[bot] wants to merge 2 commits into
devfrom
composer-permission-dropdown

Conversation

@opencode-agent

@opencode-agent opencode-agent Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a Permissions dropdown to the end of the composer footer so a session can switch between Ask for approval and Auto-accept without changing the app-wide setting.

  • Each session's choice is stored client-side in settings (permissions.sessions), keyed by server scope and root session ID. Sessions without a choice still follow the existing app-wide Auto-accept permissions setting, so the Settings toggle and mod+shift+a command become the default.
  • Subagent requests follow their root session's mode. The footer reads and writes the root's mode when you're viewing a child session.
  • The auto-approver still replies once to asked requests, so config deny rules stay enforced; it now decides per request instead of using one global flag. The permission dock and tab badge use the same per-session check.

Stacked on the composer footer

#49500 (composer workspace footer) was closed without merging, so the first commit ports it onto current v2 and keeps its original author:

  • Since refactor(app): move GUI features into built-in extensions #52369 moved the session move menu into gui-extensions, the footer's menu now lives in the app as session/composer/workspace-menu.tsx, using the shared WorkspaceSubmenu.
  • The new-session selector keeps current v2's own worktree search instead of the old submenu refactor.
  • The menu's eligible gate was dropped because workspaceMoveEligible no longer exists. The menu is now blocked only while the session is running, which matches the extension's menu.

The second commit adds the dropdown.

Validation

  • bun run typecheck in packages/app
  • Unit tests: src/settings, src/session
  • E2E: multi-server.spec.ts (the existing auto-accept keepers plus a new case), composer.spec.ts, mobile-composer-submit-focus.spec.ts, session-location-sync.spec.ts, and session-queue.spec.ts all pass. One session-queue typing case failed once and then passed 3/3 when repeated.
  • The new e2e case checks that a session set to Auto-accept approves its subagent's request but not another session's. It fails if the mode is not resolved through the root session.
  • Checked light, dark, and 420px-wide layouts with screenshots from the mock-server fixture. The screenshots are in the Slack thread.
  • The production session benchmark from packages/app/AGENTS.md was not run.

Requested by: @Brendonovich (Brendan via Slack)

@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Automated PR Cleanup

Thank you for contributing to opencode.

Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions.

This PR was closed because it matched the following cleanup criteria:

  • The PR was created more than 1 month ago
  • The PR had fewer than 2 positive reactions
  • Positive reactions are counted as thumbs-up, heart, celebration, or rocket reactions on the PR

PRs created within the last month are not affected by this cleanup.

If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate.

Thanks again for taking the time to contribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant