fix(desktop): use the crypto service for screenshot IDs (#16415)

This commit is contained in:
Yash Singh authored and GitHub committed 2026-10-06 09:33:40 +00:00
1 parent 9ae9f2ba1f
commit 4fb04fe7fa
2 files changed
+3 -2

No files matched your search

+2 -1
View File
@@ -2974,7 +2974,8 @@ const makeNativeOperations = Effect.fn("PreviewManager.makeOperations")(function
wc,
),
]);
const id = `browser-screenshot-${artifactSiteSlug(wc.getURL())}-${millis.toString(36)}-${NodeCrypto.randomUUID().slice(0, 8)}`;
const uuid = yield* crypto.randomUUIDv4.pipe(Effect.orDie);
const id = `browser-screenshot-${artifactSiteSlug(wc.getURL())}-${millis.toString(36)}-${uuid.slice(0, 8)}`;
const artifactPath = path.join(resolvedArtifactDirectory, `${id}.png`);
const data = image.toPNG();
yield* fileSystem.makeDirectory(resolvedArtifactDirectory, { recursive: true }).pipe(
@@ -331,7 +331,7 @@ it.effect.each(["--bare", "source.git"])(
});
assert.strictEqual(result.cwd, destinationPath);
assert.isTrue(yield* fs.exists(path.join(destinationPath, ".git")));
}).pipe(Effect.provide(makeLayer({ git: { execute: git.execute } })));
}).pipe(Effect.provide(layer({ git: { execute: git.execute } })));
}).pipe(
Effect.provide(
GitVcsDriver.layer.pipe(