[Refactor] Reuse webview render helper in remaining settings specs - #1204
Merged
Conversation
Co-authored-by: Roomote <roomote@roomote.dev>
Contributor
Author
|
Author self-review summary:
Per initiative policy, not approving this Roomote-authored PR — leaving review to a human maintainer. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
edelauna
marked this pull request as ready for review
August 9, 2026 00:52
edelauna
requested review from
JamesRobert20,
edelauna,
hannesrudolph,
navedmerchant and
taltas
as code owners
August 9, 2026 00:52
edelauna
approved these changes
Aug 9, 2026
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.
Related GitHub Issue
N/A: Phase 3 webview test-utils refactor — final settings batch.
Description
Completes the webview lane's render-helper migration after #1203. The four heavier settings specs stop hand-wrapping renders in
QueryClientProviderand go through the sharedrenderWithExtensionStatehelper:SettingsView.change-detection.spec.ts→.tsxrenders pass their existingqueryClient(with retry config) via the helper's optionsSettingsView.unsaved-changes.spec.tsx— sameModelPicker.spec.tsx— sameModelPicker.deprecated.spec.tsx— sameNotes for reviewers:
{ queryClient }so the file's existing client and its retry configuration are preserved exactly.rerender(...)calls now pass only the inner element; RTL reuses the helper's wrapper.@src/context/ExtensionStateContextwith onlyuseExtensionStategained a one-line local passthroughExtensionStateContextProvider— required for the helper's provider import to resolve against the mock.ModelPicker.deprecatedhas no extension-state mock and uses the real provider through the helper.webview-ui/src/components/**/__tests__hand-wrapsQueryClientProvideranymore.Component mocks, fixtures, and assertions stay local and unchanged. This is a test-only refactor with no intended runtime or user-facing behavior change.
Test Procedure
pnpm exec vitest run src/components/settings/__tests__/SettingsView.change-detection.spec.tsx src/components/settings/__tests__/SettingsView.unsaved-changes.spec.tsx src/components/settings/__tests__/ModelPicker.spec.tsx src/components/settings/__tests__/ModelPicker.deprecated.spec.tsxfromwebview-ui(26 tests passed)pnpm test(webview suite: 144 files, 1,590 tests passed; extension suite: 445 files, 7,355 tests passed)pnpm lintpnpm check-typesPre-Submission Checklist
Visual Snapshots
Not applicable; no product UI changed.
Videos (interaction / animation only)
Not applicable; no product interaction changed.
Documentation Updates
Additional Notes
No changesets were added. Author self-review found no behavior or scope regressions.
Get in Touch
Mention
@roomoteon this PR for follow-up requests.