Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(desktop): keep remote connections available during idle sleep #7640

ClosedChrisMarstaller(GitHub profile, opens in a new tab)wants to merge 2 commits intomain fromrefs/pull/7640/headopened View on GitHub

Showing 14 changed files with 92 additions and 0 deletions (loading 11).

x
0 of 14 viewed, 14 left
3 additions and 0 deletionsapps/desktop/src/app/DesktopApp.tsModified
View file
@@ -22,6 +22,7 @@
import * as DesktopObservability from "./DesktopObservability.ts";
import * as DesktopPreReadyPlatform from "./DesktopPreReadyPlatform.ts";
import * as DesktopShutdown from "./DesktopShutdown.ts";
+import * as DesktopSleepPrevention from "./DesktopSleepPrevention.ts";
import * as DesktopServerExposure from "../backend/DesktopServerExposure.ts";
import * as DesktopAppSettings from "../settings/DesktopAppSettings.ts";
import * as DesktopShellEnvironment from "../shell/DesktopShellEnvironment.ts";
@@ -150,6 +151,8 @@
const desktopWindow = yield* DesktopWindow.DesktopWindow;
yield* logBootstrapInfo("bootstrap start");
​
+ yield* DesktopSleepPrevention.restore();
+​
if (environment.isDevelopment && Option.isNone(environment.configuredBackendPort)) {
return yield* new DesktopDevelopmentBackendPortRequiredError();
69 additions and 0 deletionsapps/desktop/src/app/DesktopSleepPrevention.test.tsAdded
View file
@@ -0,0 +1,69 @@
+import { DEFAULT_CLIENT_SETTINGS } from "@t3tools/contracts";
+import { assert, describe, it } from "@effect/vitest";
+import * as Effect from "effect/Effect";
+import * as Layer from "effect/Layer";
+import * as Option from "effect/Option";
+​
+import * as ElectronPowerSaveBlocker from "../electron/ElectronPowerSaveBlocker.ts";
+import { setClientSettings } from "../ipc/methods/clientSettings.ts";