You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ae4aa9a
Browse filesBrowse the repository at this point in the historyBrowse files
fix(server): only click timeouts carry a reason, and its warning comes first
A server browser timeout forwarded Playwright's raw message as its reason,
so preview_open repeated it. The click diagnostic now travels in the error
detail, leads with the possible-click warning, caps the target, and still
names the target when the count is unavailable.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copy file name to clipboardExpand all lines: apps/server/src/mcp/PreviewAutomationBroker.test.ts
+5-4Lines changed: 5 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -349,8 +349,8 @@ it.effect("names the click target that matched nothing when the server browser t
349
349
ok: false,
350
350
error: {
351
351
_tag: "PreviewAutomationTimeoutError",
352
-
message:
353
-
'No element matches ".definitely-no-such-t3-target" after the timeout. The click may have happened and removed its target or navigated; check the page before retrying, then take a fresh snapshot and use its locator.',
352
+
message:"No element matches the target.",
353
+
detail: {reason: 'No element matches ".definitely-no-such-t3-target".'},
354
354
},
355
355
}),
356
356
).pipe(Effect.forkScoped);
@@ -365,8 +365,9 @@ it.effect("names the click target that matched nothing when the server browser t
'No element matches ".definitely-no-such-t3-target" after the timeout. The click may have happened and removed its target or navigated; check the page before retrying, then take a fresh snapshot and use its locator.',
112
+
'The click may have happened and removed its target or navigated; check the page before retrying. No element matches ".definitely-no-such-t3-target" after the timeout; take a fresh snapshot and use its locator.',
? `The click may have happened; check the page before retrying. Whether ${target} still matches an element is unknown.`
673
+
: matches===0
674
+
? `The click may have happened and removed its target or navigated; check the page before retrying. No element matches ${target} after the timeout; take a fresh snapshot and use its locator.`
675
+
: `The click may have happened; check the page before retrying. ${target} still matches an element after the timeout.`;
667
676
returnnewServerBrowserOperationError(
668
677
"PreviewAutomationTimeoutError",
669
-
matches===0
670
-
? `No element matches ${target} after the timeout. The click may have happened and removed its target or navigated; check the page before retrying, then take a fresh snapshot and use its locator.`
671
-
: `${target} still matches an element after the timeout. The click may have happened; check the page before retrying.`,
0 commit comments