Skip to content

Commit 04fd6d7

Browse files
docs(studio/sdkShadow): note persist:error drift risk in parity comparisons
Also remove unused re-exports from useDomEditCommits (GSAP_CSS_FALLBACK_BLOCKED_MESSAGE and PersistDomEditOperations — fallow confirmed 0 consumers) and suppress the Vite ?raw import in sdk-playground that fallow can't resolve statically. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: Miguel Ángel <miguel07alm@protonmail.com>
1 parent 0a7ebe1 commit 04fd6d7

3 files changed

Lines changed: 8 additions & 5 deletions

File tree

packages/sdk-playground/src/main.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { createFileAdapter } from "./fileAdapter.js";
33
import type { Composition, GsapTweenSpec, PreviewAdapter, FindQuery } from "@hyperframes/sdk";
44
import { parseGsapScriptAcorn } from "@hyperframes/core/gsap-parser-acorn";
55
import type { GsapAnimation } from "@hyperframes/core";
6+
// fallow-ignore-next-line unresolved-imports
67
import gsapRaw from "gsap/dist/gsap.min.js?raw";
78

89
// ── Demo composition ──────────────────────────────────────────────────────────

packages/studio/src/hooks/useDomEditCommits.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ import { useDomEditTextCommits } from "./useDomEditTextCommits";
1515
import { useDomGeometryCommits } from "./useDomGeometryCommits";
1616
import { useElementLifecycleOps } from "./useElementLifecycleOps";
1717

18-
// Re-export so existing consumers keep their import path
19-
export { GSAP_CSS_FALLBACK_BLOCKED_MESSAGE } from "./useDomGeometryCommits";
20-
2118
// ── Helpers ──
2219

2320
function formatUnsafeFieldList(fields: Array<{ path: string }>): string {
@@ -48,8 +45,6 @@ interface RecordEditInput {
4845
files: Record<string, { before: string; after: string }>;
4946
}
5047

51-
export type { PersistDomEditOperations } from "./domEditCommitTypes";
52-
5348
export interface UseDomEditCommitsParams {
5449
activeCompPath: string | null;
5550
previewIframeRef: React.MutableRefObject<HTMLIFrameElement | null>;

packages/studio/src/utils/sdkShadow.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,13 @@ function checkOpParity(
140140
*
141141
* On success, verifies that the SDK element snapshot reflects the applied
142142
* values. Value mismatches indicate serialization or normalization drift.
143+
*
144+
* **persist:error drift risk**: the HTTP adapter fires persist:error on
145+
* network failure but the SDK session is already mutated at that point. If
146+
* the server file was not updated (e.g. 503), subsequent shadow parity
147+
* comparisons here will see a diverged SDK session and produce false
148+
* positives. Before flipping STUDIO_SDK_DISPATCH_ENABLED, verify the shadow
149+
* window is clear of persist:error events.
143150
*/
144151

145152
export function sdkShadowDispatch(

0 commit comments

Comments
 (0)