Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/vs/platform/browserView/common/browserView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export enum BrowserViewCommandId {
Open = `${commandPrefix}.open`,
NewTab = `${commandPrefix}.newTab`,
QuickOpen = `${commandPrefix}.quickOpen`,
OpenOrList = `${commandPrefix}.openOrList`,
CloseAll = `${commandPrefix}.closeAll`,
CloseAllInGroup = `${commandPrefix}.closeAllInGroup`,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class BrowserTabQuickPick extends Disposable {
super();

this._quickPick = this._register(quickInputService.createQuickPick<IBrowserQuickPickItem>({ useSeparators: true }));
this._quickPick.placeholder = localize('browser.quickOpenPlaceholder', "Select a browser tab or enter a URL");
this._quickPick.placeholder = localize('browser.quickOpenPlaceholder', "Select a browser tab");
this._quickPick.matchOnDescription = true;
this._quickPick.sortByLabel = false;
this._quickPick.buttons = [closeAllButtonItem];
Expand Down Expand Up @@ -225,7 +225,6 @@ class BrowserTabQuickPick extends Disposable {

class QuickOpenBrowserAction extends Action2 {
constructor() {
const neverShowInTitleBar = ContextKeyExpr.equals('config.workbench.browser.showInTitleBar', false);
super({
id: BrowserViewCommandId.QuickOpen,
title: localize2('browser.quickOpenAction', "Quick Open Browser Tab..."),
Expand All @@ -239,12 +238,6 @@ class QuickOpenBrowserAction extends Action2 {
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyA,
when: BROWSER_EDITOR_ACTIVE
},
menu: {
id: MenuId.TitleBar,
group: 'navigation',
order: 10,
when: ContextKeyExpr.and(CONTEXT_BROWSER_EDITOR_OPEN, neverShowInTitleBar.negate()),
}
});
}

Expand Down Expand Up @@ -274,16 +267,6 @@ class OpenIntegratedBrowserAction extends Action2 {
category: BrowserActionCategory,
icon: Codicon.globe,
f1: true,
menu: {
id: MenuId.TitleBar,
group: 'navigation',
order: 10,
when: ContextKeyExpr.and(
// This is a hack to work around `true` just testing for truthiness of the key. It works since `1 == true` in JS.
ContextKeyExpr.equals('config.workbench.browser.showInTitleBar', 1),
CONTEXT_BROWSER_EDITOR_OPEN.negate()
)
}
});
}

Expand Down Expand Up @@ -420,18 +403,30 @@ class CloseAllBrowserTabsInGroupAction extends Action2 {
}
}

class OpenBrowserFromViewMenuAction extends Action2 {
static readonly ID = 'workbench.action.browser.openFromViewMenu';

class OpenOrListBrowsersAction extends Action2 {
constructor() {
super({
id: OpenBrowserFromViewMenuAction.ID,
title: localize2('browser.openFromViewMenuAction', "Browser"),
id: BrowserViewCommandId.OpenOrList,
title: localize2('browser.openOrListAction', "Browser"),
icon: Codicon.globe,
Comment on lines +406 to +411
Copy link

Copilot AI Apr 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OpenOrListBrowsersAction is named in the plural, but the command/title is singular ("Browser") and the action is effectively "open browser" or "list tabs". Consider renaming the class (and any related identifiers) to a singular form to better match behavior and reduce confusion when searching for the action.

Copilot generated this review using guidance from repository custom instructions.
f1: false,
keybinding: {
weight: KeybindingWeight.WorkbenchContrib,
primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.Slash,
},
menu: {
id: MenuId.TitleBar,
group: 'navigation',
order: 10,
when: ContextKeyExpr.and(
ContextKeyExpr.equals('config.workbench.browser.showInTitleBar', false).negate(),
ContextKeyExpr.or(
CONTEXT_BROWSER_EDITOR_OPEN,
// This is a hack to work around `true` just testing for truthiness of the key. It works since `1 == true` in JS.
ContextKeyExpr.equals('config.workbench.browser.showInTitleBar', 1)
)
),
}
});
}

Expand All @@ -454,7 +449,7 @@ class OpenBrowserFromViewMenuAction extends Action2 {
MenuRegistry.appendMenuItem(MenuId.MenubarViewMenu, {
group: '4_auxbar',
command: {
id: OpenBrowserFromViewMenuAction.ID,
id: BrowserViewCommandId.OpenOrList,
title: localize({ key: 'miOpenBrowser', comment: ['&& denotes a mnemonic'] }, "&&Browser")
},
order: 2
Expand All @@ -465,7 +460,7 @@ MenuRegistry.appendMenuItem(MenuId.EditorTitleContext, { command: { id: BrowserV

registerAction2(QuickOpenBrowserAction);
registerAction2(OpenIntegratedBrowserAction);
registerAction2(OpenBrowserFromViewMenuAction);
registerAction2(OpenOrListBrowsersAction);
registerAction2(NewTabAction);
registerAction2(CloseAllBrowserTabsAction);
registerAction2(CloseAllBrowserTabsInGroupAction);
Expand Down
Loading