Visual Studio Code, rebuilt in Rust
Rust
fix(breadcrumbs): show breadcrumbs of custom editors on any provider
rokartur8d9a9d1a0a8d
diff --git a/native/crates/app/src/workbench/breadcrumbs.rs b/native/crates/app/src/workbench/breadcrumbs.rsindex ad7b0ab384e..f389423864d 100644--- a/native/crates/app/src/workbench/breadcrumbs.rs+++ b/native/crates/app/src/workbench/breadcrumbs.rs@@ -40,8 +40,8 @@ impl Breadcrumbs {enum BreadcrumbElement {/// The resource's scheme and path.File(String, PathBuf),- /// A folder of the path and whether it is a FileKind.ROOT_FOLDER (`~` or a workspace folder).- Folder(PathBuf, bool),+ /// The resource's scheme, a folder of its path and whether it is a FileKind.ROOT_FOLDER (`~` or a workspace folder).+ Folder(String, PathBuf, bool),/// An outline symbol by id; the `…` item and a notebook's cells have none.Symbol(Option<String>),}@@ -219,13 +219,11 @@ impl Workbench {let editor = self.active_text_editor_control().or(self.editors.active()).expect("breadcrumbs of an editor");let foreground = self.color("breadcrumb.foreground");let (notebook_path, notebook_items) = self.notebook_breadcrumbs_of(editor, foreground, super::editor_view::BREADCRUMBS_HEIGHT).unzip();- let path = self.breadcrumbs_resource(editor, notebook_path);- // shortcut: a notebook's or custom editor's resource opens as a file, upgrade when breadcrumbs keep the URI.- let scheme = if path == editor.document().path { editor.document().scheme.clone() } else { "file".into() };- let (segments, _, has_root_folder) = self.breadcrumb_file_segments(&path);+ let (scheme, path) = self.breadcrumbs_resource(editor, notebook_path);+ let (segments, _, has_root_folder) = self.breadcrumb_file_segments(&scheme, &path);let file = segments.len() - 1;// Each item above the file is the folder as many levels up, `~` the home and a workspace's name its folder.- let mut elements: Vec<_> = (0..file).map(|index| BreadcrumbElement::Folder(path.ancestors().nth(file - index).expect("an ancestor per item").to_path_buf(), has_root_folder && index == 0)).collect();+ let mut elements: Vec<_> = (0..file).map(|index| BreadcrumbElement::Folder(scheme.clone(), path.ancestors().nth(file - index).expect("an ancestor per item").to_path_buf(), has_root_folder && index == 0)).collect();elements.push(BreadcrumbElement::File(scheme, path));match notebook_items {Some(items) => elements.extend(items.iter().map(|_| BreadcrumbElement::Symbol(None))),diff --git a/native/crates/app/src/workbench/breadcrumbs/picker.rs b/native/crates/app/src/workbench/breadcrumbs/picker.rsindex 841fe434080..938052cbb1c 100644--- a/native/crates/app/src/workbench/breadcrumbs/picker.rs+++ b/native/crates/app/src/workbench/breadcrumbs/picker.rs@@ -36,6 +36,9 @@ pub(in crate::workbench) struct Picker {enum Source {/// `BreadcrumbsFilePicker`: the children of the folder, or the workspace's folders when `None`.Files(Option<PathBuf>),+ /// The folder of a resource of another scheme, which the port lists nothing of: debugMemory.ts `stat` makes every+ /// `vscode-debug-memory` folder a file, without children.+ Unlisted,/// `BreadcrumbsOutlinePicker`: the outline of the model, whose resource opens to the side.Outline { model_id: u32, scheme: String, path: PathBuf },}@@ -60,13 +63,14 @@ impl Workbench {/// `_onSelectEvent`'s `showContextView` and `_setInput`: the picker of `element`, its own row revealed and focused.pub(super) fn new_breadcrumbs_picker(&mut self, group: u32, item: usize, element: BreadcrumbElement, click_x: Option<f32>, window: &mut Window, cx: &mut Context<Self>) -> Picker {let (source, expanded, focused) = match element {- BreadcrumbElement::Folder(path, true) => {+ BreadcrumbElement::Folder(_, path, true) => {let key = path.to_string_lossy().into_owned();(Source::Files(None), HashSet::new(), Some(key))}- BreadcrumbElement::Folder(path, false) | BreadcrumbElement::File(_, path) => {+ BreadcrumbElement::Folder(scheme, path, false) | BreadcrumbElement::File(scheme, path) => {let key = path.to_string_lossy().into_owned();- (Source::Files(path.parent().map(PathBuf::from)), HashSet::new(), Some(key))+ let source = if crate::editor::on_disk(&scheme) { Source::Files(path.parent().map(PathBuf::from)) } else { Source::Unlisted };+ (source, HashSet::new(), Some(key))}BreadcrumbElement::Symbol(id) => {let editor = self.active_text_editor_control().or(self.editors.active()).expect("breadcrumbs of an editor");@@ -119,6 +123,7 @@ impl Workbench {}rows}+ Source::Unlisted => Vec::new(),Source::Outline { model_id, .. } => {let Status::Ready { model_id: shown, outline, .. } = &self.outline_pane.status else { return Vec::new() };if shown != model_id {@@ -261,7 +266,7 @@ impl Workbench {let group = picker.group;let outline_resource = match &picker.source {Source::Outline { scheme, path, .. } => Some(crate::editor::uri_value(scheme, path)),- Source::Files(_) => None,+ Source::Files(_) | Source::Unlisted => None,};let opened = match &self.breadcrumbs_picker_rows(picker)[index].target {Target::File(path) => Some((crate::editor::uri_value("file", path), None)),diff --git a/native/crates/app/src/workbench/breadcrumbs/tests.rs b/native/crates/app/src/workbench/breadcrumbs/tests.rsindex 61aa955c841..81615e2d397 100644--- a/native/crates/app/src/workbench/breadcrumbs/tests.rs+++ b/native/crates/app/src/workbench/breadcrumbs/tests.rs@@ -189,3 +189,38 @@ fn toggle_to_on_and_use_quick_pick(cx: &mut TestAppContext) {assert_eq!(value, Some(String::new()), "the file item opens Quick Open");});}++/// breadcrumbsControl.ts takes any resource with a file system provider: View Binary Data's hex editor on+/// `vscode-debug-memory://<session>/3/memory.bin` shows `3 > memory.bin`, outside the workspace folder and the home.+#[gpui::test]+fn a_custom_editor_on_a_debug_memory_resource_has_breadcrumbs(cx: &mut TestAppContext) {+ let (workbench, cx, _receiver, _dir) = open(cx, "breadcrumbs-debug-memory", "text\n");+ workbench.update(cx, |workbench, cx| {+ let custom = crate::workbench::custom_editors::CustomEditor {+ resource: crate::workbench::debug_memory::memory_uri("session-1", "3"),+ resolved: true,+ backup_id: None,+ navigation: crate::workbench::custom_editors::Navigation::None,+ diff: None,+ };+ workbench.add_custom_document_editor("hexEditor.hexedit", "memory.bin".into(), &json!({}), false, Some(custom), false);+ cx.notify();+ });+ cx.run_until_parked();+ let elements = workbench.read_with(cx, |workbench, _| {+ workbench.breadcrumb_elements().into_iter().map(|element| match element {+ super::BreadcrumbElement::Folder(scheme, path, root) => format!("folder {scheme}:{} {root}", path.display()),+ super::BreadcrumbElement::File(scheme, path) => format!("file {scheme}:{}", path.display()),+ super::BreadcrumbElement::Symbol(_) => "symbol".into(),+ }).collect::<Vec<_>>()+ });+ assert_eq!(elements, ["folder vscode-debug-memory:/3 false", "file vscode-debug-memory:/3/memory.bin"]);+ assert!(cx.debug_bounds("breadcrumb-item-1").is_some(), "3 > memory.bin is drawn");+ assert!(cx.debug_bounds("breadcrumb-item-2").is_none());++ // FileDataSource resolves the folder `3` through the provider, whose `stat` answers a file: no rows, not the disk's `/`.+ let folder_item = cx.debug_bounds("breadcrumb-item-0").unwrap().center();+ cx.simulate_click(folder_item, gpui::Modifiers::none());+ let rows = workbench.read_with(cx, |workbench, _| workbench.breadcrumbs.picker.as_ref().map(|picker| workbench.breadcrumbs_picker_rows(picker).len()));+ assert_eq!(rows, Some(0));+}diff --git a/native/crates/app/src/workbench/editor_view.rs b/native/crates/app/src/workbench/editor_view.rsindex e03b0014aaf..f0e344ddb84 100644--- a/native/crates/app/src/workbench/editor_view.rs+++ b/native/crates/app/src/workbench/editor_view.rs@@ -113,7 +113,7 @@ impl Workbench {// The playground's focused snippet is the active editor; the page draws it with the others._ if self.playground_active() => part.child(self.playground_body(window, cx)),// A webview panel's resource has no file system provider, a custom editor's has.- WEBVIEW_PANEL_SCHEME if self.webview_resource(&editor.document().path).is_none() => part,+ WEBVIEW_PANEL_SCHEME if self.custom_editor_resource(&editor.document().path).is_none() => part,_ if self.active_notebook_resource().is_some_and(|(scheme, _)| scheme == "untitled") => part,super::modal_editor_group::PREFERENCES_EDITOR_SCHEME => part,super::extension_editor::EXTENSION_EDITOR_SCHEME => part.child(self.extension_editor_body(&editor.document().path, cx)),@@ -154,7 +154,7 @@ impl Workbench {let document = editor.document();let scheme = document.scheme.as_str();!self.playground_active()- && !(scheme == WEBVIEW_PANEL_SCHEME && self.webview_resource(&document.path).is_none())+ && !(scheme == WEBVIEW_PANEL_SCHEME && self.custom_editor_resource(&document.path).is_none())&& !self.active_notebook_resource().is_some_and(|(scheme, _)| scheme == "untitled")&& !matches!(scheme, super::extension_editor::EXTENSION_EDITOR_SCHEME | super::welcome_page::WALKTHROUGH_SCHEME | super::disassembly_view::DISASSEMBLY_SCHEME | SEARCH_EDITOR_SCHEME | crate::output::OUTPUT_SCHEME | "untitled" | TERMINAL_EDITOR_SCHEME)&& self.editors.active_multi_diff().is_none()@@ -909,18 +909,25 @@ impl Workbench {}/// The resource the breadcrumbs show: a custom editor's is its resource's (`EditorResourceAccessor.getOriginalUri`).- pub(super) fn breadcrumbs_resource(&self, editor: &OpenEditor, notebook_path: Option<PathBuf>) -> PathBuf {+ pub(super) fn breadcrumbs_resource(&self, editor: &OpenEditor, notebook_path: Option<PathBuf>) -> (String, PathBuf) {// customEditorDiffInput.ts: a custom editor diff's resource is its modified side.let custom_diff = self.editors.active_diff().filter(|diff| diff.custom.is_some()).map(|diff| diff.modified.path.clone());- notebook_path.or(custom_diff).or_else(|| self.webview_resource(&editor.document().path)).unwrap_or_else(|| editor.document().path.clone())+ // shortcut: a notebook's or custom editor diff's resource opens as a file, upgrade when they keep the URI.+ if let Some(path) = notebook_path.or(custom_diff) {+ return ("file".into(), path);+ }+ let document = editor.document();+ self.custom_editor_resource(&document.path).unwrap_or_else(|| (document.scheme.clone(), document.path.clone()))}/// breadcrumbsModel.ts `_initFilePathInfo`: the path's items as labels, whether the first is relative to a folder or/// the home, and whether the first is a root folder.- pub(super) fn breadcrumb_file_segments(&self, path: &Path) -> (Vec<String>, bool, bool) {+ pub(super) fn breadcrumb_file_segments(&self, scheme: &str, path: &Path) -> (Vec<String>, bool, bool) {let workspace = self.workspace();- let folder = workspace.and_then(|workspace| workspace.folder_of(path));- let home = std::env::home_dir().filter(|home| folder.is_none() && path.starts_with(home));+ // A folder or the home of another scheme never holds the resource: `vscode-debug-memory:/3/memory.bin` is `3 > memory.bin`.+ let local = crate::editor::on_disk(scheme);+ let folder = workspace.filter(|_| local).and_then(|workspace| workspace.folder_of(path));+ let home = std::env::home_dir().filter(|home| local && folder.is_none() && path.starts_with(home));// breadcrumbsModel.ts `_initFilePathInfo`: the path below the workspace folder, else below the user home as// `~` (`getUriHome`), else below the root, which has no item.let (relative, root): (PathBuf, Option<String>) = match (folder, &home) {@@ -942,8 +949,8 @@ impl Workbench {let foreground = self.color("breadcrumb.foreground");let line_height = if inline { SINGLE_TAB_TITLE_HEIGHT } else { BREADCRUMBS_HEIGHT };let (notebook_path, notebook_items) = self.notebook_breadcrumbs_of(editor, foreground, line_height).unzip();- let path = self.breadcrumbs_resource(editor, notebook_path.clone());- let (segments, is_relative, has_root_folder) = self.breadcrumb_file_segments(&path);+ let (scheme, path) = self.breadcrumbs_resource(editor, notebook_path.clone());+ let (segments, is_relative, has_root_folder) = self.breadcrumb_file_segments(&scheme, &path);let file = segments.len() - 1;let symbol_items: Vec<(Option<Div>, String)> = match notebook_items {Some(items) => items,diff --git a/native/crates/app/src/workbench/webview_panels.rs b/native/crates/app/src/workbench/webview_panels.rsindex f49819cc3de..a8c1c1c3fe5 100644--- a/native/crates/app/src/workbench/webview_panels.rs+++ b/native/crates/app/src/workbench/webview_panels.rs@@ -756,9 +756,16 @@ impl Workbench {/// The file a custom editor or media preview panel shows.pub(super) fn webview_resource(&self, path: &Path) -> Option<PathBuf> {- let panel = self.webview_panel(path)?;- let resource = &panel.custom.as_ref()?.resource;- (resource["scheme"] == "file").then(|| PathBuf::from(resource["path"].as_str().unwrap_or_default()))+ self.custom_editor_resource(path).filter(|(scheme, _)| scheme == "file").map(|(_, path)| path)+ }++ /// A custom editor's resource when a file system provider serves its scheme (breadcrumbsControl.ts+ /// `fileService.hasProvider`), as `vscode-debug-memory` for View Binary Data's hex editor.+ pub(super) fn custom_editor_resource(&self, path: &Path) -> Option<(String, PathBuf)> {+ let resource = &self.webview_panel(path)?.custom.as_ref()?.resource;+ let scheme = resource["scheme"].as_str()?;+ let has_provider = crate::editor::on_disk(scheme) || scheme == exthost::main_thread_files::DEBUG_MEMORY_SCHEME || self.file_system_providers.contains(scheme);+ has_provider.then(|| (scheme.to_owned(), PathBuf::from(resource["path"].as_str().unwrap_or_default())))}fn webview_panel(&self, path: &Path) -> Option<&WebviewPanel> {diff --git a/port/ledger.md b/port/ledger.mdindex 8a6a452fd9a..83ce2e9b11d 100644--- a/port/ledger.md+++ b/port/ledger.md@@ -22,7 +22,7 @@ Status: `open`, `in progress`, `waiting on Artur`, `later` (postponed), `done`,| Milestones | M5 edit and save | done | One cursor with selection, the `coreCommands.ts` cursor and delete commands, typing with IME through GPUI's input handler, undo/redo with `editStack.ts` stops, clipboard, save and dirty state; the host hears `$acceptModelChanged`, `$acceptDirtyStateChanged`, `$acceptModelSaved` and selection changes (`editor/cursor.rs`, `editor/edit.rs`, `workbench/text_input.rs`, `host_sync.rs`). | `cargo test -p app` passes with the cursor, edit and host sync tests (including `live_host_takes_edits_and_typescript_sees_the_new_text`); typing in `notes.txt` then Cmd+S writes the file and the tab loses its dirty dot; pixel-check of the three earlier windows unchanged. || Milestones | M6 API test harness | done | Run `extensions/vscode-api-tests` against the port, so every later milestone reports a pass count against the reference baseline (`port/results/api-tests-reference.md`: folder 356/46/0, workspace 4/0/0): `--extensionDevelopmentPath` / `--extensionTestsPath` in `code-gpui`, the test runner's exit code reaching the parent, host errors and console forwarded to the port's log, a `port/tools/api-tests` script on the Studio. Open gaps: the gaps column of its unit rows. | `port/tools/api-tests` prints passing/pending/failing per suite for the port and writes them to `port/results/api-tests.md`; the run finishes (failures allowed) without a hang. || Milestones | M7 syntax colors and themes | done | TextMate grammars from `contributes.grammars` (vscode-textmate's algorithm, Oniguruma regexes), token colors from the theme's `tokenColors` and `semanticTokenColors`, bracket pair colorization and matching, every built-in color theme including High Contrast Light, `firstLine` language detection. Open gaps: the gaps column of its unit rows. | `port/results/pixels.md` milestone 7 (main window in dark, light, hc and hclight); cargo test -p app syntax:: (colorize_fixtures_match_the_reference: every colorize-tests fixture's scopes and colors) |-| Milestones | M8 editor viewport and editing commands | in progress | Scrolling (wheel, scrollbar, reveal), real `visibleRanges`, minimap, folding, sticky scroll, multi-cursor, find/replace widget, comment toggling, line operations, smart select, font zoom, the editor context menu. Open gaps: the gaps column of its unit rows. | api-tests `editor.test`, `window.test` (text editor parts) and `documents.test` pass as in the reference; pixel-check gains a scrolled long-file window with minimap and a folded region; `cargo test -p app` folding and multi-cursor tests. |+| Milestones | M8 editor viewport and editing commands | done | Scrolling (wheel, scrollbar, reveal), real `visibleRanges`, minimap, folding, sticky scroll, multi-cursor, find/replace widget, comment toggling, line operations, smart select, font zoom, the editor context menu. Open gaps: the gaps column of its unit rows. | api-tests `editor.test`, `window.test` (text editor parts) and `documents.test` pass as in the reference; pixel-check gains a scrolled long-file window with minimap and a folded region; `cargo test -p app` folding and multi-cursor tests. || Milestones | M9 commands, keybindings, menus, quick input | done | Command registry shared by the workbench and `vscode.commands`, context keys and `when` clauses, keybinding resolution from `contributes.keybindings` and `keybindings.json`, the native macOS menu bar, context menus, hovers, Command Palette and Quick Open (files, symbols, commands, theme picker), title bar and activity bar clicks. Open gaps: the gaps column of its unit rows. | api-tests `commands.test` and `quickInput.test` pass as in the reference; Cmd+Shift+P runs a command contributed by an extension; Cmd+P opens a fixture file; `cargo test -p app` `when`-clause and keybinding resolution tests against upstream cases. || Milestones | M10 settings, storage, profiles | done | `settings.json` (user, workspace, folder, language overrides) feeding both the workbench and `vscode.workspace.getConfiguration`, configuration schema from `contributes.configuration`, the Settings editor and JSON settings with schema validation, global and workspace storage on disk, secret storage in the macOS Keychain, profiles, real `environment` in init data. Import from VS Code, Cursor and VSCodium (Artur, port feature with no upstream counterpart): a command and a first-run offer that read each installed editor's user data (`~/Library/Application Support/{Code,Cursor,VSCodium}/User`: settings.json, keybindings.json, snippets, the color and icon theme ids) and its extension list (`~/.vscode/extensions`, `~/.cursor/extensions`, `~/.vscode-oss/extensions`, installed again from Open VSX), show what will be imported, write it into the active profile and skip settings and extensions the port has removed (AI, sign-in, Microsoft services, telemetry, remote). Open gaps: the gaps column of its unit rows. | api-tests `configuration.test` and `state.test` pass as in the reference; a setting changed in `settings.json` reaches an extension's `onDidChangeConfiguration`; storage survives a restart; importing from a fixture VS Code, Cursor and VSCodium user data folder gives the same settings, keybindings, snippets and theme in the port. || Milestones | M11 workbench layout and chrome | done | The part grid with sashes and hidden parts, panel and secondary side bar, view containers and collapsible views, tree views from extensions (with the Refactor Preview of workbench/contrib/bulkEdit, which file operation participants open), editor groups and splits, notifications, dialogs (native open/save), progress, banner, status bar entries from extensions, decorations, window lifecycle (close, quit, hot exit backup), multiple windows, focus and inactive look. Open gaps: the gaps column of its unit rows. | api-tests `window.test` (messages, progress, tree views, status bar) pass as in the reference; pixel-check gains a window with panel and split editor; hot exit restores an unsaved buffer after quit. |@@ -409,7 +409,7 @@ One row per upstream unit, generated by `bun port/tools/gen-ledger.ts`; mileston| workbench/parts/banner | workbench part | M11 | verified | | workbench/banner.rs (bannerPart.ts): one item by priority, icon, message with ellipsis, link actions, Close Banner; Focus Banner, `bannerFocused`, arrow keys through the links and the close button, Enter and Space on them. `cargo test -p app banner`; verified: ui-pair banner.json vs the reference (port/results/windows.md, milestone 11 verification) || workbench/parts/chat | workbench part | | removed | | no sign-in/AI by decision (port/notes.md); not ported || workbench/parts/dialogs | workbench part | M11 | verified | | workbench/dialog_view.rs custom dialog, used for every message box with `window.dialogStyle: custom` (severity codicons, plain detail); cargo test -p app dialogs; verified: ui-pair dialogs.json `custom-modal` vs the reference (port/results/windows.md, milestone 11 verification): size, buttons in macOS order, Close Dialog; its buttons and Close Dialog are accessibility buttons named by their labels (dialog.ts monaco Buttons, the close action's aria-label): port/tools/update-check pre-release presses "Trust Publisher & Install" through them |-| workbench/parts/editor | workbench part | M8 | ported | [3 S] breadcrumbs.rs: a custom editor on a resource that is not `file` has no breadcrumbs, where the reference's hex editor on `vscode-debug-memory` shows `3 > memory.bin` (webview_panels.rs `webview_resource` keeps only `file`; ui-pair `debug/memory.json` hex-editor.png) | breadcrumbs, tab strip, text editor, groups, title menus, terminal editors, `workbench.editor.showTabs` and `editorActionsLocation` (workbench/editor_view.rs, workbench/editor_menus.rs, editor_type_picker.rs, scroll_locking.rs; port/notes.md milestone 5): cargo test -p app workbench::breadcrumbs editor::tests use_modal_all_opens_editors_in_the_modal_part use_modal_all_reveals_an_opened_editor_in_its_group_unless_an_index_is_given keys_and_typed_text_edit_the_focused_editor_and_reach_the_host editor_menus workbench_open diff_editor editor_groups editor_grid scroll_locking the_grid_and_its_editors_come_back_from_workspace_storage the_wait_marker_waits_for_the_dirty_file_to_be_saved editor_type_picker custom_editors terminal_editor icon_select_box previews_off_pins_every_opened_editor tab_labels_keep show_tabs_picks_the_title_control_and_zen_mode_enforces_its_own show_tabs_none_moves_the_editor_actions_into_the_title_bar the_tab_bar_menu_switches_the_tabs_mode the_editor_actions_toggle_restores_the_hidden_location menubar the_keyboard_focuses_moves_through_and_reveals_the_breadcrumbs the_modal_header_shows_the_modal_editor_title_menu; ui-pair m8/breadcrumbs-pickers.json, m12/editor-type.json, m12/editor-type-second-start.json, m11/editor-menus.json, m11/watermark-tips.json, m12/terminal-editor.json, m12/terminal-pickers.json, m12/terminal-tab-list-menu.json, icons/seti.json, show-tabs.json, menus/modal-editor-title.json; pixel-check file window (port/results/pixels.md milestone 4); port/results/contextmenu.md, port/results/auxiliary-windows.md, port/results/api-tests.md |+| workbench/parts/editor | workbench part | M8 | verified | | breadcrumbs, tab strip, text editor, groups, title menus, terminal editors, `workbench.editor.showTabs` and `editorActionsLocation` (workbench/editor_view.rs, workbench/editor_menus.rs, editor_type_picker.rs, scroll_locking.rs; port/notes.md milestone 5): cargo test -p app workbench::breadcrumbs editor::tests use_modal_all_opens_editors_in_the_modal_part use_modal_all_reveals_an_opened_editor_in_its_group_unless_an_index_is_given keys_and_typed_text_edit_the_focused_editor_and_reach_the_host editor_menus workbench_open diff_editor editor_groups editor_grid scroll_locking the_grid_and_its_editors_come_back_from_workspace_storage the_wait_marker_waits_for_the_dirty_file_to_be_saved editor_type_picker custom_editors terminal_editor icon_select_box previews_off_pins_every_opened_editor tab_labels_keep show_tabs_picks_the_title_control_and_zen_mode_enforces_its_own show_tabs_none_moves_the_editor_actions_into_the_title_bar the_tab_bar_menu_switches_the_tabs_mode the_editor_actions_toggle_restores_the_hidden_location menubar the_keyboard_focuses_moves_through_and_reveals_the_breadcrumbs the_modal_header_shows_the_modal_editor_title_menu a_custom_editor_on_a_debug_memory_resource_has_breadcrumbs; ui-pair m8/breadcrumbs-pickers.json, debug/memory.json, m12/editor-type.json, m12/editor-type-second-start.json, m11/editor-menus.json, m11/watermark-tips.json, m12/terminal-editor.json, m12/terminal-pickers.json, m12/terminal-tab-list-menu.json, icons/seti.json, show-tabs.json, menus/modal-editor-title.json; pixel-check file window (port/results/pixels.md milestone 4); port/results/contextmenu.md, port/results/auxiliary-windows.md, port/results/api-tests.md || workbench/parts/notifications | workbench part | M11 | verified | | workbench/notifications_view.rs: toasts (3 at most, purge 10/12/15s unless sticky, focused or hovered, spam protection), notifications center (Clear All, Do Not Disturb menu with per-source filters, Hide), rows with expand, collapse, clear, More Actions, buttons, links, Copy Text, double-click toggle; status bar bell states and tooltips; notificationsCommands.ts commands and context keys; geometry from the reference DOM (port/tools/ref-dom); cargo test -p app notifications_view; `workbench.notifications.position` (bottom right, bottom left, top right with the title bar bell); no toast animation, no screen reader announcements; verified: ui-pair messages.json `center`, `progress` vs the reference (port/results/windows.md, milestone 11 verification) || workbench/parts/panel | workbench part | M11 | verified | | bottom centered card, view tabs from register_panel_view with the "..." overflow of compositeBar.ts (cargo test -p app workbench::panel::, ui-pair port/results/problems.md), `<view id>.focus` per view, Maximize/Restore, Close, Cmd+J, active view in workspace storage; Problems, Output, Debug Console, Test Results (`hideIfEmpty`) and Terminal views with their title actions (cargo test -p app editor_groups the_output_view_shows_in_the_panel, output_view, the_debug_console_and_test_results_are_panel_views, terminal); part_grid tests, ui-pair port/results/layout.md; no panel position or alignment change, no Views and More Actions menu; verified: ui-pair port/results/problems.md (milestone 11 verification): tabs, "..." overflow and the filter box as the reference; tabs at Chromium's fractional text widths (the Problems tab with its badge was 2px wider: GPUI rounds a text element's width up), the filter in the view below 600px of width (`shouldShowFilterInHeader`) || workbench/parts/partGrid | workbench part | M11 | verified | | workbench/layout.rs grid on split_view.rs (splitview.ts priorities, snap, visibility), workbench/part_grid.rs sashes, hidden parts, sizes and visibility in LayoutStateModel storage keys: cargo test -p app layout part_grid split_view (reference geometry at 1024x768, Cmd+B for the next open, sash drag, snap); ui-pair grid steps, port/results/layout.md |diff --git a/port/notes.md b/port/notes.mdindex 2f4b4165284..f4f8b80fadf 100644--- a/port/notes.md+++ b/port/notes.md@@ -888,7 +888,7 @@ Scope as in the M19 Work row of port/ledger.md.- Debug Console find (`workbench/debug_console_find.rs`; repl.ts `FindReplAction`, `openFind`): `repl.action.find` (Cmd+Alt+F, the title's `search` before the session picker and Clear Console) opens the tree find widget of the debug hover (`TreeFind`) over the console with 30px of padding; elements are found by `IReplElement.toString(true)`, an evaluation by its input or its result, filter mode drops the elements without a match, evaluation inputs and variable names highlight the matched chars, "No results found." when nothing matches, the pattern is kept for the next open. Shortcuts: the port's console has no row focus, so highlight mode moves no focus to the first match; the item in `MenuId.DebugConsoleContext` waits on that menu, which the port does not have (cargo test -p app the_find_widget_filters_the_console).- Extension host debugging (`extensionHost` launch type; rawDebugSession.ts `launchVsCode`, localProcessExtensionHost.ts `attachSession`, debugService.ts `onAttachSession`): js-debug's `launchVSCode` opens the Extension Development Host window (or reloads the one on the same extension path) with `--debugId`, `--inspect-brk-extensions` and `--extensionEnvironment`; the host it starts has the session attach to the inspector port on a new adapter. Decision: a host with an inspector port runs on Node, since Bun has no V8 inspector; a host without one stays on Bun, and there is no 5870 default port (environmentService.ts gives one to a build from source, which would put every checkout run on Node). The window closes with its current host's exit and at the end of a 'Run Without Debugging' session; a restart reloads it. Check: `cargo test -p app workbench::host::`, ui-pair `debug/extension-host.json` with `FOLDER=port/fixtures/debug-extension` (stops at the breakpoint in `activate`).- Debug visualizers (`workbench/debug_visualizers.rs`): a visualizer contributed with a Uri `iconPath` draws an empty button in the reference too: variablesView.ts builds the action with `class: v.iconClass || 'debug-viz-icon'`, reads no `iconPath`, and no stylesheet of 1.147.0 names `debug-viz-icon` (cargo test -p app debug_visualizers).-- View Binary Data (`workbench/debug_memory.rs`; variablesView.ts `VIEW_MEMORY_ID`, debugMemory.ts): the `vscode-debug-memory` provider lives in the workbench, and `exthost/src/main_thread_files.rs` asks it through `ask_workbench`. The answer waits on the workbench's own `readMemory` to js-debug, so `Session::ask_workbench` flushes the workbench's queued host calls while it waits; before that the hex editor's read hung on its LOADING placeholders. The provider has only `FileOpenReadWriteClose`, so upstream's file service reads with `read`, which ends the file at the first unreadable byte; the port's `readFile` returns that prefix. The range comes from an extension: it must be ordered, end at most at 2^53-1 and span at most 16 MiB. Inline row buttons show on hover or focus through `hidden()`/`flex()`: a `group_hover` display change skips prepaint and panics. ui-pair `debug/memory.json` needs `ms-vscode.hexeditor` 1.11.1 from Open VSX in `<dir>`, `ARGS="--extensions-dir <dir>"` and `FOLDER=port/fixtures/debug-node`.+- View Binary Data (`workbench/debug_memory.rs`; variablesView.ts `VIEW_MEMORY_ID`, debugMemory.ts): the `vscode-debug-memory` provider lives in the workbench, and `exthost/src/main_thread_files.rs` asks it through `ask_workbench`. The answer waits on the workbench's own `readMemory` to js-debug, so `Session::ask_workbench` flushes the workbench's queued host calls while it waits; before that the hex editor's read hung on its LOADING placeholders. The provider has only `FileOpenReadWriteClose`, so upstream's file service reads with `read`, which ends the file at the first unreadable byte; the port's `readFile` returns that prefix. The range comes from an extension: it must be ordered, end at most at 2^53-1 and span at most 16 MiB. Inline row buttons show on hover or focus through `hidden()`/`flex()`: a `group_hover` display change skips prepaint and panics. ui-pair `debug/memory.json` needs `ms-vscode.hexeditor` 1.11.1 from Open VSX in `<dir>`, `ARGS="--extensions-dir <dir>"` and `FOLDER=port/fixtures/debug-node`. The hex editor's breadcrumbs are `3 > memory.bin` (breadcrumbsControl.ts takes a custom editor's resource of any scheme with a file system provider, `custom_editor_resource`): a resource of a scheme other than `file` and `vscode-userdata` has no workspace folder or `~` item, and its pickers list nothing, as debugMemory.ts `stat` makes every folder a file (cargo test -p app a_custom_editor_on_a_debug_memory_resource_has_breadcrumbs). shortcut: Space on its file item opens the resource as a text file without the session authority, which cannot be read; upgrade when breadcrumb elements keep the URI.- Checks: `cargo test -p app debug` and `cargo test -p app testing::`; api-tests `MOCHA_GREP="vscode API - debug"`; `port/fixtures/debug-node` (app.js with launch.json, math.test.js) with `port/fixtures/extensions/tests-provider` through `port/tools/ui-pair`.## Milestone 11 windows: dialogs, lifecycle, hot exit, windows, title bardiff --git a/port/results/api-tests.md b/port/results/api-tests.mdindex 399bdac8527..7e0f419d14b 100644--- a/port/results/api-tests.md+++ b/port/results/api-tests.md@@ -291,3 +291,7 @@ Same tree, the suites the RPC and document changes touch: `MOCHA_GREP="vscode AP## Milestone 20: custom root certificate on BunOn the Studio, branch `port-m20-sweep` (proxyResolver.ts `addBunSecureContext`), `port/tools/build-exthost && MOCHA_GREP='network proxy' SUITE_TIMEOUT=600 port/tools/api-tests`: api-folder 2 passing, 1 pending (`separate local / remote proxy settings`, skipped upstream), 0 failing: `custom root certificate` and `basic auth` pass on the Bun host. Before the change `custom root certificate` failed on Bun and passed with `--node`.++## Milestone 8 done check++`MOCHA_GREP="vscode API - editor|vscode API - window|vscode API - documents" SUITE_TIMEOUT=900 port/tools/api-tests` on the Studio (branch small-gaps): api-folder 53 passing, 0 pending, 0 failing; api-workspace 0/0/0. The reference's bash run has the same 53 tests: 52 passing and `active editor not always correct... #49125` pending because its window had no focus (see above). 1.147.0 has no `documents.test.ts`; the done-when's documents tests are the editors and window suites' text document cases.