Visual Studio Code, rebuilt in Rust
Rust
feat(menus): read the extension/context menu in the Manage menu
rokartur0f4605b693a5
diff --git a/README.md b/README.mdindex e9c633fd0c2..b7eecc9f8c0 100644--- a/README.md+++ b/README.md@@ -11,8 +11,8 @@ Coverage of VS Code 1.147.0, from [port/ledger.md](port/ledger.md) (584 rows). V```mermaidpie showData- "verified" : 415- "ported" : 15+ "verified" : 414+ "ported" : 16"removed" : 126"n/a" : 28```@@ -20,7 +20,7 @@ pie showData| area | verified | ported | removed | n/a | verified of in scope ||---|---:|---:|---:|---:|---|| src/vs/platform | 68 | 1 | 30 | 13 | `████████████████████ 99%` |-| workbench contribution | 64 | 4 | 30 | 3 | `███████████████████░ 94%` |+| workbench contribution | 63 | 5 | 30 | 3 | `███████████████████░ 93%` || built-in extension | 88 | 1 | 6 | 0 | `████████████████████ 99%` || MainThread* shape (Rust side) | 59 | 0 | 30 | 0 | `████████████████████ 100%` || workbench service | 58 | 7 | 23 | 7 | `██████████████████░░ 89%` |@@ -31,7 +31,7 @@ pie showData| src/vs/editor | 1 | 1 | 1 | 1 | `██████████░░░░░░░░░░ 50%` || src/vs/base | 0 | 0 | 2 | 3 | `████████████████████ 100%` || port feature | 1 | 0 | 0 | 0 | `████████████████████ 100%` |-| **all** | **415** | **15** | **126** | **28** | `███████████████████░ 97%` |+| **all** | **414** | **16** | **126** | **28** | `███████████████████░ 96%` |<!-- coverage:end -->`removed` are parts left out by decision: AI features, Microsoft services, telemetry, remote and tunnels ([port/notes.md](port/notes.md)). `n/a` are upstream test infrastructure and the Electron process, IPC and DOM layers the native architecture replaces.diff --git a/native/crates/app/src/menus.rs b/native/crates/app/src/menus.rsindex f4041a7f377..dea036d2e51 100644--- a/native/crates/app/src/menus.rs+++ b/native/crates/app/src/menus.rs@@ -138,6 +138,8 @@ pub enum MenuId {ViewTitle,/// `MenuId.ViewContainerTitle`: a view container's title actions and `...`, read with `viewContainer` set.ViewContainerTitle,+ /// `MenuId.ExtensionContext`: an extension's Manage menu and its list row's context menu, read with the extension's keys.+ ExtensionContext,ViewItemContext,EditorContent,/// suggest.ts `suggestWidgetStatusbarMenu`.@@ -468,6 +470,12 @@ const WORKBENCH_MENUS: &[Row] = &[(MenuId::ViewContainerTitle, None, "workbench.action.debug.start", "Start Debugging", "navigation", 10., Some("viewContainer == 'workbench.view.debug' && debugUx != 'simple' && workbenchState != 'empty' && (debugState == 'inactive' || config.debug.toolBarLocation != 'docked') && (!config.debug.hideLauncherWhileDebugging || !inDebugMode)"), Some("debugState != 'initializing'")),(MenuId::ViewContainerTitle, None, "workbench.action.debug.configure", "Open 'launch.json'", "navigation", 20., Some("viewContainer == 'workbench.view.debug' && debugUx != 'simple' && workbenchState != 'empty' && (debugState == 'inactive' || config.debug.toolBarLocation != 'docked')"), Some("debugUx != 'simple'")),(MenuId::ViewContainerTitle, None, "workbench.action.debug.configure", "Open 'launch.json'", "", 20., Some("viewContainer == 'workbench.view.debug' && debugState != 'inactive' && config.debug.toolBarLocation == 'docked'"), Some("debugUx != 'simple'")),+ // extensions.contribution.ts: the ExtensionContext items the port has commands for.+ (MenuId::ExtensionContext, None, "workbench.extensions.action.copyExtension", "Copy", "1_copy", 0., None, None),+ (MenuId::ExtensionContext, None, "workbench.extensions.action.copyExtensionId", "Copy Extension ID", "1_copy", 0., None, None),+ (MenuId::ExtensionContext, None, "workbench.extensions.action.copyLink", "Copy Link", "1_copy", 0., Some("isGalleryExtension && galleryHasExtensionLink"), None),+ (MenuId::ExtensionContext, None, "workbench.extensions.action.configure", "Settings", "2_configure", 1., Some("extensionStatus == 'installed' && extensionHasConfiguration"), None),+ (MenuId::ExtensionContext, None, "workbench.extensions.action.configureKeybindings", "Keyboard Shortcuts", "2_configure", 2., Some("extensionStatus == 'installed' && extensionHasKeybindings"), None),(MenuId::ViewContainerTitle, None, "workbench.action.debug.selectandstart", "Start Additional Session", "", 10., Some("viewContainer == 'workbench.view.debug' && debugState != 'inactive' && (config.debug.toolBarLocation == 'docked' || config.debug.hideLauncherWhileDebugging)"), None),// debug.contribution.ts `registerDebugViewMenuItem(MenuId.DebugVariablesContext/DebugHoverContext/DebugWatchContext, ...)`.// shortcut: Set Value, View Binary Data and Break on Value Read/Change/Access wait for their commands (ledger debug row).@@ -909,7 +917,7 @@ pub fn workbench_menus() -> Vec<MenuItem> {/// menusExtensionPoint.ts `apiMenus`: the `contributes.menus` keys of the menus the port shows. `commandPalette`/// is read by `command_palette::menu`.-const API_MENUS: [(&str, MenuId); 49] = [+const API_MENUS: [(&str, MenuId); 50] = [("file/newFile", MenuId::NewFile),("editor/context", MenuId::EditorContext),("explorer/context", MenuId::ExplorerContext),@@ -944,6 +952,7 @@ const API_MENUS: [(&str, MenuId); 49] = [("debug/watch/context", MenuId::DebugWatchContext),("view/title", MenuId::ViewTitle),("viewContainer/title", MenuId::ViewContainerTitle),+ ("extension/context", MenuId::ExtensionContext),("view/item/context", MenuId::ViewItemContext),("editor/context/copy", MenuId::EditorContextCopy),("editor/context/share", MenuId::EditorContextShare),diff --git a/native/crates/app/src/menus/tests.rs b/native/crates/app/src/menus/tests.rsindex 9d78352187d..20588331340 100644--- a/native/crates/app/src/menus/tests.rs+++ b/native/crates/app/src/menus/tests.rs@@ -190,6 +190,7 @@ fn api_menu_keys_reach_their_menus() {("debug/watch/context", MenuId::DebugWatchContext),("scm/historyItemRef/context", MenuId::ScmHistoryItemRefContext),("viewContainer/title", MenuId::ViewContainerTitle),+ ("extension/context", MenuId::ExtensionContext),];for (key, menu) in keys {let item = json!({ "command": "k.run", "when": "viewContainer == workbench.view.debug" });diff --git a/native/crates/app/src/workbench/extensions_list_view.rs b/native/crates/app/src/workbench/extensions_list_view.rsindex c18151d6aab..7dcf9b56614 100644--- a/native/crates/app/src/workbench/extensions_list_view.rs+++ b/native/crates/app/src/workbench/extensions_list_view.rs@@ -12,9 +12,16 @@ use super::extensions_view::{Pane, SEARCH_HEADER_HEIGHT};use super::view_panes::{PaneContainer, ViewPane};use crate::extension_enablement::EnablementState;use crate::extensions_model::{Extension, ExtensionState};-use crate::menus::MenuAction;+use crate::menus::{MenuAction, MenuId};++#[cfg(test)]+mod tests;/// `EXTENSION_LIST_ELEMENT_HEIGHT`.+/// extensions.ts: the ExtensionContext groups ManageExtensionAction places among its own actions.+const THEME_ACTIONS_GROUP: &str = "_theme_";+const INSTALL_ACTIONS_GROUP: &str = "0_install";+const UPDATE_ACTIONS_GROUP: &str = "0_update";const ROW_HEIGHT: f32 = 72.;/// An action button of a row or of the extension editor.@@ -523,17 +530,46 @@ impl Workbench {/// `ManageExtensionAction`: enablement, auto update, install and uninstall, then the extension context menu.pub(super) fn show_manage_extension_menu(&mut self, id: &str, position: gpui::Point<gpui::Pixels>, window: &mut Window, cx: &mut Context<Self>) {let Some(extension) = self.find_extension(id) else { return };- let actions = self.manage_extension_actions(&extension);+ let actions = self.manage_extension_actions(&extension, window);let anchor = gpui::Bounds::new(position, gpui::size(px(0.), px(0.)));self.show_context_menu_actions(actions, &Default::default(), anchor, vec![json!(extension.identifier().id)], window, cx);}- fn manage_extension_actions(&self, extension: &Extension) -> Vec<MenuAction> {+ /// extensionsActions.ts `getContextMenuActionsGroups`: the keys `MenuId.ExtensionContext` is read with, those the+ /// port can tell.+ fn extension_context(&self, extension: &Extension, window: &Window) -> std::collections::HashMap<String, Value> {+ let manifest = extension.local.as_ref().map(|local| &local.description["contributes"]);+ let contributes = |key: &str| manifest.is_some_and(|contributes| !contributes[key].is_null());+ let status = match extension.state {+ ExtensionState::Installing => "installing",+ ExtensionState::Installed => "installed",+ ExtensionState::Uninstalling => "uninstalling",+ ExtensionState::Uninstalled => "uninstalled",+ };+ let mut context = self.key_context(window);+ context.insert("extension".into(), json!(extension.identifier().id));+ context.insert("isBuiltinExtension".into(), json!(extension.is_builtin()));+ context.insert("isGalleryExtension".into(), json!(extension.gallery.is_some()));+ // extensions.contribution.ts sets it from product.json `extensionsGallery.itemUrl`; every gallery entry of the port has its `detail_link`.+ context.insert("galleryHasExtensionLink".into(), json!(extension.gallery.is_some()));+ context.insert("extensionHasConfiguration".into(), json!(contributes("configuration")));+ context.insert("extensionHasKeybindings".into(), json!(contributes("keybindings")));+ context.insert("extensionHasCommands".into(), json!(contributes("commands")));+ context.insert("isExtensionEnabled".into(), json!(extension.enablement.is_enabled()));+ context.insert("extensionStatus".into(), json!(status));+ context+ }++ fn manage_extension_actions(&self, extension: &Extension, window: &Window) -> Vec<MenuAction> {let command = |id: &str, title: &str| MenuAction::Command { id: id.into(), title: title.into(), enabled: true, checked: false, alt: None };+ let context = self.extension_context(extension, window);+ let menu = |keep: &dyn Fn(&str) -> bool| crate::menus::menu_group_actions(&self.menus, MenuId::ExtensionContext, &context, keep);let installed = extension.state == ExtensionState::Installed;let gallery = extension.gallery.is_some();let has_workspace = self.folder.is_some();- let mut groups: Vec<Vec<MenuAction>> = Vec::new();+ let mut groups: Vec<Vec<MenuAction>> = vec![menu(&|group| group == THEME_ACTIONS_GROUP)];+ let mut update = Vec::new();+ let mut install = menu(&|group| group == INSTALL_ACTIONS_GROUP);if installed {let disabled = !extension.enablement.is_enabled();let mut enable = Vec::new();@@ -555,26 +591,16 @@ impl Workbench {groups.push(disable);if !extension.is_builtin() {let checked = self.is_auto_update_enabled_for(extension);- groups.push(vec![MenuAction::Command { id: "workbench.extensions.action.toggleAutoUpdateForExtension".into(), title: "Auto Update".into(), enabled: true, checked, alt: None }]);- groups.push(vec![command("extensions.uninstall", "Uninstall")]);+ update.push(MenuAction::Command { id: "workbench.extensions.action.toggleAutoUpdateForExtension".into(), title: "Auto Update".into(), enabled: true, checked, alt: None });+ install.push(command("extensions.uninstall", "Uninstall"));}} else if extension.state == ExtensionState::Uninstalled && gallery {- groups.push(vec![command("extensions.install", "Install")]);- }- let mut copy = vec![command("workbench.extensions.action.copyExtension", "Copy"), command("workbench.extensions.action.copyExtensionId", "Copy Extension ID")];- if gallery {- copy.push(command("workbench.extensions.action.copyLink", "Copy Link"));- }- groups.push(copy);- let manifest = extension.local.as_ref().map(|local| &local.description);- let mut configure = Vec::new();- if installed && manifest.is_some_and(|manifest| !manifest["contributes"]["configuration"].is_null()) {- configure.push(command("workbench.extensions.action.configure", "Settings"));+ install.insert(0, command("extensions.install", "Install"));}- if installed && manifest.is_some_and(|manifest| manifest["contributes"]["keybindings"].as_array().is_some_and(|keys| !keys.is_empty())) {- configure.push(command("workbench.extensions.action.configureKeybindings", "Keyboard Shortcuts"));- }- groups.push(configure);+ update.extend(menu(&|group| group == UPDATE_ACTIONS_GROUP));+ groups.push(update);+ groups.push(install);+ groups.push(menu(&|group| ![THEME_ACTIONS_GROUP, UPDATE_ACTIONS_GROUP, INSTALL_ACTIONS_GROUP].contains(&group)));let mut actions = Vec::new();for group in groups.into_iter().filter(|group| !group.is_empty()) {if !actions.is_empty() {@@ -658,24 +684,3 @@ fn capitalize(name: &str) -> String {let mut chars = name.chars();chars.next().map(|first| first.to_uppercase().chain(chars).collect()).unwrap_or_default()}--#[cfg(test)]-mod tests {- use serde_json::json;-- use crate::menus::MenuAction;-- #[test]- fn only_a_stable_build_installs_the_release_version_first() {- let install = |quality| {- let _quality = crate::product::test_quality::set(quality);- let button = super::install_dropdown("pub.ext".into(), true);- let [MenuAction::Command { id, title, .. }] = button.dropdown.as_slice() else { panic!("one dropdown command") };- (button.label, button.args[1].clone(), id.clone(), title.clone())- };- assert_eq!(install(Some("stable")), ("Install".into(), json!(false), "extensions.installPreRelease".into(), "Install Pre-Release Version".into()));- for quality in [Some("insider"), None] {- assert_eq!(install(quality), ("Install Pre-Release".into(), json!(true), "extensions.install".into(), "Install Release Version".into()));- }- }-}diff --git a/native/crates/app/src/workbench/extensions_list_view/tests.rs b/native/crates/app/src/workbench/extensions_list_view/tests.rsnew file mode 100644index 00000000000..1138e83d77d--- /dev/null+++ b/native/crates/app/src/workbench/extensions_list_view/tests.rs@@ -0,0 +1,65 @@+use std::path::Path;++use exthost::scan::{ScannedExtension, scan_extension};+use gpui::TestAppContext;+use serde_json::json;++use crate::extension_enablement::EnablementState;+use crate::extensions_model::{Extension, ExtensionState};+use crate::host_sync::HostSync;+use crate::languages::Languages;+use crate::menus::MenuAction;+use crate::theme::load_theme;+use crate::workbench::Workbench;++#[test]+fn only_a_stable_build_installs_the_release_version_first() {+ let install = |quality| {+ let _quality = crate::product::test_quality::set(quality);+ let button = super::install_dropdown("pub.ext".into(), true);+ let [MenuAction::Command { id, title, .. }] = button.dropdown.as_slice() else { panic!("one dropdown command") };+ (button.label, button.args[1].clone(), id.clone(), title.clone())+ };+ assert_eq!(install(Some("stable")), ("Install".into(), json!(false), "extensions.installPreRelease".into(), "Install Pre-Release Version".into()));+ for quality in [Some("insider"), None] {+ assert_eq!(install(quality), ("Install Pre-Release".into(), json!(true), "extensions.install".into(), "Install Release Version".into()));+ }+}++/// extensionsActions.ts `ManageExtensionAction.getActionGroups`: after enablement, auto update and uninstall come the+/// `MenuId.ExtensionContext` groups, the workbench's Copy and Settings items with an extension's `extension/context`+/// item read with the extension's keys.+#[gpui::test]+fn the_manage_menu_lists_the_extension_context_menu(cx: &mut TestAppContext) {+ let app_root = Path::new(env!("VSCODE_SRC")).to_path_buf();+ let themes = scan_extension(&app_root.join("extensions/theme-defaults"), true).unwrap();+ let theme = load_theme(&[themes], "Dark Modern").unwrap();+ let (workbench, cx) = cx.add_window_view(|_, cx| Workbench::new(theme, app_root.clone(), None, Languages::new(&[]), crate::default_settings(), HostSync::new(std::sync::mpsc::channel().0), cx));+ let contributor = ScannedExtension {+ id: "test.contributor".into(),+ location: app_root.clone(),+ description: json!({ "contributes": {+ "commands": [{ "command": "c.report", "title": "Report Extension" }, { "command": "c.other", "title": "Other Extension" }],+ "menus": { "extension/context": [+ { "command": "c.report", "group": "4_port", "when": "extension == test.configured && extensionStatus == installed" },+ { "command": "c.other", "group": "4_port", "when": "extension == test.other" }+ ] }+ } }),+ };+ let configured = Extension {+ local: Some(ScannedExtension { id: "test.configured".into(), location: app_root.clone(), description: json!({ "contributes": { "configuration": {} } }) }),+ gallery: None,+ state: ExtensionState::Installed,+ enablement: EnablementState::EnabledGlobally,+ running: true,+ restart_required: false,+ };+ workbench.update(cx, |workbench, _| workbench.menus.extend(crate::menus::extension_menus(&[contributor])));+ let actions = workbench.update_in(cx, |workbench, window, _| workbench.manage_extension_actions(&configured, window));+ let titles: Vec<&str> = actions.iter().map(|action| match action {+ MenuAction::Command { title, .. } => title.as_str(),+ MenuAction::Separator => "---",+ MenuAction::Submenu { title, .. } => title.as_str(),+ }).collect();+ assert_eq!(titles, ["Disable", "---", "Auto Update", "---", "Uninstall", "---", "Copy", "Copy Extension ID", "---", "Settings", "---", "Report Extension"]);+}diff --git a/port/fixtures/extensions/menus/package.json b/port/fixtures/extensions/menus/package.jsonindex 581561d73fb..0e4513c7a6c 100644--- a/port/fixtures/extensions/menus/package.json+++ b/port/fixtures/extensions/menus/package.json@@ -2,18 +2,48 @@"name": "menus","publisher": "port","version": "0.0.1",- "description": "Contributions to the contributes.menus ids of menusExtensionPoint.ts, one group per id, for port/tools/ui-pair (port/fixtures/ui-pair/menus).",- "engines": { "vscode": "^1.100.0" },- "enabledApiProposals": ["contribViewContainerTitle"],+ "description": "Contributions to the contributes.menus ids of menusExtensionPoint.ts, for port/tools/ui-pair (port/fixtures/ui-pair/menus).",+ "engines": {+ "vscode": "^1.100.0"+ },+ "enabledApiProposals": [+ "contribViewContainerTitle"+ ],"contributes": {"commands": [- { "command": "port.menus.containerRun", "title": "Port Container Run", "icon": "$(rocket)" },- { "command": "port.menus.containerMore", "title": "Port Container Action" }+ {+ "command": "port.menus.containerRun",+ "title": "Port Container Run",+ "icon": "$(rocket)"+ },+ {+ "command": "port.menus.containerMore",+ "title": "Port Container Action"+ },+ {+ "command": "port.menus.extensionReport",+ "title": "Port Extension Action"+ }],"menus": {"viewContainer/title": [- { "command": "port.menus.containerRun", "group": "navigation", "when": "viewContainer == workbench.view.debug" },- { "command": "port.menus.containerMore", "group": "1_port", "when": "viewContainer == workbench.view.debug" }+ {+ "command": "port.menus.containerRun",+ "group": "navigation",+ "when": "viewContainer == workbench.view.debug"+ },+ {+ "command": "port.menus.containerMore",+ "group": "1_port",+ "when": "viewContainer == workbench.view.debug"+ }+ ],+ "extension/context": [+ {+ "command": "port.menus.extensionReport",+ "group": "4_port",+ "when": "extension == vscode.emmet"+ }]}}diff --git a/port/fixtures/ui-pair/menus/extension-context.json b/port/fixtures/ui-pair/menus/extension-context.jsonnew file mode 100644index 00000000000..8a34563ef3a--- /dev/null+++ b/port/fixtures/ui-pair/menus/extension-context.json@@ -0,0 +1,12 @@+[+ {"wait": 4000},+ {"hotkey": ["cmd", "shift", "x"], "foreground": true},+ {"wait": 2000},+ {"type": "@builtin emmet"},+ {"wait": 3000},+ {"rightClick": [180, 145], "foreground": true},+ {"wait": 1000},+ {"shot": "menu"},+ {"key": "escape", "foreground": true},+ {"wait": 500}+]diff --git a/port/ledger.md b/port/ledger.mdindex c4e7fa6d96b..329318cb18c 100644--- a/port/ledger.md+++ b/port/ledger.md@@ -365,7 +365,7 @@ One row per upstream unit, generated by `bun port/tools/gen-ledger.ts`; mileston| workbench/parts/views | workbench part | M11 | verified | | Explorer views as panes (view_panes.rs): collapse by mouse and keys, sashes, header drag to reorder with drop overlay, state in workbench.explorer.views.state; no view actions, view menus or hidden views; cargo test -p app view_panes, ui-pair port/results/layout.md; pane headers drawn statically (workbench.rs section_header): no collapse, resize or view actions; verified: ui-pair port/results/references-view.md and every pair of port/results/windows.md (milestone 11 verification): the Explorer panes and contributed views as the reference; Explorer and Source Control views as panes of a ViewPaneContainer (view_panes.rs `PaneContainer`): collapse by mouse and keys, sashes, header drag to reorder with drop overlay, single view merged into the container, header actions, state in the container's storageId; cargo test -p app view_panes scm_container, ui-pair port/results/layout.md and port/fixtures/ui-pair/m11/scm-panes.json (port/notes.md View panes); verified: ui-pair port/results/references-view.md and every pair of port/results/windows.md (milestone 11 verification): the Explorer panes and contributed views as the reference; Run and Debug, Extensions and webview containers still draw section_header rows: no collapse, resize or view actions; welcome buttons draw their `$(icon)`s (cargo test -p app a_welcome_button_draws_its_label_icons; ui-pair port/fixtures/ui-pair/icons/scm-welcome.json: github's Publish to GitHub button with the github codicon as the reference); wrapped text stacks unsnapped 18.2px lines as Chromium (vendor gpui elements/text.rs; cargo test -p app wrapped_lines_keep_their_fractional_line_height): scm-welcome's Publish button 0.5pt from the reference, was 2.5pt; left: the port wraps "Git" of "To learn more about how to use Git" to the next line; a merged view's "..." puts the Views submenu, a separator and the view's own actions (panecomposite.ts `getSecondaryActions`; cargo test -p app a_merged_changes_view_shows_the_views_submenu_in_its_more_actions a_merged_view_without_actions_lists_the_view_toggles_flat) || workbench/services/accessibility | workbench service | M19 | verified | | electron-browser accessibilityService.ts over GPUI: screen reader attach follows Electron's `isAccessibilitySupportEnabled` on macOS (VoiceOver, or an assistive app setting AXManualAccessibility or AXEnhancedUserInterface, as cua-driver does; ui-pair screen-reader-detection.json with accessibility support auto shows the prompt in both), the Screen reader usage detected prompt and status entry; port/tools/a11y-check; cargo test -p app accessib; electron-browser accessibilityService.ts over GPUI: screen reader attach follows is_a11y_active, the Screen reader usage detected prompt and status entry; port/tools/a11y-check; cargo test -p app accessib || workbench/services/accounts | workbench service | | removed | | no sign-in/AI by decision (port/notes.md); not ported |-| workbench/services/actions | workbench service | M9 | ported | [3 L] contributes.menus: unmapped ids of menusExtensionPoint.ts, each needing its view's menu first: debug/toolBar (debug_toolbar.rs draws a fixed action list), debug/createConfiguration, testing/item/gutter, testing/profiles/context, testing/item/result, testing/message/context, testing/message/content, webview/context, extension/context, editor/title/run, modalEditor/editorTitle, editor/inlineCompletions/actions, diffEditor/gutter/selection, multiDiffEditor/content, notebook/cell/execute, notebook/kernelSource, notebook/variables/context, mergeEditor/result/title, comments/comment/editorActions, comments/commentThread/additionalActions, comments/commentThread/title/context, comments/commentThread/comment/context, issue/reporter, titleBar; ports/*, statusBar/remoteIndicator, menuBar/home class 4; touchBar class 2 | contributes.menus and contributes.submenus for editor/context, explorer/context, editor/title/context (menus::extension_menus): cargo test -p app menus explorer_actions; terminal/context, terminal/title/context, debug/callstack/context, debug/variables/context, debug/watch/context, scm/resourceFolder/context and scm/historyItemRef/context (cargo test -p app api_menu_keys_reach_their_menus a_folder_row a_history_item_menu); viewContainer/title on the Run and Debug title with its debugViewlet.ts items (cargo test -p app view_container_title the_debug_container_more_actions; ui-pair `menus/view-container-title.json` with `ARGS=--extensionDevelopmentPath=port/fixtures/extensions/menus`, the rocket and the `...` items match the reference); the AI menu ids (chat/*, chatSessions/*, agents/*, agents/titleBar, editor/context/chat, searchPanel/aiResults/commands) removed by decision (port/notes.md:35); ui-pair README.md Explorer menu (port/results/contextmenu.md); other menu ids wait for their views |+| workbench/services/actions | workbench service | M9 | ported | [3 L] contributes.menus: unmapped ids of menusExtensionPoint.ts, each needing its view's menu first: debug/toolBar (debug_toolbar.rs draws a fixed action list), debug/createConfiguration, testing/item/gutter, testing/profiles/context, testing/item/result, testing/message/context, testing/message/content, webview/context, editor/title/run, modalEditor/editorTitle, editor/inlineCompletions/actions, diffEditor/gutter/selection, multiDiffEditor/content, notebook/cell/execute, notebook/kernelSource, notebook/variables/context, mergeEditor/result/title, comments/comment/editorActions, comments/commentThread/additionalActions, comments/commentThread/title/context, comments/commentThread/comment/context, issue/reporter, titleBar; ports/*, statusBar/remoteIndicator, menuBar/home class 4; touchBar class 2 | contributes.menus and contributes.submenus for editor/context, explorer/context, editor/title/context (menus::extension_menus): cargo test -p app menus explorer_actions; terminal/context, terminal/title/context, debug/callstack/context, debug/variables/context, debug/watch/context, scm/resourceFolder/context and scm/historyItemRef/context (cargo test -p app api_menu_keys_reach_their_menus a_folder_row a_history_item_menu); viewContainer/title on the Run and Debug title with its debugViewlet.ts items (cargo test -p app view_container_title the_debug_container_more_actions; ui-pair `menus/view-container-title.json` with `ARGS=--extensionDevelopmentPath=port/fixtures/extensions/menus`, the rocket and the `...` items match the reference); extension/context in the Manage and row menus after extensionsActions.ts `ManageExtensionAction` (cargo test -p app the_manage_menu_lists_the_extension_context_menu; ui-pair `menus/extension-context.json`, the Copy, Settings and contributed groups match the reference); the AI menu ids (chat/*, chatSessions/*, agents/*, agents/titleBar, editor/context/chat, searchPanel/aiResults/commands) removed by decision (port/notes.md:35); ui-pair README.md Explorer menu (port/results/contextmenu.md); other menu ids wait for their views || workbench/services/activity | workbench service | M11 | verified | | activity badges of view containers: view `$setBadge` values, the SCM and Extensions counts and `withProgress` progress badges (300 ms delay, kept 300 ms), numbers summed and shortened as compositeBarActions.ts (workbench/activity.rs; cargo test -p app -- activity progress_at_a_view_container_badges_its_activity_bar_item); `withCompositeProgress` progress bars of a container (side bar or panel title bottom) and of a view (pane header, merged title): `options.delay`, discrete worked of total, infinite, gone on done (progress_at_a_view_container_shows_its_progress_bar_under_the_title); ui-pair `activity-badge.json` on a git folder with two changes: the Source Control badge matches the reference (AE 1808 over the window, port/results/layout.md) || workbench/services/agentEditorComments | workbench service | | removed | | no sign-in/AI by decision (port/notes.md); not ported || workbench/services/agentHost | workbench service | | removed | | no sign-in/AI by decision (port/notes.md); not ported |@@ -482,7 +482,7 @@ One row per upstream unit, generated by `bun port/tools/gen-ledger.ts`; mileston| workbench/contrib/emergencyAlert | workbench contribution | | removed | | no AI or Microsoft services by decision (port/notes.md); API stays inert || workbench/contrib/emmet | workbench contribution | M13 | verified | | workbench/emmet.rs: Emmet: Expand Abbreviation (`emmet.expandAbbreviation` with the language at the cursor and the emmet parent mode of its grammar's scope, emmetAction.test.ts cases), Tab with `emmet.triggerExpansionOnTab`, the Edit menu entry: cargo test -p app emmet menubar || workbench/contrib/encryption | workbench contribution | M10 | n/a | | encryption.contribution.ts only migrates Linux `password-store` argv values to gnome-libsecret; the port runs on macOS and keeps secrets in the Keychain |-| workbench/contrib/extensions | workbench contribution | M18 | verified | | Extensions view as view panes (cargo test -p app the_views_are_panes; ui-pair port/fixtures/extensions/ui-view.json), queries, details editor, enablement, updates, badge, Help: Start/Continue/Stop Extension Bisect (services/extensionManagement/browser/extensionBisect.ts: state in the application storage across reloads, bisect-disabled extensions as DisabledByEnvironment in the window and out of the host, the urgent sticky prompt, the default-checked Keep this extension disabled; Report Issue & Continue is out with the removed contrib/issue): cargo test -p app extension_bisect, bisect_finds_the_extension_and_keeps_it_disabled; cargo test -p app extension (extensionsViews.test.ts, extensionQuery.test.ts, extensionEnablementService.test.ts cases); Features tab tables and markdown of extensionFeaturesTab.ts and the registered renderers: cargo test -p app extension_features; Runtime Status Uncaught Errors from `$onExtensionRuntimeError` and Messages: cargo test -p app the_runtime_status_lists_uncaught_errors_and_messages, invalid_contributed, static_entries_need_the_proposal, group_needs_the_proposal, debuggers_merge_by_type_and_keep_the_built_in_values, skipped_menu_contributions_are_extension_messages, contributed_command_messages, invalid_views_and_view_containers_are_extension_messages, invalid_configuration_is_an_extension_message, invalid_json_validation_is_an_extension_message, invalid_colors_and_icons_are_extension_messages, invalid_semantic_token_contributions_are_extension_messages, invalid_problem_patterns_and_matchers_are_extension_messages, invalid_grammars_are_extension_messages, invalid_notebook_contributions_are_extension_messages (the authentication point is out with the removed services/authentication); ui-pair port/fixtures/extensions/ui-view.json (view, search, details) against the reference |+| workbench/contrib/extensions | workbench contribution | M18 | ported | [3 S] extensions_list_view.rs `manage_extension_actions`: for a built-in extension (ui-pair `menus/extension-context.json`, `@builtin emmet`) the reference lists Enable, Enable (Workspace), Install Specific Version... and Uninstall disabled where the port leaves them out, and the right-clicked row gets no focus outline in the port <br> [3 M] extensions.contribution.ts: of the `MenuId.ExtensionContext` items the port has Copy, Copy Extension ID, Copy Link, Settings and Keyboard Shortcuts; the theme, pre-release, install, download, account, profile, sync and recommendation items wait for their commands, and the keys they read (`isExtensionRecommended`, `extensionHasColorThemes`, `isExtensionAllowed`, ...) are not set | Extensions view as view panes (cargo test -p app the_views_are_panes; ui-pair port/fixtures/extensions/ui-view.json), queries, details editor, enablement, updates, badge, Help: Start/Continue/Stop Extension Bisect (services/extensionManagement/browser/extensionBisect.ts: state in the application storage across reloads, bisect-disabled extensions as DisabledByEnvironment in the window and out of the host, the urgent sticky prompt, the default-checked Keep this extension disabled; Report Issue & Continue is out with the removed contrib/issue): cargo test -p app extension_bisect, bisect_finds_the_extension_and_keeps_it_disabled; cargo test -p app extension (extensionsViews.test.ts, extensionQuery.test.ts, extensionEnablementService.test.ts cases); Features tab tables and markdown of extensionFeaturesTab.ts and the registered renderers: cargo test -p app extension_features; Runtime Status Uncaught Errors from `$onExtensionRuntimeError` and Messages: cargo test -p app the_runtime_status_lists_uncaught_errors_and_messages, invalid_contributed, static_entries_need_the_proposal, group_needs_the_proposal, debuggers_merge_by_type_and_keep_the_built_in_values, skipped_menu_contributions_are_extension_messages, contributed_command_messages, invalid_views_and_view_containers_are_extension_messages, invalid_configuration_is_an_extension_message, invalid_json_validation_is_an_extension_message, invalid_colors_and_icons_are_extension_messages, invalid_semantic_token_contributions_are_extension_messages, invalid_problem_patterns_and_matchers_are_extension_messages, invalid_grammars_are_extension_messages, invalid_notebook_contributions_are_extension_messages (the authentication point is out with the removed services/authentication); ui-pair port/fixtures/extensions/ui-view.json (view, search, details) against the reference || workbench/contrib/externalTerminal | workbench contribution | M15 | verified | | workbench/external_terminal.rs: Open New External Terminal (`workbench.action.terminal.openNativeConsole`, cmd+shift+c), with several workspace folders after the Select workspace folder pick (cargo test -p app open_native_console_picks_a_folder_in_a_multi_root_workspace); cargo test -p app external_terminal; ui-pair (port/results/terminal.md) || workbench/contrib/externalUriOpener | workbench contribution | M12 | verified | | workbench/opener.rs: externalUriOpenerService.ts getRequestedOpener (workbench.externalUriOpeners globs), chooseOpener, "How would you like to open: {0}" picker; no Simple Browser (out of scope); verified at port-m12b-verify: cargo test -p app opener 4/4; Simple Browser is out of scope by decision || workbench/contrib/files | workbench contribution | M12 | ported | [3 S] explorer_actions/tests.rs:846: list_click_settings_change_what_clicks_do failed once ("a single click only selects the folder") in three concurrent `cargo test -p app -- editor:: workbench::` runs, passed in the next three | virtual workspaces (non-file folders): milestone 25; Cmd+V pastes the files another app copied after explorer.confirmPasteNative (explorerView.ts paste listener, fileActions.ts `pasteFileHandler`: cargo test -p app cmd_v_pastes_the_files_finder_copied); Dragged workspace roots reorder before or after a root by the pointer's half, or to the end, with the list.dropBetweenBackground line (explorerViewer.ts `doHandleRootDrop`: cargo test -p app dragging_a_root_reorders_the_workspace_folders; ui-pair dragShot of a three-root workspace, line over a root and below the rows matches); Compact folders off while optimized for a screen reader (explorerView.ts `isCompressionEnabled`: cargo test -p app compacts_single_child_folders_into_one_row); A workspace root that fails to resolve: the single folder's file item of its own resource, the "!" decoration in `list.invalidItemForeground` with "Unable to resolve workspace folder (...)" (explorerViewer.ts `getChildren`, explorerDecorationsProvider.ts: cargo test -p app a_workspace_root_that_fails_to_resolve_is_decorated_with_its_error; ui-pair of a two-root workspace with a missing folder, row and hover match); a copy soft-reverts the target's dirty model, which shows the copied file (workingCopyFileService.ts `doMoveOrCopy`: cargo test -p app a_copy_onto_a_dirty_model_reverts_it_to_the_copied_file); An unreadable folder expands to no children without an error (fileService.ts `toFileStat`: cargo test -p app an_unreadable_folder_expands_to_no_children); Explorer tree read from disk (explorer.rs): folders first, default excludes, click to expand, click opens a file as preview, double click pins, selection follows the active editor; Seti file icons and compareFileNamesDefault sort; workspace folders as roots, first five expanded (cargo test -p app); new file and folder, rename, delete, copy, cut, paste, drag and drop and undo through the working copy file operations (cargo test -p app explorer_actions, file_actions); "Do not ask me again" as the NSAlert suppression checkbox (dialog.rs); the context menu with the items whose commands the port has (port/results/contextmenu.md); tree view state in workspace storage (cargo test -p app view_state); file nesting with the explorerFileNestingTrie.test.ts cases (cargo test -p app nest); copyFilePath, copyRelativeFilePath and revealFileInOS (cargo test -p app copy_path, copied_path_labels); compact folders (cargo test -p app compact, get_context, compressed_navigation); Explorer find (cargo test -p app explorer_find find_filters); Finder drops through ExternalFileImport (cargo test -p app files_dropped_from_finder); explorer.sortOrder and sortOrderLexicographicOptions; explorer.autoReveal; list keyboard commands; the view title actions on hover or focus, revealInExplorer, showActiveFileInExplorer and the other file actions (cargo test -p app view_title_and_file_actions); workbench.action.files.newFile and showOpenedFileInNewWindow (cargo test -p app new_file_creates); Add Folder to Workspace and removeRootFolder (workbench/workspace_editing.rs, ui-pair port/fixtures/ui-pair/m12/workspace-folders.json); the compare commands compareFiles, selectForCompare, compareSelected, compareFileWith, compareWithSaved, compareWithClipboard, compareNewUntitledTextFiles (workbench/file_compare.rs: cargo test -p app file_compare); compare with saved by its chord: ui-pair port/fixtures/ui-pair/m12/compare-saved.json (the modified side has its own editor and cursor, at the first change: cargo test -p app file_compare; left the breadcrumbs editor type picker); Find in Folder..., Open in Integrated/External Terminal (cargo test -p app explorer_actions; ui-pair m12/find-in-folder.json and m12/folder-terminal.json), high contrast list outline (icons.json hc matches); rename, delete, new file and drag and drop with its move confirmation: ui-pair m12/explorer-ops.json matches; `<view id>.focus` of the Explorer panes (cargo test -p app focus_view_commands); the editor placeholders: binary, too large, not found and read errors with their actions (cargo test -p app files_that_do_not_resolve; ui-pair m12/editor-placeholders.json matches); the Open Editors view: pane size limits, group rows, unsaved badge, title actions, row close and dirty actions, drag to groups (cargo test -p app open_editors body_limits_clamp; ui-pair m12/open-editors.json); pinned (sticky) editors and scrolling tab bars, sticky shrink tabs in place with the `m…` label (cargo test -p app sticky pinned_editors tab_scroll; ui-pair m12/tab-scroll.json); Explorer indent guides at the reference x, row hover background, decoration badges at 11px 8px from the end, the Unpin Editor hover again after the tab menu closes (cargo test -p app tree_guides hover unpin_hover; ui-pair m12/explorer-guides.json and m12/pinned-tabs.json match). Differences left (port/notes.md milestone 12, session m12-files-done): a long tooltip breaks one path segment earlier (GPUI's line wrapper), the pin action loses its hover style after Cmd+W until the pointer moves (gpui keyboard modality), a shrink sticky tab with a badge and no room for its name; Open With... (`explorer.openWith`, `explorerResourceAvailableEditorIds`: cargo test -p app open_with_opens_the_resource the_context_menu_selects_the_row); Compare Active File With... from a file it opens itself: ui-pair m12/compare.json, the picker, the diff and the README.md menu match (port/notes.md session compare-fix); `explorerResourceReadonly` and `explorerResourceParentReadOnly` from `isReadonly` (cargo test -p app readonly_keys_follow_the_focused_item_and_its_parent); a failed create as an error notification with Retry, a dropped folder added to the workspace (cargo test -p app a_failed_create_offers a_folder_dropped_on_the_root) |