Add per-project settings #2567
Conversation
- add project details/settings RPCs and persistence - use project remote overrides for source control detection - add project details page and sidebar navigation
|
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)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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 significant new feature: per-project settings including provider enable/disable, default model selection, action environment variables, and git remote overrides. The changes affect runtime behavior across composer provider selection, script execution, and model defaults. The scope and behavioral impact warrant careful review. You can customize Macroscope's approvability policy. Learn more. |
- Replace sidebar rename action with project settings access - Show detected remotes and project path in settings - Extract remote override parsing into shared server helper
- Persist project action environment and surface it in setup/runtime - Seed new threads from project default model selection - Refine source control detection precedence and project settings UI
- sync script keybindings against existing local bindings - preserve sticky draft state when seeding new threads - reject duplicate action environment keys during normalization
- Replace the manual remote block with a detected remote summary - Add provider icons and friendlier labels for Git remotes - Keep custom remote override controls available when enabled
- Seed new chat drafts from per-project defaults - Cache project settings edits locally while commits are in flight - Prevent duplicate action-environment keys
- update project settings from the latest persisted snapshot - skip keybinding validation when no server is available - cover the new atomic update path with tests
- block action environment keys that start with `T3CODE_` - keep runtime `T3CODE_*` values owned by T3Code - add coverage for reserved env validation
- Remove the Electron-only guard around project script keybinding sync - Pass the local server when available and let the helper handle non-Electron cases
- Deploy the web app from release workflow - Replace broad Effect imports with subpath imports - Add lint rules and diagnostics for cleaner schema usage
- Remove detected-remote summary and provider icon usage - Show effective remote URL inline with external-link opening - Reuse shared external URL helper for remote actions
- Persist project-level Git fetch refresh settings - Thread project context through VCS status polling and UI - Update project settings schema and tests for the new field
- Persist disabled provider instance IDs in project settings - Gate chat and project selection on project-specific provider access - Update project settings UI and validation
# Conflicts: # apps/server/src/provider/Layers/ProviderRegistry.test.ts # apps/server/src/serverSettings.ts # apps/server/src/ws.ts # packages/shared/src/serverSettings.ts
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 398ffb2. Configure here.
| } | ||
|
|
||
| return `${target.environmentId}:${target.cwd}`; | ||
| return `${target.environmentId}:${target.cwd}:${target.projectId ?? ""}`; |
There was a problem hiding this comment.
Git status key change creates duplicate subscriptions for same cwd
Low Severity
The git status target key now includes projectId, so the same cwd watched from different UI contexts (some with projectId, some without, or with different values) creates separate atoms, subscriptions, and server-side streams. Components like ThreadStatusIndicators pass thread.projectId while other callers may pass null for the same directory, resulting in redundant server subscriptions and inconsistent state atoms for what is logically the same git status.
Reviewed by Cursor Bugbot for commit 398ffb2. Configure here.


What Changed
Added a per-project settings page that can be opened from the project row in the sidebar.
/projects/$projectIdWhy
Git remote detection can fail for self-hosted providers where the remote URL does not clearly identify the host, such as a self-hosted GitLab instance without
gitlab.comin the URL.This gives users a project-level fallback instead of requiring the app to guess correctly. The project name change is also scoped to T3 Code metadata only; it does not rename or move the directory on disk.
UI Changes
Checklist
Note
Medium Risk
Adds new per-project settings persistence and RPCs that influence provider availability, git status polling, and source-control detection; mistakes could disable providers or mis-route git operations for a project. Changes are localized but touch server settings writes, WS APIs, and composer send gating.
Overview
Introduces per-project settings persisted in
ServerSettings(newprojectSettingsmap +updateProjectSettings) and exposes them via new WS RPCs:projects.getDetails(returns project metadata, git root/branch/remotes, and effective remote) andprojects.updateSettings(validates at least one provider remains enabled).Wires settings into runtime behavior: project
remoteOverridenow takes precedence for source-control provider resolution (withcontextSourcetagged asoverridevsdetected), git status subscriptions/refresh now key by{cwd, projectId}and use per-project fetch intervals, and projectactionEnvironmentis injected into setup scripts and terminal launches while reservingT3CODE_*env vars.Updates the web UI to add a
/projects/$projectIdroute and sidebar navigation (row opens settings, caret toggles collapse), refactors project script keybinding syncing, and changes new draft threads to seed model selection from the project default (with per-project provider disablement enforced in the composer/model picker).Reviewed by Cursor Bugbot for commit 398ffb2. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
[!NOTE]
Add per-project settings including provider policy, action environment, and remote overrides
/projects/$projectIdsettings route where users can configure per-project model selection, remote overrides, action environment variables, and disabled provider instances.ProjectSettingsand related schemas to contracts, and extendsServerSettingswith aprojectSettingsmap;ServerSettingsServicegainsupdateProjectSettingsfor per-project patch updates.projects.getDetails,projects.updateSettings) expose project details and settings updates to the web client, and enforce that at least one provider remains enabled per project.ChatComposernow filters available providers via a per-project policy (resolveProjectProviderInstancePolicy), disabling send when no provider instances are allowed for the active project.defaultModelSelectionviacreateDefaultModelSelection, replacing the previous sticky-model behavior.actionEnvironment) are injected into terminal launches and setup script runners;T3CODE_*keys are reserved and cannot be overridden by user-supplied env.SourceControlProviderRegistrynow resolves provider context from a settings-level remote override first (taggedoverride), falling back to auto-detection (taggeddetected);GitManagerprioritizes override context, then branch remote, then detected context.gpt-5.4togpt-5.5and default reasoning effort is set tolow; existing drafts or sticky settings referencing the old model may be silently replaced by the new project default on next load.Macroscope summarized 398ffb2.