fix(studio,producer): post-merge regressions and open issues (#1643)

- fix gsapDragCommit.test.ts import for commitGsapPositionFromDrag
- add generateId() helper with insecure-context fallback (fixes #1637)
- enable STUDIO_KEYFRAMES_ENABLED by default
- prevent clock duration from shrinking during playback (fixes #1636)
- add maxRetries to rmSync cleanup calls to handle ENOTEMPTY race (fixes #1644)
This commit is contained in:
Miguel Ángel
2026-06-22 11:19:52 -04:00
committed by GitHub
parent 4db708eb4a
commit 1f5dbdbc4c
12 changed files with 31 additions and 19 deletions
+7
View File
@@ -0,0 +1,7 @@
// ponytail: crypto.randomUUID is undefined on plain HTTP non-localhost origins
export function generateId(): string {
if (typeof crypto !== "undefined" && typeof crypto.randomUUID === "function") {
return crypto.randomUUID();
}
return `${Date.now()}-${Math.random().toString(36).slice(2)}`;
}
+3 -1
View File
@@ -1,3 +1,5 @@
import { generateId } from "./generateId";
// PostHog public ingest key — write-only, safe to ship in the client bundle
const POSTHOG_API_KEY = "phc_zjjbX0PnWxERXrMHhkEJWj9A9BhGVLRReICgsfTMmpx";
const POSTHOG_HOST = "https://us.i.posthog.com";
@@ -29,7 +31,7 @@ function getDistinctId(): string {
} catch {
// localStorage may be unavailable
}
distinctId = crypto.randomUUID();
distinctId = generateId();
try {
localStorage.setItem("hf-studio-anon-id", distinctId);
} catch {