Visual Studio Code, rebuilt in Rust
Rust
chore(port): bump the port's version to VS Code 1.148.0
rokarturf35bb2878348
diff --git a/README.md b/README.mdindex ec00d640510..e321c3e79e5 100644--- a/README.md+++ b/README.md@@ -42,14 +42,14 @@ Release builds of both with default settings and the same built-in extensions, A## Coverage<!-- coverage:start -->-**434 of the 435 parts of VS Code 1.147.0 the port covers match upstream 1:1 (99%).** The other one works, with open gaps listed below. 154 more are left out on purpose. A part is one upstream folder: a feature, a service or a built-in extension, counted from [port/ledger.md](port/ledger.md).+**434 of the 435 parts of VS Code 1.148.0 the port covers match upstream 1:1 (99%).** The other one works, with open gaps listed below. 155 more are left out on purpose. A part is one upstream folder: a feature, a service or a built-in extension, counted from [port/ledger.md](port/ledger.md).```mermaid%%{init: {"theme": "base", "themeVariables": {"pie1": "#2da44e", "pie2": "#d4a72c", "pie3": "#8c959f", "pieStrokeColor": "#ffffff", "pieOuterStrokeColor": "#ffffff", "pieSectionTextColor": "#ffffff", "pieLegendTextColor": "#8c959f", "pieTitleTextColor": "#8c959f"}}}%%pie showData"Matches VS Code 1:1" : 434"Works, with open gaps" : 1- "Left out on purpose" : 154+ "Left out on purpose" : 155```<details><summary>By area</summary>@@ -60,7 +60,7 @@ pie showData| Workbench features: debug, Git, terminal, search, settings, extensions view | 70 | 1 | 33 | `███████████████████░` 98% || Workbench services: editors, views, layout, themes, storage | 65 | 0 | 30 | `████████████████████` 100% || Built-in extensions: languages, themes, Git, Markdown, npm | 89 | 0 | 6 | `████████████████████` 100% |-| Extension API: the calls extensions make into the editor | 59 | 0 | 30 | `████████████████████` 100% |+| Extension API: the calls extensions make into the editor | 59 | 0 | 31 | `████████████████████` 100% || Editor features: find, folding, suggest, hover, multi-cursor | 55 | 0 | 3 | `████████████████████` 100% || Window parts: title bar, activity bar, side bar, panel, status bar | 12 | 0 | 2 | `████████████████████` 100% || Extension host: runs unmodified VS Code extensions | 7 | 0 | 0 | `████████████████████` 100% |@@ -68,7 +68,7 @@ pie showData| Whole-app checks: look, memory, no telemetry, Open VSX gallery | 5 | 0 | 0 | `████████████████████` 100% || Text editor core: model, view, cursor | 2 | 0 | 2 | `████████████████████` 100% || Port-only features: settings import from VS Code | 1 | 0 | 0 | `████████████████████` 100% |-| **All** | **434** | **1** | **154** | `███████████████████░` 99% |+| **All** | **434** | **1** | **155** | `███████████████████░` 99% |"Matches 1:1" means upstream's tests or a named check against VS Code pass. Parts that work with open gaps, by gap count:diff --git a/native/crates/app/src/diagnostics/tests.rs b/native/crates/app/src/diagnostics/tests.rsindex 7291c0f70e0..a9b24e884a8 100644--- a/native/crates/app/src/diagnostics/tests.rs+++ b/native/crates/app/src/diagnostics/tests.rs@@ -90,7 +90,7 @@ fn the_report_names_the_app_the_windows_and_the_hosts() {let stats = |_: &Path| WorkspaceStats { file_types: vec![("ts".into(), 2)], file_count: 2, ..WorkspaceStats::default() };let report = format_diagnostics(&info, &machine, Some(&root), &stats);let lines: Vec<&str> = report.lines().collect();- assert!(lines[1].starts_with("Version: VSRustium 1.147"), "{}", lines[1]);+ assert!(lines[1].starts_with("Version: VSRustium 1.148"), "{}", lines[1]);assert_eq!(&lines[2..10], ["OS Version: Darwin arm64 25.0.0","CPUs: Apple M2 (8 x 0)",diff --git a/native/crates/app/src/main.rs b/native/crates/app/src/main.rsindex fe818b2a60e..aa1ea9a0186 100644--- a/native/crates/app/src/main.rs+++ b/native/crates/app/src/main.rs@@ -836,8 +836,8 @@ fn run_extension_host(/// package.json `version`, with `-<quality>` on a build that is not stable (`insider`), as gulpfile.vscode.ts writes it.static VERSION: std::sync::LazyLock<String> = std::sync::LazyLock::new(|| match product::quality() {- Some(quality) if quality != "stable" => format!("1.147.0-{quality}"),- _ => "1.147.0".to_owned(),+ Some(quality) if quality != "stable" => format!("1.148.0-{quality}"),+ _ => "1.148.0".to_owned(),});const ACTIVATED_PREFIX: &str = "eager extensions activated: ";diff --git a/native/crates/app/src/product.rs b/native/crates/app/src/product.rsindex 48bde6f0540..6c574d33d33 100644--- a/native/crates/app/src/product.rs+++ b/native/crates/app/src/product.rs@@ -106,6 +106,6 @@ mod tests {assert_eq!(super::name_short(), "VSRustium");assert_eq!(super::get("urlProtocol"), "vsrustium");assert_eq!(super::get("darwinBundleIdentifier"), "com.rokartur.vsrustium");- assert!(super::get("version").as_str().is_some_and(|version| version.starts_with("1.147")));+ assert!(super::get("version").as_str().is_some_and(|version| version.starts_with("1.148")));}}diff --git a/native/crates/app/src/workbench/dialogs.rs b/native/crates/app/src/workbench/dialogs.rsindex c179175916b..4b275ad78fb 100644--- a/native/crates/app/src/workbench/dialogs.rs+++ b/native/crates/app/src/workbench/dialogs.rs@@ -106,7 +106,7 @@ mod tests {crate::product::load(std::path::Path::new(env!("VSCODE_SRC")), false);let details = about_details(&("Test OS".into(), "test-arch".into(), "1.0".into()));let lines: Vec<&str> = details.lines().collect();- assert!(lines[0].starts_with("Version: 1.147"));+ assert!(lines[0].starts_with("Version: 1.148"));assert_eq!(&lines[1..], ["Commit: Unknown", "Date: Unknown", "OS: Test OS test-arch 1.0"]);}diff --git a/native/crates/app/src/workbench/update.rs b/native/crates/app/src/workbench/update.rsindex abac5b2ca98..cbf36607e26 100644--- a/native/crates/app/src/workbench/update.rs+++ b/native/crates/app/src/workbench/update.rs@@ -225,7 +225,7 @@ mod tests {fn a_stable_build_shows_the_release_notes_of_a_ready_minor_update(cx: &mut TestAppContext) {let update = |product_version: &str| Update { version: "bbbb".into(), product_version: product_version.into(), timestamp: 2, url: "https://example.com/a.zip".into(), sha256hash: "ab".repeat(32) };let ready = |product_version: &str| State::Ready { update: update(product_version), app: "/tmp/VSRustium.app".into() };- // The checkout's product.json version, 1.147.x.+ // The checkout's product.json version, 1.148.x.crate::product::load(Path::new(env!("VSCODE_SRC")), false);for quality in [Some("stable"), Some("insider"), None] {let _quality = crate::product::test_quality::set(quality);@@ -240,13 +240,13 @@ mod tests {});let stable = quality == Some("stable");let item = |workbench: &Workbench, window: &Window| update_titles(workbench, window).contains(&"Show Update Release Notes".to_owned());- workbench.update_state_changed(&ready("1.148.0"), window, cx);+ workbench.update_state_changed(&ready("1.149.0"), window, cx);assert_eq!(item(workbench, window), stable, "{quality:?}");assert_eq!(workbench.commands.get("update.showUpdateReleaseNotes").is_some(), stable, "{quality:?}");if stable {workbench.execute_command("update.showUpdateReleaseNotes", Vec::new(), window, cx);- assert_eq!(*shown.borrow(), [vec![serde_json::json!("1.148.0")]]);- workbench.update_state_changed(&ready("1.147.9"), window, cx);+ assert_eq!(*shown.borrow(), [vec![serde_json::json!("1.149.0")]]);+ workbench.update_state_changed(&ready("1.148.9"), window, cx);assert!(!item(workbench, window), "a patch update has no item");workbench.update_state_changed(&State::Idle { error: None, not_available: false }, window, cx);workbench.execute_command("update.showUpdateReleaseNotes", Vec::new(), window, cx);diff --git a/port/ledger.md b/port/ledger.mdindex 172183af46b..d0537835d94 100644--- a/port/ledger.md+++ b/port/ledger.md@@ -1,6 +1,6 @@# Port ledger-The one source of truth for the port's state: the work (decisions, milestones, investigations) and one row per unit of upstream VS Code 1.147.0 with its milestone, status, open gaps and evidence. `bun port/tools/ledger-check.ts` prints every place the two tables disagree; after a status change, `bun port/tools/readme-coverage.ts` rewrites README.md's coverage block.+The one source of truth for the port's state: the work (decisions, milestones, investigations) and one row per unit of upstream VS Code 1.148.0 with its milestone, status, open gaps and evidence. `bun port/tools/ledger-check.ts` prints every place the two tables disagree; after a status change, `bun port/tools/readme-coverage.ts` rewrites README.md's coverage block.## Work@@ -8,7 +8,7 @@ Status: `open`, `in progress`, `waiting on Artur`, `later` (postponed), `done`,| area | item | status | detail | check or evidence ||---|---|---|---|---|-| Decisions (Artur) | 1:1 rule | decided | Every milestone ships a feature end to end and 1:1 with VS Code 1.147.0: UI, keyboard and mouse, the main-thread side the extension host calls, persistence, same look and behavior, upstream logic and tests ported, checked against the reference. Fewer complete features beat more partial ones; a `shortcut:` is only for a missing platform capability or a product decision. | |+| Decisions (Artur) | 1:1 rule | decided | Every milestone ships a feature end to end and 1:1 with VS Code 1.148.0: UI, keyboard and mouse, the main-thread side the extension host calls, persistence, same look and behavior, upstream logic and tests ported, checked against the reference. Fewer complete features beat more partial ones; a `shortcut:` is only for a missing platform capability or a product decision. | || Decisions (Artur) | mouse cursors | decided | Every element gets the cursor the reference CSS gives it (`rg 'cursor:' src/vs --glob '*.css'`): `pointer` on clickable items (activity bar, tabs, list rows, status bar items with a command, buttons, links), `text` over editor text and input fields, the resize cursors on sashes, `default` elsewhere. GPUI: `.cursor_pointer()`, `.cursor_text()`, `.cursor_ew_resize()` and the like on the element, never a window-wide cursor. | || Decisions (Artur) | removed parts | decided | AI (chat, agents, agent host, sessions, Copilot, MCP, language models, inline chat, embeddings, speech), sign-in and accounts (authentication, GitHub sign-in), Settings Sync, Microsoft services (experiments, surveys, issue reporter), telemetry and remote/tunnels are `removed` (41 rows), their extension API kept inert; internal infrastructure and developer tools with no 1:1 counterpart (base/common, base/node, platform/instantiation, platform/observable, platform/webWorker, platform/gpu, platform/cssDev, editor/standalone, editor/contrib/gpu, workbench/contrib/screenshotTool) are `removed`, replaced by the native architecture; later: the integrated browser (`browserView`, `MainThreadBrowsers`) is `removed`, Simple Browser stays; the api-tests suites of removed features leave the milestone 20 target. | || Decisions (Artur) | n/a parts | decided | Upstream test infrastructure (`base/test`, `editor/test`, `platform/test`, `workbench/services/driver`) and the Electron process, IPC and DOM layers (`base/browser` `base/parts` `platform/domWidget` `platform/ipc` `platform/protocol` `platform/sandbox` `platform/sharedProcess` `platform/utilityProcess`) are `n/a`. | |@@ -107,7 +107,7 @@ Status: `open`, `in progress`, `waiting on Artur`, `later` (postponed), `done`,| M21 uplift | setup: proxy ids | done | 1.148.0 appends `MainThreadRemoteAgentHosts` to `MainContext` (id 90), so every `ExtHostContext` id after it moves by one: `bun port/tools/gen-proxy-ids.ts` (172 identifiers). The port answers the new proxy as inert, the same as the other removed agent proxies: its two methods return void, so the session.rs fallback (`undefined`) is the whole answer. | `cargo test -p exthost`: 88 passed; exthost-probe on Bun and Node: 26/26 code extensions activate, both round trips pass, the same 26 as with the 1.147.0 extensions (2026-12-01) || M21 uplift | setup: reference dumps | later | Rerun `port/tools/dump-settings`, `ref-commands`, `ref-contextmenu`, `ref-menubar`, `ref-hover` and `ref-dom`. They bring in without code: `workbench.editor.newTabButton` (renamed from `workbench.editor.experimental.newTabButton`), the removed `multiDiffEditor.experimental.fileList`, the new `update.enableEarlyStaging`, `markdown.editor.initialMode` and `workbench.editor.experimental.emptyEditorHintOpenInMarkdownEditor`. | `port/tools/settings-check` lists the new settings and not the removed one || M21 uplift | setup: baselines | later | Refresh the pixel-check baseline and `port/results/api-tests-reference.md`. 1.148.0 adds `browser.tools.test.ts` cases (integrated browser, removed) and an `http.noProxy` step in `proxy.test.ts` (row extension/vscode-api-tests). | api-tests reference numbers for 1.148.0 in port/results/api-tests-reference.md |-| M21 uplift | setup: version bump | later | 1.148.0 in `VERSION` (`native/crates/app/src/main.rs`) and in this file's text that names 1.147.0; rerun `bun port/tools/gen-ledger.ts`. New units: `mainthread/MainThreadRemoteAgentHosts` gets a `removed` row (remote agent hosts); `mainthread/MainThreadGitExtensionService` (21 lines) is a client of the removed IGitService and stays with the `removed` row `mainthread/MainThreadGitExtension`. | `bun port/tools/ledger-check.ts` |+| M21 uplift | setup: version bump | done | 1.148.0 in `VERSION` (`native/crates/app/src/main.rs`), in this file's header and 1:1 rule, and in README.md's coverage line (`port/tools/readme-coverage.ts` now reads the version from upstream's `package.json`); evidence that names a 1.147.0 dump keeps its version. `bun port/tools/gen-ledger.ts` added one unit: `mainthread/MainThreadRemoteAgentHosts`, `removed` (remote agent hosts). `mainthread/MainThreadGitExtensionService` (21 lines) is a client of the removed IGitService and stays with the `removed` row `mainthread/MainThreadGitExtension`. | `bun port/tools/ledger-check.ts` exits 0; 595 rows (2026-12-01) || M21 uplift | setup: diff recount | later | Run `bun port/tools/uplift-diff.ts 1.148.0 1.147.0` on the split tree and compare its group counts with section 1 of `port/plans/uplift-1.147.0-to-1.148.0.md`. | the counts match, or the plan and these rows take the difference || M21 uplift | extension/* grammars | later | M7. New upstream grammar commits for cpp, csharp, dart, dotenv, go, java, latex, log, php, razor, rust and scss (1,265 lines of data) arrive with the reference's extensions; the colorize fixtures `test-80644_cpp`, `test_env` and `test_tex` change (712 lines). | `cargo test -p app syntax` (`colorize_fixtures_match_the_reference`) || M21 uplift | extension/theme-defaults | later | M7, 8 lines. Light 2026: `editorGroupHeader.connectedTabsBackground` #EAEAEA to #F0F0F3, `tab.divider` #CECECE, `activityBarTop.inactiveForeground` #606060. Light Modern: the quick pick's focused row is #005FB8 with #FFFFFF foreground, icon and highlight. | ui-pair 2026-light tab bar and top activity bar, light_modern Cmd+P; the defaultThemeColors.test.ts cases (74 lines) in `cargo test -p app theme` |@@ -246,6 +246,7 @@ One row per upstream unit, generated by `bun port/tools/gen-ledger.ts`; mileston| mainthread/MainThreadWindow | MainThread* shape (Rust side) | M11 | verified | | $openUri through the opener service (openExternal), $asExternalUri for file system provider resources (code-oss://workspace?<uri>, no tunnels), $onDidChangeWindowFocus on window activation; $getInitialState isActive fixed true (no user activity service); api-tests env.asExternalUri pass; session.rs: $getInitialState fixed {isFocused,isActive}; rest undefined; verified: api-tests `MOCHA_GREP="vscode API - window|vscode API - tree"`: api-folder 43 passing, 0 pending, 1 failing (`Tabs - Ensure tabs getter is correct`, openNotebookDocument: notebooks are milestone 17) || mainthread/MainThreadTunnelService | MainThread* shape (Rust side) | | removed | | no remote or tunnels by decision (port/notes.md); one local extension host || mainthread/MainThreadTimeline | MainThread* shape (Rust side) | M14 | verified | | `$registerTimelineProvider`/`$unregisterTimelineProvider`/`$emitTimelineChangeEvent` routed to timeline.rs and workbench/timeline_view.rs (main_thread_commands.rs): cargo test -p app timeline |+| mainthread/MainThreadRemoteAgentHosts | MainThread* shape (Rust side) | | removed | | remote agent hosts serve the agent (no sign-in/AI by decision, port/notes.md); API stays inert: its two methods return void, session.rs answers undefined; exthost-probe 26/26 on Bun and Node (1.148.0) || mainthread/MainThreadChatArtifactIntegrations | MainThread* shape (Rust side) | | removed | | no sign-in/AI by decision (port/notes.md); API stays inert: session.rs answers undefined, list getters []; exthost-probe 30/30 on Bun and Node || mainthread/MainThreadAiRelatedInformation | MainThread* shape (Rust side) | | removed | | no sign-in/AI by decision (port/notes.md); API stays inert: session.rs answers undefined, list getters []; exthost-probe 30/30 on Bun and Node || mainthread/MainThreadAiSettingsSearch | MainThread* shape (Rust side) | | removed | | no sign-in/AI by decision (port/notes.md); API stays inert: session.rs answers undefined, list getters []; exthost-probe 30/30 on Bun and Node |@@ -759,4 +760,4 @@ One row per upstream unit, generated by `bun port/tools/gen-ledger.ts`; mileston| gallery/open-vsx | cross-cutting check | M18 | verified | | exthost/src/gallery.rs: query, latest-version resource, version choice, download with signature check; cargo test -p exthost gallery (upstream extensionGalleryService.test.ts sorting and filterLatestExtensionVersionsForTargetPlatform cases, Open VSX resource fixture); `workbench.extensions.installExtension redhat.vscode-yaml` downloads 2.0.0 from open-vsx.org, verifies it and activates without restart, not-found errors as upstream: PORT_GALLERY=1 port/tools/extensions-check || port/settings-import | port feature | M10 | verified | | app/src/settings_import.rs, workbench/settings_import.rs: cargo test -p app settings_import installed_extensions_bring extensions_open_vsx_lacks_are_copied_from_the_source accepting_the_contents_pick_imports_every_part imported_extensions_ask_for_publisher_trust_once installed_extensions_bring_the_themes_the_settings_name an_empty_profile_takes_keybindings_json_with_its_comments reads_the_disabled_extensions on port/fixtures/settings-import; release GUI on the host lane: one import each from VS Code, Cursor and VSCodium fixtures under a scratch HOME. AI, sign-in, telemetry, remote and the editors' own settings and extensions are left out; the UI state is what a VS Code profile export carries, the source global storage's `StorageTarget.USER` keys (view locations, pinned and hidden views; accepting_the_contents_pick_imports_every_part), not the part sizes (port/notes.md Settings import) || look/screenshot-diff | cross-cutting check | | verified | | port/tools/pixel-check: CDP reference capture and Metal readback in 3 themes, pixeldiff reference vs itself 0 different; baseline in port/results/pixels.md |-| perf/memory-benchmark | cross-cutting check | | verified | | port/tools/bench, median of 5 on the Studio, the VS Code 1.147.0 checkout open; port/results/benchmark.md: 218 MiB in all, extension host 74 MiB, VS Code 1.147.0 release 975 MiB and 195 MiB |\ No newline at end of file+| perf/memory-benchmark | cross-cutting check | | verified | | port/tools/bench, median of 5 on the Studio, the VS Code 1.147.0 checkout open; port/results/benchmark.md: 218 MiB in all, extension host 74 MiB, VS Code 1.147.0 release 975 MiB and 195 MiB |diff --git a/port/tools/readme-coverage.ts b/port/tools/readme-coverage.tsindex 9816041189d..2bd546cae59 100755--- a/port/tools/readme-coverage.ts+++ b/port/tools/readme-coverage.ts@@ -3,8 +3,10 @@// Run after a ledger recount: bun port/tools/readme-coverage.tsimport { readFileSync, writeFileSync } from 'node:fs';import { join } from 'node:path';+import { vscodeSrc } from './vscode-src.ts';const root = join(import.meta.dir, '../..');+const version = JSON.parse(readFileSync(join(vscodeSrc, 'package.json'), 'utf8')).version;const areaNames: Record<string, string> = {'workbench contribution': 'Workbench features: debug, Git, terminal, search, settings, extensions view','src/vs/platform': 'Platform services: files, configuration, keybindings, windows, updates',@@ -59,7 +61,7 @@ const bar = (c: typeof total) => {};const lines = [- `**${total.verified} of the ${inScope(total)} parts of VS Code 1.147.0 the port covers match upstream 1:1 (${percent(total)}%).** ${inScope(total) - total.verified === 1 ? 'The other one works' : `The other ${inScope(total) - total.verified} work`}, with open gaps listed below. ${leftOut(total)} more are left out on purpose. A part is one upstream folder: a feature, a service or a built-in extension, counted from [port/ledger.md](port/ledger.md).`,+ `**${total.verified} of the ${inScope(total)} parts of VS Code ${version} the port covers match upstream 1:1 (${percent(total)}%).** ${inScope(total) - total.verified === 1 ? 'The other one works' : `The other ${inScope(total) - total.verified} work`}, with open gaps listed below. ${leftOut(total)} more are left out on purpose. A part is one upstream folder: a feature, a service or a built-in extension, counted from [port/ledger.md](port/ledger.md).`,'','```mermaid',`%%{init: {"theme": "base", "themeVariables": {"pie1": "#2da44e", "pie2": "#d4a72c", "pie3": "#8c959f", "pieStrokeColor": "#ffffff", "pieOuterStrokeColor": "#ffffff", "pieSectionTextColor": "#ffffff", "pieLegendTextColor": "#8c959f", "pieTitleTextColor": "#8c959f"}}}%%`,