Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat: configure permissions for new side chats #29300

Closedfadilhim(GitHub profile, opens in a new tab)wants to merge 4 commits intomain fromrefs/pull/29300/headopened View on GitHub

/side chats force Supervised mode, including their first turn, with no configurable default. This adds a side-chat permission default under Settings → Threads → Permissions, alongside the existing new-thread default.

Supervised remains the default. Environment and project overrides apply when a side chat is created and from its first turn. Existing side chats keep their stored modes, and managed-policy limits still apply. Web/desktop and mobile settings use the same server setting.

Configuration scope

Submitted under the focused configuration exception: side chats and composer permission modes already exist; this controls the initial mode without changing the shipped default or adding a workflow. It also removes the mandatory first-turn Supervised restriction, which needs review as part of this option. No prior maintainer approval is claimed.

Verification

  • Before the fix, four existing first-turn cases failed when expecting Full access: the provider received approval-required instead.
  • Added dispatch coverage for the built-in default, environment override, and project overrides; extended managed-policy coverage for side-chat defaults and ceilings.
  • pnpm exec vp run check:changed passed: formatting, lint, dependency checks, affected-package typechecks, 213 tests, and the React Compiler checks.
  • Browser-tested Settings → Threads in an isolated development server. Confirmed the default is Supervised, selected Full access, reloaded, and confirmed it persisted independently of the new-thread setting.
  • Native mobile runtime verification and a live-provider end-to-end turn were not performed. Provider-start behavior is covered by focused tests.

Before / after

Screenshots from the actual app, comparing base 47f2c8d2 with this branch. Assets are hosted on the fork, not committed to the source tree.

BeforeAfter selecting Full access
BeforeAfter

After with the unchanged Supervised default.

Created with GPT-6.1 Sol in Pi.

    1. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched

    2. Approvability

      Verdict: Approved at a99578e

      Macroscope's review found this PR approvable — Adds configurable permissions for new side chats, including their first turn, while retaining Supervised as the shipped default. Broader permissions require explicit selection and remain subject to managed-policy limits.

      You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    3. coderabbitai[bot](GitHub profile, opens in a new tab)commented
      Review in Change Stack →

      No actionable comments were generated in the recent review.

      Walkthrough

      The change adds a configurable side-chat runtime mode at server and project scope. Settings screens expose separate permission defaults for new threads and side chats. Side-chat creation and first-turn handling use the configured mode.

      Changes: Side-chat permissions

      Layer / File(s)Summary
      Setting contract and policy limits
      packages/contracts/src/settings.ts, apps/server/src/policy/managedSettings.ts, apps/server/src/policy/ManagedPolicy.test.ts, apps/server/src/serverSettings.test.ts
      The settings schema adds project-scoped sideChatRuntimeMode, defaulting to approval-required. Managed-policy validation and runtime-mode clamping now cover both runtime-mode defaults.
      Permission settings screens
      apps/web/src/components/settings/ThreadPermissionsSettings.tsx, apps/web/src/components/settings/ProjectDefaultsSettings.tsx, apps/web/src/components/settings/SettingsPanels.tsx, apps/web/src/components/settings/settingsSearch.ts, apps/mobile/src/features/settings/SettingsServerControlsRouteScreen.tsx, docs/user/*
      Web and mobile settings show separate permission controls for new threads and side chats. Search entries and documentation describe the settings and side-chat behavior.
      Side-chat runtime mode
      apps/server/src/orchestration-v2/ThreadForkService.ts, apps/server/src/orchestration-v2/Orchestrator.ts, apps/server/src/orchestration-v2/ProviderTurnStartService.ts, apps/web/src/components/chat/useSideChat.ts, apps/server/src/orchestration-v2/ThreadFork.execution.test.ts, apps/server/src/orchestration-v2/ProviderTurnStartService.test.ts, apps/server/src/orchestration-v2/testkit/ProviderReplayHarness.ts
      Side-chat creation passes the resolved mode to the fork planner. The first turn uses the mode from the side-chat thread shell, and runtime policy resolution uses the thread unchanged. Tests cover defaults, project overrides, and first-turn behavior.

      Estimated code review effort: 3 (Moderate) | ~25 minutes

      Change: Feature

      Sequence Diagram(s)

      sequenceDiagram
        participant Settings
        participant Orchestrator
        participant ThreadForkService
        participant SideChat
        participant ProviderTurnStartService
        Settings->>Orchestrator: Provide resolved sideChatRuntimeMode
        Orchestrator->>ThreadForkService: Pass sideChatRuntimeMode
        ThreadForkService->>SideChat: Create side chat with runtime mode
        SideChat->>ProviderTurnStartService: Start first turn with thread runtime mode

      Possibly related issues

      • pingdotgg/t3code#28110: The changes pass the selected side-chat runtime mode through creation and first-turn handling.
      • pingdotgg/t3code#29010: The changes remove the first-turn approval-required override and add configurable side-chat defaults.

      Suggested reviewers: t3dotgg, juliusmarminge

      Merge Risk: Minimal · up to 4e164

      The configurable side-chat permission defaults are wired through persistence, project overrides, policy limits, and first-turn execution without an identified merge-blocking risk.

      Pre-merge checks: Passed 4
      Check nameStatusExplanation
      Title checkPassedThe title "feat: configure permissions for new side chats" matches the main change. The PR adds a side-chat permission default (sideChatRuntimeMode) in server settings, project overrides, the Threads …
      Description checkPassedThe description covers the problem (side chats force Supervised mode with no configurable default), the change (a side-chat permission default under Settings → Threads → Permissions), scope (cites the…
      Linked Issues checkPassedCheck skipped because no linked issues were found for this pull request.
      Out of Scope Changes checkPassedCheck skipped because no linked issues were found for this pull request.
      Full details: Title check

      Explanation

      The title "feat: configure permissions for new side chats" matches the main change. The PR adds a side-chat permission default (sideChatRuntimeMode) in server settings, project overrides, the Threads settings panel, and the fork and provider-start logic. It uses a conventional commit prefix and a plain-language description.

      Full details: Description check

      Explanation

      The description covers the problem (side chats force Supervised mode with no configurable default), the change (a side-chat permission default under Settings → Threads → Permissions), scope (cites the focused configuration exception and states that no prior approval is claimed), and verification (focused tests, check:changed run, browser testing, and before/after screenshots). It does not have a separate titled Problem or Change section as the template does, and it does not name a linked triaged issue or maintainer approval. These are gaps against the template, but the description is mostly complete.

      Finishing Touches
      Generate unit tests (beta)
      • Create a new PR
      • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

      Warning

      Some tools did not complete. Review the errors below.

      ast-grep (0.51.1)

      ast-grep could not parse rule config: /ast-grep-rules/ast-grep-essentials/rules/swift/security/chacha20-hardcoded-secret-swift.yml

      Tip

      🎯 Customize your risk assessments

      Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.

      ✅ Automatic approvals, with your rules

      Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.

      CodeRabbit Verify

      • Run CodeRabbit Verify to test the changes in this pull request.
      Recent review info
      Run configuration
      Commits

      Reviewing files that changed from the base of the PR and between 937c99a084982c23e76b80c6f8d4a5f77793f7dd and 4e16435ffa79ab1bc3a29905a85066fedf0c8768.

      Files selected for processing: 4
      • apps/server/src/orchestration-v2/Orchestrator.ts
      • apps/server/src/orchestration-v2/ProviderTurnStartService.test.ts
      • apps/server/src/orchestration-v2/testkit/ProviderReplayHarness.ts
      • apps/server/src/serverSettings.test.ts

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

    4. maria-rckscommented

      Note

      Written by gpt-6.1-sol on behalf of Maria

      Verified in a real dev environment

      verified unchanged head 937c99a084982c23e76b80c6f8d4a5f77793f7dd on linux using repository playwright, /usr/bin/google-chrome, the real web client, and codex gpt-6.1-sol through the local proxy. no replay, mocks, fixtures, or demo data. the project was added through the app and pointed at a real git repository.

      • reproduced on github/main at 07a1e799d6: no side-chat default in settings; the first /side command required approval even though the parent had full access.
      • on this head, selected full access for side chats and confirmed persistence after reload. the first /side turn read README.md without approval and completed. new-thread permissions remained independent.
      • a project-level supervised override beat the environment's full-access default. its first command requested approval and completed after approval.
      • existing side chats retained their modes. the full-access side chat executed a second turn writing verified.txt after the project default became supervised; the file contained side-chat-full-access. the older supervised side chat and parent retained their stored modes.

      sanitized outgoing codex turn/start transcript:

      main parent:                 gpt-6.1-sol  approvalPolicy=never      sandbox=dangerFullAccess
      main first side turn:        gpt-6.1-sol  approvalPolicy=untrusted  sandbox=readOnly
      pr first side turn:          gpt-6.1-sol  approvalPolicy=never      sandbox=dangerFullAccess
      pr project override, first:  gpt-6.1-sol  approvalPolicy=untrusted  sandbox=readOnly
      pr existing side, second:    gpt-6.1-sol  approvalPolicy=never      sandbox=dangerFullAccess
      $ cat verified.txt
      side-chat-full-access

      blacksmith vp run check:changed 9bcf75335f9b2a8af877e1317c809b72a070b280 passed after fetching the shallow snapshot's history: formatting, lint, knip, graphql, 35 affected-package typechecks, 213 focused tests, and react compiler checks. the head also reports 28 successful ci checks.

      before, main settings:

      main settings have no side-chat permission default

      after, persisted full-access setting:

      pr settings persist a separate full-access side-chat default

      before, first side turn:

      main first codex side turn waits for command approval

      after, same project and prompt:

      pr first codex side turn completes with never and danger-full-access

      Not verified

      native ios/android and electron shells were not exercised on this linux vm. other providers, remote/relay/tunnel connections, and live managed-policy enforcement were not exercised. focused managed-policy tests passed. no code changes were needed.

      • Fix comments: Fix CodeRabbit comments on this PR
    5. Thanks @fadilhim for the original side-chat permissions work. Closing this older PR in favor of #29994, where @voltcrash carries the same configuration forward on current main. This branch has not been updated since November 3, and main has since changed side-chat permission inheritance and first-turn behavior.

    6. juliusmarminge closed this

Sign in to join this conversation.