Skip to content

Note an unresponsive frame in the browser snapshot and refuse dragged files through the gateway - #571

Merged
yansfil merged 12 commits into
mainfrom
browser/finish-drag-frame-hidden
Oct 6, 2026
Merged

yansfil merged 12 commits into
mainfrom
browser/finish-drag-frame-hidden

Conversation

@yansfil

@yansfil yansfil commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Closes #557

Summary

  • The gateway refuses Input.dispatchDragEvent with a non-empty data.files, as it refuses DOM.setFileInputFiles; drags without files pass, and a native HTML5 drag naming files fails drag_carries_files before any replay.
  • A cross-origin frame that answers nothing within a step is noted as # OOPIF unresponsive origin=... after the top document and the rest of the page is read; dialog_open stays for a blocked top document or a dialog event the command saw.
  • A frame's silence is one read's observation, not a state of the frame: every frame stays known and each read (snapshot, the capture before and after an action, each wait poll) asks the silent ones again.
  • Each multi-frame read is one batched round under one deadline (Page.enable, tags, reads, tag checks, baselines, wait polls), so hung frames cost one step between them per round.
  • A silent frame is never evidence of absence: a ref no readable frame carries is unknown, not stale or gone, while a frame has not answered, so wait --gone @tag:N is not met by a frame that is only slow; a change check that could not read a frame says so and adds no stall.
  • The change check compares like with like: a frame unread in either the before or the after read is left out of both and named (# unread:), never counted as added or removed content; type and press that cannot tell which frame holds the focus (a frame did not answer) send nothing and fail page_unresponsive; a ref that may be a child of a frame whose own frames could not be looked for is unknown, not stale or gone.
  • A frame that goes silent during the baseline swap becomes a note in the diff, not new lines.
  • A selected View of a Workspace that is not in front answers input and screenshots at once (observed natively), so no input times out or arrives later.
  • An input a busy page does not answer took effect anyway: the failure's next_action says so, and an unanswered drag move sends no release afterwards.
  • docs/BROWSER_DISPLAYS.md and hide browser help describe all of it.

Review

  • 판단해 주세요: a hidden View of a Workspace that is not in front takes agent input the operator cannot see; refusing it would block agents working in background Workspaces, so this PR keeps it and documents it.
  • 판단해 주세요: a dialog a frame opened in an earlier command now reads as an unresponsive frame (Chromium sends no dialog event again), not dialog_open. Observed: such a dialog does not hold the top document, a top-document click ran while a frame's confirm was open; the top document's own dialog still fails dialog_open.
  • 조심해서 볼 파일: hided/src/browser_page/page.rs - the frame model (Known, frames(), lookup): which calls count as silence (only an unanswered one; a closed connection still fails) and that nothing marks a frame gone.
  • 조심해서 볼 파일: hided/src/browser_page/cdp.rs - call_all and the shared message reader that call_inner now uses.
  • 조심해서 볼 파일: desktop/src/main/browserCdp.ts - gateway boundary check on data.files.
  • 비용 검토: a hung frame costs one step per round, shared with the other frames of that round, and every read of the page asks it again; the 24-known-frame cap and the gateway's 32 commands in flight bound a round, and the two-minute command limit still ends a command with page_unresponsive.

Evidence

  • 확인한 것: gateway test for a drag with files (array, string, null refused) and without (forwarded); it failed before the fix.
  • 확인한 것: hided tests against a scripted gateway: a hung frame noted and the rest read, five hung frames within three steps, a closed connection not read as silence, a frame that stops mid-read or mid-baseline, the silent notes in the baseline, a dialog event and a hung top document still dialog_open, frames answering a kind of request only once all have asked (Page.enable, tags, reads, baselines, wait polls), a frame slow to attach or to read once being read by the next call, a ref unknown while a frame has not answered and a --gone wait not met by it, a change check naming an unread frame, a frame readable before the action and silent after (and the reverse) read as no change and named, type/press failing silent when the focus frame cannot be told and finding the focused frame beside a silent one, a ref under a frame whose scan did not answer unknown for wait --gone, click and lookup, a batch above the gateway's cap in rounds, a drag with no release and no interception switch after an unanswered move, and a release after an answered one; requests of each kind sent before any answer is read (by order: frames answer only once all have asked); a probe that finds the connection closed reporting that cause, drag_carries_files, and wait --text past a silent frame; the hung-frame test failed against the old behavior.
  • 확인한 것: browser-agent.spec.ts (isolated candidate app, private HOME and Herdr, no OS input): a frame hung past 8 s, a frame dialog, a native HTML5 drag replayed through the gateway with no files, a Workspace behind another (click, fill, screenshot answered, counters unchanged after it returns), and a press held 12 s (page_unresponsive, press delivered, no release or click later).
  • 확인한 것: cargo fmt, clippy -p hided, cargo test -p hided, desktop typecheck, lint, unit tests, workstation-identity check.
  • 확인하지 못한 것: locally the dialog spec's teardown focus guard failed on this machine after the app became active during the dialog (the spec body passed); CI is the check for that spec.
  • 확인하지 못한 것: workspace-wide clippy and cargo test, Linux and Windows runs; the Workspace-behind observation is macOS Electron only and was not tried against a remote device display.

@yansfil
yansfil merged commit 657ad81 into main Oct 6, 2026
19 checks passed
@yansfil
yansfil deleted the browser/finish-drag-frame-hidden branch October 6, 2026 03:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

hide browser: 드래그 파일 경계, 응답 없는 frame, 뒤에 있는 Workspace 입력 마무리

1 participant