[Refactor] Reuse webview render helper in chat and settings specs - #1203
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! |
9 tasks
edelauna
marked this pull request as ready for review
August 9, 2026 00:40
edelauna
requested review from
JamesRobert20,
edelauna,
hannesrudolph,
navedmerchant and
taltas
as code owners
August 9, 2026 00:40
edelauna
approved these changes
Aug 9, 2026
edelauna
enabled auto-merge
August 9, 2026 00:41
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 batch.
Description
Extends the ChatRow batch in #1196 across the remaining mechanically similar chat and settings specs. Twelve specs now render through the shared
renderWithExtensionStatehelper instead of assemblingQueryClientProvider/ExtensionStateContextProviderwrappers by hand:ChatView.preserve-images,ChatView.notification-sound,ChatView.scroll-debug-repro,ChatView.clear-approval-buttons,ChatView.keyboard-fix,TaskHeaderRulesSettings,SkillsSettings,SlashCommandsSettings,ApiOptions,ApiOptions.provider-filtering,SettingsViewNotes for reviewers:
RulesSettings/SkillsSettings/SlashCommandsSettingsspecs keep their local@/context/ExtensionStateContextmock (passthrough provider + mutable scenario state set per render); only the QueryClient boilerplate was removed.TaskHeaderandApiOptions.provider-filteringmocked onlyuseExtensionState, so their localvi.mockgained a one-line passthroughExtensionStateContextProvider— required for the shared helper's provider import to resolve.SettingsViewrerenders now pass only the inner element; RTL reuses the helper's wrapper.SettingsView.change-detection,SettingsView.unsaved-changes, and the twoModelPickerspecs, which reuse the client for rerenders/cache access — those land in a follow-up batch to close the lane.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 runover the 12 touched specs fromwebview-ui(145 tests passed)pnpm test(445 files passed, 4 skipped; 7,355 tests passed, 39 skipped)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.