Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(client): keep warm thread resumes live instead of flashing sync #9913

Mergedjuliusmarmingemerged 1 commit intomain fromrefs/pull/9913/headmerged by juliusmarminge View on GitHub

Showing 2 changed files with 110 additions and 5 deletions.

x
0 of 2 viewed, 2 left
89 additions and 2 deletionspackages/client-runtime/src/state/threads-atoms.test.tsModified
View file
@@ -27,6 +27,7 @@
PrimaryConnectionTarget,
type NetworkStatus,
type PreparedConnection,
+ type SupervisorConnectionState,
} from "../connection/model.ts";
import { EnvironmentSupervisor } from "../connection/supervisor.ts";
import { EnvironmentCacheStore } from "../platform/persistence.ts";
@@ -73,8 +74,18 @@
};
const SNAPSHOT: OrchestrationThreadDetailSnapshot = { snapshotSequence: 7, thread: THREAD };
​
+const CONNECTED_STATE: SupervisorConnectionState = {
+ ...AVAILABLE_CONNECTION_STATE,
+ desired: true,
+ network: "online",
+ phase: "connected",
+ attempt: 1,
+ generation: 1,
+};
+​
const makeHarness = Effect.fn("TestThreadAtoms.makeHarness")(function* (options?: {
readonly snapshot?: OrchestrationThreadDetailSnapshot;
+ readonly connected?: boolean;
}) {
const subscriptions = yield* Queue.unbounded<{
readonly afterSequence: number | undefined;
@@ -123,10 +134,14 @@