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 Introduces a new user-facing settings option that controls the default access mode for new threads. New features adding configuration capabilities warrant human review even when implementation is straightforward. You can customize Macroscope's approvability policy. Learn more. |
2a7e5af to
4d589e8
Compare
4d589e8 to
4642fd2
Compare
Dismissing prior approval to re-evaluate 4642fd2
|
should be server setting imo |
- 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 Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
4642fd2 to
860f0c6
Compare
… into feature/default-permission-mode # Conflicts: # apps/web/src/components/ChatView.tsx # apps/web/src/components/settings/SettingsPanels.tsx # apps/web/src/hooks/useHandleNewThread.ts # apps/web/src/localApi.test.ts # packages/contracts/src/settings.test.ts
…mission-mode # Conflicts: # apps/web/src/components/ChatView.tsx # apps/web/src/hooks/useHandleNewThread.ts # packages/contracts/src/settings.test.ts
|
Sorry for the late response. I’ve fixed the merge conflicts, and the preference is now stored as a server setting. |
|
@juliusmarminge Honestly, I'm trying to make sense of this:
|
|
I created this pr because I thought it would be a simple change to implement while learning agenting engineering (I read the code of course), I actually wouldn't be that affected by this change since I usually always run as always-approve, models are quite good at avoiding critical errors like eliminating a codebase, i've seen a couple of tweets of it happening but nothing a bit of better prompting or context management wouldn't fix. Also and I think this is the biggest reason as to why he's not merging: they are focused on other things, the new sidebar and mobile support (t3 cloud) and also i'm not a vouched contributor (not that I wanna be) |
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
Low Risk
Client-side default for new draft permission mode only; schema defaults preserve prior behavior when the field is absent.
Overview
Adds a persisted
defaultRuntimeModeserver setting (defaulting to the existingfull-accessconstant when unset) and a Default access control in settings so users can choose Supervised, Auto-accept edits, or Full access for new draft threads.New drafts no longer hardcode
DEFAULT_RUNTIME_MODE:buildNewDraftExecutionDefaultssetsruntimeModefrom the setting and keeps the provider default interaction mode; ChatView, useHandleNewThread, and the active composer fallback readsettings.defaultRuntimeModeinstead of the constant. Restore-to-defaults and the changed-settings list include the new field; server settings persistence tests cover round-tripping.Reviewed by Cursor Bugbot for commit ea95e48. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add configurable default access mode for new threads in server settings and UI
defaultRuntimeModetoServerSettingsandServerSettingsPatchschemas in settings.ts, defaulting toDEFAULT_RUNTIME_MODE.buildNewDraftExecutionDefaultsin chatThreadActions.ts to initialize new draft threads withruntimeModefrom the configured default andinteractionModefrom the provider default.settings.defaultRuntimeModeinstead of the hardcodedDEFAULT_RUNTIME_MODEconstant.Macroscope summarized ea95e48.