Repository navigation
spinner-waiter: inputValue waits like an action, and a target that is ready by the loading check proceeds - #47
Conversation
… ready by the loading check proceeds Port of the branch fix/input-value-loading, which iterate/private has run on since before the repo split (pinned as pkg.pr.new/middlewright@e3f2374): - inputValue joins the patched methods, so a read of an input that has not appeared yet waits while loading UI is visible, then returns the current value. An explicit timeout still passes through. - Before the no-spinner fast-fail, the target is checked once more. A target that became ready while the loading check ran proceeds with its normal budget instead of a 1 ms timeout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PR SummaryMedium Risk Overview Spinner-waiter no-spinner path: after deciding nothing is loading (including post-navigation checks), it re-checks whether the target is already ready before applying the 1 ms fast-fail. Controls that become ready in the gap between the readiness poll and the loading check keep the normal action timeout instead of failing instantly. README and three Playwright specs cover composer Reviewed by Cursor Bugbot for commit 20eacef. Bugbot is set up for automated code reviews on this repo. Configure here. |
commit: |
Ports the branch
fix/input-value-loadingonto main. iterate/private has run on that branch since before the repo split: it pinspkg.pr.new/middlewright@e3f2374, a build of the branch, not of main. Without this PR, iterate/private cannot move to a main build with #46's fix without losing the two changes below.What changes
inputValuewaits like an action. It joins the patchedLocatormethods. A read of an input that has not appeared yet waits while loading UI is visible, then returns the current value. It does not wait for a particular value. An explicit timeout still passes through.Before:
locator.inputValue: Timeout 1000ms exceeded. After: it returns the value. iterate/private's browser specs callinputValue()in 8 places.A target that is ready by the loading check proceeds. Before the no-spinner fast-fail, the waiter checks the target once more. A target that became ready while
loadingVisibleran (the spinner left and the control enabled between the two observations) now gets its normal action budget, not a 1 ms timeout. The cost is oneisVisible(andisEnabledfor actions) round trip on the fast-fail path only.Tests
Three rows from the branch, unchanged:
inputValue waits for a loading composer and returns its valueinputValue preserves an explicit timeout and can read disabled inputsa control becoming ready during the loading check keeps its normal action budget(a custom selector engine finishes the UI update at the exact moment the loading check runs)Local:
pnpm typecheck,pnpm lint,pnpm buildclean;pnpm test162 passed, 3 skipped (withffmpeg-full).The branch's CI change (publishing builds of
fix/input-value-loadingon push) is left out.Risk map
inputValuegoes through the plugin chain, so other plugins (video mode, screenshots) see it as an action. This is what iterate/private already runs.src/plugins/spinner-waiter.ts,src/plugin-system.ts, the spec, the README.todo-app baseline video
mw-todo-app.mp4
🤖 Generated with Claude Code