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...@@ -2974,7 +2974,8 @@ const makeNativeOperations = Effect.fn("PreviewManager.makeOperations")(function
2974 wc,2974 wc,
2975 ),2975 ),
2976 ]);2976 ]);
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)}`;
2978 const artifactPath = path.join(resolvedArtifactDirectory, `${id}.png`);2979 const artifactPath = path.join(resolvedArtifactDirectory, `${id}.png`);
2979 const data = image.toPNG();2980 const data = image.toPNG();
2980 yield* fileSystem.makeDirectory(resolvedArtifactDirectory, { recursive: true }).pipe(2981 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"])(...@@ -331,7 +331,7 @@ it.effect.each(["--bare", "source.git"])(
331 });331 });
332 assert.strictEqual(result.cwd, destinationPath);332 assert.strictEqual(result.cwd, destinationPath);
333 assert.isTrue(yield* fs.exists(path.join(destinationPath, ".git")));333 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 } })));
335 }).pipe(335 }).pipe(
336 Effect.provide(336 Effect.provide(
337 GitVcsDriver.layer.pipe(337 GitVcsDriver.layer.pipe(