Skip to content

Add configurable default access mode for new threads - #3086

Open
JustMarkDev wants to merge 7 commits into
pingdotgg:mainfrom
JustMarkDev:feature/default-permission-mode
Open

Add configurable default access mode for new threads#3086
JustMarkDev wants to merge 7 commits into
pingdotgg:mainfrom
JustMarkDev:feature/default-permission-mode

Conversation

@JustMarkDev

@JustMarkDev JustMarkDev commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

What Changed

Added a persisted defaultRuntimeMode client setting and exposed it in apps/web settings UI as Default access. New draft threads now initialize with that setting instead of always starting in full-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-access default when the new setting is absent.

UI Changes

Progetto.senza.titolo.mp4

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

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 defaultRuntimeMode server setting (defaulting to the existing full-access constant 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: buildNewDraftExecutionDefaults sets runtimeMode from the setting and keeps the provider default interaction mode; ChatView, useHandleNewThread, and the active composer fallback read settings.defaultRuntimeMode instead 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

  • Adds defaultRuntimeMode to ServerSettings and ServerSettingsPatch schemas in settings.ts, defaulting to DEFAULT_RUNTIME_MODE.
  • Introduces buildNewDraftExecutionDefaults in chatThreadActions.ts to initialize new draft threads with runtimeMode from the configured default and interactionMode from the provider default.
  • Updates ChatView.tsx and useHandleNewThread.ts to use settings.defaultRuntimeMode instead of the hardcoded DEFAULT_RUNTIME_MODE constant.
  • Adds a 'Default access' select control in SettingsPanels.tsx so users can view, change, and reset the default runtime mode; restore-to-defaults also resets this field.

Macroscope summarized ea95e48.

- 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
@coderabbitai

coderabbitai Bot commented Jun 14, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: ec51989d-445f-46ca-a83b-27056716c368

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Jun 14, 2026
@macroscopeapp

macroscopeapp Bot commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: 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.

@juliusmarminge
juliusmarminge force-pushed the feature/default-permission-mode branch from 2a7e5af to 4d589e8 Compare June 19, 2026 06:38
@github-actions github-actions Bot added size:L 100-499 changed lines (additions + deletions). and removed size:M 30-99 changed lines (additions + deletions). labels Jun 19, 2026
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Jun 19, 2026
@juliusmarminge
juliusmarminge force-pushed the feature/default-permission-mode branch from 4d589e8 to 4642fd2 Compare June 19, 2026 18:45
@macroscopeapp
macroscopeapp Bot dismissed their stale review June 19, 2026 18:45

Dismissing prior approval to re-evaluate 4642fd2

@juliusmarminge

Copy link
Copy Markdown
Member

should be server setting imo

Comment thread apps/web/src/components/ChatView.tsx Outdated
Comment thread apps/web/src/hooks/useSettings.ts Outdated
JustMarkDev and others added 2 commits June 19, 2026 11:56
- 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>
@juliusmarminge
juliusmarminge force-pushed the feature/default-permission-mode branch from 4642fd2 to 860f0c6 Compare June 19, 2026 18:58
Comment thread apps/web/src/lib/newThreadSettings.ts Outdated
Comment thread apps/web/src/components/ChatView.tsx
… 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
@JustMarkDev

Copy link
Copy Markdown
Contributor Author

Sorry for the late response. I’ve fixed the merge conflicts, and the preference is now stored as a server setting.

@benglewis

benglewis commented Jul 27, 2026

Copy link
Copy Markdown

@juliusmarminge Honestly, I'm trying to make sense of this:

  1. Why do you trust LLMs with full access to your machines? What if the agent just casually deletes your entire disk? Or it casually sends your credentials to various websites out to the world for others to use. Prompt injection in LLMs still exists and is not entirely preventable at this stage AFAIK, so this is like using software from some random supplier who you are not sure has protection against SQL injection and then giving them all of your computer user and all of its current permissions. What makes you feel safe / comfortable doing that?
  2. Given this is the default behaviour, do you really have a good reason not to merge this PR allowing others to change their default setting when using T3 Code? This is the number 1 reason that I cannot realistically use T3 Code right now

@JustMarkDev

Copy link
Copy Markdown
Contributor Author

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)

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

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: store preference setting for permission mode

3 participants