[feat]: add timeout support to locator inputs, highlight & upload - #3026
Open
seanmcguire12 wants to merge 3 commits into
Open
seanmcguire12 wants to merge 3 commits into
seanmcguire12 wants to merge 3 commits into
Conversation
|
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 5 files
Architecture diagram
sequenceDiagram
participant Caller as Caller (Test/User)
participant Loc as Locator
participant Deep as DeepLocatorDelegate
participant Frame as FrameLocatorDelegate
participant Prog as Progress
participant Sess as CDP Session
participant DOM as DOM Scripts
Note over Caller,DOM: Runtime Flow for fill/type/highlight/setInputFiles with deadline propagation
Caller->>Loc: fill(value, progress)
Loc->>Loc: resolveNode(progress)
Loc->>Prog: consume budget for node resolution
Prog-->>Loc: remaining time
Loc->>Sess: Runtime.callFunctionOn (prepareElementForTyping)
alt Preparation succeeds within budget
Sess-->>Loc: input ready
Loc->>Sess: Runtime.callFunctionOn (fillElementValue)
Sess-->>Loc: value set
Loc->>Prog: cleanup (release object)
else Preparation fails or times out
Loc->>Loc: fallback to type
Loc->>Deep: type(text, options, progress)
Deep->>Loc: type(text, options, progress)
Loc->>Prog: delay per keystroke
alt Budget remaining
Loc->>Sess: Input.insertText
Sess-->>Loc: typed
else Budget expired
Loc->>Loc: stop typing
Loc->>Sess: Runtime.releaseObject
end
end
Caller->>Loc: highlight(options, progress)
Loc->>Loc: resolveNode(progress)
Loc->>Sess: Overlay.enable
Loc->>Sess: DOM.scrollIntoViewIfNeeded
Loc->>Sess: DOM.enable
Loc->>Sess: DOM.describeNode
Sess-->>Loc: backendNodeId
loop duration budget
Loc->>Prog: delay(tick)
Prog-->>Loc: remaining
Loc->>Sess: Overlay.highlightNode
end
alt duration > 0
Loc->>Sess: Overlay.hideHighlight
else duration = 0 and success
Loc->>Loc: keep highlight visible
end
Loc->>Prog: cleanup (hide if needed + release)
Caller->>Loc: setInputFiles(files, progress)
Loc->>Loc: resolveNode(progress)
Loc->>Sess: Runtime.callFunctionOn (validate input)
Loc->>Prog: normalize & encode files
alt Empty file list
Loc->>Sess: Runtime.callFunctionOn (clear)
else Valid files
Loc->>Sess: Runtime.callFunctionOn (inject payloads)
end
Loc->>Prog: cleanup (release object)
Prog-->>Loc: throwIfStopped
Loc-->>Caller: done
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
seanmcguire12
added this pull request to stack #3025
September 24, 2026 17:40
seanmcguire12
force-pushed
the
share-progress-in-locator-inputs-and-highlights
branch
from
September 25, 2026 22:09
a53fa9c to
eb774b0
Compare
This branch has not been deployed
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
fill(),type(),highlight(), &setInputFiles()perform multiple steps within one call. those steps need to share the caller's deadline, including typing fallbacks, intentional delays, & file preparation. otherwise, they can continue sending browser commands after the call times outwhat changed
fill(),type(),highlight(),setInputFiles(), & their existing delegatesdurationMs: 0calls still leave the highlight visible. timeout or failure triggers removal, including another removal attempt if a draw finishes late.test plan
extended
locatorActions.test.tsusing shared setup, controlled time, & held browser responses to verify:Summary by cubic
Fixes
fill(),type(),highlight(), andsetInputFiles()so every step in a multi-step call shares the caller's deadline, preventing browser commands from being sent after the call has timed out.fill()fallbacks reuse the original deadline; timeout or closed connection errors stop fallback to typing.locatorActions.test.tswith controlled time and held browser responses to cover each deadline path.Written for commit eb774b0. Summary will update on new commits.