Skip to content

Commit 16c2f25

Browse files
committed
fix(client): show queued update progress
1 parent a73bcfd commit 16c2f25

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

‎packages/client-runtime/src/state/server.ts‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,8 +442,16 @@ export function createServerEnvironmentAtoms<R, E>(
442442
execute: (target, atomRegistry) => {
443443
const stateAtom = serverUpdateStateAtom(target.environmentId);
444444
const targetVersion = target.input.targetVersion;
445-
let fromVersion = targetVersion;
445+
let fromVersion =
446+
atomRegistry.get(configValueAtom(target.environmentId))?.environment.serverVersion ??
447+
targetVersion;
446448
let currentStage: ServerUpdateStage = "downloading";
449+
atomRegistry.set(stateAtom, {
450+
status: "running",
451+
stage: currentStage,
452+
fromVersion,
453+
targetVersion,
454+
});
447455

448456
return Effect.gen(function* () {
449457
const environmentRegistry = yield* EnvironmentRegistry;

0 commit comments

Comments
 (0)