Visual Studio Code, rebuilt in Rust
Rust
docs(port): drop stale compact activity bar note, record view container move gap
rokartur7d10b80149df
diff --git a/README.md b/README.mdindex 6bfe583da75..873c3a0b835 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" : 417- "ported" : 13+ "verified" : 416+ "ported" : 14"removed" : 126"n/a" : 28```@@ -23,7 +23,7 @@ pie showData| workbench contribution | 65 | 3 | 30 | 3 | `███████████████████░ 96%` || built-in extension | 88 | 1 | 6 | 0 | `████████████████████ 99%` || MainThread* shape (Rust side) | 58 | 1 | 30 | 0 | `████████████████████ 98%` |-| workbench service | 60 | 5 | 23 | 7 | `██████████████████░░ 92%` |+| workbench service | 59 | 6 | 23 | 7 | `██████████████████░░ 91%` || src/vs/editor/contrib | 54 | 0 | 2 | 1 | `████████████████████ 100%` || workbench part | 11 | 0 | 2 | 0 | `████████████████████ 100%` || extension host seam | 7 | 0 | 0 | 0 | `████████████████████ 100%` |@@ -31,7 +31,7 @@ pie showData| src/vs/editor | 0 | 2 | 1 | 1 | `░░░░░░░░░░░░░░░░░░░░ 0%` || src/vs/base | 0 | 0 | 2 | 3 | `████████████████████ 100%` || port feature | 1 | 0 | 0 | 0 | `████████████████████ 100%` |-| **all** | **417** | **13** | **126** | **28** | `███████████████████░ 97%` |+| **all** | **416** | **14** | **126** | **28** | `███████████████████░ 97%` |<!-- 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/port/ledger.md b/port/ledger.mdindex aba159abd00..10ab5f904e6 100644--- a/port/ledger.md+++ b/port/ledger.md@@ -456,7 +456,7 @@ One row per upstream unit, generated by `bun port/tools/gen-ledger.ts`; mileston| workbench/services/userDataProfile | workbench service | M10 | verified | | one app-wide `UserDataProfilesService` (a gpui Global in app/src/user_data_profile.rs) for every window of the process: profile windows open in this process, a transient profile lives while a window runs it (userDataProfilesHandler.ts cleanup on close), and `onDidChangeProfiles` reaches every window (cargo test -p app workbench::user_data_profile: profile_windows_open_in_this_process, every_window_sees_a_profile_another_window_creates_and_removes); userDataProfileManagement.ts `switchProfile`, `removeProfile` and `changeCurrentProfile` (configuration, keybindings, global state and user extensions move to the profile's files, the extension host restarts, workbench/extension_host_restart.rs) in workbench/user_data_profile.rs; the configuration layers of a profile (`ApplicationConfiguration`, PROFILE_SCOPES, `workbench.settings.applyToAllProfiles`) with configurationService.test.ts's Profiles suite (cargo test -p config profile_tests); the settings, keybindings, tasks, snippets, globalState and extensions resources and the `.code-profile` template of userDataProfileImportExportService.ts as app/src/profile_template.rs (cargo test -p app profile_template); a template's extensions install the way extensionsResource.ts `apply` does, one publisher trust dialog for all of them and an error naming the ones that failed (cargo test -p app template_extensions_ask_for_publisher_trust_once); per-profile extensions.json (cargo test -p exthost extension_management); `createTroubleshootProfile` is removed with contrib/issue, its only caller (issueTroubleshoot.ts); profile templates from `profileTemplatesUrl` have no source, the product.json has none || workbench/services/userDataSync | workbench service | | removed | | no sign-in/AI by decision (port/notes.md); not ported || workbench/services/utilityProcess | workbench service | | verified | | no utility process workers: the file watcher worker, the one kept client, is files/src/watcher.rs on an FSEvents thread (platform/files; api-tests `vscode API - workspace-watcher` passes in the milestone 20 whole-suite run); localTranscription is AI, removed (port/notes.md milestone 20) |-| workbench/services/views | workbench service | M11 | verified | | view containers of `viewsContainers.activitybar` and `viewsContainers.panel` and the tree views of every container (workbench/view_containers.rs): activity bar items while a view's `when` holds, `workbench.view.extension.<id>` with its "View: Show <title>" Command Palette item while `viewContainer.<id>.enabled` (cargo test -p app an_extension_container_is_shown), a panel container's tab after the built-in ones, its views as side-by-side panes under its "..." and "View: Toggle <title>" (cargo test -p app an_extension_panel_container_is_a_panel_tab), each contributed view's "<container>: Focus on <view> View" palette item (ui-pair port/fixtures/ui-pair/contributed-panes.json "palette" and "panel" match the reference but its Ports tab, removed by decision), `<view id>.focus`, `<view id>.active`, merged single views, view_panes.rs panes for the views of an extension container and of Testing (`PaneContainer::Contributed`: cargo test -p app view_containers::; ui-pair port/fixtures/ui-pair/contributed-panes.json with port/fixtures/extensions/contributed-panes, the Port Panes and Testing side bars as the reference), treeView.ts `noDataProviderMessage` (cargo test -p app tree_view::), contributed views of scm and debug as panes of those containers; the Explorer's ViewDescriptorsState (view_panes.rs); ui-pair port/results/references-view.md; `visibility` (`hidden` views stay out until the Views submenu of the Explorer's "..." shows them, `collapsed`; workbench/view_visibility.rs: cargo test -p app view_visibility); the Explorer container's ViewDescriptorsState (view_panes.rs); moving views (workbench/view_locations.rs, verified): `views.customizations` viewLocations and generated containers `workbench.views.service.<location>.<uuid>` with their activity bar items and panel tabs, View: Move View, Move Focused View, Reset Focused View Location, a view header dropped on another container's pane (at its position), on the activity bar or on a panel's title (a new entry), `focusedView`; the folder view, Open Editors, Outline, Timeline, Source Control's Changes, Search, the debug views and the panel's views move into any built-in container or a new entry and back, the moved view opens focused, the picker lists only visible views, a moved view's hidden state is in its current container's state (cargo test -p app a_moved_view_is_hidden); cargo test -p app (2594 passed); ui-pair port/fixtures/ui-pair/m11/move-view.json, port/results/move-view.md (8 steps match, Ports removed by decision); verified: ui-pair port/results/references-view.md (milestone 11 verification) |+| workbench/services/views | workbench service | M11 | ported | [3 M] panel.rs:197: a view container moves only between the panel and the secondary side bar, by dragging its tab; upstream moves any container to the primary side bar too, and the tabs' and activity bar items' context menu has "Move To" (Primary Side Bar, Secondary Side Bar, Panel) and "Reset Location" (paneCompositeBar.ts `getCompositeActions`) | view containers of `viewsContainers.activitybar` and `viewsContainers.panel` and the tree views of every container (workbench/view_containers.rs): activity bar items while a view's `when` holds, `workbench.view.extension.<id>` with its "View: Show <title>" Command Palette item while `viewContainer.<id>.enabled` (cargo test -p app an_extension_container_is_shown), a panel container's tab after the built-in ones, its views as side-by-side panes under its "..." and "View: Toggle <title>" (cargo test -p app an_extension_panel_container_is_a_panel_tab), each contributed view's "<container>: Focus on <view> View" palette item (ui-pair port/fixtures/ui-pair/contributed-panes.json "palette" and "panel" match the reference but its Ports tab, removed by decision), `<view id>.focus`, `<view id>.active`, merged single views, view_panes.rs panes for the views of an extension container and of Testing (`PaneContainer::Contributed`: cargo test -p app view_containers::; ui-pair port/fixtures/ui-pair/contributed-panes.json with port/fixtures/extensions/contributed-panes, the Port Panes and Testing side bars as the reference), treeView.ts `noDataProviderMessage` (cargo test -p app tree_view::), contributed views of scm and debug as panes of those containers; the Explorer's ViewDescriptorsState (view_panes.rs); ui-pair port/results/references-view.md; `visibility` (`hidden` views stay out until the Views submenu of the Explorer's "..." shows them, `collapsed`; workbench/view_visibility.rs: cargo test -p app view_visibility); the Explorer container's ViewDescriptorsState (view_panes.rs); moving views (workbench/view_locations.rs, verified): `views.customizations` viewLocations and generated containers `workbench.views.service.<location>.<uuid>` with their activity bar items and panel tabs, View: Move View, Move Focused View, Reset Focused View Location, a view header dropped on another container's pane (at its position), on the activity bar or on a panel's title (a new entry), `focusedView`; the folder view, Open Editors, Outline, Timeline, Source Control's Changes, Search, the debug views and the panel's views move into any built-in container or a new entry and back, the moved view opens focused, the picker lists only visible views, a moved view's hidden state is in its current container's state (cargo test -p app a_moved_view_is_hidden); cargo test -p app (2594 passed); ui-pair port/fixtures/ui-pair/m11/move-view.json, port/results/move-view.md (8 steps match, Ports removed by decision); verified: ui-pair port/results/references-view.md (milestone 11 verification) || workbench/services/workingCopy | workbench service | M8 | verified | | the text file and untitled working copies are the editor models (dirty state, save, revert, the window's edited dot of `onDidChangeDirty`): cargo test -p app untitled (30), lifecycle (3); WorkingCopyFileService create, move, copy, delete with participants: cargo test -p files operations (12); WorkingCopyHistoryService and its tracker for saves into User/History, entries following renames and folder moves (`moveEntries`): cargo test -p app local_history (10); WorkingCopyBackupService and the backup tracker with hot exit (backups.rs, workbench/backup_tracker.rs), a backup of a deleted file restoring as an orphaned model (`doResolveFromBackup`), modified scratchpads backing up: cargo test -p app backup (19); the working copies of editable custom documents (MainThreadCustomEditorModel, workbench/custom_documents.rs: `$onDidEdit` edits for undo and redo with `$disposeEdits`, `$onContentChange`, dirty tabs, `$onSave`, Save As with `$onSaveAs` and the editor moved to the target, `$revert`, `$backup` into a `vscode-custom-editor` backup restored with its backup id): cargo test -p app custom_documents (3), and port/fixtures/extensions/custom-document-tests (FIXTURE=custom-document-tests port/tools/webview-check: 4/4 in the reference and 4/4 in the port). Notebook working copies are the contrib/notebook row's; their backups are typed (`hashIdentifier` with a type id, backups.rs: cargo test -p app backups::, the upstream typed hashes) and the shutdown joins backups still being written || workbench/services/workspaces | workbench service | M12 | ported | [3 L] workspace_editing.rs:243, :379: enterWorkspace reopens the window where upstream switches in place (L); the Remove Folder picker has no ROOT_FOLDER icons (S) | workspace_trust.rs: WorkspaceTrustManagementService (uriTrustInfo in shared storage, longest trusted parent, empty window memento, parent folder trust) and WorkspaceTrustRequestService: cargo test -p app workspace_trust; workbench/workspace_editing.rs: abstractWorkspaceEditingService.ts addFolders, removeFolders, updateFolders, saveAndEnterWorkspace, enterWorkspace (shortcut in port/notes.md: the window reopens in place), duplicate workspace: cargo test -p app folders_added_and_removed_in_a_workspace_reach_its_file_the_explorer_settings_and_host workspace_editing; ui-pair port/fixtures/ui-pair/m12/workspace-folders.json, verified at port-m12b-verify || workbench/contrib/accessibility | workbench contribution | M19 | verified | | workbench/accessible_view.rs and workbench/accessibility.rs: accessible view and accessibility help (Alt+F2, Alt+F1 with the editor, hover, view help providers, the hover's and a workbench hover's accessible view, Escape from the latter focusing the hover again, a focused contributed tree or webview view's `accessibilityHelpContent`, a webview view the `focusedView` while its webview has the keyboard; Alt+F6, Alt+H, Alt+K, Alt+A, Alt+]/[), notification aria labels with the verbosity hint, unfocused editor dimming, Toggle Screen Reader Accessibility Mode, status entry; cargo test -p app accessib (alt_f1_shows_the_editor_help..., alt_f1_in_a_contributed_view..., alt_f1_in_a_webview_view..., dimming), cargo test -p app content_hover (the hover's accessible view), port/tools/a11y-check reads the help text area (port/notes.md milestone 19) |diff --git a/port/notes.md b/port/notes.mdindex 80bb6fb79ac..c7a14c7eb59 100644--- a/port/notes.md+++ b/port/notes.md@@ -603,7 +603,7 @@ Scope (roadmap section 13): diagnostics, hover, completion, go to definition and- Decorations (`decorations.rs`, `workbench/file_decorations.rs`; decorationsService.ts, mainThreadDecorations.ts): a label asks while it draws; the asks go out once the frame is built, one `$provideDecorations` per provider. `$onDidChange` drops and asks again for the named resources at once, so folders keep their bubble. The SCM rows take their letter and color from the service (they read git's tooltip before).- Panel overflow (`panel.rs` `fitting_tabs`, compositeBar.ts `updateCompositeSwitcher`): tab widths come from the shaped titles and badges, the limit from the title and its actions as painted last frame (a size change draws again). A filter box squeezed below its 200px maximum counts at 200px, as upstream lays the composite bar out after the toolbar. The "..." item lists the hidden tabs ("{name} ({badge})") and runs their `<view id>.focus` command, which every panel view registers (`PanelView.view_id`, `PanelView.open`). Tests: `cargo test -p app workbench::panel::`.- Problems filter (`markers_filter.rs` for markersFilterOptions.ts and the tree and table filters, `workbench/problems_filter.rs`, `workbench/problems_table.rs`): the filter box with history (Up/Down), `@source:`, `!` negation, include and exclude globs, the filter submenu (Show Errors, Warnings, Infos, Active File Only, Excluded Files with `files.exclude` per folder), "Showing x of y", the "No results found with provided filter criteria. Clear Filters." message, View as Table/Tree with `problems.defaultViewMode`, all in the workspace memento `memento/workbench.panel.markers`. The table has the five columns of markersTable.ts in a `SplitView` with column sashes. Not ported yet: the badge's `small` rule (hidden below 400px), the code link in the table opening its target, row focus and selection. Tests: `cargo test -p app markers_filter`.-- View containers (`workbench/view_containers.rs`): `viewsContainers.activitybar` containers show in the activity bar while one of their views' `when` holds; `workbench.view.extension.<id>` opens one, a single view merges with it ("<container>: <view>" title), several views are view_panes.rs panes (`PaneContainer::Contributed`, state in `workbench.view.extension.<id>.state`) with sashes, header drag and the Views submenu. Testing is the same `PaneContainer::Contributed("workbench.view.extension.test")`: the Test Explorer (when a controller registers, testing.contribution.ts `providerCount`) first, views contributed to `test` after it; the container shows while it has a view, and a single contributed view merges under the title "Testing" (`alwaysUseContainerInfo`, ui-pair port/fixtures/ui-pair/contributed-panes.json with `port/fixtures/extensions/contributed-panes`). A tree view without a data provider shows treeView.ts `noDataProviderMessage`. Every contributed tree view registers `<view id>.focus` and sets `<view id>.active`. `viewsContainers.panel` containers are panel tabs after the built-in ones (panel.rs `part_containers`, `hideIfEmpty`), their views panes laid side by side in a bottom panel under the container's "..." (the Views submenu); their "View: Toggle <title>" closes the panel when it shows with the focus in it (viewsService.ts `OpenViewContainerAction`). Every contributed view lists "<container>: Focus on <view> View" in the Command Palette while its `when` holds (`registerFocusViewAction`). Not ported yet: the compact activity bar's contributed items.+- View containers (`workbench/view_containers.rs`): `viewsContainers.activitybar` containers show in the activity bar while one of their views' `when` holds; `workbench.view.extension.<id>` opens one, a single view merges with it ("<container>: <view>" title), several views are view_panes.rs panes (`PaneContainer::Contributed`, state in `workbench.view.extension.<id>.state`) with sashes, header drag and the Views submenu. Testing is the same `PaneContainer::Contributed("workbench.view.extension.test")`: the Test Explorer (when a controller registers, testing.contribution.ts `providerCount`) first, views contributed to `test` after it; the container shows while it has a view, and a single contributed view merges under the title "Testing" (`alwaysUseContainerInfo`, ui-pair port/fixtures/ui-pair/contributed-panes.json with `port/fixtures/extensions/contributed-panes`). A tree view without a data provider shows treeView.ts `noDataProviderMessage`. Every contributed tree view registers `<view id>.focus` and sets `<view id>.active`. `viewsContainers.panel` containers are panel tabs after the built-in ones (panel.rs `part_containers`, `hideIfEmpty`), their views panes laid side by side in a bottom panel under the container's "..." (the Views submenu); their "View: Toggle <title>" closes the panel when it shows with the focus in it (viewsService.ts `OpenViewContainerAction`). Every contributed view lists "<container>: Focus on <view> View" in the Command Palette while its `when` holds (`registerFocusViewAction`).- View visibility (`workbench/view_visibility.rs`, viewContainerModel.ts `ViewDescriptorsState`): `"visibility": "hidden"` views (npm's NPM Scripts) stay out of their container until `<view id>.toggleVisibility` from the Explorer's "..." Views submenu shows them; the state is `{ id, isHidden }` in the profile's `<storage id>.hidden`, which the Explorer's pane order shares. `collapsed`, and every contributed view of scm and debug (`showCollapsed`), start collapsed. Not ported yet: the Views submenu of the other containers, the title and pane header context menus with Hide.- Refactor Preview (`bulk_edit_preview.rs` for bulkEditPreview.ts's checked state, `workbench/refactor_preview.rs` for the pane and tree): a workspace edit with an edit that `needsConfirmation`, from `workspace.applyEdit` or a file participant's Show Preview, makes the host ask the workbench (`previewWorkspaceEdit`) and wait; the panel shows the `refactorPreview` view with categories (by type) or files (by file, `refactorPreview.groupByFile` in profile storage), checkboxes with upstream's file and category rules, and Apply and Discard. The reply is the checked edits, none on Discard, and `applyEdit` resolves `false` for no edits as bulkEditService.ts does. A second preview asks "Another refactoring is being previewed." Not ported yet: the multi-file diff editor an element opens in (milestone 14; a text file opens a diff of the file against `vscode-bulkeditpreview-editor` instead), the conflict check while the preview is open, tree keyboard navigation. Tests: `cargo test -p app bulk_edit_preview`.- Modal editor group (`workbench/modal_editor_group.rs`, modalEditorPart.ts): `MODAL_GROUP` is a group outside the grid like the panel's (`EditorGroup::ensure_detached_group`; `has_several_groups` counts neither). preferencesService.ts `getEditorGroupFromOptions` sends settings.json and keybindings.json there unless `workbench.editor.useModal` is `off` or extension tests run; the modal draws the group's active editor with its breadcrumbs but without tabs or editor actions (`NoEditorTabsControl`) under a header, while the part keeps showing the group active before it with the file's icon, name and folder and the Open Settings (UI) or Open Keyboard Shortcuts action. Escape (`editorFocus && editorPartModal`), a press outside and Close Modal Editor close its editors (dirty ones ask) and the group with them. The Settings and Keyboard Shortcuts editors are editors of the group (preferencesEditorInput.ts resource `vscode-settings:/settingseditor`; keybindingsEditorInput.ts has no resource, the port's is `vscode-settings:/keybindingseditor`): a settings file opens beside them and they show again when it closes, a closed one drops its state, and an editor opened without preserveFocus (a file, an extension) closes the modal (editorGroupFinder.ts `handleModalEditorPart`). Tests: `cargo test -p app modal_editor_group`.