Repository navigation
webview: Fix find in detached editor windows - #337403
Merged
Dmitriy Vasyura (dmitrivMS) merged 1 commit intoSep 23, 2026
Merged
Conversation
Route find and stop-find requests through the webview's current host, distinguishing main window IDs from auxiliary web contents IDs. Add regression coverage for routing, navigation, debounce, and cancellation. Fixes #233044 Co-authored-by: Copilot <[email protected]>
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The reviewed changes have comprehensive regression coverage and no unresolved issues.
Review effort: Balanced
Findings: None
What changed in this PR
Fixes webview find routing after editors move to auxiliary windows.
Changes:
- Routes find and stop-find requests through the webview’s current window.
- Supports main-window and auxiliary web-contents identifiers.
- Adds regression coverage for routing, navigation, debounce, and cancellation.
| File | Description |
|---|---|
src/vs/workbench/contrib/webview/test/electron-browser/webviewElement.test.ts |
Adds find-routing and lifecycle regression tests. |
src/vs/workbench/contrib/webview/electron-browser/webviewElement.ts |
Resolves the webview’s current find target. |
src/vs/platform/webview/electron-main/webviewMainService.ts |
Resolves main-window and auxiliary web contents. |
src/vs/platform/webview/common/webviewManagerService.ts |
Updates find APIs to accept either identifier type. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Dmitriy Vasyura (dmitrivMS)
marked this pull request as ready for review
September 23, 2026 04:00
Dmitriy Vasyura (dmitrivMS)
enabled auto-merge (squash)
September 23, 2026 04:00
Anthony Kim (anthonykim1)
approved these changes
Sep 23, 2026
Dmitriy Vasyura (dmitrivMS)
deleted the
agents/fix-webview-findwidget-issue-233044
branch
September 23, 2026 04:57
Abdon Morales (abdonmorales)
pushed a commit
to abdonmorales/vscode-utcs
that referenced
this pull request
Sep 23, 2026
Fix webview find in detached editor windows Route find and stop-find requests through the webview's current host, distinguishing main window IDs from auxiliary web contents IDs. Add regression coverage for routing, navigation, debounce, and cancellation. Fixes microsoft#233044 Co-authored-by: Copilot <[email protected]> (cherry picked from commit 9cc2a44)
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fixes #233044
Webview find requests always used the original main window ID. After moving an editor group into an auxiliary window, the main process consequently searched the wrong web contents.
windowId/webContentsIdunion to distinguish main-window IDs from auxiliary web-contents IDs, reusing the existing web-contents resolver.