[Claimed #2012] fix(cli): support multi-value selection in browse select#2033
Open
github-actions[bot] wants to merge 2 commits intomainfrom
Open
[Claimed #2012] fix(cli): support multi-value selection in browse select#2033github-actions[bot] wants to merge 2 commits intomainfrom
github-actions[bot] wants to merge 2 commits intomainfrom
Conversation
Contributor
Author
|
Contributor
There was a problem hiding this comment.
No issues found across 4 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Architecture diagram
sequenceDiagram
participant User as CLI User
participant CLI as CLI (executeCommand)
participant Core as Core (actHandlerUtils)
participant Playwright as Browser (Page/Locator)
Note over User,Playwright: Multi-Value Selection Flow
User->>CLI: browse select "selector" val1 val2
CLI->>CLI: Parse variadic args into string array
alt NEW: CLI Direct Interaction
CLI->>Playwright: deepLocator(selector)
Playwright-->>CLI: locator instance
alt values.length == 1
CLI->>Playwright: selectOption(value)
else values.length > 1 (NEW)
CLI->>Playwright: CHANGED: selectOption([val1, val2, ...])
end
Playwright-->>CLI: Array of selected values
end
Note over CLI,Core: Internal Core Action Flow
opt Understudy / Deterministic Action
Core->>Core: selectOption(ctx)
Note right of Core: ctx.args contains multiple values
alt values.length <= 1
Core->>Playwright: selectOption(text)
else values.length > 1 (NEW)
Core->>Playwright: CHANGED: selectOption(string[])
end
Playwright-->>Core: void
end
CLI-->>User: { "selected": ["val1", "val2"] }
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.
Mirrored from external contributor PR #2012 after approval by @pirate.
Original author: @BABTUNA
Original PR: #2012
Approved source head SHA:
1271e2d5037b95a8d13c2f7fa20b2ea69caaa2a9@BABTUNA, please continue any follow-up discussion on this mirrored PR. When the external PR gets new commits, this same internal PR will be marked stale until the latest external commit is approved and refreshed here.
Original description
Summary
one.
Problem
browse select accepts variadic values (<values...>), but implementation
only forwarded values[0], so multi-select usage was broken :{.
Changes
with: