Launch Query Profiler 'in active' instead that beside#21498
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the Query Profiler webview’s default editor-column placement so it opens in the currently active column rather than always opening beside the current editor.
Changes:
- Set the Profiler webview panel creation
viewColumntovscode.ViewColumn.Active(wasBeside). - Change
panel.reveal(...)calls to usevscode.ViewColumn.Activeinstead ofBeside.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| public revealToForeground(): void { | ||
| this.panel.reveal(vscode.ViewColumn.Beside); | ||
| this.panel.reveal(vscode.ViewColumn.Active); | ||
| } |
There was a problem hiding this comment.
revealToForeground() now uses ViewColumn.Active, which will move an existing profiler panel into whatever editor column is currently active (e.g., when re-opening an already-open XEL profiler from ProfilerController.openXelFile). If the intent is only to change the initial launch location, consider revealing without specifying a column (or using this.panel.viewColumn) so the panel is simply brought to the front without being relocated.
| title: title, | ||
| viewColumn: vscode.ViewColumn.Beside, | ||
| viewColumn: vscode.ViewColumn.Active, | ||
| iconPath: { |
There was a problem hiding this comment.
This change alters the panel placement behavior, but the existing unit test (ProfilerWebviewController Tests → "should create a WebviewPanel with correct options") only asserts that createWebviewPanel was called, not which viewColumn was requested. To prevent regressions, update the test to assert that the controller creates/reveals the panel with ViewColumn.Active (and/or preserves the expected column when revealing existing panels, depending on the intended UX).
Description
Change to launch view in active instead of beside.
Code Changes Checklist
npm run test)Reviewers: Please read our reviewer guidelines