Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(desktop): preview snapshots no longer stall on Chromium's legacy capture path #32415

Closedjuliusmarmingewants to merge 5 commits intomain fromfix/issue-32410opened View on GitHub

Showing 3 changed files with 80 additions and 1 deletion.

x
0 of 3 viewed, 3 left
19 additions and 0 deletionsapps/desktop/src/app/DesktopEarlyElectronStartup.tsModified
View file
@@ -138,6 +138,25 @@
: `${input.disableFeatures},${WAYLAND_COLOR_MANAGER_FEATURE}`;
​
+// Playwright enables this when it launches Chromium; T3 launches Electron itself and attaches
+// over CDP, so preview snapshots would otherwise use the legacy capture path that can stall.
+const CDP_SCREENSHOT_NEW_SURFACE_FEATURE = "CDPScreenshotNewSurface";
+​
+export function resolveEnableFeaturesSwitch(input: {
+ readonly enableFeatures: string | null;
+ readonly disableFeatures: string | null;
+}): string | null {
+ if (featureListNames(input.enableFeatures).includes(CDP_SCREENSHOT_NEW_SURFACE_FEATURE)) {
+ return null;
+ }
+ if (featureListNames(input.disableFeatures).includes(CDP_SCREENSHOT_NEW_SURFACE_FEATURE)) {
+ return null;
+ }
+ return input.enableFeatures === null
+ ? CDP_SCREENSHOT_NEW_SURFACE_FEATURE
+ : `${input.enableFeatures},${CDP_SCREENSHOT_NEW_SURFACE_FEATURE}`;
+}
+​
export function resolveEarlyLinuxElectronOptions(
input: EarlyLinuxElectronOptionsInput,
): EarlyLinuxElectronOptions {
53 additions and 1 deletionapps/desktop/src/app/DesktopPreReadyPlatform.test.tsModified
View file