Skip to content

Picking the all-agents permission keeps agents set separately - #33018

Merged
brennanb2025 merged 32 commits into
mainfrom
brennanb2025/agent-permission-reset-toast
Oct 26, 2026
Merged

brennanb2025 merged 32 commits into
mainfrom
brennanb2025/agent-permission-reset-toast

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 8 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​275 $\color{#cf222e}{\Huge{\mathbf{−}}}$​23 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​252
Prod 9 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​330 $\color{#cf222e}{\Huge{\mathbf{−}}}$​76 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​254

The problem

Picking a permission for all agents erased choices you had set separately for individual agents. Changing the default could therefore change more agents than you expected.

What changes for you

  • Picking the all-agents permission keeps each agent's separate setting.
  • One toast says “{n} agent(s) still use their own permission setting:”, lists up to three agents with their choices, and shows “and {k} more” when needed.
  • “Use {Mode}” makes those listed agents follow the all-agents setting. It includes the agents beyond the three visible rows.
  • Each successful pick replaces or dismisses the previous toast. An old toast's button cannot apply an earlier list.

How it works

The toast is built from the settings returned by the computer saving them. Before changing each listed agent, the button checks that computer's current choice again. It uses the existing per-agent save and preserves other agents' choices. Concurrent edits to the same agent keep the existing save order; this is not an all-or-nothing group action.

Auto also keeps choices already set separately. For an agent without Auto that was following the all-agents setting, Orca saves the mode it was using. Those saved choices outlive Auto: leaving Auto does not remove them, and a later pick can offer “Use {Mode}” for them.

Older apps and servers

An older paired server may still reset a separate choice. The toast then says “{Agent} now follows {Mode}” alongside any agents that still use a different setting. Only those remaining agents get the “Use {Mode}” action.

Older apps v1.4.238–240 still show their old reset wording against a newer server, even though the server keeps the separate choices. This stale copy is an accepted limitation.

Differences from the common pattern

Intended: the toast lists only separate choices that differ from the all-agents choice. An agent set separately to the same mode keeps its marker in Settings but does not appear in the toast. Auto's saved choices also remain until you change them or make them follow all agents.

Not in this PR

#32334 has landed: Settings → Chat links to Settings → Agents, new chats follow each agent's permission, and an agent using its own setting supplies no mode. Its in-chat menu offers concrete modes. This PR keeps that behavior and makes an older app's Chat permission write keep choices set separately too.

There is no Undo action. Deleting the permission pill does not show this toast.

Testing

  • All 197 tests in 14 explicitly named suites passed in one tc-gate run on the final merge. The migration keep table includes an older app’s Chat permission write through the real save mapping, and the durable boundary preserves the separate setting.
  • Full review and the reference comparison are complete on d0bcef2f278a. The latest commit, 93b6183da851, automatically merges exact main 5a4dd3004885, including fix(ci): repair main's line limits and a stale test import #33675’s repair. It needed no manual resolution and preserves the reviewed behavior.
  • CI passes on 93b6183da851: 24 successful checks and 19 applicable skips, including static analysis/typechecking, selected Node 24 tests, both packaging jobs and the required aggregate. The single watcher exited 0; no failed job was retried.
  • One branch screenshot run checked the row layout, a pick with two agents set separately, and the real “Use Ask for approval” action switching both agents to follow all agents. No agents were launched.
  • Screenshots were taken on c9ba44fbe755. Later Settings save changes have deterministic regression coverage; the main merges preserve those captured flows. No new QA was needed for this merge.
  • The toast screenshot below shows the earlier wording; only the heading text changed since (“…their own permission setting:”), so no new screenshot was taken.

Permissions row

Two agents still use their own setting

Both agents follow Ask for approval after Use

@brennanb2025
brennanb2025 marked this pull request as ready for review October 24, 2026 05:48
@brennanb2025

brennanb2025 commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor Author

Picking the all-agents permission used to erase choices set separately. It now keeps them and shows one toast with their modes and “Use {Mode}” to make the eligible listed agents follow the default. Each successful pick replaces or dismisses the previous toast. Older-server replies can show “{Agent} now follows {Mode}” alongside choices still kept.

Full review, the first-hand reference comparison and bounded acceptance of the landed chat behavior and old-client keep contract are complete on d0bcef2f278a3b76cd2092bb9dd155f789230694. The final head 93b6183da85180239bcd7e619fdddca5d2f260e1 automatically merges exact main 5a4dd3004885a64e53b4fcda580517be6d324323, including #33675’s repair of both inherited line-limit errors. There was no manual resolution or feature edit, so no additional reviewer acceptance was required. The merged behavior keeps Own delegation, the concrete chat menu, scoped per-agent saves and the reviewed toast lifecycle.

Intended: the toast lists only separate choices differing from the default; equal choices keep their Settings marker. Choices saved for agents without Auto outlive Auto. Concurrent edits to the same agent retain ordinary per-agent save order. #32334 has landed: Settings → Chat links to Agents, Own supplies no explicit chat mode, and old Chat dropdown writes now keep separate choices through the shared save mapping. Older v1.4.238–240 apps retain their stale reset wording against newer servers; that limitation was ruled explicitly.

Verification:

  • 197/197 tests in 14 named suites, one tc-gate invocation on the final merge. This includes the real migration/Auto table and old-client write contract, local/Host toast and lifecycle cases, mixed vanished/retained replies, durable save/rollback and chat permission consumers. Earlier delayed-reply regressions reproduced before the fix and passed afterward.
  • The exact required node_modules/.bin/lint-staged --diff=MERGE_HEAD --concurrent false passed before the authorized merge commit. The tree is clean and pushed once.
  • CI passes on 93b6183da851: 24 successful checks and 19 applicable skips, including static analysis/typechecking, selected Node 24 tests, both packaging jobs and the required aggregate. The single watcher exited 0; no failed job was retried.
  • Feature budget and automatic PR table: production +330/-76 = 254 net; tests +275/-23 = 252 net. Both fixtures use the existing __fixtures__ convention.

The one Settings screenshot/action run passed on c9ba44fbe755b7da25733b1db9292763a3d68cdb: row layout, a pick retaining Claude/Codex choices, and the real Use button making both follow Ask. No agents were launched. Subsequent Settings save/lifecycle changes were reviewed as tests-row flows with named regression coverage and unchanged appearance. The authorized main merges d0bcef2f and 93b6183d preserve those captured flows; their integration is covered by the tests above. The original screenshots carry with qa_head; no new QA was needed. The original ticket was released and recorded QA processes/listeners stopped, with config hashes unchanged.

For Brennan’s review:

Permissions row

Two retained settings and Use action

Both agents following Ask after the action

Code: global keep/Auto rule, local owner action, retained and vanished notice sets.

@brennanb2025 brennanb2025 changed the title Show previous choices and Undo when Permissions resets agents Picking the all-agents permission keeps agents set separately Oct 25, 2026
@brennanb2025
brennanb2025 changed the base branch from brennanb2025/agent-permission-pill-inline to main October 25, 2026 21:32
@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b84dee65-e324-47c8-9c6d-6cf79d7c3900
Commits

Reviewing files that changed from the base of the PR and between d0bcef2 and 25ee9f7.

Files selected for processing: 5
  • src/renderer/src/components/settings/HostAgentLaunchSettings.test.tsx
  • src/renderer/src/components/settings/agent-permission-conversion-persistence.test.tsx
  • src/renderer/src/components/settings/agent-permission-override-notice.tsx
  • src/renderer/src/i18n/en-runtime-required.json
  • src/renderer/src/i18n/locales/en.json
Files skipped from review as they are similar to previous changes: 2
  • src/renderer/src/i18n/en-runtime-required.json
  • src/renderer/src/i18n/locales/en.json

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.

Walkthrough

Global permission changes now preserve existing agent overrides. Settings writes are serialized and can return acknowledged settings to their callers. Permission changes can display a notice about retained or removed overrides, with an action to reset still-matching overrides to the selected default. English messages and tests are updated for the notice, follow behavior, and persistence scenarios.

Priority: Normal

Merge Risk: Minimal · up to 25ee9

No outstanding issue identified here prevents merging after normal checks.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 4.35% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 23 functions across 25 files. (2 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: all-agents permission updates preserve separate agent settings.
Description check Passed The description clearly explains the problem, user-visible behavior, implementation, compatibility considerations, testing, and visual proof. It is mostly complete and directly aligned with the pull r…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description clearly explains the problem, user-visible behavior, implementation, compatibility considerations, testing, and visual proof. It is mostly complete and directly aligned with the pull request objectives, although it does not reproduce every template heading or include an explicit Fixes issue link and checklist.

Full details: Docstring Coverage

Explanation

Docstring coverage is 4.35% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 23 functions across 25 files. (2 skipped: 2 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1acbdadd-d923-45fa-8011-d2f78c2a082f
Commits

Reviewing files that changed from the base of the PR and between 27e7f8f and cd46506.

Files selected for processing: 22
  • src/renderer/src/components/native-chat/NativeChatPermissionModePicker.test.tsx
  • src/renderer/src/components/native-chat/NativeChatPermissionModePicker.tsx
  • src/renderer/src/components/settings/AgentCatalogRow.tsx
  • src/renderer/src/components/settings/AgentLaunchDefaultsEditor.tsx
  • src/renderer/src/components/settings/AgentLaunchSettingsCatalog.tsx
  • src/renderer/src/components/settings/AgentLaunchSettingsSection.test.tsx
  • src/renderer/src/components/settings/AgentLaunchSettingsSection.tsx
  • src/renderer/src/components/settings/AgentPermissionChoiceControls.tsx
  • src/renderer/src/components/settings/AgentsPane.test.tsx
  • src/renderer/src/components/settings/HostAgentLaunchSettings.test.tsx
  • src/renderer/src/components/settings/HostAgentLaunchSettings.tsx
  • src/renderer/src/components/settings/agent-permission-conversion-persistence.test.tsx
  • src/renderer/src/components/settings/agent-permission-override-notice.tsx
  • src/renderer/src/components/settings/permission-notice-test-fixture.tsx
  • src/renderer/src/components/settings/settings-persistence-test-fixture.ts
  • src/renderer/src/components/ui/textarea.tsx
  • src/renderer/src/i18n/en-runtime-required.json
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/store/slices/settings.ts
  • src/renderer/src/store/slices/worktree-visibility-settings-write.ts
  • src/shared/tui-agent-permission-choice.test.ts
  • src/shared/tui-agent-permission-choice.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.

@brennanb2025
brennanb2025 merged commit 2b62af7 into main Oct 26, 2026
42 checks passed
@brennanb2025
brennanb2025 deleted the brennanb2025/agent-permission-reset-toast branch October 26, 2026 01:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant