Visual Studio Code, rebuilt in Rust
Rust
Merge branch 'port-audit-editor-b' into port-integrate
rokartur2923448a0cfe
diff --cc README.mdindex bfe6e8e8560,fda654ba760..e9c633fd0c2--- a/README.md+++ b/README.md@@@ -11,27 -11,27 +11,27 @@@ Coverage of VS Code 1.147.0, from [port```mermaidpie showData- "verified" : 416- "ported" : 14- "verified" : 412- "ported" : 18++ "verified" : 415++ "ported" : 15"removed" : 126"n/a" : 28```| area | verified | ported | removed | n/a | verified of in scope ||---|---:|---:|---:|---:|---|-| src/vs/platform | 69 | 0 | 30 | 13 | `████████████████████ 100%` |-| workbench contribution | 63 | 5 | 30 | 3 | `███████████████████░ 93%` |+| src/vs/platform | 68 | 1 | 30 | 13 | `████████████████████ 99%` |- | workbench contribution | 65 | 3 | 30 | 3 | `███████████████████░ 96%` |++| workbench contribution | 64 | 4 | 30 | 3 | `███████████████████░ 94%` || built-in extension | 88 | 1 | 6 | 0 | `████████████████████ 99%` |-| MainThread* shape (Rust side) | 58 | 1 | 30 | 0 | `████████████████████ 98%` |+| MainThread* shape (Rust side) | 59 | 0 | 30 | 0 | `████████████████████ 100%` || workbench service | 58 | 7 | 23 | 7 | `██████████████████░░ 89%` |-| src/vs/editor/contrib | 52 | 2 | 2 | 1 | `███████████████████░ 96%` |+| src/vs/editor/contrib | 54 | 0 | 2 | 1 | `████████████████████ 100%` || workbench part | 10 | 1 | 2 | 0 | `██████████████████░░ 91%` || extension host seam | 7 | 0 | 0 | 0 | `████████████████████ 100%` || cross-cutting check | 5 | 0 | 0 | 0 | `████████████████████ 100%` || src/vs/editor | 1 | 1 | 1 | 1 | `██████████░░░░░░░░░░ 50%` || src/vs/base | 0 | 0 | 2 | 3 | `████████████████████ 100%` || port feature | 1 | 0 | 0 | 0 | `████████████████████ 100%` |- | **all** | **416** | **14** | **126** | **28** | `███████████████████░ 97%` |-| **all** | **412** | **18** | **126** | **28** | `███████████████████░ 96%` |++| **all** | **415** | **15** | **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 --cc native/crates/app/src/menus.rsindex 5033b8e3ab0,56be6b1f766..0efa69e8a1c--- a/native/crates/app/src/menus.rs+++ b/native/crates/app/src/menus.rs@@@ -898,7 -880,7 +902,7 @@@ pub fn workbench_menus() -> Vec<MenuIte/// 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); 47] = [-const API_MENUS: [(&str, MenuId); 46] = [++const API_MENUS: [(&str, MenuId); 48] = [("file/newFile", MenuId::NewFile),("editor/context", MenuId::EditorContext),("explorer/context", MenuId::ExplorerContext),diff --cc native/crates/app/src/menus/tests.rsindex ac9f7b2f0e4,a9227fe123e..7a392c44b9d--- a/native/crates/app/src/menus/tests.rs+++ b/native/crates/app/src/menus/tests.rs@@@ -185,12 -185,12 +185,15 @@@ fn api_menu_keys_reach_their_menus()("terminal/context", MenuId::TerminalInstanceContext),("terminal/title/context", MenuId::TerminalTabContext),("scm/resourceFolder/context", MenuId::ScmResourceFolderContext),+ ("debug/callstack/context", MenuId::DebugCallStackContext),+ ("debug/variables/context", MenuId::DebugVariablesContext),+ ("debug/watch/context", MenuId::DebugWatchContext),+ ("scm/historyItemRef/context", MenuId::ScmHistoryItemRefContext),];for (key, menu) in keys {- let items = extension_menus(&[extension("k", json!({ "commands": [{ "command": "k.run", "title": "Run" }], "menus": { key: [{ "command": "k.run" }] } }))]);+ let mut contributor = extension("k", json!({ "commands": [{ "command": "k.run", "title": "Run" }], "menus": { key: [{ "command": "k.run" }] } }));+ contributor.description["enabledApiProposals"] = json!(["contribSourceControlHistoryItemMenu"]);+ let items = extension_menus(&[contributor]);let reached: Vec<_> = items.iter().map(|item| item.menu).collect();assert_eq!(reached, [menu], "{key}");}diff --cc port/ledger.mdindex 63940a810b3,c6f8955275d..07af2d112c3--- a/port/ledger.md+++ b/port/ledger.md@@@ -365,7 -365,7 +365,7 @@@ One row per upstream unit, generated b| 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, scm/historyItemRef/context, testing/item/gutter, testing/profiles/context, testing/item/result, testing/message/context, testing/message/content, viewContainer/title, 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, searchPanel/aiResults/commands, titleBar; chat/*, chatSessions/*, agents/*, editor/context/chat, 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 and debug/watch/context (cargo test -p app api_menu_keys_reach_their_menus); 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 (e.g. the debug variables and watch context menus with their built-in items): debug/*, testing/item/gutter, testing/profiles/context, testing/item/result, testing/message/context, testing/message/content, viewContainer/title, 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, scm/resourceFolder/context and scm/historyItemRef/context (cargo test -p app api_menu_keys_reach_their_menus a_folder_row a_history_item_menu); 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, viewContainer/title, 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); 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 |