feat(settings): add shared project defaults and scoped overrides - #9754
Conversation
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This is a large product feature introducing persisted machine/project defaults and overrides that affect thread creation, automatic pulls, browser credentials, and worktree setup actions across web, mobile, and server runtimes. The broad behavior change and unresolved risks around bootstrap failure, partial multi-machine saves, and discarded actions require human review. Not approved because:
Adjust the Minimum Blocking Severity for this repo — including turning it Off — in Settings. You can add or adjust custom eligibility rules. Learn more. |
e0f623b to
06f43fa
Compare
01d7ee6 to
767464a
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort 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 767464a. Configure here.
# Conflicts: # packages/shared/src/serverSettings.test.ts
Bugbot is paused — on-demand spend limit reachedBugbot uses usage-based billing for this team and has hit its on-demand spend limit. A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue. |
Bugbot is paused — on-demand spend limit reachedBugbot uses usage-based billing for this team and has hit its on-demand spend limit. A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue. |
| const settings = yield* (yield* ServerSettings.ServerSettingsService).getSettings; | ||
| const defaultModelSelection = | ||
| settings.defaultModelSelection ?? getAutoBootstrapThreadModelSelection(); |
There was a problem hiding this comment.
🟡 Medium src/serverRuntimeStartup.ts:203
A getSettings failure now aborts resolveAutoBootstrapWelcomeTargets before it looks up or creates the CWD project/thread, so an unavailable redacted provider secret leaves completeAutoBootstrapWelcome publishing a completed payload with no bootstrap targets. Read the settings with a fallback to getAutoBootstrapThreadModelSelection() when materialization fails.
- const settings = yield* (yield* ServerSettings.ServerSettingsService).getSettings;
- const defaultModelSelection =
- settings.defaultModelSelection ?? getAutoBootstrapThreadModelSelection();
+ const settings = yield* (yield* ServerSettings.ServerSettingsService).getSettings.pipe(
+ Effect.catchAll(() => Effect.succeed(undefined)),
+ );
+ const defaultModelSelection =
+ settings?.defaultModelSelection ?? getAutoBootstrapThreadModelSelection();🤖 Copy this AI Prompt to have your agent fix this:
In file @apps/server/src/serverRuntimeStartup.ts around lines 203-205:
A `getSettings` failure now aborts `resolveAutoBootstrapWelcomeTargets` before it looks up or creates the CWD project/thread, so an unavailable redacted provider secret leaves `completeAutoBootstrapWelcome` publishing a completed payload with no bootstrap targets. Read the settings with a fallback to `getAutoBootstrapThreadModelSelection()` when materialization fails.
| JSON.stringify(scripts), | ||
| ); | ||
| const [request, setRequest] = useState<ProjectScriptEditorRequest | null>(null); | ||
| const { saving, persist, submit } = useProjectScriptSettings( |
There was a problem hiding this comment.
🟡 Medium settings/ProjectDefaultActionsSettings.tsx:38
A multi-machine save can leave permanently divergent default actions when a later updateSettings fails: earlier machines are updated, but the failed machine is not. Retrying Add action then appends again on the already-updated machines while applying only the retry's action to the failed machine. Make useProjectScriptSettings roll back prior updates on failure or make the operation idempotent.
🤖 Copy this AI Prompt to have your agent fix this:
In file @apps/web/src/components/settings/ProjectDefaultActionsSettings.tsx around line 38:
A multi-machine save can leave permanently divergent default actions when a later `updateSettings` fails: earlier machines are updated, but the failed machine is not. Retrying `Add action` then appends again on the already-updated machines while applying only the retry's action to the failed machine. Make `useProjectScriptSettings` roll back prior updates on failure or make the operation idempotent.
| activeProjectIcon={activeProject?.projectIcon ?? null} | ||
| openInCwd={gitCwd} | ||
| activeProjectScripts={activeProject?.scripts} | ||
| activeProjectScripts={activeProjectScripts} |
There was a problem hiding this comment.
🟡 Medium components/ChatView.tsx:7907
Unprojected threads now receive activeProjectScripts=[], so ProjectScriptsControl renders its “Add action” button even though saveProjectScript exits successfully without persisting when activeProject is absent. Users can therefore create an action that is silently discarded; preserve undefined when no project is active (or disable editing in that state).
| activeProjectScripts={activeProjectScripts} | |
| activeProjectScripts={activeProject ? activeProjectScripts : undefined} |
🤖 Copy this AI Prompt to have your agent fix this:
In file @apps/web/src/components/ChatView.tsx around line 7907:
Unprojected threads now receive `activeProjectScripts=[]`, so `ProjectScriptsControl` renders its “Add action” button even though `saveProjectScript` exits successfully without persisting when `activeProject` is absent. Users can therefore create an action that is silently discarded; preserve `undefined` when no project is active (or disable editing in that state).
## What's Changed * fix(web): keep timestamp tooltip dates in English by @Lucenx9 in pingdotgg/t3code#10256 * fix(web): let authorized clients scrolling reach settings by @flamboh in pingdotgg/t3code#10080 * fix(web): remember usage page selection by @extoci in pingdotgg/t3code#10189 * fix(server): keep the Antigravity Google sign-in across server restarts by @t3dotgg in pingdotgg/t3code#10244 * fix(antigravity): load user skills from ~/.gemini for every project by @t3dotgg in pingdotgg/t3code#10257 * fix(web): respect reduced motion in shared disclosures by @saphid in pingdotgg/t3code#10258 * feat(marketing): add a Windows 95 landing page by @t3dotgg in pingdotgg/t3code#10286 * refactor(web): remove unused runtime wrappers and exports by @juliusmarminge in pingdotgg/t3code#10225 * refactor(web): keep feature component helpers private by @juliusmarminge in pingdotgg/t3code#10226 * refactor(web): keep app utilities private and remove dead helpers by @juliusmarminge in pingdotgg/t3code#10227 * ci: enforce unused runtime exports in the web app by @juliusmarminge in pingdotgg/t3code#10228 * test(desktop): cover Clerk setup through the service by @juliusmarminge in pingdotgg/t3code#10284 * test(desktop): cover WSL hashes through runtime resolution by @juliusmarminge in pingdotgg/t3code#10285 * test(desktop): cover password store through startup by @juliusmarminge in pingdotgg/t3code#10287 * test(desktop): cover WSL paths through public behavior by @juliusmarminge in pingdotgg/t3code#10289 * test(desktop): exercise WSL cache safety through public scripts by @juliusmarminge in pingdotgg/t3code#10301 * test(web): cover file classification through diff ordering by @juliusmarminge in pingdotgg/t3code#10304 * test(web): focus command palette tests on search behavior by @juliusmarminge in pingdotgg/t3code#10302 * fix(web): add project settings to legacy sidebar project menu by @hwanseoc in pingdotgg/t3code#10021 * test(web): keep Markdown gutter styling private by @juliusmarminge in pingdotgg/t3code#10306 * feat(settings): add shared project defaults and scoped overrides by @maria-rcks in pingdotgg/t3code#9754 * feat(connections): balance new threads across connected machines by @maria-rcks in pingdotgg/t3code#9895 * test(web): keep settings viewport comparison private by @juliusmarminge in pingdotgg/t3code#10307 * fix(web): prevent file tree search focus ring clipping by @GuilhermeVieiraDev in pingdotgg/t3code#10175 * fix(mobile): stop the work log flickering during subagent runs and failing calls by @juliusmarminge in pingdotgg/t3code#10273 * fix(mobile): save linked media from chat by @juliusmarminge in pingdotgg/t3code#10271 * feat(markdown): show the GitHub mark for github.com links by @juliusmarminge in pingdotgg/t3code#10324 * fix(marketing): show a real preview card when t3.codes is shared by @t3dotgg in pingdotgg/t3code#10305 **Full Changelog**: pingdotgg/t3code@v0.0.39-nightly.20260906.1292...v0.0.39-nightly.20260906.1293 Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.39-nightly.20260906.1293
Resolved 30 conflicted files. Notable resolutions: - Upstream's Knip sweep privatized helpers the fork still imports: re-exported runInEnvironment (client-runtime state/runtime), config (client-runtime rpc/client), buildEnvironmentAuthHeaders and withEnvironmentCredentials (environmentHttpAuth), and getDefaultSshAskpassDirectory (packages/ssh auth). Contracts RPC definitions with no external consumer took upstream's un-export. - client-runtime state/usage.ts was an add/add: upstream's refreshUsage helper won and the fork's deriveUsageState/environmentUsageStatus were dropped (no consumers outside the file; web and mobile have their own). - Restored createPullRequestStackEnvironmentAtoms, which the merge dropped while keeping its call sites in pullRequests.ts and apps/mobile. - useHandleNewThread: upstream pingdotgg#9754's targetServerSettings had merged in ahead of the fork's projectRef declaration (use-before-declare); moved it below the retargeted projectRef so it reads the hosting environment. - ProviderService.test.ts mock gained hasAssistantVisualizationReference; ChatView.logic.test.ts fork tests pass upstream's new providers argument. Verification: every package typechecks clean; lint error set is byte-identical to the pre-merge backup (64, all pre-existing in fork-only files); personal-verify-fork-features.sh passes. All test failures observed (5 server, 2 mobile, 7 desktop, 1 shared) reproduce on backup/mtcode-pre-upstream-sync-20260906. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Merges 141 upstream commits (`b438447f6..8b2838e`) into the fork, following the `fork-upstream-merge` skill. Landed as a merge commit; conflicts resolved by the path-policy verdicts in `docs/fork/inventory.json`. ## Merge shape 563 files landed (`git diff --stat HEAD^1 HEAD`) against 563 in the upstream range, so no upstream work was dropped. Fork delta 720 files. ## Conflicts 14 files, resolved by concern. The merge commit message names each. Two are worth carrying forward: - Upstream extracted the project action rows into `ProjectActionsList.tsx`. The fork's Edit gate now rides an `editable` prop that defaults to upstream's always-editable behavior, so the gate survives the next extraction. - Upstream moved the `agent-browser-access` setting onto its new `/settings/projects` page. `settingsSearch.ts` points that item there and drops a fork delta. ## Two things a clean merge did not show **Upstream can delete an export the fork still imports.** pingdotgg#10225 removed `ClientTracingLive` as unused. `apps/web/src/lib/runtime.ts` still installs it, and neither file conflicted, so the typecheck failed four ways on a merge git called clean. Restored with a `// Fork:` comment naming the consumer. **A green test step can hide a suite that never finished.** `vp run -r test` kills the packages still running when one of them fails. A `@t3tools/desktop` failure truncated `apps/web` and `@t3tools/mobile` after each had reported hundreds of passing files, and `verify.mjs` counted any package with labeled output as tested. Four failing web tests went unreported. The check now keys on the closing `Test Files` line and runs every unfinished package alone. ## Unsupported methods `unsupported-methods.mjs` reports 0 ADD, 0 DROP, 2 KEEP, against 61 dispatched backend methods and 131 contract methods. Getting there took a fix. The backend moved its dispatch from `crates/t3code/src/lib.rs` to `crates/t3code/src/rpc/dispatch.rs`, where every arm is a one-line call into a handler below the match. The script read the old path and reported zero dispatched methods, then read the new one and called `vcs.switchRef` a DROP, because the `unsupported_exit` that refuses it had moved out of the arm. It now tries both paths and follows an arm two calls deep. Contract changes: `provider.consumeResetCredit` and `server.getHostResources` gained `UnsupportedMethodError`; `server.getUsageSummary` lost it, which closes the item the previous merge left open. ## Feature classification **Usable as-is** — client-only, nothing new on the wire. Sidebar drag across sections with destination cues and a named drop action (pingdotgg#9731, pingdotgg#9750, pingdotgg#10378, pingdotgg#10453, pingdotgg#10464). Composer behavior: a multiline draft survives timeline scrolling (pingdotgg#10444), the composer stops collapsing on blur (pingdotgg#10437) and regains focus when you tab back (pingdotgg#10463). Panel and preview chrome: resize the floating preview from any edge (pingdotgg#10467), toolbar controls stay anchored (pingdotgg#10478), the stuck resize cursor clears (pingdotgg#10461), the browser hides as the right panel closes (pingdotgg#10385), manual panel choices hold during a turn (pingdotgg#10113). Settings and accessibility polish (pingdotgg#10177, pingdotgg#10262, pingdotgg#10415, pingdotgg#10258, pingdotgg#10124, pingdotgg#10125, pingdotgg#10127, pingdotgg#10128, pingdotgg#10175). Performance (pingdotgg#10413, pingdotgg#10190, pingdotgg#10118). Plus the GitHub mark on `github.com` links (pingdotgg#10324), the Tux icon for WSL (pingdotgg#8511), a remembered usage page selection (pingdotgg#10189), project settings in the legacy sidebar menu (pingdotgg#10021), and text-only preview snapshots (pingdotgg#10232). **Unsupported in Moatless** — resolves to a refusal, or falls through to its own empty state. Each is recorded in `docs/fork/gaps.md`: - Reset credits through the hub and CLIProxyAPI (pingdotgg#10462, pingdotgg#10395, pingdotgg#10308). `provider.consumeResetCredit`, new union entry. `UsageLimits.tsx` catches the refusal and shows "Could not use the reset credit." - Balancing new threads across connected machines (pingdotgg#9895, pingdotgg#10433, pingdotgg#10407). `server.getHostResources`, new union entry. Nothing polls until a user picks automatic routing, and the composer then reads "Auto balance unavailable." - Onboarding: import grouped by repository (pingdotgg#10493), the shared multi-computer wizard (pingdotgg#10465), agent install without Node or npm (pingdotgg#10402). All ride `agentSessions.scan` and `.import`, an existing gap. - Shared project defaults and scoped overrides (pingdotgg#9754). The page reads, and every write goes through `server.updateSettings`, which the backend does not dispatch. - Two new `orchestration.dispatchCommand` types: `thread.active.reorder` (pingdotgg#9729) and `thread.user-input.dismiss` (pingdotgg#10431). Both are ordinary controls, a sidebar drag and a Dismiss button, and a dispatched command cannot be refused per type. That is the standing _A command cannot be refused_ gap, now 26 members wide. **Backend behavior to consider reproducing in Moatless** — upstream server fixes whose behavior the fork's client assumes: - Invalid script IDs no longer crash threads (pingdotgg#10019). The fork ships project scripts, so this one is worth reading first. - Settlement: settle inactive threads without a PR lookup (pingdotgg#10103), skip disabled settlement lookups (pingdotgg#10424), settle threads with unanswered async questions (pingdotgg#10400). - Interrupted threads stay resumable after a restart (pingdotgg#10421). - Completed requests stay closed across clients (pingdotgg#10123). - Placeholder branches are followed after a checkout updates (pingdotgg#10441). - A thread's PR links without an open client (pingdotgg#10101), and checkpoints are captured before a PR status refresh (pingdotgg#10347). - Adapters declare their own context compaction (pingdotgg#10112). - Transcripts with oversized tool records import (pingdotgg#10430), and git status scans are skipped while the index is locked (pingdotgg#9845). - Usage limits pool per provider across accounts and environments (pingdotgg#10300). The client renders what `server.getUsageSummary` returns, so this shows something only if the Moatless payload carries per-account limits. Mobile, marketing, desktop, provider adapters and release tooling are not this fork's surface and are not classified. ## Also fixed here, and not upstream's doing - Three `browser-*` search items still routed to `/settings/integrations`, which the fork owns for its Moatless administration page. A non-administrator who searched for them was redirected away from the result. - `moatless/listSearch.ts` carried no fork-only declaration. - `pnpm fmt:check` failed on 294 files, 293 of them orval output. The generator now formats what it writes through an `afterAllFilesWrite` hook. - `@t3tools/moatless-api` exported `./generated`, a barrel that is never checked in. ## Verification `inventory-check.mjs` clean. `verify.mjs` green on seven checks: duplicate-adds, tripwires, resolution-check, unsupported-methods, `fmt:check` (3876 files), `lint` and `typecheck`. `test` is red on one package, and it is the machine. `@t3tools/desktop`'s `bundled libsecret helper` shells out to `pkg-config` for `libsecret-1`, which this sandbox does not have; it fails the same way when retried alone. Everything else passes: `apps/web` 369 files, `t3` 291, `@t3tools/mobile` 149, `t3code-relay` 27, `@t3tools/client-runtime` 71, plus the smaller packages. `spec:check` cannot run in a sandbox: it needs a sibling `moatless` checkout or a deployment URL and has neither. Written by Claude Opus 5 in Claude Code. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- Moatless task: https://moatless.soaplabstest.com/tasks/8d348ecf-f9cb-4e65-b96b-6c1054a8ed33

project settings live in settings → projects, with machine tabs and a project dropdown. machine defaults apply unless a project overrides them; reset restores inheritance.
shared action persistence now handles defaults and checkout overrides once, removing 147 lines of duplicated save, shortcut, and editor logic without adding a helper module. the layout and shared-default behavior are preserved. merged main without rewriting branch history and updated the existing projection test mock. review fixes preserve defaults in settings search, native script menus, bootstrap threads, and onboarding imports. the final net code reduction is 101 lines. the patch remains large: 37 files, +2,220/-643 versus the starting 35 files, +2,204/-526; code reuse and review fixes add line churn despite reducing the code.
verified web/server/mobile typechecks, 117 focused tests, real-browser default create/edit plus project inherit → override → delete → reset, and both settings-search entry points. targeted lint reports existing warnings in untouched code. both reviewers approve toggle fix
9d1b9a871. ci is blocked by the new main-branch IntegrationsSettings.test.tsx rendering a settings link without a router; toggle typecheck, lint, and live checks pass.before
original layout capture, using the earlier project fixture.
after
automatically pull now disables only its own setting while saving. verified both toggle directions with a live disabled-attribute observer: workspace, model, and browser controls remain active; the name and icon rows remain muted. web typecheck and targeted lint pass.
action persistence after trimming
recorded the interaction walkthrough, but its file is on the desktop browser host and cannot be retrieved from this environment. video transfer and playback remain unverified. native simulator runtime was not exercised; evidence is not complete.
built with
gpt-5.6-solin t3 code.Note
Medium Risk
Changes effective auto-pull, setup scripts, and agent browser MCP issuance based on new server settings and projection lookups; misconfiguration or missing settings layers could alter background git behavior or tool access for running sessions.
Overview
Introduces Settings → Projects with machine and project scope pickers, replacing the standalone project settings route (which now redirects). All projects edits machine-wide defaults; selecting a project configures per-checkout overrides with inherit/reset semantics.
Server settings gain
defaultModelSelection,defaultProjectScripts,defaultAutoPull, and per-project override maps for scripts, auto-pull, and agent browser access. Web, mobile, and server paths resolve effective values viaresolveProjectScripts,resolveProjectAutoPull, andresolveProjectAgentBrowserAccessinstead of relying only on project records.Project actions are persisted as
projectScriptOverrideson the server (null resets to defaults); setup scripts on worktree create use the same resolution. Auto-pull at startup and in VCS status refresh now consults server settings layers. Agent MCP browser credentials are issued or revoked based on the thread’s project override, not just the global toggle.Composer and new-thread flows fall back to the target environment’s
defaultModelSelectionand workspace defaults. General/Integrations settings link out to Projects for model, workspace, and browser access;defaultThreadEnvModeis no longer synced as a shared preference across machines.Reviewed by Cursor Bugbot for commit 13dfd0c. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add shared project defaults and per-project scoped overrides for scripts, browser access, auto-pull, and model selection
/settings/projectspage with scope pickers for configuring defaults across all projects or overrides for a specific project and machineresolveProjectScripts,resolveProjectAgentBrowserAccess,resolveProjectAutoPull) that layer per-project overrides on top of server-wide defaults;applyServerSettingsPatchmerges override maps entry-by-entry so omitted projects are preserved/projects/:projectKeyroute now redirects to/settings/projects\n- Model selection now falls back to the environment's server-configureddefaultModelSelectionwhen a project has no explicit model, affecting bootstrap, new-thread creation, draft hero, and mobile new-task flowdefaultThreadEnvModeas a machine-local setting inSHARED_SERVER_SETTING_KEYS, removing it from shared-settings patching and comparisonProviderService.makeProviderServicenow requiresProjectionSnapshotQueryto resolve project browser-access overrides; provider-only runtimes or unresolved threads with configured project overrides return false for browser access.ProjectSetupScriptRunner.makenow requiresServerSettingsServiceand returns a typedProjectSetupScriptOperationErrorwithreadSettingson settings-load failureMacroscope summarized c663ec2.