Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(settings): share restart continuation across environments #9933

Mergedmaria-rcksmerged 3 commits intomain fromrefs/pull/9933/headmerged by maria-rcks View on GitHub

maria-rckscommented

Enabling "Continue threads after restarts" in desktop Settings saved only to the primary server, while remote updates read the remote server's disabled preference. The toggle now saves to local and connected supported servers, and existing mismatches use "Apply to all"; a capability check keeps older servers from receiving an unsupported key while preserving their other shared preferences.

Verified 141 focused tests, web/server/mobile/client-runtime typechecks, and scoped lint/format checks (existing lint warnings remain). In two isolated environments, toggling on/off persisted on both servers; disconnecting a remote, changing the preference, reconnecting, and applying to all resolved the mismatch. Native mobile runtime verification was not performed.

The 24-second capture samples actual preview frames while toggling off and on; both servers' persisted values were checked at each state.

Restart continuation toggle off and on, verified on local and remote servers

Unsupported-server warning verified without persisting a setting:

Unsupported servers show setting not saved

Model: gpt-5.6-sol; harness: Codex.


Note

Medium Risk Changes multi-environment settings persistence and mismatch reconciliation; incorrect capability filtering could skip saves or hide drift, but scope is limited to one shared key with explicit version skew handling.

Overview Continue threads after restarts is now treated as a shared server preference like sidebar auto-settle, so toggling it propagates to all connected environments that support shared-settings sync instead of sticking on the primary only.

A new threadRestartContinuation environment capability gates whether continueThreadsAfterServerUpdate is included in sync, mismatch detection, and Apply to all. filterSharedServerPatch strips that key for older servers while other shared keys still sync; clients show a warning when no target can accept the restart preference. Web, mobile, settings copy, and user docs are updated to describe cross-environment behavior and upgrading older servers first.

Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit b71997160fc950ef21901fe2437e63c0cc19960e. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).

Note

Filter continueThreadsAfterServerUpdate by threadRestartContinuation capability in shared-settings sync

  • Adds continueThreadsAfterServerUpdate to SHARED_SERVER_SETTING_KEYS and introduces filterSharedServerPatch to omit the key when the target environment lacks threadRestartContinuation capability
  • Updates findSharedSettingsMismatches to compare restart-continuation values only when both primary and target advertise support, preventing false drift on mixed-capability setups
  • Propagates capability data through useSharedSettingsSync, useUpdateSettingsTarget, and AutoSettleSettingsRows so Apply-to-all sends a per-target filtered patch and surfaces an older-server warning when no target can accept the setting
  • Server advertises threadRestartContinuation: true via ServerEnvironment.make; docs and setting description text are updated accordingly
  • Risk: pickSharedServerSettings now takes an optional capability argument; callers that do not supply it will silently omit continueThreadsAfterServerUpdate from the selected shared settings — verify all callers in sharedSettings.ts and web/mobile hooks pass capabilities when the key is expected
Macroscope summarized b719971.
    1. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted

    2. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      Approvability

      Verdict: Not approved

      Macroscope's review found this PR not approvable — This PR changes an existing settings path to propagate restart-continuation preferences across connected environments and affects runtime thread recovery after server restarts. The capability/version-skew filtering has an unresolved compatibility concern for older remotes, so the broader behavior warrants human review.

      You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    3. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      🟡 Medium

      https://github.com/pingdotgg/t3code/blob/ba2e4d24ef630efac708d6524a35a9ce3cfd4cb2/apps/web/src/hooks/useSettings.ts#L417

      The restart setting is silently dropped when the selected/primary environment lacks threadRestartContinuation: targets.size is nonzero because environmentId is added, but filterSharedServerPatch returns an empty targetPatch, so the loop skips the only write without showing Setting not saved. Track whether any non-empty targetPatch was written and call warnUnsaved() when none were, or gate the control for unsupported environments.

      No longer relevant as of b71997160fc950ef21901fe2437e63c0cc19960e

    4. Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

      Fix All in Cursor ❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the [Cursor dashboard](https://www.cursor.com/dashboard/bugbot). Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit ba2e4d24ef630efac708d6524a35a9ce3cfd4cb2. Configure [here](https://www.cursor.com/dashboard/bugbot).
    5. Note

      Written by gpt-5.6-sol on behalf of Maria

      Fixed in b71997160. The updater tracks non-empty target patches and reports "Setting not saved" with an update instruction when all targets lack support. Verified in the real app with the preceding server capability implementation: the warning appeared and neither server persisted the preference. Restored the current server implementation after checking; web tests and typecheck pass.

    6. maria-rcks merged thisf47a3fe

    7. maria-rcks closed this

Sign in to join this conversation.