style(record): format trace recording changes

Apply the repository formatter so the merged Trace v3 changes pass frontend lint checks.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
“haonan”
2026-08-17 12:24:31 +08:00
co-authored by Cursor
parent 9b6a525439
commit 464a8da86b
2 changed files with 17 additions and 3 deletions
+4 -1
View File
@@ -264,7 +264,10 @@ function collectHoverTriggerLabelText(root: Element): string {
return normalizeLabelText(text); return normalizeLabelText(text);
} }
function compactHoverTargetName(el: Element, desc: CaptureTargetDescriptor): CaptureTargetDescriptor { function compactHoverTargetName(
el: Element,
desc: CaptureTargetDescriptor,
): CaptureTargetDescriptor {
if (!desc.name) return desc; if (!desc.name) return desc;
const fullText = normalizeLabelText(el.textContent ?? ""); const fullText = normalizeLabelText(el.textContent ?? "");
const compactName = collectHoverTriggerLabelText(el); const compactName = collectHoverTriggerLabelText(el);
@@ -185,8 +185,19 @@ describe("reduceTraceSteps v3", () => {
const { steps } = reduceTraceSteps( const { steps } = reduceTraceSteps(
[ [
{ op: "fill", target: { ref: "e1", role: "textbox", name: "Search" }, value: "", preStateId: s1, postStateId: s1 }, {
{ op: "click", target: { ref: "e2", role: "button", name: "Apply" }, preStateId: s1, postStateId: s1 }, op: "fill",
target: { ref: "e1", role: "textbox", name: "Search" },
value: "",
preStateId: s1,
postStateId: s1,
},
{
op: "click",
target: { ref: "e2", role: "button", name: "Apply" },
preStateId: s1,
postStateId: s1,
},
], ],
registry, registry,
); );