Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix: enforce opencode >= 1.14.19 and reveal window on Wayland #2262

Mergedmwolson(GitHub profile, opens in a new tab)merged 2 commits intomain fromrefs/pull/2262/headmerged by juliusmarminge View on GitHub

Showing 5 changed files with 114 additions and 10 deletions (loading 2).

x
0 of 5 viewed, 5 left
12 additions and 10 deletionsapps/desktop/src/main.tsModified
View file
@@ -75,6 +75,7 @@
} from "./updateMachine.ts";
import { isArm64HostRunningIntelBuild, resolveDesktopRuntimeInfo } from "./runtimeArch.ts";
import { resolveDesktopAppBranding } from "./appBranding.ts";
+import { bindFirstRevealTrigger, type RevealSubscription } from "./windowReveal.ts";
​
syncShellEnvironment();
​
@@ -1998,16 +1999,17 @@
emitUpdateState();
- let initialRevealScheduled = false;
- const revealInitialWindow = () => {
- if (initialRevealScheduled) {
- return;
- }
- initialRevealScheduled = true;
- revealWindow(window);
- };
-​
- window.once("ready-to-show", revealInitialWindow);
+ // On Linux/Wayland with `show: false`, Electron's `ready-to-show` only
+ // fires after `show()` is called, deadlocking the standard "wait for
+ // ready, then show" pattern. Add `did-finish-load` as a Linux-only
+ // fallback so the window still surfaces once the renderer has loaded
+ // the page. Other platforms keep the no-flash `ready-to-show` path,
+ // since `did-finish-load` typically fires before the first paint there.
+ const revealSubscribers: RevealSubscription[] = [(fire) => window.once("ready-to-show", fire)];