File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -63,8 +63,9 @@ another link to share.
6363
6464### Balance new threads across machines
6565
66- On web and desktop, ** Settings → Connections → Load balancing** enables automatic
67- machine selection for new threads in projects grouped across connected environments.
66+ Auto balance is off by default. On web and desktop, enable it in
67+ ** Settings → Connections → Load balancing** to automatically choose a machine for
68+ new threads in projects grouped across connected environments.
6869Each machine starts at ** Normal** . Choose ** Prefer** to favor it when it has CPU and
6970memory available, ** Less often** to reduce its share, or ** Manual only** to exclude
7071it from automatic selection. These are preferences, not fixed traffic percentages.
Original file line number Diff line number Diff line change @@ -135,6 +135,21 @@ describe("ClaudeSettings auto-compaction", () => {
135135 } ) ;
136136} ) ;
137137
138+ describe ( "ClientSettings load balancing" , ( ) => {
139+ it ( "requires opt-in when settings are new or omit load balancing" , ( ) => {
140+ expect ( decodeClientSettings ( { } ) . loadBalancingEnabled ) . toBe ( false ) ;
141+ expect ( decodeClientSettings ( { loadBalancingWeights : { } } ) . loadBalancingEnabled ) . toBe ( false ) ;
142+ } ) ;
143+
144+ it . each ( [ true , false ] ) ( "preserves a saved choice of %s" , ( loadBalancingEnabled ) => {
145+ const settings = decodeClientSettings ( { loadBalancingEnabled } ) ;
146+ expect ( encodeClientSettings ( settings ) . loadBalancingEnabled ) . toBe ( loadBalancingEnabled ) ;
147+ expect ( decodeClientSettingsPatch ( { loadBalancingEnabled } ) . loadBalancingEnabled ) . toBe (
148+ loadBalancingEnabled ,
149+ ) ;
150+ } ) ;
151+ } ) ;
152+
138153describe ( "ClientSettings word wrap" , ( ) => {
139154 it ( "defaults word wrap on" , ( ) => {
140155 expect ( decodeClientSettings ( { } ) . wordWrap ) . toBe ( true ) ;
Original file line number Diff line number Diff line change @@ -205,7 +205,7 @@ export const LoadBalancingWeights = Schema.Record(
205205) ;
206206
207207export const ClientSettingsSchema = Schema . Struct ( {
208- loadBalancingEnabled : Schema . Boolean . pipe ( Schema . withDecodingDefault ( Effect . succeed ( true ) ) ) ,
208+ loadBalancingEnabled : Schema . Boolean . pipe ( Schema . withDecodingDefault ( Effect . succeed ( false ) ) ) ,
209209 loadBalancingWeights : LoadBalancingWeights . pipe ( Schema . withDecodingDefault ( Effect . succeed ( { } ) ) ) ,
210210 appearanceContrast : AppearanceContrast . pipe (
211211 Schema . withDecodingDefault ( Effect . succeed ( DEFAULT_APPEARANCE_CONTRAST ) ) ,
You can’t perform that action at this time.
0 commit comments