Skip to content

Acknowledge Playwright's directory listener before file selection - #13

Merged
yo4e merged 1 commit into
mainfrom
codex/fix-browser-upload-wait
Oct 20, 2026
Merged

yo4e merged 1 commit into
mainfrom
codex/fix-browser-upload-wait

Conversation

@yo4e

@yo4e yo4e commented Oct 20, 2026 •

Copy link
Copy Markdown
Owner

Ubuntu WebKit can complete a directory selection and render the requested book while Playwright's setInputFiles remains pending until the test times out. Repeated runs reproduced this even for the first selection on a fresh input. The Playwright implementation starts an asynchronous evaluate to register the input listener, then immediately issues the native selection command; listener registration is not acknowledged first. The same sequence remains in the official 1.64.1 source.

Add a test-only preparation step for the pinned Playwright 1.61.1 package. It installs the listener through an awaited object handle containing the event promise, performs the native selection, then awaits the event and disposes the handle. Exact version and source-fragment guards reject an unexpected dependency change. The normal parser/viewer build does not contain this patch. Validation documentation describes the temporary patch and its removal criteria.

Local lint, strict typecheck, 95 Node tests and build pass. The actual chooser/edit/unchanged-reload scenario passes 10 WebKit repetitions with the patch. Final commit c4ab4083b604f4019e39d96990ce506084ea9e80 also passed all 24 local browser tests and three CLI sample validations. Ubuntu CI confirmed the guarded patch was applied and passed all static/unit/sample checks, 24 browser tests and five extra WebKit repetitions. No skipped tests, swallowed timeouts, synthetic completion events or automatic retries. Related to #9.

@yo4e
yo4e marked this pull request as ready for review October 20, 2026 07:14
@yo4e
yo4e merged commit 151f6cc into main Oct 20, 2026
1 check passed
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.

1 participant