Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(desktop): keep native snapshot retries painting #32412

Openvoltcrash(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/32412/headopened View on GitHub

Showing 4 changed files with 31 additions and 4 deletions (loading 2).

x
0 of 4 viewed, 4 left
22 additions and 4 deletionsapps/desktop/src/app/DesktopPreReadyPlatform.test.tsModified
View file
@@ -252,15 +252,29 @@
).pipe(Effect.ensuring(Effect.sync(() => vi.unstubAllEnvs())));
});
​
- it.effect(
- "acquires a synchronous pre-ready layer before an asynchronous Clerk-shaped layer",
- () =>
+ it.effect.each([
+ { enabledFeatures: undefined, expected: "CDPScreenshotNewSurface" },
+ {
+ enabledFeatures: "ExistingFeature<Trial:param/value",
+ expected: "ExistingFeature<Trial:param/value,CDPScreenshotNewSurface",
+ },
+ {
+ enabledFeatures: "ExistingFeature,CDPScreenshotNewSurface",
+ expected: "ExistingFeature,CDPScreenshotNewSurface",
+ },
+ ])(
+ "configures fresh screenshot surfaces before asynchronous startup with $enabledFeatures",
+ ({ enabledFeatures, expected }) =>
Effect.gen(function* () {
class ClerkShaped extends Context.Service<ClerkShaped, { readonly ready: true }>()(
"@t3tools/desktop/app/DesktopPreReadyPlatform.test/ClerkShaped",
) {}
​
const events: Array<string> = [];
+ hasSwitchMock.mockImplementation(
+ (name: string) => name === "enable-features" && enabledFeatures !== undefined,
+ );
+ getSwitchValueMock.mockReturnValue(enabledFeatures ?? "");