Skip to content

test(ci): open the native VS Code model picker with Enter - #1805

Open
lilly-luo wants to merge 1 commit into
mainfrom
isaac/lilly.luo/vscode-model-picker-keyboard-20261120
Open

lilly-luo wants to merge 1 commit into
mainfrom
isaac/lilly.luo/vscode-model-picker-keyboard-20261120

Conversation

@lilly-luo

@lilly-luo lilly-luo commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

What did you change, and why?

The model-picker mouse click intermittently hits a neighboring Use configured approval settings tooltip. Native evidence records the model button center (1266.56, 813) inside the hover rectangle (1207..1437.61, 811..838), while Playwright correctly refuses the intercepted click.

Open only the visible primary model-name button with its native Enter handler. VS Code 1.144.0 renders that primary button as focusable and registers Enter/Space to open the model-name picker. The outer split container is a non-tabbable group, so target its visible .model-picker-name child. Keep the original two-second action timeout, screen-change recovery, other mouse actions, model-selection checks and completed inference assertions.

How do you know it works?

Final head d6468c4 passed all four existing VS Code cases on each platform: Linux and Windows, eight passes with no failures or skips. Saved switch artifacts show Models, Claude Haiku 4.5 and Models, GPT 6 Luna, completed native file-read answers without errors, and the expected Claude/GPT route/model records. Existing assertions validate hidden file values and correlated successful responses.

Python compilation, git diff --check and commit/push secret scans passed. Passing runs do not deliberately force tooltip overlap; the separate failed-run evidence establishes that geometry, and the pinned handler proves keyboard activation avoids pointer hit testing. tests/README.md is unchanged.

The diagnostic PR #1804 is closed unmerged as superseded by this smaller fix; its artifact and pushed branch preserve the investigation evidence.

Checklist before requesting review

  • Comment /ug-review and address the comments. UG review recommended APPROVE with zero findings; Polly found no blocking/security issues and its native validation note is answered with both platform results.
  • Ordinary PR CI runs integration; /integration-test will not be commented, as instructed.

@lilly-luo

Copy link
Copy Markdown
Collaborator Author

/ug-review


This comment was generated with GitHub MCP.

@lilly-luo lilly-luo added the ug-review Run the automated UG review label Nov 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

✅ OpenCodeReview: Review complete: 0 finding(s) across 1 selected item(s).

@github-actions

Copy link
Copy Markdown
Contributor

UG review recommendation

RECOMMENDATION: APPROVE

Reasons:

  • The review completed with no findings on the changed lines.

Complete review of 1 files; no findings.

Advisory only: this recommendation never approves or merges the pull request. The ready-to-approve label tracks it.

@github-actions github-actions Bot added the ready-to-approve Ready for maintainer approval label Nov 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Polly AI Review

Blocking issues

None identified.

Security vulnerabilities

None identified.

Non-blocking notes

  • tests/integration/utils/vscode.py:400: can you show Linux/Windows tooltip-overlap runs with readable model names and completed Claude/GPT answers?

Approach

The approach is sound. Native Enter activation avoids pointer interception without forced clicks, DOM mutation, additional waits, or retries. The locator remains scoped to the existing first split button.

Summary

Diff size (computed): 2 files; +10 / -1 lines (11 changed text lines); 0 binary files.

Category Files Added Deleted Share of changed text lines
Tests and test support 2 10 1 100.0%
Documentation 0 0 0 0.0%
Dependencies and lockfiles 0 0 0 0.0%
Implementation / other 0 0 0 0.0%

Shares use additions + deletions, including generated text and lockfiles. Binary files have no line count. Tests include fixtures/helpers under test paths and colocated test/spec files; categories are path-based, not coverage measurements.

Changes

The picker-opening helper switches from a mouse click to Enter on the visible model-name button. Supporting documentation explains the choice. The action timeout, recovery logic, and other mouse actions remain unchanged.

The change is proportional to the reported tooltip interception. No concrete reduction is needed.

Tests

Test-by-test assessment

No test cases are added or removed; the diff modifies a shared helper and test documentation.

Test / case Behavior protected Layer Needed? Action / rationale
tests/integration/utils/vscode.py — VSCode._picker_action, closed-picker branch Opens the primary model picker while retaining bounded actions and existing recovery Native UI helper keep Targets the relevant interaction directly. A mock asserting press("Enter") would not establish native activation.
tests/integration/README.md — VS Code Copilot Chat section Documents keyboard opening and unchanged mouse interactions Test documentation keep Explains the constraint without introducing setup or claiming additional coverage.
tests/integration/test_ug_configure_copilot_vscode.py::test_vscode_copilot_chat_switches_from_claude_to_gpt_in_one_window Repeated model selection, completed answers, and matching requests/responses Native UI / gateway E2E keep Existing assertions are suitable for validating the changed keyboard path across a same-window model switch.
tests/integration/test_ug_configure_copilot_vscode.py::test_vscode_copilot_chat_reads_a_file_on_a_provider_service_model Provider-service selection, routing, and completed inference Native UI / gateway E2E keep Protects a distinct provider-service contract despite sharing picker setup.
tests/integration/test_ug_configure_copilot_vscode.py::test_vscode_copilot_chat_lists_the_new_models_after_reconfigure Picker reopening, new-model inference, and removed-model exclusion Stateful native E2E keep Covers a distinct reconfiguration boundary and negative picker assertion.

Existing scenarios are sufficient in design; native execution is needed to establish that Enter works with the pinned UI and tooltip overlap. No tests were run during this review. Linux/Windows results and linked upstream/artifact evidence remain unverified. Request/response assertions do not establish downstream usage attribution.

Both trusted review policies were read, and the frozen diff checksum matched. The referenced tests/_helpers/README.md is absent from the trusted checkout, limiting the primitive-catalog assessment.

To verify, reproduce the adjacent approval tooltip overlap, activate the model-name button with Enter, select the expected readable models, and complete both file tasks in the existing model-switch scenario on Linux and Windows.

Scope

Both changed files support the single outcome of avoiding tooltip-intercepted picker clicks. No unrelated changes or unresolved scope questions were found.


Automated review by Polly · workflow run

@lilly-luo

Copy link
Copy Markdown
Collaborator Author

Native validation on d6468c4 is complete on both platforms: Linux job136383502134 and Windows job136383502057 each passed all4 existing VS Code cases (zero failures/skips). The same-window switch artifacts show readable Models, Claude Haiku4.5 and Models, GPT6 Luna states, two completed native chat responses with copilot_readFile, no native errors, and requests naming the expected Claude/GPT routes and models. The unchanged tests also assert the unknown file values and correlated successful responses.

For Polly's validation note: these are real pinned Linux/Windows UI runs, not mocked activation. I did not artificially force an overlay in the passing runs. The original overlap is independently established by the linked failed-run geometry/screenshot, and the exact pinned source proves that Enter invokes the model-name button's native handler without pointer hit testing. This avoids adding a separate synthetic UI scenario or weakening any existing task assertion.


This comment was generated with GitHub MCP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants