Conversation
554f6de to
ed13b3e
Compare
ed13b3e to
d7bd829
Compare
34fa6f5 to
fec066f
Compare
821ac0f to
5f1eda2
Compare
5f1eda2 to
fc1f5c4
Compare
Keep modality and focus as internal resolver facts. Publish only the window identity needed for logical rebinding, and ignore unrelated foreground changes. Co-authored-by: Francesco Bonacci <195596869+f-trycua@users.noreply.github.com>
Adapt pi-computer-use’s cheap signal and authoritative AX diff while retaining Cua Driver ownership proof, focus suppression, and typed action accounting.
fc1f5c4 to
4e7bc5b
Compare
|
I think the unified scheduler still has one lifecycle hole that matters for the invariant it is trying to establish: the lease lifetime is tied to the async dispatch future, not necessarily to the native work it admitted.
let mut result = tool.invoke(args.clone()).await;
...
drop(_desktop_action_lease);That is correct on normal completion. But many platform actions run irreversible work through Tokio cannot cancel a
So the scheduler can report the lane free while the resource it represents is still physically in use. The current scheduler regression: cancelled_waiter_does_not_keep_or_poison_a_resourcecovers the opposite boundary — cancellation before acquisition — and is useful, but it does not prove cancellation after acquisition/native entry. This appears to compose directly with #3796 rather than requiring a second cancellation design. I would record the scheduler invariant as:
For this PR, the smallest safe choices seem to be either:
The discriminating regression is straightforward:
A held-input variant (drag/key-down) is even stronger because it observes the actual resource rather than only the scheduler. The conceptual distinction is important: cancelled waiter != completed owner. The scheduler should model the lifetime of the effect it serializes, not only the lifetime of the task that requested it. |
What changed
Cua Driver used separate code to coordinate desktop actions and text entry. It also kept its own list of tools for each path, so a new tool could miss the right checks.
This pull request replaces that code with one small scheduler. It now:
type_textandtype_text_chars; andIt also removes the old desktop lock, text-process set, custom cleanup guard, and duplicate tool list.
There are no browser or public API changes.
Refs #3373
Checks
Candidate
4e7bc5b20f567217034b4d0a50d542d67bd65eb0:This branch needs to be rebased onto the latest #3373 before merge.