Repository navigation
feat(web): apply chosen server settings to every environment - #9
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lain gaps Plan the writes again whenever a connected server's config, its session, or the preferences change, and send each distinct patch at most once per connection, so a cached config, a late session, a preference saved while connecting, or a replaced connection no longer skips a server. Under All environments, covered settings save where they can instead of locking the row, and the row says why each differing server was not changed. Restore defaults only updates preferences already set, a single-environment write leaves them alone, and the client's default for idle compaction is Never, matching what servers without a saved choice use. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lue is set back Under All environments the idle compaction choice is saved for every environment, so a connected server too old to store Never no longer disables it; that server is listed with its reason. The docs and the sync comment now match the once-per-connection rule: a value changed elsewhere is set back at the latest on the next connection. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some server settings change how agents behave, and each server keeps its own copy in its
settings.json. Changing one under All environments only reached servers connected at that moment. Servers that were offline missed it, a new server started from its own defaults, and existing servers kept whatever value had been written into their file.What changed
serverSettingPreferences, a struct of server-setting keys. It is saved with the other client settings (the desktop client-settings file, orlocalStorageon web) and defaults to{}. The keys covered now areidleCompaction(the global mode),sidebarAutoSettleOnMerge, andsidebarAutoSettleAfterDays. Covering another key takes one line inServerSettingPreferencesinpackages/contracts/src/settings.ts.startServerSettingPreferencesSyncruns fromappInit. It plans again whenever a connected server's config, its auth session, or the preferences change, and writes only the keys that differ. A new server gets every preference the first time it connects. The decision logic lives in the purenextPreferenceWrites:persistScopedSettingsPatch, with idle compaction written byidleCompactionPatchin the form each server version reads. Keys locked by a server's managed policy are skipped, and so are connections without permission to write settings. A failed write shows a toast at most once per environment, server version and patch per app session, and the failure reason also appears in the row.DEFAULT_IDLE_COMPACTION("off", "Never") matches what servers without a saved choice use since Never compact idle threads unless the user chooses to #8. The server uses it, andDEFAULT_UNIFIED_SETTINGSand the row's built-in-default check use it too, so Reset no longer shows on every fresh server or records "When you return".DEFAULT_SERVER_SETTINGSandglobalIdleCompactionare unchanged, so an old server's legacycompactIdleThreads: falsestill means "When you return".docs/user/project-settings.mddescribes this.Idle session release is not covered. On
grant/mainit is theT3CODE_PROVIDER_IDLE_TIMEOUT_MSenvironment variable, not a server setting.Compatibility. Mobile is unchanged. An older desktop or web client drops
serverSettingPreferencesthe next time it saves client settings, so after a downgrade the preferences have to be set again.Checks
vp test run src/components/settings/serverSettingPreferences.test.ts src/components/settings/scopedSettings.test.ts78b960076evp run check:changed: format, lint, knip, typecheck (37 packages), react compiler78b960076evp run check:changed: tests beside changes78b960076eSidebar.logic.browser.test.tsx,ChatView.logic.browser.test.ts,ChatView.browser.test.tsxfail to import (Cannot access 'twMerge' before initialization)7fdbc2762e7fdbc2762evp test run src/components/settings/serverSettingPreferences.test.ts src/components/settings/scopedSettings.test.tsf14305b517vp test run src/serverSettings.test.ts(apps/server)f14305b517vp run check:changed: format, lint, knip, typecheck (37 packages), react compilerf14305b517vp run check:changed: tests beside changesf14305b517Sidebar.logic.browser.test.tsxandChatView.logic.browser.test.ts, the same import failure that happens on basevp test runserverSettingPreferences.test.ts, scopedSettings.test.tsvp run check:changedNo real-client UI pass was run.
🤖 Generated with Claude Code