fix(record): drop 'hover' in tracev2 for compatible

This commit is contained in:
“haonan” authored and GitHub committed 2026-08-23 21:26:41 +08:00
1 parent f69d1aecd8
commit a74f5b136e
4 files changed
+26 -16

No files matched your search

@@ -119,14 +119,6 @@ function toV2Step(
},
effectForNavigation(step.navigatedTo, urlToId),
);
case "hover":
if (!step.captureTarget) return null;
return {
op: "hover",
id,
page,
target: step.captureTarget,
};
case "fill":
if (!step.captureTarget) return null;
return {
@@ -161,6 +153,9 @@ function toV2Step(
},
effectForNavigation(step.navigatedTo, urlToId),
);
// `hover` only exists in Trace v3. Peers that negotiate v2 predate the
// step variant and fail to decode the whole result if we emit it.
case "hover":
case "scroll":
case "switch_tab":
return null;