fix: js statement wrapping + click auto-routes option to selectOption (v0.4.5)#117
Merged
fix: js statement wrapping + click auto-routes option to selectOption (v0.4.5)#117
Conversation
Bug 1: js command wrapped all code as expressions — const, semicolons,
and multi-line code broke with SyntaxError. Added needsBlockWrapper()
and wrapForEvaluate() helpers (shared with eval) to detect statements
and use block wrapper {…} instead of expression wrapper (…).
Bug 2: clicking <option> refs hung forever because Playwright can't
.click() native select UI. Click handler now checks ARIA role + DOM
tagName and auto-routes to selectOption() via parent <select>.
Bug 3: click timeouts on <option> elements gave no guidance. Now
throws helpful error: "Use browse select instead of click."
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
lucaslim
pushed a commit
to lucaslim/gstack-governed
that referenced
this pull request
Mar 17, 2026
… (v0.4.5) (garrytan#117) * fix: js statement wrapping + click auto-routes option to selectOption Bug 1: js command wrapped all code as expressions — const, semicolons, and multi-line code broke with SyntaxError. Added needsBlockWrapper() and wrapForEvaluate() helpers (shared with eval) to detect statements and use block wrapper {…} instead of expression wrapper (…). Bug 2: clicking <option> refs hung forever because Playwright can't .click() native select UI. Click handler now checks ARIA role + DOM tagName and auto-routes to selectOption() via parent <select>. Bug 3: click timeouts on <option> elements gave no guidance. Now throws helpful error: "Use browse select instead of click." * chore: bump version and changelog (v0.4.5) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
jscommand now handles statements —const, semicolons, multi-line code withawaitall work correctly instead of throwing SyntaxError. SharedwrapForEvaluate()helper DRYs upjsandeval.<option>refs auto-routes toselectOption()— no more 5-second hang when an agent clicks@e3 [option] "Admin". Checks both ARIA role and DOMtagNameto avoid blocking custom listbox components.<option>elements give actionable error — "Usebrowse selectinstead ofclickfor dropdown options."Pre-Landing Review
No issues found.
Eval Results
No prompt-related files changed — evals skipped.
TODOS
No TODO items completed in this PR.
Test plan
🤖 Generated with Claude Code