Skip to content

feat(settings): move Permissions for new chats into the Chat page's Behavior section - #28212

Merged
brennanb2025 merged 1 commit into
mainfrom
brennanb2025/chat-permission-setting-in-behavior
Oct 13, 2026
Merged

brennanb2025 merged 1 commit into
mainfrom
brennanb2025/chat-permission-setting-in-behavior

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​18 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​17
Prod 3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​12 $\color{#cf222e}{\Huge{\mathbf{−}}}$​10 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​2

ELI5

The Chat settings page has a "Permissions for new chats" picker. It sets whether new Claude and Codex chats ask before running commands or just run them. Today it sits alone at the very top of the page with its own heading, above Appearance. It's a choice about how chats behave, so this PR moves it into the Behavior section as that section's first row.

What Changed

Before: Settings → Chat opened with a standalone "Permissions for new chats" heading and picker, then Appearance, then Behavior.

After: Settings → Chat shows Appearance, then Behavior. Behavior's first row is "Permissions for new chats", with the same description and picker, laid out like the other Behavior rows. That's a label and description on the left and the control on the right.

Mechanism:

  • ChatPermissionSetting now renders a SettingsRow, the row layout the Behavior card already uses, instead of a section heading.
  • ChatBehaviorSetting renders that row first inside its card. It counts the row toward its search matching, so searching "permissions" still shows the Behavior section.
  • ChatSettingsSection no longer renders it at the top.

The setting itself, its search entry and its chat-permissions section id are unchanged. So search, deep links and the value are unaffected.

Why

The control describes how chats behave, and the Behavior card is where the other chat behaviour switches live (resume after restart, queue follow-ups, shell environment). This reuses that card's existing row instead of keeping a one-off heading.

Linked Issue

Follow-up to #26116 and #28100 (STA-10345).

Visual Proof

Captured from hidden Electron dev builds on separate throwaway profiles at the same 1728 × 1200 renderer viewport.

Before (f0ccfcc0d32, merge base with main): the permission picker sits above Appearance, outside Behavior.

Before: Permissions for new chats above Appearance

After (f6ab055cf99): the picker is the first row in Behavior, with the description on the left and the control on the right.

After: Permissions for new chats as the first Behavior row

Search: searching settings for “permissions” finds the row inside Behavior.

Searching permissions finds the row inside Behavior

Manually checked the rendered screenshots and opened the permission menu through the settings row. No clipping or overlap in the changed row. This capture covers macOS dark mode; other platforms, light mode, and agent execution were not exercised.

Testing

  • ChatBehaviorSetting.test.tsx: the permission picker is the first Behavior row, and the row is left out when the host has no value. The tests now render inside the app's TooltipProvider, because the picker uses a tooltip.

  • ChatPermissionSetting, ChatSettingsSection (including navigation and inline visuals) tests pass: 53 tests in total.

  • tc:web and orca-ci-checks --no-typecheck pass, apart from the known local bun tooling error in its typecheck step.

  • I manually tested these changes locally

  • Automated tests added/updated, or explained why not below

Notes

Renderer-only layout change. No settings, wire or platform impact. Paired web clients render the same component.

…ehavior section

The new-chat permission default sat alone above Appearance with its own header.
It is a behaviour choice, so it now renders as the first row of the Behavior
card, laid out like the rows already there. Its search entry and section id are
unchanged, so search and deep links still land on it.
@brennanb2025
brennanb2025 marked this pull request as ready for review October 13, 2026 07:00
@coderabbitai

coderabbitai Bot commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 165ae08c-9b01-476e-8f97-2db2ec9442e5
📥 Commits

Reviewing files that changed from the base of the PR and between d31f37c and f6ab055.

📒 Files selected for processing (4)
  • src/renderer/src/components/settings/ChatBehaviorSetting.test.tsx
  • src/renderer/src/components/settings/ChatBehaviorSetting.tsx
  • src/renderer/src/components/settings/ChatPermissionSetting.tsx
  • src/renderer/src/components/settings/ChatSettingsSection.tsx
💤 Files with no reviewable changes (1)
  • src/renderer/src/components/settings/ChatSettingsSection.tsx

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

📝 Walkthrough

ChatBehaviorSetting now includes the chat permission search entry and renders ChatPermissionSetting when nativeChatPermissionMode is defined. ChatPermissionSetting displays its picker in a SettingsRow. ChatSettingsSection no longer renders the permission setting. Tests wrap the component in TooltipProvider and check that the row appears first for full-access mode and is absent when the setting is undefined.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to f6ab0

The permission control remains searchable and appears first under Behavior when available, without a duplicate in its former location. No material merge risk is evident; confirm the reported tests through the usual validation process.

Pre-merge checks · Passed 4 · Failed 1

Failed Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 3 files. 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: moving permissions for new chats into the Chat page's Behavior section.
Description check Passed The description is mostly complete. It explains the user-facing change, implementation, rationale, linked issues, visual proof, testing, and known testing limits. It omits the AI Disclosure, Review, A…
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.
  • Fix all pre-merge checks with AI
✨ 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.

@brennanb2025
brennanb2025 merged commit f844518 into main Oct 13, 2026
41 of 52 checks passed
@brennanb2025
brennanb2025 deleted the brennanb2025/chat-permission-setting-in-behavior branch October 14, 2026 05:54
registered2nd pushed a commit to registered2nd/orca that referenced this pull request Oct 14, 2026
…ehavior section (stablyai#28212)

The new-chat permission default sat alone above Appearance with its own header.
It is a behaviour choice, so it now renders as the first row of the Behavior
card, laid out like the rows already there. Its search entry and section id are
unchanged, so search and deep links still land on it.

(cherry picked from commit f844518)
brennanb2025 added a commit that referenced this pull request Oct 15, 2026
…ehavior section (#28212)

The new-chat permission default sat alone above Appearance with its own header.
It is a behaviour choice, so it now renders as the first row of the Behavior
card, laid out like the rows already there. Its search entry and section id are
unchanged, so search and deep links still land on it.

(cherry picked from commit f844518)
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