fix(settings): share restart continuation across environments #9933
Mergedmaria-rcksmerged 3 commits into
main fromrefs/pull/9933/headmerged by maria-rcks View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:S
- packages/client-runtime/src/state/sharedSettings.ts line 24Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -21,3 +21,4 @@21212222 /** Server keys that hold a user preference rather than machine config. */2323 export const SHARED_SERVER_SETTING_KEYS = [24+ "continueThreadsAfterServerUpdate",
github-actions[bot](GitHub profile, opens in a new tab) removed labelssize:S
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:L
- @@ -52,6 +53,12 @@5253 };5354 }545555-/** The shared subset of one environment's settings, as a patch that can be written elsewhere. */56-export function pickSharedServerSettings(settings: ServerSettings): ServerSettingsPatch {57- return Struct.pick(settings, SHARED_SERVER_SETTING_KEYS);56+/** Omit restart recovery on servers that cannot persist its preference. */57+export function filterSharedServerPatch(58+ patch: ServerSettingsPatch,59+ capabilities: Pick<ExecutionEnvironmentCapabilities, "threadRestartContinuation"> | undefined,60+): ServerSettingsPatch {61+ return capabilities?.threadRestartContinuation === true62+ ? patch63+ : Struct.omit(patch, ["continueThreadsAfterServerUpdate"]);64+}
maria-rcks merged thisf47a3fe
maria-rcks closed this
Sign in to join this conversation.




macroscopeapp[bot](GitHub profile, opens in a new tab) reviewed