Add configurable default access mode for new threads#3086
Conversation
- Persist client-side default runtime mode in settings - Use it when creating draft threads and new local threads - Surface the setting in the UI and cover it with tests
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
ApprovabilityVerdict: Needs human review This PR introduces a new user-facing feature allowing configuration of the default access/permission mode for new threads. While well-implemented with tests, new features that add user-configurable behavior affecting runtime permissions warrant human review. You can customize Macroscope's approvability policy. Learn more. |
What Changed
Added a persisted
defaultRuntimeModeclient setting and exposed it inapps/websettings UI asDefault access. New draft threads now initialize with that setting instead of always starting infull-access.Also updated the relevant settings and persistence tests to cover the new field.
Why
This makes the app remember the user’s preferred permission mode for new threads, so they do not have to reselect it every time. The change is scoped to client-side defaults and preserves existing behavior for saved data by falling back to the current
full-accessdefault when the new setting is absent.UI Changes
Progetto.senza.titolo.mp4
Checklist
Closes #2662
Note
Medium Risk
Changes the default permission mode for newly created threads, which affects how much autonomy agents get on first send; mitigated by unchanged schema default and no retroactive changes to existing threads.
Overview
Adds a persisted
defaultRuntimeModeclient setting and a Default access control in settings (Supervised, Auto-accept edits, Full access).New draft threads and composer fallbacks now use that preference instead of always
full-access. Existing saved settings without the field still decode to the sameDEFAULT_RUNTIME_MODE(full-access), so behavior for users who never change the setting stays the same.Wiring updates
ChatView,useHandleNewThread, and related persistence tests;DEFAULT_RUNTIME_MODEis no longer imported directly in those paths for new-thread defaults.Reviewed by Cursor Bugbot for commit f25091f. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add configurable default access mode for new threads in General Settings
defaultRuntimeModefield toClientSettingsandClientSettingsPatchin settings.ts, defaulting toDEFAULT_RUNTIME_MODE.settings.defaultRuntimeModeinstead of the hard-codedDEFAULT_RUNTIME_MODE.defaultRuntimeModeis unset continue to useDEFAULT_RUNTIME_MODEvia the decode fallback, so existing threads are unaffected.Macroscope summarized f25091f.