Repository navigation
Browser CLI reliability: socket-worker JS lane, CSP eval fallback, blank-surface fixes, fixture test suite #5778
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
f817903
24d529f
3c7a8d8
6c8b8be
b20ef81
de24e6c
07db958
7b5b4eb
871a315
26dbae0
3e65735
1a9d6fa
e1e96b7
498ab45
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -73,6 +73,55 @@ public enum ControlCommandExecutionPolicy: Sendable, Equatable { | |
| // v2MainSync). Running on .mainActor would deadlock the UI for the | ||
| // entire simulation, defeating the profiling workload. | ||
| "debug.sidebar.simulate_drag", | ||
| // Browser methods that evaluate page JavaScript (or wait on it) run on | ||
| // the socket worker: on the main actor they block SwiftUI updates for | ||
| // their full duration, and on a not-yet-mounted webview that is a | ||
| // starvation deadlock (the JS can't run until SwiftUI mounts the | ||
| // webview, which can't happen while the handler holds the main | ||
| // thread). UI/model access inside the handlers stays on main via | ||
| // v2MainSync. | ||
| "browser.navigate", | ||
| "browser.back", | ||
| "browser.forward", | ||
| "browser.reload", | ||
| "browser.snapshot", | ||
| "browser.eval", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This new worker classification makes Useful? React with 👍 / 👎. |
||
| "browser.wait", | ||
| "browser.click", | ||
| "browser.dblclick", | ||
| "browser.hover", | ||
| "browser.focus", | ||
| "browser.type", | ||
| "browser.fill", | ||
| "browser.press", | ||
| "browser.keydown", | ||
| "browser.keyup", | ||
| "browser.check", | ||
| "browser.uncheck", | ||
| "browser.select", | ||
| "browser.scroll", | ||
| "browser.scroll_into_view", | ||
| "browser.get.text", | ||
| "browser.get.html", | ||
| "browser.get.value", | ||
| "browser.get.attr", | ||
| "browser.get.count", | ||
| "browser.get.box", | ||
| "browser.get.styles", | ||
| "browser.is.visible", | ||
| "browser.is.enabled", | ||
| "browser.is.checked", | ||
| "browser.find.role", | ||
| "browser.find.text", | ||
| "browser.find.label", | ||
| "browser.find.placeholder", | ||
| "browser.find.alt", | ||
| "browser.find.title", | ||
| "browser.find.testid", | ||
| "browser.find.first", | ||
| "browser.find.last", | ||
| "browser.find.nth", | ||
| "browser.highlight", | ||
|
cursor[bot] marked this conversation as resolved.
Resolved
|
||
| ] | ||
|
|
||
| /// Socket-worker methods that are also safe to invoke from the main | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Putting
browser.navigateand the other browser automation methods in the socket-worker policy makesTerminalController.runV2CommandLine(_:)reject them withinvalid_dispatch, becauseprocessV2Commandonly accepts.mainActormethods;CmuxSidebarActionDispatchinvokes custom-sidebarcmux(...)actions through that in-process entrypoint on the main actor. Any sidebar button/action that navigates, clicks, waits, or evals in a browser now silently gets an error instead of performing the action, so this path needs a worker-capable in-process dispatch rather than only changing the socket policy.Useful? React with 👍 / 👎.