Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): show server update progress through reconnect #4903

Mergedt3dotgg(GitHub profile, opens in a new tab)merged 12 commits intomain fromrefs/pull/4903/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

Showing 21 changed files with 82 additions and 35 deletions (loading 18).

x
0 of 21 viewed, 21 left
1 addition and 0 deletionsapps/server/src/auth/RpcAuthorization.tsModified
View file
@@ -32,6 +32,7 @@
[WS_METHODS.serverRefreshProviders]: AuthOrchestrationOperateScope,
[WS_METHODS.serverUpdateProvider]: AuthOrchestrationOperateScope,
[WS_METHODS.serverUpdateServer]: AuthOrchestrationOperateScope,
+ [WS_METHODS.serverUpdateServerWithProgress]: AuthOrchestrationOperateScope,
[WS_METHODS.serverUpsertKeybinding]: AuthOrchestrationOperateScope,
[WS_METHODS.serverRemoveKeybinding]: AuthOrchestrationOperateScope,
[WS_METHODS.serverGetSettings]: AuthOrchestrationReadScope,
40 additions and 5 deletionsapps/server/src/cloud/selfUpdate.test.tsModified
View file
@@ -26,6 +26,33 @@
​
const NODE_PATH = "/usr/local/bin/node";
​
+const eventuallyFileString = Effect.fn("test.eventuallyFileString")(function* (
+ filePath: string,
+ expected: string,
+) {
+ const fs = yield* FileSystem.FileSystem;
+ for (let iteration = 0; iteration < 1_000; iteration += 1) {
+ const contents = yield* fs.readFileString(filePath);
+ if (contents === expected) {
+ return;
+ }
+ // The rollback performs real filesystem I/O on a detached fiber, which
+ // advancing TestClock does not await.
+ yield* Effect.yieldNow;
+ }