authorgravatar for saiansh2525@gmail.comYash Singh <saiansh2525@gmail.com> 2026-10-06 04:33:40-05:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-10-06 09:33:40+00:00
log4fb04fe7fae566cc91ab810888b3232f274a00cf
treef7d3e844392c42aa8f4c44cb3b36c87d16cd4af0
parent9ae9f2ba1f30e5fc14f69ba6dff6b08c7bfb401c
signature Signed by PGP key B5690EEEBB952194

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


2 files changed, 3 insertions(+), 2 deletions(-)

apps/desktop/src/preview/Manager.ts+2-1
......@@ -2974,7 +2974,8 @@ const makeNativeOperations = Effect.fn("PreviewManager.makeOperations")(function
29742974 wc,
29752975 ),
29762976 ]);
2977 const id = `browser-screenshot-${artifactSiteSlug(wc.getURL())}-${millis.toString(36)}-${NodeCrypto.randomUUID().slice(0, 8)}`;
2977 const uuid = yield* crypto.randomUUIDv4.pipe(Effect.orDie);
2978 const id = `browser-screenshot-${artifactSiteSlug(wc.getURL())}-${millis.toString(36)}-${uuid.slice(0, 8)}`;
29782979 const artifactPath = path.join(resolvedArtifactDirectory, `${id}.png`);
29792980 const data = image.toPNG();
29802981 yield* fileSystem.makeDirectory(resolvedArtifactDirectory, { recursive: true }).pipe(
apps/server/src/sourceControl/SourceControlRepositoryService.test.ts+1-1
......@@ -331,7 +331,7 @@ it.effect.each(["--bare", "source.git"])(
331331 });
332332 assert.strictEqual(result.cwd, destinationPath);
333333 assert.isTrue(yield* fs.exists(path.join(destinationPath, ".git")));
334 }).pipe(Effect.provide(makeLayer({ git: { execute: git.execute } })));
334 }).pipe(Effect.provide(layer({ git: { execute: git.execute } })));
335335 }).pipe(
336336 Effect.provide(
337337 GitVcsDriver.layer.pipe(