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)
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 substantial new feature (per-project settings) with new UI, API methods, and cross-cutting behavioral changes to provider access, model selection, git operations, and action execution. The scope and nature of changes warrant human 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
# Conflicts: # apps/server/src/ws.ts # apps/web/src/components/chat/ChatComposer.tsx
- Stop reseeding model defaults for reused empty drafts - Keep draft routing stable when creating a new thread from an emptied draft
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 b007aa0. Configure here.
| contextSource: null, | ||
| }), | ||
| ), | ||
| ); |
There was a problem hiding this comment.
Missing provider field in error fallback object
Low Severity
When sourceControlProviders.resolveHandle({ cwd }) fails, the Effect.catch fallback returns { context: null, contextSource: null } which is missing the provider field from SourceControlProviderHandle. The code only accesses .contextSource and .context from this value so it works at runtime, but it relies on structural typing leniency rather than matching the declared interface. If future code accesses .provider from this result, it'll be undefined.
Reviewed by Cursor Bugbot for commit b007aa0. 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 persisted per-project settings surfaced via WS RPCs and enforced in orchestration dispatch/model selection, which can affect provider availability, git remote detection, and runtime env for scripts.
Overview
Adds per-project settings (persisted in
ServerSettingsService) and exposes them via new WS RPCsprojects.getDetails/projects.updateSettings, including git metadata detection (root/branch/remotes) and an effective remote derived from either detection or a user override.Wires project settings into core flows: source control provider resolution now supports project remote overrides (and tracks context source) with
GitManagerpreferring branch remotes unless an explicit override is set; VCS status subscriptions/refresh are keyed byprojectIdand per-project fetch intervals.Updates the web app to add a
/projects/$projectIdroute and sidebar navigation, enforce project-level provider instance disablement inChatComposer(blocking send/picker when no allowed providers and validating on dispatch), seed new drafts from project defaults (not sticky state), and propagate projectactionEnvironmentinto terminal/script env while preventingextraEnvfrom overridingT3CODE_*runtime variables. Also refactors project-script keybinding syncing to remove stale bindings, and includes a minor diff panel caret CSS fix.Reviewed by Cursor Bugbot for commit b007aa0. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add per-project settings with provider policies, action environments, and remote overrides
ProjectSettingsschema with fields foractionEnvironment,disabledProviderInstanceIds,automaticGitFetchInterval, andremoteOverride; persisted and updated via newServerSettingsService.updateProjectSettings.projects.getDetailsandprojects.updateSettingsRPC endpoints returning git-detected metadata, effective remote info, and per-project settings.projects.$projectId.tsx) and sidebar navigation now open a project settings page instead of toggling collapse.defaultModelSelectionviacreateDefaultModelSelection()instead of carrying over sticky settings.projectScriptRuntimeEnvnow prevents user-supplied env from overridingT3CODE_*runtime variables.Macroscope summarized b007aa0.