Repository navigation
🐛 Preserve app document context and editable text - #905
Merged
Merged
Conversation
Keep synthetic events and focus assertions in the element’s own window when tests interact with an iframe or another same-origin document.
Robdel12
force-pushed
the
rd/cross-document-events
branch
from
November 11, 2026 06:57
f1db891 to
eadda98
Compare
Robdel12
force-pushed
the
rd/cross-document-events
branch
from
November 11, 2026 07:00
eadda98 to
510959b
Compare
Use DOM ranges to insert and remove text without flattening native paragraphs or inline elements. Keep the caret after inserted text so browser-local typing composes with real editing defaults.
Robdel12
force-pushed
the
rd/cross-document-events
branch
from
November 11, 2026 07:14
510959b to
d22e523
Compare
Robdel12
added a commit
to Robdel12/dyno
that referenced
this pull request
Nov 11, 2026
## Why Keep app interaction in the browser through Interactor. The product ports had picked up driver-backed typing, clicks, taps and scrolling that duplicated local actions. This keeps the managed input surface limited to real keys for browser defaults and pointer movement for CSS hover. ## Approach Remove the overlapping actions from Interactor, `app.native`, the wire protocol, provider, types and capability flags. Scrolling composes through custom Interactor actions and real DOM scrolling. URL-only tests exercise those actions with native capabilities unavailable. The ports exposed cross-document events/focus and contenteditable typing bugs in Interactor. Fix those upstream in [Interactor #905](wwilsman/interactor.js#905), including paragraphs, caret placement and empty-line placeholders. Dyno pins the tested upstream commit; land and release that fix before moving back to a registry version. Git consumers need its standard prepare build enabled. Managed contexts retain fractional pixel ratios, touch/viewport settings and user agents. Color scheme and external request blocking reset between tests. App requests preserve browser credentials, fill survives replaced controls, and startup cancellation preserves the run deadline. Chromium keeps Playwright's default headless shell. Full Chromium on this Mac repeats content after 16,384 physical rows; affected macOS headed/branded/custom builds fail clearly above that limit. Real pixel checks cover long pages and fractional dimensions. Project setup, fixtures and preparation now have a separate CI suite after the macOS Firefox execution job exhausted its five-minute budget. All 46 test files and every engine/OS combination remain covered; each job retains the same hard cap. ## Evidence The framework has 239 passing checks and two existing browser-specific skips, including installed-consumer types and URL-only interaction. All 17 WebKit capture checks and 20 supported native checks pass on Linux and macOS. Fractional bounds retain raw renderer pixels, including Linux's transparent partial row and anti-aliased corner. All seven documentation checks pass. The real Vizzly integration passes both workflows. Interactor has 136 passing browser tests and passing package/type builds. Cyclonic retains 97 passing cases, three existing layout skips and 116 captures. BackChannel retains 31 workflows and 49 captures after replacing the overlapping actions. Visual baseline review remains open; no baselines were approved or replaced.
wwilsman
requested changes
Nov 11, 2026
wwilsman
left a comment
Owner
There was a problem hiding this comment.
All nitpicks adding empty lines. Hopefully I made it easy to just apply suggestions
wwilsman
approved these changes
Nov 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
An Interactor rooted in another same-origin document still creates events in the test window and checks focus against the test document. Click handlers receive the wrong
view, event type checks use the wrong window, andfocused()fails on a focused iframe input.Typing also replaces an editable element's entire
textContent, flattening browser-created paragraphs and inline formatting. BackChannel exposed this when local typing followed the browser's Return behavior. Fixing it here lets Dyno keep typing in Interactor.Approach
Use the target element's
ownerDocumentfor events and focus. Edit contenteditable text with DOM ranges, preserving surrounding markup and placing the caret after inserted text. Whole-editor replacement clears the full content; explicit text ranges remain partial edits. Use the standard prepare lifecycle so Git installs build the bundle and declarations too.Evidence
The iframe, paragraph, and caret regressions fail before their fixes and pass afterward. The complete Chrome suite has 136 passing tests; package and type builds pass too. Tests cover empty editors, inline deletion, insertion at offset zero, whole-editor replacement across paragraphs, and typing into a browser-created empty paragraph.