Skip to content

Visual Studio Code, rebuilt in Rust

Rust
617 KB
Raw Blame

Port notes

Decisions, traps and findings that the ledger rows point to. Newest at the end of each section.

Layout

  • native/: Cargo workspace. crates/exthost (framing, RPC, handshake, init data, session dispatcher, exthost-probe binary), crates/app (code-gpui, the GPUI app).
  • upstream/ (not committed, milestone 22): VS Code checked out at the 1.148.0 tag, never edited; every build step and tool reads it through VSCODE_SRC (default upstream/; native/vscode_src.rs, port/tools/vscode-src.sh, port/tools/vscode-src.ts). Setup and build: README.md. A Studio mirror without its own upstream/ gets a link to ~/Developer/vscode-ref-1.148.0 (port/tools/studio).
  • src/bootstrap-exthost.ts (added by port/patches/src-bootstrap-exthost.patch): entry of the extension host bundle (port/tools/build-exthost writes out-exthost/bootstrap-exthost.js). Same bundle on Bun and Node.
  • Upstream edits (milestone 22) are port/patches/*.patch against the 1.148.0 tag, never committed to upstream: build-exthost applies src-*.patch to a copy of src/ in out-exthost/build and inlines product.json with port/product.json (the port's name, data folder, bundle id, URL protocol) over it; package-app applies extensions-*.patch to the bundled extensions and writes the merged product.json; product.rs merges port/product.json at startup. A patch is regenerated by editing the file in upstream/ and git -C upstream diff -- <file>, then git -C upstream checkout -- <file>.
  • port/tools/studio <cmd>: syncs the tree to the Mac Studio (~/Developer/vscode-gpui-work/port-src) and runs <cmd> there. All builds and runs go through it.
  • Reference: untouched 1.148.0 checkout at ~/Developer/vscode-ref-1.148.0 on the Studio (compiled, extensions compiled), the default REF of every port tool. ~/Developer/vscode-ref is the 1.147.0 checkout, kept until the sessions still on 1.147.0 end; ~/Developer/vscode-ref-openvsx (Open VSX product overrides, milestone 18) is a 1.147.0 copy too. Wu a3ced28 at ~/Developer/wu.

Extension host seam

  • The Rust parent listens on a Unix socket and passes it as VSCODE_EXTHOST_IPC_HOOK; framing is upstream PersistentProtocol (13-byte header, ack frames), RPC is rpcProtocol.ts. No Electron message ports.
  • Proxy ids are creation order in extHost.protocol.ts, starting at 1. port/tools/gen-proxy-ids.ts writes proxy_ids.rs keyed by the MainContext/ExtHostContext key, not the identifier string: MainThreadLanguageModelTools is created as 'MainThreadChatSkills', and 8 more keys differ from their strings. Rerun the generator when the protocol file changes.
  • The local host is EagerManualStart: init data has autoStart: false and main sends $startExtensionHost. With autoStart: true the host races the explicit call and rejects it ("Extension host is already started!").
  • Startup calls main must make before $startExtensionHost (they come from MainThread* constructors upstream): $initializeConfiguration, $initializeWorkspace, $initializeTelemetryLevel, $acceptEditorTabModel. Without the tab model, typescript-language-features fails on window.tabGroups.activeTabGroup.
  • Main must answer MainThreadWindow.$getInitialState with {isFocused, isActive} and MainThreadLanguageModelTools.$getTools with an array, or the host logs unhandled rejections. A MainThread* method the port does not implement answers undefined (the session.rs fallback).

Bun (1.4.5) as the extension host runtime

Host changes, all gated on process.versions.bun so Node behaves as upstream:

  1. extensionHostProcess.ts: skip @vscode/native-watchdog. Bun panics on its uv_thread_create (oven-sh/bun#18546). The 1 s parent-pid poll still runs; lost: the watchdog that kills a host whose event loop is stuck. The Rust parent kills the child on drop.
  2. extHostExtensionService.ts CommonJS: Bun's require() does not call Module._load, so the vscode (and other factory) modules are served from Module._resolveFilename through require.cache under /__vscode_module__/<uuid>/<name>, one key per API instance.
  3. extHostExtensionService.ts ESM: Bun has no module.registerHooks, and runtime onResolve plugins never see bare specifiers. A synchronous Bun.plugin onLoad rewrites from 'vscode' / import('vscode') in ESM extensions to the same data: URL the Node hook resolves to. Constraints found: onLoad must return an object (no pass-through), must be synchronous (an async one breaks every require() of a matched file), and loading a CommonJS file through it turns it into ESM, so the filter only matches .mjs and .js files of "type": "module" extensions outside node_modules. Known limit: ESM extensions added after startup are not matched (code comment shortcut:).
  4. Bun is started with --conditions=module-sync: Node resolves require() of ESM-only packages through that condition by default (git requires file-type, which has only import/module-sync exports).

Copilot Chat

GitHub.copilot-chat (built in at 1.147.0) does not finish activating within 60 s on either runtime with the stub main thread; it waits on auth/language-model main-thread calls. It is a Microsoft service client.

Decision (Artur): the port ships no sign-in and no AI features. Copilot Chat, chat views, inline chat, language models, MCP and agent parts are removed, and so are the accounts UI and Settings Sync sign-in. The extension API stays as an inert surface, like telemetry: vscode.authentication, vscode.lm and vscode.chat report no providers, so third-party extensions keep loading. Ledger rows for these parts become removed (by decision), not todo.

Decision (Artur), later: also removed are the remaining AI parts (embeddings, code mapper, speech, transcription, canvases, session changes), Microsoft services (assignment/experiments, share, surveys, issue reporter, emergency alerts, marketplace customizations, data channels, OTel, external services), edit telemetry, and remote/tunnels (SSH, containers, port forwarding, managed sockets, the test resolver). The port keeps one local extension host; their APIs stay inert. Upstream test infrastructure rows are n/a. With workbench/contrib/remote removed, the status bar has no remote indicator (remoteIndicator.ts status.host, "Open a Remote Window"): Problems, when no Restricted Mode, bottom left bell or higher left entry comes before it, takes the first-visible-item spacing (cargo test -p app the_status_bar_has_no_remote_indicator); ui-pairs differ from the reference by that item.

Decision (Artur), later: the Electron process, IPC and DOM layers (base/browser, base/parts, platform/domWidget, platform/ipc, platform/protocol, platform/sandbox, platform/sharedProcess, platform/utilityProcess and the workbench clients of the shared and utility processes) are n/a: the port runs one Rust process drawn by GPUI plus the extension host, so there is nothing of these to port.

Milestone 2: empty workbench

Scope: the window the reference opens with no folder (title bar with command center and layout actions, activity bar, editor part with the letterpress watermark, no-folder status bar) in the modern floating layout, drawn by GPUI from the built-in theme JSON, in Dark Modern, Light Modern and Default High Contrast.

Done when: port/tools/pixel-check diffs all three themes; every non-anti-aliased difference left is listed in port/results/pixels.md with its cause; the theme tests pass (cargo test -p app); the benchmark is rerun with the workbench drawn.

  • Theme resolution follows ColorThemeData: the include chain merged with the including file winning, then the registerColor default for the keys the shell paints (theme.rs registry_default). A key with no value is transparent, like an unset CSS variable.
  • --theme takes the settings id (workbench.colorTheme), not the extension id.
  • Codicons are drawn from @vscode/codicons/src/icons/*.svg, not codicon.ttf: Wu's macOS text system skips any font without an m glyph (gpui_macos load_family). The SVGs and the letterpress are read at runtime from the checkout, not embedded; codicons are CC-BY-4.0, the same files upstream ships.
  • port/tools/ref-screenshot brings the page to front and waits until the title bar is not .inactive; without it a capture could show the inactive title bar or the previous theme.
  • shortcut: the port always draws the active-window look (no titleBar.inactive*, window.inactiveBorder); add it with window focus events.
  • shortcut: the window border radius is the macOS 26+ value (16px); older macOS uses 10px.
  • shortcut: High Contrast Light has no registry defaults yet; loading it fails with "not ported".

Milestone 3: open a folder

Scope: code-gpui <folder> passes the folder to the extension host as its workspace (init_data and $initializeWorkspace, the same IWorkspaceData as exthost-probe --workspace) and draws the window the reference shows with that folder open: Explorer active in the activity bar, the side bar with the folder tree and the collapsed Outline and Timeline sections, the folder name in the command center, the folder status bar. Clicking a folder row expands or collapses it.

Done when: port/tools/pixel-check diffs the empty and the folder window (port/fixtures/workspace) in all three themes, with every non-anti-aliased difference listed in port/results/pixels.md; cargo test -p app passes with the tree test.

  • The tree (explorer.rs) is read from disk on every render: folders first, then names compared case-insensitively (FileSorter default), filtered by files.exclude and explorer.excludeGitIgnore (see Explorer filter, milestone 12).
  • pixel-check copies the fixture outside the repository, so the git extension finds no repository and the reference draws no SCM decorations.
  • The reference runs with security.workspace.trust.enabled: false (no trust dialog) and workbench.secondarySideBar.defaultVisibility: hidden (with AI off the secondary side bar is empty).
  • shortcut: no file icon theme; the reference is captured with workbench.iconTheme: null. Port Seti when the editor opens files.
  • shortcut: no file watcher; the tree shows the disk at the last redraw. Add a watcher with file operations.
  • shortcut: names sort with plain lowercase comparison, not compareFileNamesDefault's numeric collation (file10 before file9).
  • shortcut: an unreadable folder shows no children, without the reference's error.
  • shortcut: rows have no focus outline, hover, keyboard navigation or scrolling; a tree taller than the side bar is clipped. Selection came with milestone 4.

Milestone 4: open a file

Scope: code-gpui <folder> <file>, or a click on a file in the Explorer, opens the file in the editor part the way the reference shows it: the connected tab strip (preview tab on single click, pinned on double click or from the command line) with the split and more actions, breadcrumbs, the text with line numbers, current-line border, indent guides, the textual word highlight under the cursor and the three-lane overview ruler; the status bar gains Ln/Col, indentation, encoding, EOL and language mode. The extension host sees the document, the editor, the tab model and onLanguage activation (host_sync.rs).

Done when: port/tools/pixel-check diffs the empty, folder and file windows (notes.txt open) in all three themes, with every non-anti-aliased difference listed in port/results/pixels.md; cargo test -p app passes with the model, language, host sync and editor tests.

  • The model (editor.rs) follows upstream: indentation from indentationGuesser.ts, guides from guidesTextModelPart.ts, word highlight from textualHighlightProvider.ts with USUAL_WORD_SEPARATORS, tab order from EditorGroupModel (new editors right of the active one, a preview replaces the preview, closing activates the most recent).
  • Languages (languages.rs) come from the scanned contributes.languages, matched like getAssociationByPath: filename, then the longest filename pattern, then the longest extension.
  • Tab, editor and model ids copy mainThreadEditorTabs.ts _generateTabId, getId() and $model<n>.
  • The reference ran with editor.minimap.enabled: false until milestone 8 drew the minimap. With a file it parks the pointer on the status bar for 1.5 s so the editor scrollbars fade; the empty and folder windows skip that, since the wait also brings up the side bar sash's grip dots.
  • Host check: code-gpui <fixture> <fixture>/src/main.ts with EXTHOST_TRACE=1 activates vscode.typescript-language-features and vscode.emmet on top of the folder-only set (git-base, npm, github, git, debug-auto-launch, merge-conflict), with no $onUnexpectedError or activation error.
  • shortcut: no minimap; port it with scrolling past one screen. Closed by milestone 8.
  • shortcut: no editing and no keyboard; a click sets the cursor. Closed by milestone 5.
  • shortcut: the cursor does not blink (the reference is captured with a solid cursor). Closed by milestone 20: the focused code editor's cursor blinks (workbench/editor_view/cursor_blink.rs, viewCursors.ts _updateBlinking, 500ms; "smooth", "phase" and "expand" run viewCursors.css's animations 500ms after the cursors change, 20 alternating 0.5s ease-in-out iterations), solid when read-only, in a screenshot and in ui-pair's port user data (cargo test -p app the_focused_snippet_cursor_blinks).
  • shortcut: visibleRanges sent to the host covers the whole document.
  • shortcut: no firstLine (shebang) language detection; a file with no association is plain text.
  • shortcut: High Contrast word highlight border is dashed; GPUI has no dotted border.
  • shortcut: the breadcrumb icon slot is empty until the file icon theme is ported.
  • shortcut: files are read as UTF-8 (with or without BOM), no encoding guessing or binary detection; a read error is logged, not shown as the editor's error placeholder.

Milestone 5: edit and save

Scope: one cursor with a selection in the active editor; the coreCommands.ts moves (char, word, line edge, document edge, with Shift to select), click, Shift+click, double and triple click and drag selection; typing and IME composition through GPUI's EntityInputHandler; Enter, Tab, Shift+Tab, the delete commands (char, word, to line start/end); Cmd+C/X/V with whole-line copy; undo/redo with the stops of editStack.ts and shouldPushStackElementBetween; Cmd+S writes the file; dirty state on the tab. The host gets $acceptModelChanged (with upstream detailedReason), $acceptDirtyStateChanged, $acceptModelSaved, selection changes and one $acceptTabOperation per tab change.

Done when: cargo test -p app passes with editor::cursor::tests, editor::edit::tests, the host sync tests and keys_and_typed_text_edit_the_focused_editor_and_reach_the_host (keys typed into a window, Cmd+S writes the file, the editor is clean after); VSCODE_GPUI_EXTENSIONS=~/Developer/vscode-ref/extensions cargo test -p app -- --ignored live_host gets a new MainThreadDiagnostics.$changeMany from TypeScript after an edit; pixel-check of the file window unchanged.

  • The pure cursor model (editor/cursor.rs) has no GPUI dependency; the edit model and undo history (editor/edit.rs) live on OpenEditor. Dirty state is upstream's alternative version id: undo back to the saved text is clean.
  • Trap: a full $acceptEditorTabModel resync fires only onDidChangeTabGroups. TypeScript's TabResourceTracker listens to onDidChangeTabs and skips geterr for files it does not see in a tab, so diagnostics never came. host_sync.rs now diffs the tab list and sends TAB_OPEN/CLOSE/MOVE/UPDATE like mainThreadEditorTabs.ts.
  • Editing a preview editor pins it; word highlight stops while typing, as _onPositionChanged does.
  • shortcut: columns step over chars, not grapheme clusters; a ZWJ emoji takes several steps. Port getLeftDeleteOffset and the grapheme iterator when needed.
  • shortcut: Enter copies the leading whitespace only; no onEnter rules or indentation rules, so { does not indent the next line. Tab on a blank line takes the nearest non-blank indent above.
  • shortcut: save has no participants (format on save, trim whitespace, final newline), no conflict check and no encoding other than UTF-8.
  • shortcut: drag selection only tracks the pointer over lines; IME candidate windows get no bounds (bounds_for_range returns None).
  • shortcut: no find. (Multi-cursor and column selection came in milestone 8.)
  • shortcut: the cursor still does not blink. Closed by milestone 20.

Milestone 6: API test harness

Scope: code-gpui <folder> --extensionDevelopmentPath=<dir> --extensionTestsPath=<path> runs an extension's tests as upstream's extension development host does, and port/tools/api-tests runs extensions/vscode-api-tests suites api-folder and api-workspace with it.

Done when: port/tools/api-tests prints passing/pending/failing per suite and writes them to port/results/api-tests.md; the run finishes (failures allowed) without a hang.

  • exthost/src/extension_development.rs: the extension under development is scanned with isBuiltin: false, isUnderDevelopment: true and replaces a built-in with the same id (the reference's extensions/ holds vscode-api-tests too); init data gets extensionDevelopmentLocationURI and extensionTestsLocationURI. Only the --flag=value form is read, as scripts/test-integration.sh passes it.
  • After eager activation the session sends $extensionTestsExecute; its reply (0 or 1), 1 if the runner threw, or the host's own code if it died first, becomes code-gpui's exit code, like _onExtensionHostExit. A session error before that also exits 1, so a test run never leaves the window open.
  • The port log is code-gpui's stderr. Host console entries are formatted like Node's util.format (console.rs), so mocha's spec reporter reads as in the reference log; $onUnexpectedError, activation and runtime errors and MainThreadLogger.$log lines go there too.
  • The test extension, its compiled tests, testrunner.js and mocha come from the reference checkout (same 1.147.0 sources; the port tree has no compiled out/), copied to /tmp so the tests' file writes leave the reference clean. rootPath assertions compare against __dirname, so the workspace must be the copy's testWorkspace.
  • api-tests opens a window, so it takes the Studio GUI lock after the build. MOCHA_GREP=<pattern> (read by testrunner.js) runs one area, e.g. MOCHA_GREP='vscode API - workspace'; later milestones should use it, since the full folder suite does not get past the terminal tests within the timeout.
  • Mocha keeps upstream's 60 s per-test timeout. Tests that wait for a main-thread event the stubs never send (quick input, terminal, shell integration) each cost 60 to 120 s, so the folder suite hits its 1800 s SUITE_TIMEOUT after 30 of its suites; the table counts the reached tests and lists the rest as not reached.
  • One early run ended at 990 s with exit 0 and no mocha summary; the next full run went past the same point and hit the timeout, so the cause is not found. The script marks any run without mocha's summary as incomplete: exit <code> (or timed out), so such a run cannot pass as complete.
  • Finding: the folder suite holds chat, lm, browser-tools and run_in_terminal tests for AI features the port removes by decision; they can never pass, so the parity target of milestone 20 (356/46/0) needs those tests subtracted. Decision for Artur.
  • Rows base/test, editor/test, platform/test (upstream unit tests of the TypeScript layers) and workbench/services/driver (the smoke-test DOM driver) are n/a: the port has no TypeScript workbench to run them on, and the api-tests harness is its end-to-end check.
  • A .code-workspace argument opens a multi-root workspace since milestone 12; the api-workspace suite passes 4/4.

Milestone 7: syntax colors and themes

Scope: TextMate tokenization of every built-in grammar, token colors from the theme's tokenColors, bracket pair colorization and bracket matching in the editor, all 19 built-in color themes including High Contrast Light, firstLine language detection.

Done when: the colorize-tests fixtures give the reference's scopes and colors; pixel-check gains a src/main.ts window in dark, light, hc and hclight; cargo test -p app runs the grammar tests.

  • Closes the milestone 2 shortcut (High Contrast Light not ported) and the milestone 4 shortcut (no firstLine detection).
  • native/crates/textmate ports vscode-textmate 9.3.2 (the version in the reference's node_modules): grammar and plist reading, rules, the tokenizer loop with \G anchors, begin/while, injections, embedded languages, the theme trie and scope matchers. Regexes run on Oniguruma through the onig crate, the engine vscode-oniguruma wraps.
  • syntax.rs resolves tokenColors like ColorThemeData: the editor default rule, the theme rules, then the token.*-token defaults. syntax::tests::colorize_fixtures_match_the_reference checks the text, scopes and color of every token of the 109 fixtures in the 10 themes the reference results list.
  • Brackets (brackets.rs) follow bracketPairsTree: brackets from the language configuration outside strings, comments and regexes, nesting level colors editorBracketHighlight.foreground1..6, unexpected brackets in editorBracketHighlight.unexpectedBracket.foreground. The cursor's bracket match follows matchBracket then findEnclosingBrackets; only a touched bracket shows in the overview ruler.
  • Languages fall back to firstLine patterns (checked on the first 1000 characters, FIRST_LINE_DETECTION_LENGTH_LIMIT) when no filename or extension association matches.
  • ref-screenshot starts the reference with --force-color-profile=srgb. Without it Chromium converts to the main display's color profile, and with a screen sharing display attached to the Studio every non-gray pixel shifts (#0F4A85 read back as #224981); the port renders sRGB.
  • The window origin is rounded to whole points: on a display with an odd pixel height the centered origin falls on a half point and the drawable grows to 1538 device pixels.
  • shortcut: no semanticTokenColors; they color semantic tokens, which come with the language features milestone.
  • shortcut: no tree-sitter; upstream uses it for TypeScript only behind editor.experimental.preferTreeSitter.typescript, off by default.
  • Token store (syntax.rs TokenStore, syntax/invalid_lines.rs; textModelTokens.ts TrackingTokenizationStateStore, RangePriorityQueueImpl, DefaultBackgroundTokenizer): each line keeps its tokens and end state; an edit marks its lines untrusted and keeps the old end state of its last line, and tokenizing stops where a new end state equals the old one (StateStack::equals, vscode-textmate StateStackImpl.equals). A drawn line is tokenized on demand from the first untrusted line; the rest runs in 1 ms chunks after the frame (workbench/editor_view.rs schedule_background_tokenization), and the bracket pairs are paired again when it is done. Bracket pairing reads the tokens as they are, a line not tokenized yet holds no brackets, as bracketPairsTree.ts does while the background tokenizer runs; it first tokenizes up to 20 untrusted lines so the edited line counts.
  • Each line keeps its brackets (brackets.rs line_brackets) until its text or tokens change, under the drawing theme and under the empty theme pairs reads; the theme changing drops them.
  • Bracket tree (brackets/: length.rs, ids.rs, edits.rs, tree.rs; bracketPairsTree/ ast.ts, concat23Trees.ts, nodeReader.ts, tokenizer.ts, parser.ts, beforeEditPositionMapper.ts, combineTextEditInfos.ts, smallImmutableSet.ts): BracketCache keeps the tree and queues each edit as a line-granular TextEditInfo; a line whose tokens changed is a same-length edit (handleDidChangeTokens), and the next read parses again reusing the unchanged nodes. The tokenizer reads each line's cached brackets, not the text, so its text tokens end at a bracket, after about 30 lines or 1500 bytes. hasUnmatchedClosingBracketAfter walks the unexpected closing brackets after the position for auto-closing on type. Not ported: nestingLevelOfEqualBracketType (independentColorPoolPerBracketType unsupported), getFirstBracketBefore (no consumer). Typing on the 52k-line TS file: 1.40, 1.73, 2.29 ms median per edit, was 9.3, 9.9, 10.3 ms.
  • shortcut: tokenColors given as a path to a .tmTheme file is not read; no built-in theme uses one.
  • shortcut: the theme type reaches the extension host after the eager extensions activate; upstream sends it before $startExtensionHost.
  • shortcut: no Go to Bracket, Select to Bracket or Force Retokenize commands until keybindings and the command palette land.

Milestone 10: settings, storage, secrets

Scope shipped: settings.json (user, workspace, language overrides) feeding the workbench and vscode.workspace.getConfiguration, global and workspace state in state.vscdb, extension secrets in the macOS Keychain, the real environment in init data. Not shipped: profiles (see the last items).

Done when: api-tests configuration.test and state.test pass as in the reference (5/5); a setting changed in settings.json reaches an extension's onDidChangeConfiguration (port/tools/settings-check configuration, step "external edit"); storage survives a restart (port/tools/settings-check state).

  • native/crates/config ports the JSONC scanner and parser (json.ts, byte offsets), jsonEdit.ts (writes keep comments and layout), ConfigurationModel and Configuration with language overrides, the configuration registry with scopes and [lang] defaults, and the write path of configurationEditing.ts with its error messages. Core settings come from core-settings.json, dumped once from the reference's registry by port/tools/dump-settings (1506 settings, 1.7 MB embedded); extension settings come from each contributes.configuration. [plaintext], [go], [makefile], [shellscript] and [yaml] defaults are added by hand from modesRegistry.ts.
  • MainThreadConfiguration (exthost/src/main_thread_configuration.rs) serves updates and removals and sends $acceptConfigurationChanged before the reply, as upstream's change event fires before the update resolves. settings.json files are polled every 100 ms by mtime and size (upstream batches watcher events by 100 ms) instead of an FSEvents watcher, which comes with milestone 12. The poll runs in the workbench (workbench/configuration.rs), so one change reaches the extension host ($acceptConfigurationChanged), the color theme and the indentation of open models, in that order.
  • The workbench reads workbench.colorTheme and the editor indentation (editor.tabSize, editor.insertSpaces, editor.detectIndentation, per language) from the same model. The default theme is now the reference's default, Dark 2026; pixel-check passes --theme, so its windows are unchanged.
  • Policies (config/src/policy.rs, app/src/policy.rs): the policy layer is built from the registered settings with a policy (and registry.excluded ones) as PolicyConfiguration does; it overrides every other layer, reaches the host in init data and blocks writes with upstream's "Unable to write ... system policy" error. Values come from CFPreferences of com.rokartur.vsrustium on macOS (defaults write com.rokartur.vsrustium UpdateMode -string none, or a configuration profile) as upstream's main.ts picks NativePolicyService there; policy::read_policy_file ports FilePolicyService for Linux's /etc/vscode/policy.json, read and watched (files watcher on /etc/vscode) by the Linux build. Live updates follow @vscode/policy-watcher's macOS side: an FSEvents stream on /Library/Managed Preferences/ (1 second latency, on its own dispatch queue, watching the folder even before it exists) reads every policy again, and the workbench applies a changed policy layer as a configuration change (policy::watch_policy_changes, workbench/configuration.rs watch_policies). As upstream, a plain defaults write reaches a running window only with the next managed preferences change or a restart.
  • Variables (config/src/variables.rs, workbench/configuration_resolver.rs): ${workspaceFolder}, ${file}, ${env:}, ${config:} and the rest of variableResolver.ts, used by findInFiles and the search editor commands. The interactive part of baseConfigurationResolverService.ts (resolveWithInteraction, showUserInput) is workbench/configuration_resolver.rs: ${command:} runs its command (through a debugger's variables) with the configuration resolved so far, ${input:} asks with a promptString input box, a pickString pick (default first with "(Default)", label: value items) or a command input, keeps the last values in configResolveInputLru (workspace storage, 5 entries) and a cancel stops the whole flow. Tasks (task_service.rs start_task, terminalTaskSystem.ts _acquireInput: the command line, or a custom execution's definition, with the inputs of the folder's tasks.json) and launch configurations (debug_service.rs, launch inputs) both use it.
  • No remote or in-memory configuration layers: init data sends them empty, in upstream's shape.
  • native/crates/storage ports SQLiteStorageDatabase on rusqlite with upstream's ItemTable, the integrity check, the .backup file and recovery from it, and the in-memory cache that rebuilds a database corrupted at runtime. Writes are synchronous instead of flushed every 100 ms. Extension tests run on in-memory storage, as storageMainService.ts does for them.
  • Workspace storage is User/workspaceStorage/<id> with upstream's macOS id (MD5 of the path and the folder's birth time). workspace.json is not written; the port has no stale workspace storage cleanup.
  • Telemetry ids: machineId and devDeviceId are kept in User/globalStorage/storage.json as upstream's app.ts does, through storage::state::FileStorage (port of platform/state/node/stateService.ts, saved at once instead of batched); firstSessionDate is kept in profile storage and sessionId is new per run. machineId is a uuid, upstream's fallback when it cannot hash a MAC address. No telemetry is sent, so env.isTelemetryEnabled is false.
  • MainThreadSecretState keeps each secret as a generic password item (service Code - OSS Secret Storage, account the upstream {"extensionId","key"} key). Upstream encrypts with Electron safeStorage, whose key sits in the Keychain, and stores the result in application storage; letting the Keychain encrypt the item gives the same protection without a key of our own. Extension tests keep secrets in memory.
  • auth.ts's remembered proxy credentials (proxy-credentials://<hash>, safeStorage-encrypted in application storage upstream) are generic password items too, service Code - OSS Proxy Credentials, account the auth info key (workbench/proxy_auth.rs), for the same reason. Unit tests keep them in memory.
  • --extensionDevelopmentPath and --extensionTestsPath are made absolute without resolving symlinks, so context.extensionPath matches the reference.
  • port/tools/settings-check runs four check extensions against the port and the reference and diffs their output. Known differences: the reference fires two empty change events before editor.wordWrap; env.appName is "Code - OSS Dev" in the reference's dev run; machineId format; isTelemetryEnabled.
  • Upstream tests ported: json.test.ts, jsonEdit.test.ts, configurationModels.test.ts, configurationRegistry.test.ts, the write cases of configurationEditing.test.ts, storage.integrationTest.ts. configurationVariables.test.ts and configurationResolverService.test.ts (config/src/variables.rs), policyConfiguration.test.ts (config/src/policy.rs). Not ported: jsonFormatter, jsonParse, configurations, configurationService and the storage service tests (their service shapes differ from the port's).
  • chat.* and sign-in settings stay in the registry as data only; no AI or sign-in features by decision.
  • Preferences commands (workbench/preferences.rs, from preferencesService.ts and preferences.contribution.ts): Open User, Application, Workspace and Folder Settings (JSON) create a missing file as {\n} (createSettingsIfNotExists) and reveal revealSetting or an @id: query, adding a missing value with its default as getPositionToReveal does (lineBreakInsert is ported for it). Open Default Settings (JSON) and Open Default Keyboard Shortcuts (JSON) open the read-only vscode://defaultsettings/defaultSettings.jsonc and .../keybindings.json models (default_settings.rs ports DefaultSettings and DefaultRawSettingsEditorModel); the host can open them too. workbench.settings.useSplitJSON and openDefaultSettings open the plain JSON editor until editor groups exist (milestone 11); the suggest widget after an added value is milestone 13.
  • Settings editor (settings_editor.rs for the model, workbench/settings_editor_view.rs for the view): workbench.action.openSettings (cmd+,), openSettings2, openGlobalSettings, openWorkspaceSettings and openAccessibilitySettings open it in the modal editor part shared with the Keyboard Shortcuts editor (modal_editor_part). The model ports settingsLayout.ts (tocData, Commonly Used, the extensions group), settingKeyToDisplayFormat, parseQuery, LocalSearchProvider with its match types and ordering, the SettingsTreeFilter/SearchResultModel filters (@modified, @tag:, @ext:, @feature:, @id:, @lang:, @stable, @hasPolicy, scope) and inspectSetting. The view draws the search box with its count, Clear and Filter Settings menu (settingsSearchMenu.ts), the User, Workspace and Folder tabs, the TOC with counts in search mode, and the tree with modified indicators, preview, experimental and advanced badges, scope notes, markdown descriptions with #setting# links, the gear and context menu (Reset Setting, Copy Setting ID, as JSON, as URL), and boolean, enum, string and number controls; a write follows updateChangedSetting (the default value in the User tab removes the key). Array, object and include/exclude settings get settingsWidgets.ts's editable lists (settings_editor/lists.rs for the values, settings_editor_view/list_widget.rs for the rows, the edit row with OK and Cancel, selects and boolean checkboxes); complex settings show Edit in settings.json. A policy value (hasPolicyValue) disables the control as settingsTree.ts does: the select dims to Chromium's select:disabled 0.7 opacity and opens neither by click nor by key, the input box keeps its look without the text cursor and takes no focus, the checkbox dims to 0.4 and ignores keys, the array and include/exclude lists are read-only (no Add button, row actions or double-click edit; objects stay editable, as upstream passes isReadOnly only to those two). The policy indicator sits in the parenthesized group and its pointer hover below has the status bar action View policy settings, which puts @hasPolicy before the query (applyFilter). preferencesValidation.ts is settings_editor/validation.rs: a text, number or list edit is validated against the schema before it is written, and the message shows under the control (an invalid array write keeps its strings, as renderArrayValidations does). The search box keeps its history in profile storage (settingsEditor2.searchHistory, up and down) and opens the suggest widget after @ and : (settings_editor_view/search_suggest.rs, ranked by fuzzyScore). The TOC and the tree sit in a split view whose sash width persists in settingsEditor2.splitViewWidth; a double click resets it to 200px. Keyboard: the settings.action.* focus commands and list.* on the tree and the TOC.
  • Not drawn: the Apply to all profiles action (profiles are item 3) and the Sync ignore actions (no sync by decision).
  • UnsupportedSettingsRenderer (workbench/preferences/unsupported_settings.rs): every open user, workspace, workspace-file or folder settings file gets hint markers 200 ms after a change, through the marker service: Unknown Configuration Setting, a non-overridable setting in a [language] block, application and machine scopes outside user settings, window scope in a folder, preview and experimental, and the system policy hint (handlePolicyConfiguration), and in an untrusted workspace a warning on restricted workspace settings with a Manage Workspace Trust quick fix. No remote settings markers: remote windows are removed (Artur's decision above).
  • Settings schemas: config::json_schema::settings_schemas builds the vscode://schemas/settings/* schemas of registerConfigurationSchemas (configurationService.ts) from the registry, compressed with getCompressedContent; the extension host serves them and vscode://schemas-associations/schemas-associations.json through a read-only vscode file system (exthost/src/settings_file_system.rs, as settingsFilesystemProvider.ts), which json-language-features reads. Each registered language gets its [lang] property (registerOverrideIdentifiers). port/tools/settings-check preferences diffs the default settings and keybindings documents and the schema keys against the reference; its header lists the known differences. The schemas those $ref (workbench-colors, token-styling, textmate-colors, size-customizations, launch) are dumped from the reference by port/tools/dump-settings into native/crates/config/schemas (shortcut: an installed extension's colors and debuggers are missing until those registries are ported).
  • Port decision (not upstream behavior): a workspace folder's configuration lives in both .vscode/ and .vsrustium/. config::service reads settings.json, tasks.json, launch.json and mcp.json from both and .vsrustium/ wins per key (FOLDER_CONFIG_DIRS); both are watched. Writes (workspace and folder settings, Open Workspace Settings (JSON), language overrides, tasks and launch edits) go to .vsrustium/ when that folder exists, else .vscode/ (folder_config_dir). configuration-editing's jsonValidation maps /.vsrustium/{settings,launch,tasks,mcp,extensions}.json to the same schemas, and both folders are always UTF-8. The user data dir move to ~/.vsrustium/ is done on integrate.
  • Profiles model (storage/src/profiles.rs, port of userDataProfile.ts UserDataProfilesService): profiles under userDataProfiles and associations under profileAssociations in User/globalStorage/storage.json, in upstream's shape, so a VS Code user data folder's profiles load as they are; transient profiles, useDefaultFlags, workspace and empty window associations, cleanUp (cargo test -p storage profiles). The Agents window profile is left out (no AI by decision).
  • User data files (settings, keybindings, tasks, extensions json of the user home) are written atomically as FileUserDataProvider asks (config::service::write_user_data_file).
  • Profiles at startup (app/src/user_data_profile.rs, windowsMainService.ts resolveProfileForBrowserWindow): --profile <name> (created when missing), --profile-temp (main.rs CliProfile, forceProfile/forceTempProfile: only the window a command line opens, the first start's or a second instance's; without paths that start opens just its new empty window, as app.ts and launchMainService.ts; windows from the menu take the workspace's profile), else the workspace's association, else window.newWindowProfile, else the default; the choice is associated with the workspace unless the window develops an extension. The profile gives the settings, tasks and mcp files (config::service::UserFiles), the keybindings file, state.vscdb of its global storage and its extensions.json (UserExtensions::extensions_file; an uninstalled folder stays while another profile's extensions.json lists it). A profile with its own settings reads the default profile's application settings and workbench.settings.applyToAllProfiles as the application layer, its own file with PROFILE_SCOPES (cargo test -p config profile_tests). The user snippets folder is not read by the port yet (no user snippets loader); the profile's snippets folder is used by export, import and settings import.
  • Switching profiles (workbench/user_data_profile.rs change_current_profile): the settings layers, keybindings, profile storage and user extensions move to the new profile's files, then workbench/extension_host_restart.rs restarts the host, since the port has no window reload: the session thread sends Terminate, the workbench drops what the host registered (commands, language features, SCM, webview views, URI handlers and openers, the host's markers), and a new session starts with the current extensions, settings and storage. workbench.action.restartExtensionHost uses the same path. StorageScope.APPLICATION keys stay in the default profile's state.vscdb across switches (application_storage, the same storage as profile_storage in the default profile). The extension under development runs again without its tests.
  • Profiles editor (workbench/profiles_editor_view.rs): the modal part with the sidebar and the contents view, rename, Use for Current/New Windows, Contents, Folders & Workspaces, the new profile form (Copy from a profile or an imported template, the Copy, Default or None source of each resource) and Export/Import of .code-profile files from a file or a URL (app/src/profile_template.rs). A non-default profile's Source radio writes its useDefaultFlags; for the current profile the window switches to the updated profile. The Icon row opens the icon picker (workbench/icon_select_box.rs, iconSelectBox.ts with the iconSelectBox.* commands): Search icons over the 83 ICONS in 36px cells, 12 a row, in a sticky hover under the icon. The activity bar's Manage item shows the current profile's icon, or the two-letter profile badge when it has none (globalCompositeBar.ts). The new profile form is named Untitled N, keeps Cancel, Preview and Create (Replace when a copy takes an existing name) under its scrolling body and validates as NewProfileElement.validate; its sidebar row has the dirty dot, Cancel and, while copying a profile, Export.... shortcut: Preview stores its profile instead of a transient one (each window is its own process, a transient profile would not reach the preview window); Cancel removes it. port/results/profiles.md.
  • Settings import (app/src/settings_import.rs, workbench/settings_import.rs; Artur, no upstream counterpart): Preferences: Import from VS Code, Cursor or VSCodium..., and an offer on the first start with the default user data (no --user-data-dir) and no settings.json yet, shown once (settingsImport.offered in application storage). Keybindings already present are not duplicated; existing snippet files are kept; extensions are installed from Open VSX, and one Open VSX does not have or cannot install (not found, offline, an incompatible version) is copied from the source's extensions folder instead (UserExtensions::install_folder, without that editor's __metadata); a publisher the user did not trust is not copied either. The first import installed one extension at a time, each with its own publisher trust dialog queued behind the others, and dropped their results; it now runs like a profile import (one query, one trust dialog, progress, the failures listed), disables what VS Code has disabled, keeps keybindings.json comments when the profile has no keybindings yet, and the theme settings apply when their extension arrives. Settings the port removed (chat., github.copilot., the AI search toggle) stay left out by design. Fixtures in port/fixtures/settings-import.
  • Settings import, UI state (decision under the rule "only what a VS Code profile export or Settings Sync carries"): the layout lives in the source's User/globalStorage/state.vscdb, not in its settings. The import takes what globalStateResource.ts getGlobalState exports, the keys __$__targetStorageMarker marks StorageTarget.USER (0): views.customizations (a view or container moved, such as Source Control to the secondary side bar), workbench.activity.pinnedViewlets2, workbench.auxiliarybar.pinnedPanels, workbench.panel.pinnedPanels, the *.state.hidden views, workbench.panel.alignment, workbench.statusbar.hidden, written as GlobalStateResource applies them (profile_template::store_user_state), as a "UI State" part of the pick. Only these layout keys: the export's other USER keys include extensions.trustedPublishers and a sign-in's account access (github-<account>), which would skip the publisher trust dialog and the sign-in this import leaves to the user, besides survey, MRU and removed features' state. The part sizes (workbench.sideBar.size, workbench.auxiliaryBar.size, workbench.panel.size) and a workspace's part visibility are StorageTarget.MACHINE or workspace storage (layout.ts LayoutStateKeys) and neither export nor sync carries them, so they stay the port's. The activity bar at the top, the layout controls and workbench.secondarySideBar.defaultVisibility are settings and came with the settings part already.
  • configuration-editing's own tests run with port/tools/extension-tests configuration-editing (a built-in extension's out/test from the reference checkout, against vsrustium): 18 passing. They needed _executeCompletionItemProvider and _executeLinkProvider to send cancellation tokens (host.call_cancellable, as rpcProtocol.ts does for a method whose last parameter is a token), $acceptLanguageIds at host start and restart (vscode.languages.getLanguages), getContextKeyInfo (the reference's RawContextKey.all(), dumped by port/tools/ref-commands into contextkey/reference-context-keys.json; rerun it when the reference moves) and the development copy of a built-in keeping isBuiltin (scanExtensionsUnderDevelopment), which @vscode/internal-github's allowlist checks. The extensions.json cases expect ms-vscode.js-debug: the Studio mirror needs port/tools/fetch-builtin-extensions once.

Milestone 9: commands, keybindings, quick input

Scope as in its Work row of port/ledger.md. Done in this milestone: the command registry, context keys and when clauses, keybinding resolution, the quick input widget and MainThreadQuickOpen, the Command Palette, and Quick Open's file picks. Not done: Quick Open symbols (@, #): their pickers wait for the milestone 13 symbol providers and are not stubbed.

  • contextkey.rs ports the scanner, parser, evaluation and the And/Or normal forms of contextkey.ts; contextkey/tests.rs holds the scanner and parser cases of contextkey.test.ts and scanner.test.ts.

  • commands.rs is the one registry of the workbench and vscode.commands: workbench handlers, extension commands registered through MainThreadCommands (main_thread_commands.rs), onCommand: activation before a run. Commands::register_all takes a whole table in one call for milestone 8's editor/commands.rs. register returns a Registration that dispose removes wherever it sits in the id's stack; MainThreadCommands keeps the host's registration per id (_commandRegistrations).

  • execute_command is CommandService.executeCommand: a command runs at once when its onCommand:<id> activation is done (HostSync::activate_by_event shares one $activateByEvent per event, so a repeat call waits on the same answer) or before the host's handshake (installed_extensions_registered, upstream's whenInstalledExtensionsRegistered); otherwise it waits for the activation, registered or not (issue #71471). Enter in the editor calls the type handler directly, as codeEditorWidget.ts trigger runs Handler.Type without the command service, so typing never waits.

  • The extension host forwards requests of chosen proxies to the app (Session::forward); replies are read inside Session::pump, because an extension whose activate awaits a forwarded request deadlocked session.start when main.rs read them.

  • keybindings.rs ports KeybindingResolver (chords, removals with -command, when on removal) with the cases of keybindingResolver.test.ts. The macOS defaults (keybindings/default-macos.json, 1220 rows) are the reference's own export (Developer: Keyboard Shortcuts Export without extension rows); extension rows come from contributes.keybindings; keybindings.json overrides both. Keys resolve in cx.intercept_keystrokes, before the focused element, as upstream's window-level listener does. The milestone 5 editor keys run through the registry under upstream ids (workbench/editor_commands.rs).

  • Keybinding aliases (keybindings.json args of the AI sessions window) are not read: no AI by decision.

  • quick_input.rs is the quick pick and input box model (filtering with filters.rs, a port of filters.ts with korean.ts; selection, buttons, validation with its 100 ms debounce); quick_input_view.rs draws it with the Modern UI frosted glass. Extension pickers and input boxes run through main_thread_quick_open.rs.

  • The Command Palette follows commandsQuickAccess.ts: TF-IDF similar commands (tf_idf.rs, threshold 0.5, at most 5), "recently used" with a 50-entry LRU, Developer category last, duplicate labels with their id, extension commands from contributes.commands with enablement as precondition and menus.commandPalette when.

  • The header drag follows QuickInputDragAndDropController: grab cursor on the title and the header padding, snap to the top line, the 25% line and the center within 20px, clear of the traffic lights, double click resets.

  • Mouse cursors follow the reference CSS: pointer on activity bar items, title bar actions, status bar items with a command, quick input rows, buttons and checkboxes; text on the quick input box; grab on the quick input header.

  • Disabled quick input arrows keep the default cursor; sashes (milestone 11), the Explorer (milestone 12) and editor status items (milestone 8) get theirs with those milestones.

  • compare_file_names sorts by code point where upstream uses Intl.Collator with numeric order; locale_compare mimics a few ICU root rules for English labels.

  • api-tests api-command: vscode.open, vscode.open with untitled supports associated resource, api-command: vscode.diff and editorCommand with extra args fail: they need milestone 8 editor groups, tab groups and text editor arguments, and a diff editor (milestone 14).

  • The palette history (commandPalette.mru.cache and .counter, limited by workbench.commandPalette.history) and the quick input position (workbench.quickInput.viewState) live in the global state.vscdb, the same Storage the extension host's MainThreadStorage serves (restore_profile_state). Upstream writes the history on shutdown only; the port writes it on each change, since its storage is synchronous and the app has no shutdown phase.

  • The Color Theme picker (workbench/themes.rs) follows InstalledThemesPicker: light, dark and high contrast groups with the default theme pinned, a preview 200ms after the focus rests, Escape or any hide without accept restores the theme it opened with. Accepting writes workbench.colorTheme through Settings::update_value_derived (updateValue without a target: the layer that already sets the key, else user settings, where the default value removes the key) and sends $acceptConfigurationChanged and $onColorThemeChange to the extension host. The Manage Extension and color mode buttons run workbench.extensions.search and workbench.action.openSettings, the first of which fails with an error dialog until the Extensions view is ported. Without a Marketplace (product.json has no gallery) upstream shows no install entry either.

  • Quick input separators use descriptionForeground, not pickerGroup.foreground: the CSS rule of quickInput.css outranks the controller's style rule (measured on 1.147).

  • shortcut: keybindings.json is polled once a second; the port has no file watcher.

  • Quick Open (Cmd+P) ports the file picks of anythingQuickAccess.ts (anything_quick_access.rs, workbench/quick_open.rs) over the fuzzy scorer (fuzzy_scorer.rs, fuzzyScorer.ts): editor history first ("recently opened"), file results from one search crate file walk per picker, :line:column ranges, ~ and absolute paths, No matching results; picks sort and highlight like the reference for 21 queries over port/fixtures/workspace (quick_open/tests.rs, read from 1.147.0 through CDP).

  • The editor history (editor_history.rs, historyService.ts's history.entries, 200 entries, files.exclude and search.exclude filtered) lives in the folder's workspace storage, shared with the extension host's MainThreadStorage; the port saves it on each change, as for the palette history.

  • The "Open to the Side" button and Alt+Enter to the side are absent: upstream shows them only when supportsSplitting, and the port has one editor group until milestone 11.

  • shortcut: Revert File is a whole-text edit plus a save until milestone 8 has a model revert.

  • fuzzy_scorer.rs ports fuzzyScorer.ts (scoreFuzzy, scoreFuzzy2, scoreItemFuzzy with its cache, compareItemsByFuzzyScore, prepareQuery) on top of filters::fuzzy_score, the fuzzyScore DP of filters.ts. Tests: fuzzy_scorer/tests.rs (68 cases of fuzzyScorer.test.ts) and filters/fuzzy_score_tests.rs (28 fuzzyScore cases of filters.test.ts). Left out: the Windows path branches (macOS only), lone UTF-16 surrogates (not representable in a Rust str), and the fuzzyScoreGraceful and anyScore assertions, which have no caller in the port yet. Match offsets count chars where upstream counts UTF-16 units; the same for every text outside the BMP the port draws.

  • pixel-check has no quick input window; the palette was compared by an ad-hoc capture (port/results/pixels.md).

  • menus.rs is the MenuRegistry: rows of upstream's MenuRegistry.appendMenuItem calls (menu, group, order, when, precondition, toggled, submenu) for the commands the port has; items for missing features are left out, not shown disabled. menu_actions sorts and separates as menuService.ts and getFlatContextMenuActions do, with the menuService.test.ts sorting cases. A toggled item takes its toggled title while checked, a submenu its own toggled state, and an alt command is offered only while its precondition (the alt command's enablement) holds, as getActionForAltMode; Alt+Enter and Alt+Space run it from the keyboard (isTriggerKeyEvent). The observer cases of menuService.test.ts have no counterpart (menus are computed when shown); group titles (appendMenuGroup) serve canvases only.

  • The native menu bar (workbench/menubar.rs) is MenuId.MenubarMainMenu as menubarControl.ts sends it, built into AppKit menus as menubar.ts does: the app menu with Preferences, Services, Hide, Quit; the Window menu before Help. It is rebuilt when an item's when, enablement, check or keybinding changes. A one-chord keybinding is the item's key equivalent; a chord sequence goes into the label (Color Theme [⌘K ⌘T]), as getMenubarKeybinding's isNative: false. Keys still resolve in the workbench first: the key equivalents are bound in a key context no element sets. A click runs the command with { from: 'menu' } as vscode:runAction does.

  • fix_up_app_kit_menus sets on the AppKit menus what GPUI cannot: the Window menu's performMiniaturize:, performZoom: and arrangeInFront: items (AppKit adds Move & Resize after them), and the Preferences title, which AppKit retitles to "Settings…" a run-loop turn after setMainMenu unless set again.

  • Labels draw "..." as "…" as Electron's Cocoa menus do. The bold app menu title is the process name (code-gpui) until the port is bundled as an app.

  • shortcut: no About, Always on Top or Switch Window… in the menu bar; the port has no about dialog, always-on-top windows or window switching.

  • shortcut: Quit closes the editors (asking for dirty ones) and quits; the port has no hot exit backups.

  • Context menus (workbench/context_menu.rs) are the custom menu of contextMenuHandler.ts and menu.ts: the reference draws it too, since the port's custom title bar makes window.menuStyle: inherit custom. The context view's anchor and layout2d come from contextview.ts and layout.ts. Keys reach the menu in dispatch_key before keybindings resolve, as the menu's DOM listeners run before the window's. Compared with 1.147.0 by port/tools/ref-contextmenu and code-gpui --screenshot-input (port/results/contextmenu.md).

  • The pointer leaving the menu is a mouse move on the click-blocking layer: GPUI's on_hover also reports "left" on every key press (last_input_was_keyboard), which unfocused the item ArrowDown had moved to.

  • The Explorer context menu (MenuId.ExplorerContext) has the rows of fileActions.contribution.ts whose commands the port has. Right click selects the row unless it is selected, as explorerView.ts onContextMenu; the list keeps its focus outline while the menu is open.

  • Submenus are not drawn yet: no menu the port shows as a context menu has one. They come with the first menu that does.

  • The editor context menu (MenuId.EditorContext, workbench/editor_menus.rs) follows contextmenu.ts _onContextMenu: a right click on text or below the last line focuses the editor and moves the cursor unless a selection holds the position. The hook in editor_view.rs is two on_mouse_down(MouseButton::Right) handlers (line content, empty content area) and one on the tab; reconcile with milestone 8 at merge, which owns that file. It shows Cut, Copy, Paste and Command Palette...: Change All Occurrences and Refactor... wait for their commands. No scrollbar menu, no Shift+F10.

  • The tab context menu (MenuId.EditorTitleContext) has Close, Close Others, Close to the Right, Close Saved, Close All and Keep Open, with the editor-scoped context keys (activeEditorIsPinned, activeEditorIsLastInGroup, groupEditorsCount) of the right-clicked tab. The close commands take [uri, { groupId, editorIndex }] as editorCommands.ts resolveCommandsContext, else the active editor; dirty editors among the ones closed ask to save first. Left out: Copy Path, Copy Relative Path, Reopen Editor With..., Reveal in Finder, Reveal in Explorer View, Pin, Split Right, Split & Move, Move and Copy into New Window (no such commands yet).

  • The title bar context menus (workbench/title_bar_actions.rs) follow titlebarPart.ts: a right click on the bar shows MenuId.TitleBarContext, one on the title (or a Cmd+click) MenuId.TitleBarTitleContext, which leads with window.ts provideCustomTitleContextMenu's path items (the active file up to /, each revealing its path in Finder through GPUI reveal_path, as showItemInFolder). The toggles (toggle.<setting>, updateValue(section, !value)) are Command Center, Navigation Controls and Layout Controls; the title bar reads the three settings on each render: without the command center it is NativeTitlebarPart.macTitlebarSize high (32px on macOS 26, else 28px) and shows the window title (window.title's macOS default). A right click on the command center or its navigation arrows shows the toolbar's own menu (toolbar.ts): Configure Keybinding, then the TitleBarContext toggles. Checked items draw the menu-selection check in the label's left padding. Left out: Menu Bar (hidden on macOS), Notifications (needs workbench.notifications.position top right, no notification center) and Integrated Browser (no browser view).

  • The path items are rebuilt when a title bar menu shows; upstream rebuilds them on each active editor change, and the menu is their only reader. The reference dump (ref-contextmenu title with window.commandCenter off) shows none for the file opened at startup, likely because onDidActiveEditorChange fires before NativeWindow subscribes; the port shows them for it.

  • settings.json edited by hand reaches the title bar through the workbench's settings poll (milestone 10, workbench/configuration.rs).

  • A click on the command center runs workbench.action.quickOpenWithModes (commandCenterControl.ts with AI features off): Quick Open with anythingQuickAccess.ts getHelpPicks while the input is empty. Only Go to File and Show and Run Commands are listed; Search for Text, Go to Symbol in Editor, Start Debugging, Run Task and More come with their providers. A Cmd+click shows the title's menu instead, as upstream takes it in the capture phase.

  • The app owns the title bar drag (app_owns_titlebar_drag), as Electron's -webkit-app-region: a press on the bar runs AppKit's own window drag (start_window_move, performWindowDragWithEvent:), a double click the system's title bar action (titlebar_double_click, AppleActionOnDoubleClick); the no-drag parts of titlebarpart.css (the command center with its navigation arrows, the layout controls) and the quick input over the bar (quickInput.css) stop the press first. Before, AppKit dragged the window from the whole bar, command center included. Measured in port/results/command-center.md.

  • Chords: default-macos.json loads whole, so every chord whose command the port registers works: Cmd+K Cmd+W, Cmd+K W, Cmd+K U, Cmd+K Cmd+T and the 20 folding chords (cargo test -p app user_keybindings folding_and_cursor_keys). The other 97 default chords wait for their commands. The status bar shows the chord message of _expectAnotherChord; the palette and menus label chords as ⌘K ⌘T.

  • filters::fuzzy_score and fuzzy_scorer::score_fuzzy2 run only in their upstream tests until Quick Open symbols (@, #) and milestone 13 completion call them; expect(dead_code) outside tests keeps the build warning-free and fails once a caller exists.

  • Hovers (workbench/hover.rs) are one widget for every workbench hover and, in milestone 13, the editor hover: setupManagedHover targets (an overlay canvas child of the target, listening in the capture phase so a target's own handlers cannot hide the pointer from it) and the hoverWidget.ts layout over the context view's layout2d, which gained the anchor position argument for hovers above their target. Delegates: mouse (tabs, Explorer rows), instant (title bar, status bar), composite bar (activity bar group). Results in port/results/hover.md.

  • Hover timing runs on the GPUI executor clock, so tests advance it; the hide after the pointer leaves is the 200ms of CompositeMouseTracker, which also makes the 200ms instant window of WorkbenchHoverDelegate.

  • Plain text, the preview tab's title (text, italic "preview", gear link) and markdown through workbench/markdown_view.rs markdown_blocks are drawn.

  • Holding Alt locks the shown hover (hoverService.ts _keyDown): it stays when the pointer leaves its target, and releasing Alt hides it unless the pointer is on the hover (_keyUp, isMouseIn). Empty content shows no hover. The workbench root listens to modifier changes, which GPUI sends along the focused element's path.

  • Not ported from hoverService.test.ts, for want of a caller in the port: nested hover chains (no port hover holds a hover target), onDidShow callbacks (chat), anchorAlignment: RIGHT, CSS zoom and scrollable content. Their callers bring them. Sticky, showAndFocusLastHover and HTML content are ported (platform/hover ledger row).

  • Keyboard Shortcuts editor: the model (keybindings_editor.rs, keybindingsEditorModel.ts: rows, unbound commands, sort, @command:, +when:, @source:, @ext:, @keybinding:, word, when and keybinding matching) and the edits of keybindingEditing.ts on the text of keybindings.json (keybinding_editing.rs: add, edit, remove, reset, comments kept) are ported with their upstream tests (cargo test -p app keybinding). The view (workbench/keybindings_editor_view.rs, keybindingsEditor.ts and keybindingWidgets.ts) is the modal editor part of modalEditorPart.ts (workbench.editor.useModal default some: 80% of the window up to 1400x900, maximize toggle, Escape and the close button close it, an editor opened pinned closes it), with the search and its Record Keys, Sort by Precedence and Clear actions, the table with key caps and highlights, the define keybinding widget with its "existing keybindings" link, the When column input and the row context menu. Cmd+K Cmd+S, Preferences > Keyboard Shortcuts, the palette's gear and the command center's Configure Keybinding open it at @command:<id> (createKeybindingCommandQuery). Writes refuse with keybindingEditing.ts's message while an open keybindings.json editor has unsaved changes. Results in port/results/keybindings-editor.md.

  • The keybindings table answers list.select, list.focusDown, list.focusUp, list.focusPageDown, list.focusPageUp, list.focusFirst and list.focusLast (listCommands.ts): its listFocus makes them resolve before the element sees the key. Other lists get them with the platform/list row.

  • The modal header's Open Modal Editor in Main Window and New Window are left out (the editor area hosts only text editors, no auxiliary windows); the open-in-product icon is drawn disabled. The extension name in the Source column does not open the extension: no Extensions view.

  • Record Keys and the define widget record on key down; GPUI sends a lone modifier as a modifiers change, not a key down, so the bare ⌘ upstream shows while only a modifier is held does not appear.

  • The Command Palette and the modal: modalEditorPart.ts stops every key bound to a workbench.* command outside defaultModalEditorAllowableCommands while focus is in the modal (unless workbench.editor.useModal is all, or off, where no modal part exists), so Cmd+Shift+P and F1 do nothing there, as in 1.147.0; the palette run from the menu bar opens above the modal (quick input z-index 2550 over the modal's 2540). cargo test -p app the_modal_blocks_the_command_palette_key_but_not_the_command with_use_modal_off_the_command_palette_key_runs.

  • shortcut: unbound commands with args metadata are listed; the port's command registry has no metadata.

  • Command titles come from the reference: port/tools/ref-commands dumps 1.147.0's MenuRegistry commands, editor action labels and MenuId.CommandPalette items into command_palette/reference-commands.json. The Keyboard Shortcuts editor labels a command as getActionsLabels does (an extension's MenuRegistry title, else the reference label), so copyFilePath reads "File: Copy Path of Active File". The palette lists a workbench item only when the port registers its command; extension items always, as they register on activation. viewContainer.<id>.enabled, <view>.active, activeEditorIsLastInGroup and viewHasSomeCollapsibleResult are set so the items' when clauses hold as in the reference. Rerun the tool when the reference moves.

  • keyboard_layout.rs reads the layout as native-keymap's keyboard_mac.mm does (TIS input source, UCKeyTranslate per DOM code with the dead-key double press and the iscntrl filter); its Developer: Inspect Key Mappings (JSON) is byte-identical to native-keymap's getCurrentKeyboardLayout and getKeyMap on the Studio's Polish Pro layout. The keyboard layout picker is web-only (workbench.web.main.ts), so desktop has none.

  • Trap: the first TIS calls of a process, made on two threads at once, abort it with SIGABRT and no message (macOS 26 and 27: 2 threads abort about 1 run in 5, 8 threads every run). The two keyboard_layout tests meeting on libtest's threads aborted the app test binary in CI at about test 1240; keyboard_layout::macos holds one lock over each TIS read, and layout_reads_from_many_threads_at_once_do_not_abort aborts without it.

  • keyboard_mapper.rs ports MacLinuxKeyboardMapper (the macOS branch): scan code combos <-> key code combos from the layout's characters, the missing Latin letters override, CJK punctuation redirects, labels, user settings labels, Electron accelerators, WYSIWYG and dispatch strings, and dumpDebugInfo, byte-identical to the mac_de_ch, mac_en_us, mac_zh_hant and mac_zh_hant2 fixtures (cargo test -p app keyboard_mapper, the macOS cases of macLinuxKeyboardMapper.test.ts). The mapper of the current input source is process-wide (keyboard_mapper::current), made as nativeKeyboardLayout.ts createKeyboardMapper does (none, so US key code dispatch, for keyboard.dispatch: keyCode, a layout without a key map and Dvorak - QWERTY ⌘) and made again when the input source or those settings change, checked on each native key down.

  • Keys dispatch by scan code: a key down's DOM code and modifiers come from AppKit's current NSEvent (keyboard_layout::current_key_event; GPUI's Keystroke has no key code), resolveKeyboardEvent turns them into a [Code] chord, and the resolver matches dispatch strings (meta+[KeyY]). With a mapper each rule becomes one rule per scan code keybinding that types it (_resolveKeybindingItems), so labels everywhere (menus, palette, Keyboard Shortcuts editor, chords) are the layout's: Cmd+Z reads ⌘Z and dispatches on KeyY on Swiss German. Tests run without a mapper, on the US key code dispatch of FallbackKeyboardMapper. Chord is a key code or a scan code chord ([Comma] in keybindings.json stays a scan code), equal only to its own kind as getHashCode.

  • Developer: Inspect Key Mappings opens _dumpDebugInfo: layout info, the default and user keybindings as the layout resolves them (_dumpResolveKeybindingDebugInfo, every row starting with its input as upstream's isFirst never clears), the mapper's table and the raw key map.

  • Removal rules (-command) compare dispatch strings of the resolved rules, as upstream.

  • System-wide keybindings (system_wide_keybindings.rs): keybindings.json entries with "systemWide": true register with Carbon's RegisterEventHotKey, as Electron's globalShortcut does; the key code is the accelerator key's US position (us_scan_code then mac_key_code). A press runs the command without focusing the window, as globalKeybindingsMainService.ts. Only chat's screenshot action marks a default rule system-wide, so the defaults branch of selectSystemWideKeybindings is not ported; the port has one window, so the per-window registry and its routing collapse to one binding list.

  • shortcut: the system-wide warnings (ignored when, failed registrations) are logged; the port has no notification toasts.

  • Table columns (split_view.rs, splitview.ts): the Keyboard Shortcuts table lays its column headers out with a port of SplitView (proportional layout, distributeEmptySpace from the last view, Alt-drag resizing both sides, sash states for the cursors), replacing the fixed column_widths. Sashes double-click back to the column's weight (onDidSashReset) and show sash.hoverBorder after workbench.sash.hoverDelay. list.resizeColumn (listResizeColumnAction.ts) opens TableColumnResizeQuickPick on the focused table. The column borders fade in on table hover with motion, and show always with reduced motion (listWidget.ts .monaco-enable-motion).

  • platform/actionWidget, list model (action_list.rs, actionList.ts ActionListWidget and ActionList.computeHeight): the filter with titled separators kept above their matches and filterText, orphaned separator removal, collapsible sections and their toggles, focus that skips separators and disabled rows and wraps through the filter, the initial, checked or first focused row, updateItems, acceptSelected, computeHeight (placement above or below kept while filtering, maxVisibleItems, the 60% viewport cap) and computeMaxWidth. cargo test -p app action_list runs 19 cases of actionList.test.ts.

  • Define Keybinding in keybindings.json (workbench/define_keybinding.rs, keybindingsEditorContribution.ts): Cmd+K Cmd+K and the floating Define Keybinding button (floatingMenu.ts's EditorContent item, bottom right) open the define widget over the file; Enter inserts { "key": ..., "command": "" } where smartSnippetInserter.ts puts it (smart_snippet_inserter.rs, its upstream tests) and selects the empty command. Key strings in keybindings.json are re-checked 500 ms after an edit: a key the layout cannot type is an error mark, a spelling that differs from the canonical one (_userSettingsFuzzyEquals) an info mark, with the message in the editor hover (markdownHoverParticipant.ts computeSync) and a lane in the overview ruler (editorOverviewRuler.errorForeground, editorOverviewRuler.infoForeground).

  • The default rule of editor.action.defineKeybinding carries resource == <the profile's keybindings.json>, built at runtime by preferences.contribution.ts. The reference export (default-macos.json, reference-commands.json) froze the exporting profile's temp file in it; with_keybindings_resource (keybindings.rs) puts the port's own file:// URI of the user keybindings.json in its place when the defaults and the palette menu load, so the exported data stays the reference's verbatim and a re-export needs no hand edit. define_keybinding_inserts_a_rule_into_the_user_keybindings_json fails when the condition does not match the real file.

  • The key string check resolves the key through the layout's keyboard mapper (_getDecorationForEntry): no scan code keybinding is the error mark; a key the layout types under another label (isWYSIWYG false, German cmd+; as ⇧⌘,) or an abnt_/oem_ name is an info mark with the layout's label.

  • shortcut: the mark's message shows in the workbench hover until editor/contrib/hover is ported (milestone 11); the inserted rule is plain text, not a snippet session, until editor/contrib/snippet (milestone 11).

  • Not done: the action widget view and ActionWidgetService. Every desktop caller without AI (the code action menu, the paste/drop widget, the debug launch dropdown, the terminal quick fix) waits for a milestone the port has not reached, and the folder location status bar picker needs a folder location provider that nothing in 1.147.0 registers, so no window can open the widget yet. The view comes with the code action menu of milestone 13 and is pixel-checked there; the module is expect(dead_code) until then. The combobox filter (filterAsCombobox), submenus, hovers, toolbars and async onFilter serve chat and sessions pickers only.

  • contributes.menus (menusExtensionPoint.ts, menus::extension_menus): items of editor/context, explorer/context and editor/title/context join the built-in menus with their when, group@order and alt; contributes.submenus items open as submenus. One invalid item drops that extension's menu key, as isValidItems. commandPalette stays in command_palette::menu. Other menu ids wait for their views; submenu icons wait for toolbars. Upstream has no tests for the extension point; menus/tests.rs covers items, groups, validation and submenus.

  • The focused Explorer row sets the resource context keys (ResourceContextKey: resource, resourceScheme, resourceFilename, resourceDirname, resourcePath, resourceLangId, resourceExtname), so a right-clicked README.md shows markdown's Open Preview and Find File References in the reference's groups (port/tools/ui-pair, raw/contextmenu/folder-readme-extension.png, reference left); explorer_actions/tests.rs checks a when on them.

  • Open Preview from that menu: the init data's activation events now carry the implicit ones (implicitActivationEvents.ts, exthost/src/activation_events.rs: onCommand: per contributes.commands, onView:, onLanguage:, onCustomEditor: and the other desktop generators; chat, language model and MCP points left out), so markdown.showPreview activates markdown-language-features instead of failing with "command not found". Menu arguments carry $mid 1, so the host revives a vscode.Uri and showPreview uses the right-clicked file. The command then calls MainThreadWebviewPanels.$createWebviewPanel (seen with EXTHOST_TRACE=1 under port/tools/ui-pair), and nothing opens: webview panels are milestone 17 (workbench/contrib/webviewPanel todo). cargo test -p exthost activation_events, cargo test -p app extension_items_follow_the_right_clicked_rows_resource.

  • runCommands (commands.contribution.ts, commands.rs): runs { commands } in order, each an id or { command, args } with array args spread, and stops at the first failure; argument errors and the failure show as notifications.

  • --export-default-keybindings [folder] (keybindingsExport.contribution.ts; ignored on a stable build, a packaged latest one): writes doc.keybindings.osx.json into the folder (relative to the working directory, default <appRoot>/doc), the core defaults in registry order and then each built-in extension's rules unsorted, followed by the unbound commands, and quits. The Windows and Linux files are not written: the port carries only the macOS default table (keybindings/default-macos.json), a product decision of a macOS-only port.

  • File Icon Theme picker (workbench.action.selectIconTheme, themes.contribution.ts): None ('', written as null) and the contributes.iconThemes entries by label, previewed and restored as the color theme picker. Icon theme files are JSONC (vs_minimal-icon-theme.json has comments), so FileIconTheme::load strips comments as the color theme loader does. shortcut: no product icon theme picker; no built-in extension contributes one, and a third-party one needs its font to replace codicons.

  • quickinput.test.ts cases the port leaves for their callers: createQuickWidget cases past content exclusivity (its one workbench caller is Terminal: Change Icon's IconPicker; the other callers are chat and sessions), createQuickTree (chat only; quickInputTreeSorter.test.ts with it), anchor/anchorPosition (only removed parts set them in 1.147: the integrated browser's browserUrlBarWidget.ts, chat and sessions; withQuickInputAnchor has no workbench caller, and the editor tab bar's + of editorAddTabControl.ts is a context menu dropdown). Separators with buttons show while an item of their section is active (focusInsideSeparator); an item's tooltip is its row's hover, padded by the list's .monaco-scrollable-element rule since its host sits in the list, and it hides when the value changes (hideHoverOnValueChange) though not on other keys (hideOnKeyDown: false); quickPickItemTooltip markdown tooltips from extensions are a proposed API. isKeyModified and quickInputButtonsToActionArrays secondary buttons have no non-AI caller; toggle and alwaysVisible buttons are in quick_input.rs.

  • Help quick access (?, helpQuickAccess.ts): one pick per help entry of the providers the port has, sorted by prefix with locale_compare, labelled with the prefix (… for Quick Open), with the command's keybinding; accepting or typing a provider's prefix after ? shows that provider with its value kept. The command center's help picks gain More ?. The list filters by label containment, where upstream's quick pick filter matches fuzzily. shortcut: the view provider (Open View) waits for view containers and the panel of milestone 11; the reference's %, @, #, debug, task, term, edt, ext providers come with their milestones.

  • Context menu submenus (workbench/context_menu.rs, menu.ts SubmenuMenuActionViewItem): the menu is a stack of levels, keys go to the last. Hover opens a submenu after 250ms, another item of its menu (or the pointer leaving the menus) closes it after 750ms unless the pointer returns; a click, Right, Enter or Space opens it with its first item focused; Left and Escape close only the submenu. Submenus are placed by calculateSubmenuMenuLayout and have no open animation. The Manage gear opens MenuId.GlobalActivity beside it (layout2d with AnchorAxisAlignment.HORIZONTAL, AnchorAlignment.RIGHT). Share and Copy As submenus (clipboard.ts, editor.contribution.ts) take the */share and */copy contributions. shortcut: no window.menuStyle: native context menus, GPUI has no native popup menu.

  • --export-default-keybindings: core rules write their when as the default table has it (Item.when_text), so isLinux, isWindows, isWeb and isMacNative stay as KeybindingsRegistry expressions keep them; extension rules are parsed and folded as upstream.

  • cua-driver key presses close the port's context menu (the window takes them as an activation); --screenshot-input keys and the reference behave. Check menu keys with --screenshot-input (release build with --features screenshot).

  • List settings (listService.ts): workbench.tree.indent (clamped 0..40) sets the Explorer and Search indent per level; workbench.list.openMode and workbench.tree.expandMode doubleClick make Explorer files open and folders expand on a double click only; workbench.list.multiSelectModifier alt makes Alt the Explorer's multi-select modifier (cargo test -p app tree_indent list_click). Type navigation (workbench/type_navigation.rs, listWidget.ts TypeNavigationController): in the Explorer and the Keyboard Shortcuts table (its keyboardNavigationLabelProvider: command label, else id) an unmodified printable key no keybinding takes, and any while a word is being typed, focuses the next row whose label starts with the word, ignoring case; the word clears 800ms after the last key; workbench.list.typeNavigationMode trigger waits for list.triggerTypeNavigation (cargo test -p app typed_words typing_a_letter typing_in_the_table). The Search results tree has no type navigation, as in 1.147.0: searchView.ts gives it no keyboardNavigationLabelProvider, so listWidget.ts creates no TypeNavigationController.

  • List scrolling (workbench/list_scroll.rs, listView.ts over scrollableElement.ts) for the Explorer, the Search results and the Keyboard Shortcuts table: the wheel goes through a capture-phase layer before GPUI's own scrolling, predominant axis only, 50px a notch times workbench.list.mouseWheelScrollSensitivity, fastScrollSensitivity more with Alt; workbench.list.smoothScrolling animates a physical wheel (AppKit line deltas, isPhysicalMouseWheel) over 125ms with scrollable.ts's ease-out cubic and its long-jump split (list_tree.rs). The lists gained scrollableElement.ts's 10px scrollbars (fade in on scroll and hover, out 500ms after, scrollbarSlider.*), a track press jumps (one view with workbench.list.scrollByPage), the slider drags, and the 3px scrollbar.shadow top shadow while scrolled. workbench.list.horizontalScrolling lets the Explorer and Search rows run unwrapped as wide as the widest (not while an Explorer name is edited, explorerView.ts setEditable) with a horizontal scrollbar; the Keyboard Shortcuts table keeps horizontalScrolling: false as keybindingsEditor.ts. list.scrollUp/Down/Left/Right move 10px, listScrollAtBoundary is set for the focused list (cargo test -p app list_scroll list_tree).

  • Trees (workbench/tree_view.rs, abstractTree.ts): indent guides (workbench.tree.renderIndentGuides, one 1px guide per ancestor at the parent's twistie center; tree.inactiveIndentGuidesStroke while the pointer is over the list with a 100ms fade, or always; the guides under the focused or selected rows' parent in tree.indentGuidesStroke always) and sticky scroll (workbench.tree.enableStickyScroll, stickyScrollMaxItemCount, the 40% view cap, rows pushed up by the end of their subtree, the scrollbar.shadow below, tree.toggleStickyScroll); a left press on a sticky row scrolls its source under the widget and focuses and selects it, other buttons reach the row. The sticky rows are the tree's own rows rendered again, never drawn selected or focused (StickyScrollWidget toggles neither on its rows). Not ported: keyboard focus inside the sticky rows (StickyScrollFocus, treestickyScrollFocused, list.stickyScroll.collapse/select/toggleExpand): the port has no Tab order between a tree's parts. While the Explorer's find widget is open no rows stick, as its 30px paddingTop keeps the first row under it.

  • listCommands.ts on the three lists: Explorer focusParent, collapseAllToFocus, selectAndPreserveFocus, showHover (the focused row's managed hover, placed by the row, hoverService.ts showManagedHover); Search results (workbench/search_list.rs) take multiple selection (multipleSelectionSupport: true: Cmd or Alt click toggles, Shift click ranges from the anchor, expandSelectionDown/Up, selectAll of the focused row's level, toggleSelection) and focusAny*, focusParent, collapseAllToFocus, selectAndPreserveFocus; their rows have no managed hover, so showHover does nothing there. The table takes focusAny*, toggleSelection (the focused row leaves the selection until the focus moves) and selectAndPreserveFocus; tree commands do nothing on it (cargo test -p app the_results_select_several_rows the_tree_commands typing_in_the_table).

  • config.<setting> context keys (contextKeyService.ts ConfigAwareContextValuesContainer): every setting's value is in the key context, so toggles like File > Auto Save (config.files.autoSave != 'off') are checked as in the reference; before, only a few config.* keys were set and Auto Save showed checked with files.autoSave off. The menu bar is compared with a fresh reference dump (port/results/menubar.md).

  • Open in platform/list: ui-pair's 4 real wheel notches (cua-driver, AppKit Lines(-2) each) over the Explorer scroll the reference 304px and the port 282px, one row less. Before, the port's wheel layer tested is_hovered, which GPUI makes false after a key press until the pointer moves, so GPUI's own 21px-a-line scrolling took the wheel (168px); it now tests should_handle_scroll (cargo test -p app the_wheel_scrolls_after_a_key_press). The remaining row: Chromium's wheelDeltaY per notch is not AppKit's scrollingDeltaY; not derived yet. After the wheel stops the reference shows the row's hover (Chromium's synthetic mouse move enters the new row); the port leaves the old row's hover on scroll and shows the next one only when the pointer moves.

Milestone 12: files, explorer, search, workspace

Scope shipped so far: workspace.fs and file events, Seti file icons and numeric name sorting in the Explorer, workspace.findFiles, findFiles2 and findTextInFiles through ripgrep, multi-root .code-workspace windows. Done when of milestone 12 is met; scope items are left, see the Seti pixel-check item.

  • native/crates/files is the file service: a FileSystem trait, the Disk provider (capabilities as diskFileSystemProviderClient, no PathCaseSensitive on macOS), delete to Trash through the trash crate (NSFileManager, as Electron shell.trashItem), and upstream's error names with _handleError renames. Other schemes go to the extension providers registered with $registerFileSystemProvider.

  • files::watcher watches through FSEvents (notify), batches events for 75 ms and coalesces them as watcher.ts EventCoalescer. files.watcherExclude patterns are matched by files::glob, a port of glob.ts with ! exceptions and its upstream tests, case insensitive as parseWatcherPatterns.

  • MainThreadFileSystem and MainThreadFileSystemEventService live in exthost/src/main_thread_files.rs; correlated extension watchers each get their own watcher so their events carry the session.

  • native/crates/search ports queryBuilder.ts, fileSearch.ts and ripgrepFileSearch.ts, and ripgrepTextSearchEngine.ts with textSearchManager.ts, against the @vscode/ripgrep-universal binary in node_modules. Excludes with ! exceptions run ripgrep twice and dedupe, as upstream. MainThreadWorkspace (exthost/src/main_thread_workspace.rs) runs each search on its own thread, sends $handleTextSearchResult before the reply, and kills ripgrep on the host's Cancel.

  • The icon theme follows workbench.iconTheme as initializeFileIconTheme: null draws no icons, an unknown id falls back to vs-seti. Names sort as compareFileNamesDefault (numeric, file9 before file10).

  • Explorer rows, section headers and actions use the pointer cursor (list.css, paneview.css, actionbar.css); twisties inherit it from the row, as tree.css sets none.

  • shortcut: an extension provider call fails after 300 s; upstream waits forever (main_thread_files.rs).

  • shortcut: no second ripgrep run without --follow when symbolic links loop (RipgrepSymlinkLoopDetector), in file and text search.

  • shortcut: workspace search skips folders of schemes other than file; the port registers no extension search providers (MainThreadSearch).

  • shortcut: Seti keys with a parent folder (dir/name) never match; Seti has none.

  • shortcut: an unreadable folder shows no children; the reference shows the error in the tree.

  • Text search does not include results from unsaved editors, as the search service's local results would; the port's documents are milestone 8's.

  • config::workspace (native/crates/config/src/workspace.rs) is the workspace of a window: one folder, or the folders of a .code-workspace file resolved as toWorkspaceFolders (relative paths against the file's folder, file: URIs, duplicates dropped), getFolder ignoring case as on macOS, and getWorkspaceLabel (<name> (Workspace)). Its cases come from workspace.test.ts.

  • Settings of a workspace file: its settings key is the workspace layer with WORKSPACE_SCOPES, launch and tasks its standalone sections; each folder's .vscode/settings.json is read with FOLDER_SCOPES, so window settings in a folder of a workspace are ignored as upstream. Workspace-target writes go into the file under settings (or tasks, launch), folder-target writes into the folder the resource is in.

  • The workspace id of a workspace file is MD5 of its lowercased path (getWorkspaceIdentifier, the stable-id case of workspaces.test.ts); it names User/workspaceStorage/<id>. Init data and $initializeWorkspace carry configuration (the file), the label, transient and every folder with its name and index. The watcher watches each folder with its own files.watcherExclude; search covers every folder.

  • The Explorer of a workspace shows its folders as root rows, the first five expanded (doSetTreeInput without view state); revealing a file expands its root. Quick pick descriptions of several folders read <folder> \u2022 <path> (label.test.ts multi-root case) and breadcrumbs start with the folder name, as BreadcrumbsModel for WorkbenchState.WORKSPACE.

  • shortcut: a workspace folder with a uri of another scheme than file is skipped; it needs the extension file system providers in the Explorer and search.

  • Adding and removing workspace folders and untitled workspaces: see "Workspace folder editing" in the milestone 12 section.

  • Explorer view state (explorerView.ts storeTreeViewState, asyncDataTree getViewState): workbench.explorer.treeViewState in workspace storage holds focus, selection, expanded and scrollTop, with ids <root URI>::<resource URI> as explorerModel.ts getId. It is restored with the workspace state; items no longer on disk are dropped. Written when the workbench is released or the app quits, since the port has no onWillSaveState phase. Tests: cargo test -p app view_state.

  • File nesting (explorer/nesting.rs, explorerFileNestingTrie.ts with the cases of explorerFileNestingTrie.test.ts): explorer.fileNesting.enabled, expand and patterns, read per folder so .vscode/settings.json applies. Nest parents get a twistie; a collapsed nest stays collapsed with expand: true; files.exclude applies after nesting, so an excluded parent still nests. Measured against the reference with ui-pair (Seti theme): nested rows sit one indent deeper with no align offset. Tests: cargo test -p app nest.

  • Explorer filter (explorer/files_filter.rs, explorerViewer.ts FilesFilter; search/src/ignore_file.rs, ignoreFile.ts with the cases of ignoreFile.test.ts): files.exclude of the item's workspace root with ! exceptions, and with explorer.excludeGitIgnore the .gitignore files from the root down to the folder, read case-insensitively (macOS disk, no PathCaseSensitive). An excluded folder an exception may match beneath stays shown and its items count as under an excluded folder; .gitignore itself always shows while the setting is on, as upstream's filter. Upstream reads a .gitignore when the tree first shows it and watches it; the port lists them with their mtimes in the folder's cache key, so an edit shows on the next frame. Not ported: an excluded file open in a visible editor staying shown (editorsAffectingFilter), and a folder whose own .gitignore upstream already read is never hidden by its parent's (findSubstr returns the folder's own file); the port takes the nearest .gitignore above the item. Breadcrumbs still hide only the default names (EXCLUDED_NAMES). Tests: cargo test -p search ignore_file, cargo test -p app hides_files_exclude_and_gitignore.

  • files::operations ports WorkingCopyFileService (create, createFolder, move, copy, delete with participants first and onDidRunWorkingCopyFileOperation after) and BulkFileEdits (consecutive edits of a kind as one operation, ignoreIfExists, ignoreIfNotExists, maxSize, delete keeping contents for undo), with the cases of bulkFileEdits.test.ts and workingCopyFileService.test.ts that need no text models.

  • MainThreadBulkEdits (exthost/src/main_thread_bulk_edits.rs) applies the file edits of workspace.applyEdit in order; options.contents arrives as base64. The participant (main_thread_files.rs) sends $onWillRunFileOperation as a cancellable request, cancelled after files.participants.timeout (0 turns participants off), applies the returned edit with the operation's undo group, and sends $onDidRunFileOperation. Operations that undo skip participants. Arguments with buffers come with {"$$ref$$": -1} for undefined; rpc.rs drops those keys as parseJsonAndRestoreBufferRefs does.

  • Text edits of a workspace edit run on the workbench, which owns the text models (workbench/bulk_text_edits.rs, a port of bulkTextEdits.ts): the host thread asks with applyTextEdits through ask_workbench, version ids are checked first, and an edit to a file without a model reads it from disk. setEndOfLine is a model change with isEolChange (shortcut: not on the undo stack yet). Notebook cell edits go to the workbench's notebook models (applyCellEdits, milestone 17 notebooks); a failing step fails the edit and the file edits before it stay applied, as upstream's BulkEdit.perform on a failing step.

  • Participant confirmation (mainThreadFileSystemEventService.ts): outside extension test runs the host thread asks the workbench (Session::ask_workbench, request ids counted down from u32::MAX so they never meet the host's) with $confirmParticipantEdits, a port-only method on the MainThreadFileSystemEventService proxy name. workbench/file_participants.rs answers from the file.particpants.additionalEdits profile memento or shows the NSAlert sheet: OK, Show Preview, Skip Changes with "Do not ask me again" (Skip is not remembered), or Show Preview and Skip Changes without the checkbox when an edit has needsConfirmation. files.participants.resetChoice deletes the memento. Checked with port/tools/ui-pair and a scratch extension whose onWillRenameFiles creates a file: same sheet in both, OK creates the file in both.

  • shortcut: Show Preview, a remembered preview, and edits with needsConfirmation skip the edit with a log line: the Refactor Preview is a panel view (milestone 11) with text diffs (milestones 8 and 14). The "Running 'File Rename' participants..." progress is milestone 11's.

  • Explorer file operations (workbench/explorer_actions.rs, file_actions.rs): explorer.newFile, explorer.newFolder, renameFile, moveFileToTrash, deleteFile, filesExplorer.copy, .cut, .paste, .cancelCut and drag and drop (Alt copies) run as upstream's handlers and go through files::operations on the extension host thread (HostMessage.files), so they reach the same participants as applyEdit. With no host they run on Disk without participants. Dialog texts, undo labels, confirmBeforeUndo levels, incrementFileName and validateFileName come from fileActions.ts, explorerViewer.ts and fileImportExport.ts; the naming and validation cases from fileActions.test.ts and explorerModel.test.ts.

  • The inline name editor is InputBox (input_box.rs), shared with the quick input; its view is workbench/input_box_view.rs. Enter accepts a value without an error, Escape cancels, F2 cycles name, all, extension, and moving the focus away accepts; the window losing focus keeps the edit (InlineEditInputBox). The input takes the border of its validation message, the message paints over the rows below with its **bold** markdown, and the icon follows the typed name.

  • undo_redo.rs ports the workspace elements of undoRedoService.ts: one stack per resource, an element on every stack it touches, undo of the closest element of the source, a later change to one resource flushing the element, a failed element dropping its stacks. Cmd+Z in the focused Explorer undoes the last file operation (explorer.enableUndo), after asking when the element was pushed with confirmBeforeUndo; a focused input undoes its text first.

  • Explorer selection follows listWidget's MouseController (Cmd toggles, Shift selects a range) and the focused tree draws the active selection colors and the focus outline; cut rows are at 0.5 opacity (explorerviewlet.css). Rows stay opaque while a name is edited: the 0.3 rule needs .explorer-folders-view twice in the ancestry, which the reference DOM never has (checked with port/tools/ui-pair).

  • Explorer copy and cut write the files' URIs to the clipboard (writeResources, clipboard.rs), so another window can paste them. shortcut: pasting files copied in Finder (the paste event's fileList) is not ported, GPUI's clipboard has no file items.

  • "Do not ask me again" (Trash delete, drag and drop move) is the NSAlert suppression checkbox of a sheet (dialog.rs), as window.dialogStyle: native, the default; a checked box writes explorer.confirmDelete or explorer.confirmDragAndDrop false to user settings. GPUI's Window::prompt has no checkbox. The custom dialog style (window.dialogStyle: custom) is not ported. Permanent delete has no checkbox, as upstream.

  • Undo of a delete to Trash recreates the file from the contents read before deleting (DeleteOperation), as upstream; nothing is put back from the Trash, and folders come back empty.

  • port/tools/ui-pair drives the reference and the port through the same clicks and keys with cua-driver and saves both frames; the port's drags need delivery_mode: foreground (a background drag reaches only Electron's drag and drop). Differences left in the Explorer frames belong to milestone 11: the folder pane's title actions on hover, row hover, and the inactive look of the tree while a sheet is open. The input selection is editor.selectionBackground where the reference draws Chromium's native selection color. While a rename waits for its operation (a participant dialog) the reference keeps the edited row blank and the port draws the old name; the editor tab of a renamed file keeps its old name (milestone 8's working copies).

  • A workspace root that fails to resolve (a folder deleted since it was opened; an unreadable one resolves without children): a single folder shows one file item of its own resource, a multi-root root stays a folder; both get explorerDecorationsProvider.ts's "!" in list.invalidItemForeground (EXPLORER_PROVIDER, synchronous like the markers provider). Difference: the port asks on demand, so a missing root that was never expanded shows the "!" too; upstream only after its children were fetched. ui-pair of a two-root .code-workspace with a missing folder: same row color, badge and hover.

  • A copy onto a file with a dirty model soft-reverts it and the model takes the copied bytes (the host thread reads them, as for a create); a move already continued the model at its target (move_models).

  • A move or rename keeps the moved items' focus, selection and expansion (FileTree::move_item, read from the renames of the returned undo, so undo and redo follow too), as explorerService.ts moves the model element itself.

  • The port loads an extension with engines.vscode: "*"; the reference rejects it ("Version specified in engines.vscode (*) is not specific enough"). Extension validation is milestone 18's.

  • shortcut: workspace folders cannot be reordered by dragging.

  • Not done: the Explorer context menu (it needs the M9 menu registry, reconcile at merge).

  • Compact folders (explorer.compactFolders, default on): FileTree::rows folds a folder whose children are loaded (expanded) and are one folder into one row, as compressedObjectTreeModel.ts compress with ExplorerCompressionDelegate (roots, files and the new item's parent stay apart; excluded names count, as the data source returns them). Expanding a folder also expands its single-folder chain (autoExpandCompressedChildren), a collapsed compact row stays compact and stores none of its folders as expanded. The row's names are a.label-name segments with a half-opaque /; hover underlines a name, the focused row underlines its current one. Navigation ports CompressedNavigationController; Left, Right, Home and End (previousCompressedFolder and its siblings, with explorerViewletCompressedFocus, FirstFocus and LastFocus) move it, pressing a name sets it, a right click off the names resets it to the last. get_context ports explorerView.ts getContext, so rename, delete, new file, copy path and the context menu act on the current folder; a multi-selection now wins over a focused row outside it, as upstream. Dragging over a name other than the last drops into that folder and highlights only that name. Tests: cargo test -p app compact get_context compressed_navigation; frames checked with port/tools/ui-pair (expand a/b/c, Left, Home, Right, Enter, right click on a name): same underline, rename target and menu target as the reference.

  • shortcut: the current folder of a compact row is kept for the session; upstream resets it to the last whenever the list re-renders the row (scroll, refresh), a DOM template lifecycle gpui's immediate-mode rows do not have.

  • shortcut: the screen reader check of explorerView.ts (compact folders off while one is active) is not ported; the port does not detect one.

  • copyFilePath, copyRelativeFilePath (fileCommands.ts resourcesToClipboard) and revealFileInOS (electron-browser revealResourcesInOS, cx.reveal_path) act on getMultiSelectedResources: the Explorer's selection while it has focus (getContext(true, true), no nested files), else the command's URI, else the active editor. Labels are getUriLabel with noPrefix (quick_input::path_label_without_prefix): no ~, no folder name in a workspace, explorer.copyPathSeparator and explorer.copyRelativePathSeparator applied. Menu entries in the Explorer and tab context menus; the active editor sets isFileSystemResource. Checked with port/tools/ui-pair and its clipboard step: <folder>/src and src in both, same menu items for the ones the port has.

  • Explorer find (workbench/explorer_find.rs) ports abstractTree.ts FindController with asyncDataTree.ts AsyncFindController and explorerViewer.ts ExplorerFindProvider: list.find (Cmd+Alt+F, F3), list.closeFind, list.toggleFindMode and list.toggleFindMatchType while the Explorer has focus, treeFindOpen and the other find context keys. Typing waits 250 ms, then ripgrep looks for files and folders whose path segments match (*a*b* fuzzy, *ab* contiguous, 512 results, files.exclude and explorer.excludeGitIgnore applied), as searchInWorkspace. Highlight mode marks the matched characters (list.filterMatchBackground) and a collapsed folder holding matches gets the count badge; Filter mode shows only the matches and their folders, expanded. Enter or Down past the history returns the focus to the tree, Up and Down walk the input history, Escape restores the view state from before the find. "No results found." and the subset message show under the input while it has the focus, as inputBox.ts. The toggles start from workbench.list.defaultFindMode and defaultFindMatchType and the widget reopens with the last pattern. Tests: cargo test -p app explorer_find find_filters. Frames checked with port/tools/ui-pair (t, filter, ts, contiguous, no results, close, reopen): each differs from the reference in under 0.11% of pixels at 6% fuzz; left is the input's selection color (Chromium native, see above). The input is 155.5px wide, as the reference's .monaco-tree-type-filter-input measures (ref-dom), which puts the widget and its message box on the reference's pixels.

  • Files dragged in from Finder (gpui's ExternalPaths drag) run fileImportExport.ts ExternalFileImport: always a copy, into the folder under the pointer or, below the rows, the last workspace folder (explorerViewer.ts drop without a target; internal drags drop there too, unless every item already sits in a workspace folder). Folders dropped into a workspace folder ask "Do you want to copy '' or add '' as a folder to the workspace?" (Add Folder to Workspace, Copy Folder, Cancel); a name the target has, in any case, asks to replace it; missing items get "The dropped file could not be accessed for import."; the copy is one undoable "Import " edit, and a single file opens pinned (explorer.autoOpenDroppedFile). With no root rows the empty area takes list.dropBackground with the rows, as the list's drop-target. Tests: cargo test -p app files_dropped_from_finder.

  • shortcut: dirty editors of the source and target of a move or copy are not reverted first (files/src/operations.rs); working copies are milestone 8's.

  • Untitled documents: $tryCreateDocument makes Untitled-<n>, openTextDocument(untitled:/path) makes a model associated with that file (dirty from the start, saved to the file, refused when the file exists). Both tell the host the document is dirty, as _doCreateUntitled. shortcut: no Save As dialog for an untitled model without a file.

  • Revert of an untitled editor (workbench.action.files.revert, _workbench.revertAllDirty) empties it, tells the host it is clean and closes it, as untitledTextEditorModel.ts revert and the input disposed on onDidRevert; it no longer reads the associated file from disk. shortcut: revert reads from disk only, so an editor of an extension provider's file (the fake-fs: files of workspace.test) logs reverting <path>: No such file or directory and stays dirty; it needs a read job through the host thread like FileJob::Write.

  • Content providers (main_thread.rs) are kept newest first as textModelResolverService.ts; opening a provider URI asks the host for $provideTextDocumentContent, and $onVirtualDocumentChange replaces the model text in one edit and keeps it clean (shortcut: upstream computes minimal edits).

  • $trySaveDocument of a dirty model first runs the host's onWillSaveTextDocument listeners ($participateInSave, 1750 ms as mainThreadSaveParticipant.ts).

  • Encodings: files::encoding ports encoding.ts (BOM and UTF-16 zero-byte detection, files.encoding per resource, SUPPORTED_ENCODINGS labels) on encoding_rs, with iconv-lite's DOS code page tables (cp437, cp850, cp852, cp865, cp866) that encoding_rs lacks. A model is decoded and saved in its encoding; openTextDocument(uri, { encoding }) decodes a new model or reads a clean one again, and refuses a dirty one as upstream. $resolveDecoding, $validateDetectedEncoding and $resolveEncoding answer workspace.decode and workspace.encode, which the host runs itself. shortcut: files.autoGuessEncoding (jschardet) is not ported in the workbench; binary files open as text.

  • Saves from the workbench (workbench.action.files.save, saveAll, and the host's $save, $saveAll of MainThreadWorkspace, now forwarded to the workbench) write a model of an extension's file system provider through the host thread (FileJob::Write) and mark it clean at the version that was written, so edits made meanwhile stay dirty. shortcut: only $trySaveDocument runs the extensions' onWillSaveTextDocument participants.

  • $tryOpenDocument answers the casing opened first when the scheme's provider has no PathCaseSensitive (the disk on macOS, case-insensitive extension providers), as uriIdentityService.asCanonicalUri. shortcut: only open models are canonical, where upstream keeps a cache of every URI it saw; editors opened from the Explorer compare paths exactly.

  • Saves from the workbench (workbench.action.files.save, saveAll, and the host's $save, $saveAll of MainThreadWorkspace, now forwarded to the workbench) write a model of an extension's file system provider through the host thread (FileJob::Write) and mark it clean at the version that was written, so edits made meanwhile stay dirty. shortcut: only $trySaveDocument runs save participants.

  • $tryOpenDocument answers the casing opened first when the scheme's provider has no PathCaseSensitive (the disk on macOS, case-insensitive extension providers), as uriIdentityService.asCanonicalUri. Editors opened in the workbench find an open file in any case too (TextDocument::is_file). shortcut: only open models are canonical, where upstream keeps a cache of every URI it saw (its trimming tests do not apply).

  • A recursive $watch whose stat fails stays recursive, as mainThreadFileSystemEventService.ts ignores the error. Every test of workspace.test and workspace.watcher.test passes (port/results/api-tests.md).

  • The folder window with Seti icons is pixel-checked at the merge of milestones 9, 10 and 12: folder 7238/4067/960/874 (dark to hclight) against a reference captured with Seti (port/results/pixels.md, "Milestone 12"). With the api-tests above and the file9/file10 sort test, the Done when of milestone 12 is met; the scope items left are workspace trust, recent workspaces, local history, opener and URL handling.

  • The Search view (workbench/search_view.rs, search_actions.rs) ports searchView.ts, searchWidget.ts and the top bar, result and replace actions: workbench.view.search, workbench.action.findInFiles (Shift+Cmd+F, seeded from the editor selection, or the word at the cursor with search.seedWithNearestWord, never while the focus is in the view), workbench.action.replaceInFiles, the search.action.* commands and the list.* ones in the results. The activity bar's Explorer and Search icons switch the side bar through the same commands. Typing searches after search.searchOnTypeDebouncePeriod; an invalid regex shows the validation message and does not search.

  • Its model (search_model.rs) ports searchTreeModel's FileMatch and Match (previews cut as lcut, UTF-16 columns), the result counts and messages, and ReplacePattern with preserve case; cases from upstream's searchResult, match and replace tests (search_model/tests.rs). The include and exclude inputs go through search::search_paths (queryBuilder.ts text with ./folder paths and onlyOpenEditors).

  • Replace all asks with confirm (replaceService.ts texts), applies the edits as one bulk text edit and saves each file. A replaced file keeps a model without an editor; opening it reuses that model. A changed model's file is searched again (updateMatchesForModel).

  • Rows: 22px, 8px indent per level, pointer cursor (list.css); count badges hide on hover and focus, and the row actions (replace, dismiss) show then (searchview.css). Matches draw editor.findMatchHighlightBackground 15px tall in the row; with a replace string, removed and inserted spans in the diff colors. Checked with port/tools/ui-pair (Shift+Cmd+F, type "the", toggle replace): same frames except the toolbar's New Search Editor action, which waits for the search editor.

  • Opening a result with a replace string opens the replace preview (replaceService.ts openReplacePreview): the file against a private:<path>?{"scheme":"file"} model of its text with every match of the file replaced, in the diff editor labelled " ↔ (Replace Preview)". Test: cargo test -p app replace_preview. Differences: the preview is computed when it opens, where upstream also updates an open preview when the file's matches change; the diff editor reveals its first change, where upstream centers the opened match's line.

  • Results context menu (MenuId.SearchContext, menus.rs): Replace, Replace All, Dismiss, Restrict to Folder, Expand Recursively, Exclude Folder, Exclude and Include File Type, Copy, Copy Path, Copy All, Reveal in Explorer View, with their search.action.* commands. A right click moves the focus, not the selection, as listWidget does. Folder include and exclude paths go through search::search_paths::resolve_resources_for_search_includes (queryBuilder.ts). Checked with ui-pair in dark: same menu frames.

  • Input history: Up and Down walk the query, replace, include and exclude histories (HistoryNavigator, 2 s and 500 ms debounce as searchView.ts), search.action.clearHistory; saved per workspace in workbench.search.history on each change (upstream writes it at shutdown).

  • Row hover is tracked in the view (SearchView::hovered): gpui group_hover toggling an element's display panicked with "must call prepaint before paint" when a right click redrew the row.

  • gpui's ellipsis drops whitespace and ASCII punctuation before "…" (line_wrapper.rs truncate_line), CSS keeps them; the match preview's trailing text gets a zero-width space after each, so it shows "the …" as the reference.

  • Light and high contrast frames match except in high contrast: gpui's dashed border is 2pt on, 1pt off (CSS 3pt and 2pt), and the match box is 0.5pt wider, so a preview can cut one character earlier.

  • Not done in the Search view: notebook and AI results, the search.quickOpen and search.experimental settings.

  • The search editor (search_editor.rs, workbench/search_editor_view.rs, workbench/search_editor_widget.rs) ports searchEditor.ts, searchEditorInput.ts and searchEditorSerialization.ts: search.action.openNewEditor, openEditor, openInEditor, rerunSearchEditorSearch, cleanSearchEditorState, selectAllSearchEditorMatches, search.searchEditor.action.deleteFileResults, focusQueryEditorWidget, the toggleSearchEditor* and context line commands, with the inSearchEditor context key. The query widget above the results is one workbench widget that loads the active editor's config and writes it back (setSearchConfig, readConfigFromWidget); it draws the Search view's inputs through InputId::SearchEditor. Results are a search-result model whose tab reads Search: <query> (12 characters) or the backing file's name, also in the API's tab labels.

  • .code-search files open as search editors and save to their file; an editor without one asks with the save panel, named by suggestFileName. A double click on a result line opens the file at the match (search.searchEditor.doubleClickBehaviour, as the search-result extension's definition provider and relativePathToUri; cases in search_editor/tests.rs).

  • peekDefinition (single click setting, double click on a file line) opens the definition peek from the search-result extension's definition provider; openLocationToSide runs editor.action.openDeclarationToTheSide (revealDefinitionAside) into the side group. The extension's document symbols, links and # Query: completions come through MainThreadLanguageFeatures. ui-pair port/fixtures/ui-pair/m12/search-editor-peek.json (double click on notes.txt:): the peek matches, its title with the file's whole folder (referencesWidget.ts getUriLabel(dirname), not relative; the port had shown the workspace-relative folder) and its preview without line numbers, as the embedded editor takes the search editor's lineNumbers: off (EmbeddedCodeEditorWidget).

  • New editors take their config as searchEditorInput.ts does: defaults, the prior editor's config from memento/workbench.editorinputs.searchEditorInput when search.searchEditor.reusePriorSearchConfiguration is on, the selection as the query, the command's arguments, then search.searchEditor.defaultNumberOfContextLines (default 1) unless the arguments set contextLines. The earlier ui-pair miss was a stale release binary, not key delivery: after a rebuild, scratch/se2-steps.json (Shift+Cmd+P, "New Search Editor", Enter, type "the", Shift+Cmd+J, Cmd+Alt+L, Shift+Cmd+L, double click) gives the reference's frames for the tab label, query widget, toggles, context lines and details. The query container is 5px shorter than its content, as upstream's empty .messages box has margin-top: -5px; the expanded excludes block keeps its 10px bottom padding.

  • Still different, owned by editor rows: the notes.txt: line is not underlined (editor/contrib/links), the active indent guide is not brighter (editor guides), and a double click on a file line opens no peek (editor/contrib/peekView).

  • _workbench.open (editorCommands.ts, host_requests.rs api_open_editor) opens a resource in the editor group with its ITextEditorOptions, an untitled resource with a path as a dirty untitled editor saved to that file, an http or https string in the browser, and ignores command: resources. vscode.open forwards its first argument. shortcut: every view column opens in the one editor group, so api-command: vscode.open still fails on ViewColumn.Two until the editor groups row.

  • _workbench.diff is not registered: the port has no diff editor (milestone 14), and api-command: vscode.diff fails with "command '_workbench.diff' not found".

  • env.asExternalUri of an app uri: $createAppUri answers the uri with product.json's urlProtocol (code-oss), as urlService.ts create; api-tests vscode API - env 6/13, the rest are env.power (power service, milestone 19) and env.remoteName, which expects the removed github-authentication.

  • MainThreadLabelService and MainThreadSearch are removed rows: their only callers are proposed APIs (resolvers, fileSearchProvider, textSearchProvider, aiTextSearchProvider) that product.json enables for no extension and that only remote resolvers and the removed AI extension declare.

  • Folder icons (fileIconThemeData.ts folder selectors): a theme with a folder icon draws it on every Explorer and Search folder row, picking rootFolderNamesExpanded, rootFolderNames, rootFolderExpanded, rootFolder, folderNamesExpanded, folderNames, folderExpanded, folder most specific first, with the light and highContrast sections over the base one. Image icons (iconPath) render as SVG tinted with the row foreground when usesCurrentColor is set. Seti declares none, so only vscode-modern-icons shows them. ui-pair takes SETTINGS for user settings of both windows: SETTINGS='{"workbench.iconTheme":"vscode-modern-icons"}' gives 0.014% to 0.073% pixels off for the closed tree, the opened folder and a search, dark and light. The 1pt chevron offset on folder rows predates this change (same in the Seti frames).

  • Local history, the saving half (local_history.rs, workingCopyHistoryService.ts WorkingCopyHistoryModel and workingCopyHistoryTracker.ts): a save of a dirty file model copies the file to User/History/<hash>/<4 random chars><ext> and writes entries.json, the folder and listing format of the reference (the folder name is hash.ts hash of the URI string, checked against a VS Code 1.x history folder). Saves within workbench.localHistory.mergeWindow seconds replace the last entry, maxFileEntries drops the oldest, maxFileSize, enabled and exclude (ResourceGlobMatcher: relative to the workspace folder, absolute for absolute patterns) skip the file. The listing is written on every change, where the native service writes it every 5 minutes and on shutdown; the files on disk end the same.

  • Entries follow a rename or move (moveEntries, after didRunFileOperation): the moved files' entries go to the new resource's folder and get a "File Renamed" (same parent) or "File Moved" entry described by the old path. Upstream moves the entries of the models it has loaded; the port reads every listing in the history home. Tests: cargo test -p app local_history.

  • Command Palette commands (workbench/local_history_actions.rs): Local History: Find Entry to Restore (files with history, the editor history's first, then the entries newest first with circle-outline and the Intl.DateTimeFormat('en') date, from NSDateFormatter with U+202F turned into a space), Delete All (confirmation) and Create Entry (input box for the source).

  • Find Entry to Restore compares the picked entry with the file in the diff editor (toDiffEditorArguments, label <name> (<source> • <date>) ↔ <name>), or opens the entry read-only when the file is gone (openEntry).

  • The Timeline's Local History source (local_history_actions.rs, localHistoryTimeline.ts): registered while workbench.localHistory.enabled is on, answered in the workbench without the extension host; items with circle-outline, the $(history) <date> tooltip, contextValue localHistory:item and Compare with File as their command. Entry URIs are upstream's vscode-local-history:<file path>?{"location":..,"associatedResource":..}; the port's models keep the query in their path, so each entry is its own model, read from the history folder when _workbench.diff or openEntry needs it. Saves, Create Entry, moves, Rename, Delete, Delete All and Restore refresh the source. Entry commands: Compare with File, Compare with Previous, Select for Compare, Compare with Selected, Show Contents, Restore Contents (also the editor title's check action on an entry), Rename, Delete (the selection too). Tests: cargo test -p app local_history.

  • Rename of an entry asks with the input box ("Rename Local History Entry"); upstream edits the Timeline row inline (timelineService.setEditable) when the Timeline is visible. The Timeline rows have no inline editor yet (workbench/contrib/timeline).

  • A resource of an extension's file system provider shows the entries of the file resource of its path (localHistoryTimeline.ts provideTimeline); the workbench learns the provider schemes from the host thread's $registerFileSystemProvider and $unregisterProvider (workbench.file_system_providers, fileService.ts hasProvider).

  • Workspace trust (workspace_trust.rs, workspaceTrust.ts): trusted folders are content.trust.model.key in the shared storage (sharedStorage/state.vscdb under --shared-data-dir, default ~/.vscode-gpui-shared, the reference's ~/<sharedDataFolderName>), compared case-insensitively with the longest trusted parent winning; an empty window keeps its answer in the workspace memento. security.workspace.trust.enabled: false or --disable-workspace-trust trusts every window. Tests: cargo test -p app workspace_trust.

  • An untrusted window starts the host with isWorkspaceTrusted: false, without the extensions whose capabilities.untrustedWorkspaces.supported is not true (or that sit inside the workspace, extensionEnablementService._isDisabledByWorkspaceTrust), and without restricted or unregistered workspace settings (configurationService.ts restricted settings). Tests: cargo test -p config untrusted.

  • The startup prompt (showModalOnStart), the request dialog of workspace.requestWorkspaceTrust (concurrent callers wait on one dialog), the Restricted Mode status entry with its markdown hover, and the banner (workbench.banner.restrictedMode.dismissed) are workbench/workspace_trust_view.rs. The dialog is the custom dialog layout (workbench/dialog_view.rs, dialog.ts and dialog.css: 480px minimum, details as markdown paragraphs, the code path in the editor font, buttons with descriptions, focus outline on the text button). ui-pair against the reference with security.workspace.trust.startupPrompt: always: same layout; the product name has no " Dev" suffix.

  • shortcut: a trust change reloads the window (workbench.action.reloadWindow relaunches the process with the same arguments, one window per process); upstream adds and removes extensions in the running host ($deltaExtensions), which the port's host cannot do yet.

  • Test tools run without trust: ui-pair and ref-dom give the reference a fresh --shared-data-dir and security.workspace.trust.enabled: false (ref-user-data.ts, override with SETTINGS), the port gets --disable-workspace-trust; so do pixel-check, api-tests and settings-check, as the reference's integration test runner does.

  • Recently opened (recently_opened.rs, workspacesHistoryMainService.ts): history.recentlyOpenedPathsList in the shared storage, read again when the window gains focus because other processes write it; 500 entries per kind, case-insensitive keys, git files left out (COMMON_FILES_FILTER), entries of other schemes kept untouched. Startup adds the opened folder, workspace or file.

  • Open File, Open Folder, Open Workspace, Close Folder, Open Recent (Ctrl+R picker with remove buttons) and Clear Recently Opened are workbench/workspace_actions.rs; the File menu's Open Recent submenu lists 10 folders, then 10 files, before More... (menubarControl.ts). A folder opens by relaunching the process (one window per process); Cmd on a pick opens a new process; a menu entry that fails to open leaves the list (menubar.ts). ui-pair of the Ctrl+R picker (one recent folder, dark theme): same row layout, label, path, description and buttons.

  • The command line folder and file keep the path as given, without resolving symlinks (windowsMainService.ts has no realpath), so /var/... stays /var/... in labels and the recent list.

  • shortcut: GPUI's open panel takes no file type filter, so Open Workspace shows every file (WORKSPACE_FILTER); upgrade when the panel gets one.

  • Not done: the Workspace Trust editor (workbench.trust.manage, the banner's Manage and the hover's links).

  • Opener (workbench/opener.rs, openerService.ts open): contributed external openers first for web links, then the link validator, then the folder opener (a workspace folder reveals in the Explorer), the code-oss url opener, the default external opener (workbench.externalBrowser via open -a, else the system), command links (only with allowCommands) and the editor (#L<line>,<col> selection). Notification links, marker code links and vscode.open with a web link go through it; env.openExternal is MainThreadWindow.$openUri.

  • Link protection (trusted_domains.rs, workbench/url_actions.rs): an untrusted http(s) link asks "Do you want Code - OSS to open the external website?" with Open, Copy and Configure Trusted Domains; Manage Trusted Domains opens trustedDomains:/Trusted Domains.jsonc with the reference's help text, saving it writes http.linkProtectionTrustedDomains. Editor links (links.ts) and webview links (mainThreadWebviews.ts onDidClickLink) open with fromWorkspace: a command link of an untrusted workspace asks for trust, a web link of a trusted workspace skips the prompt unless workbench.trustedDomains.promptInTrustedWorkspace.

  • Protocol urls (workbench/url_handler.rs): code-oss://file/<path>:<line>:<col> opens after the security.promptForLocalFileProtocolHandling prompt, code-oss://<publisher.name>/... reaches the extension's registerUriHandler after the "Allow '{0}' extension to open this URI?" prompt (confirmed ids in extensionUrlHandler.confirmedExtensions). shortcut: the app bundle registers no URL scheme, so --open-url <url> hands the url in; $asExternalUri resolves only file system provider resources (no tunnels, no remote).

  • Security review of the opener and URL code (commit 295153609aa, security-review skill): no findings. Traced: --open-url (a CLI flag, trusted) into url_handler.rs (file urls and extension urls each behind their prompt); extension $openUri/$asExternalUri and notification links into opener.rs (command links only with allowCommands, which only notification links pass, as notificationsViewer.ts does); workbench.externalBrowser into open -a <app> <url> (argument vector, no shell; the setting is restricted, so an untrusted workspace cannot set it); trusted domain globs in trusted_domains.rs (a malformed pattern trusts nothing).

  • Not done: Simple Browser (out of scope), the user activity service ($onDidChangeWindowActive, isActive stays true).

  • workbench.action.files.newFile (fileCommands.ts): a save dialog in defaultFilePath (the folder of the last active file, else the first workspace folder, else home) named fileName or Untitled.txt; the file is created empty and opens pinned. Test: cargo test -p app new_file_creates.

  • workbench.action.files.showOpenedFileInNewWindow starts another app process on the active file; code-gpui <file> (a path that is neither a folder nor a .code-workspace file) opens an empty window with the file, as windowsMainService.ts does.

  • Command sweep of workbench/contrib/files against the port: workbench.action.files.saveEditors and revertEditors are ids of notification actions, not commands (n/a); explorer.download and explorer.upload are web and remote only (n/a). Owned by code merged in port-integrate after this branch's base (e9ae1460): Save As, Save without Formatting, Toggle Auto Save, textFileSaveErrorHandler and the elevated write (milestone 8 text files), the empty Explorer view (milestone 11). Wait for that code here: the compare commands (compareFiles, compareSelected, selectForCompare, compareFileWith, compareNewUntitledTextFiles, compareWithClipboard, compareWithSaved) need the milestone 14 diff editor; the Open Editors view (focusOpenEditorsView, openEditors.closeAll, openEditors.newUntitledFile, saveAllInGroup, closeGroup) needs the milestone 11 view panes. Wait for section 11 services still todo: explorer.openToSide and toggleEditorGroupLayout (editor groups), explorer.openWith (the editor resolver), the dirty files badge (the activity service), the Explorer decorations for symlinks and unresolvable roots (the decorations service), the binary, missing file and folder placeholders of textFileEditor.ts with their actions workbench.files.action.openFolder, workbench.files.action.reveal and workbench.files.action.createMissingFile (the editor placeholder). workbench.files.openFile is only a telemetry event id (n/a).

  • Workspace folder editing (workbench/workspace_editing.rs; workspaceEditingService.ts browser and electron-browser, configurationService.ts doUpdateFolders, workspacesManagementMainService.ts createUntitledWorkspace): updateFolders, addFolders and removeFolders write the workspace file's folders through jsonEdit (paths relative to the file where possible, getStoredWorkspaceFolder), then the window follows in place: the Explorer roots, the folder settings layers (Settings::write_workspace_folders), the host's $acceptWorkspaceData and its search folders, the file watcher, and a host restart when the first folder changed (WorkspaceChangeExtHostRelauncher, not while extension tests run). An edit of the workspace file on disk takes the same path. In a folder or empty window, adding (or replacing or removing the folder) creates an untitled workspace <user data>/Workspaces/<id>/workspace.json ("Untitled (Workspace)", not in the recent list) and enters it. Commands: addRootFolder and Add Folder to Workspace (dialog "Add Folder to Workspace", Add), Remove Folder from Workspace (picker "Select workspace folder"), removeRootFolder on the Explorer's roots, Save Workspace As (pickNewWorkspacePath, rewriteWorkspaceFileForNewLocation, trust of the new file, "Unable to save workspace" when another window has it), Duplicate Workspace (copyWorkspaceSettings); File menu group 3_workspace and the Explorer context group 2_workspace. $updateWorkspaceFolders shows the "Extension '{0}' added 1 folder to the workspace" status for 10 s. Closing or leaving an untitled workspace asks "Do you want to save your workspace configuration as a file?" (window.confirmSaveUntitledWorkspace, the "Always discard" checkbox). A dropped folder's "Add Folder to Workspace" adds it. Tests: cargo test -p config workspace::, cargo test -p app workspace_editing.

  • Entering a workspace switches the window in place as nativeWorkspaceEditingService.ts enterWorkspace: the extension host stops, the settings read the workspace's layers, the backups move (moveBackupFolder), the workspace storage is copied (storageService.switch(preserveData)), the Explorer, trust and recently opened follow, then the host starts again. Tests count the host start without a host process (a test's Workbench has no host_launch). A non-default profile is not associated with the new untitled workspace (setProfileForWorkspace), a gap on the ledger row.

  • shortcut: the folder picker of Remove Folder from Workspace shows no ROOT_FOLDER icon; Seti, the default file icon theme, has no folder icons.

  • An empty area Explorer press stands for the only root (onContextMenu): its resource keys apply, so Reveal in Finder, Open Timeline, Copy Path and Copy Relative Path show there as in the reference.

  • Compare commands (workbench/file_compare.rs, fileCommands.ts and fileActions.ts): Compare Active File with Saved (Cmd+K D; the showModifications side holds the file as on disk, label "{name} (in file) ↔ {name}"), Select for Compare and Compare with Selected (resourceSelectedForCompare), Compare Selected (two Explorer rows, listDoubleSelection), Compare Active File With... (Quick Open with its second item active, ItemActivation.SECOND; the picked file is the modified side), Compare Active File with Clipboard (Cmd+K C, clipboardCompare<n> side, "Clipboard ↔ {name}"), Compare New Untitled Text Files; Explorer context group 3_compare. Test: cargo test -p app file_compare.

Milestone 12 verification (port-m12b-verify)

Verified: the rows whose ledger evidence names "M12 verification" (api-tests, port/results/api-tests.md) or "verified at port-m12b-verify" (their named cargo tests). Ported here: the local history Timeline source and entry commands, the search replace preview. Left, by row:

  • Workspace folder editing, the compare commands, workspace undo, the replace preview updates, open editors in the text search, the gallery install for an extension's URI and the Workspace Trust editor are ported in this branch (see the paragraphs above and the ledger rows). Left, by row:
  • Second pass (this session): port/tools/ui-pair foreground key and hotkey steps first bring_to_front the window and leave it there, so a chord's keys reach an active window; a later background step to the then frontmost reference is dropped, so m12/compare-saved.json holds the chord alone. Ported: Find in Folder... (filesExplorer.findInFolder, search.mode editor modes too), Open in Integrated Terminal and Open in External Terminal (terminal.explorerKind, defaulted in the Explorer's context: the electron-browser setting is not in core-settings.json), Workspace Trust Edit Path and the Up/Down section navigation with their focus outlines, the high contrast outline of a focused list without a focused row (Explorer, Search, Timeline), the diff tab's dirty mark (its modified side's), the search message wrapping between words, and a context menu opened by a mouse down keeps its focus (window.prevent_default() in show_context_menu: the tracked focus handle under the pointer took it back, so the Explorer's title actions stayed shown under the menu).
  • Checked by ui-pair (Studio, /tmp/m12v-g1): m12/compare-saved.json (the chord now works in both; left: the reference's 1.147 breadcrumbs editor type picker "Text Diff Editor" (editorTypePicker.ts, not ported, workbench/browser/parts/editor) and the diff's modified side opening at Ln 1, Col 1, where the port shares the text editor's cursor: one OpenEditor per model), m12/icons.json hc (the Explorer outline matches), m12/search-editor.json (matches), m12/search-replace.json (the second cmd+shift+h and the click into Replace reached neither app, and background typing lost the shift of "THE"; the message wrap is fixed after this run, not rerun).
  • Third pass (port-m12b-verify after merging port-integrate): <view id>.focus "Focus on {0} View" for the built-in views (Explorer, Outline, Timeline, Search, SCM, Run, Testing, the extensions views, workbench.action.problems.focus; view_containers.rs register_view_focus_commands, cargo test -p app focus_view_commands). The diff editor's modified side is its own OpenEditor of the model (DiffInput.modified_editor): own cursor, scroll and view zones, the cursor on the first change as revealFirstDiff (cargo test -p app file_compare). Timeline: Down moves the focus without selecting (no selectionNavigation), Shift+F10 opens the focused row's menu, and the Outline and Timeline headers show their actions while the pane has focus (.pane:focus-within). The bundle's open-url event reaches the last active window (on_open_urls in main.rs). ui-pair type steps take foreground and send capitals as shift plus the letter; bring_to_front under a sheet passes.
  • Checked by ui-pair (Studio, /tmp/m12c): search-replace.json, timeline.json, compare-saved.json (Ln 7, Col 1 in both), find-in-folder.json (search.mode newEditor), folder-terminal.json, explorer-ops.json (macOS renames on Return, not F2: F2 never reached either app) and the docs folder menu match. Left by them:
    • Done in the fourth pass (below): the editor type picker for diffs, the Timeline toolbar tab stop, "fish - docs", the in-place trust change. Fifth pass: workspace-folders.json folder-pick matches (the header actions under the open quick pick). The "no frames" runs were timeout killing ui-pair while it waited for the GUI lock. GPUI's is_hovered turns false after any key, where Chrome keeps :hover, so pane_hovered (view_panes.rs) tests the pointer against the pane's last bounds. The fixture now hovers the pane after Escape: cua's activation puts GPUI's pointer back at the parked cursor, and Chrome gets no such event.
  • workbench/contrib/workspace: the Workspace Trust editor (modal, RequiresModal) matches the reference in port/fixtures/ui-pair/m12/trust-editor.json (dark, security.workspace.trust.enabled on, Restricted Mode) except the counts: 97 workspace settings and 7 extensions where the reference has 101 and 12, the settings and extensions the port removed (AI, sign-in, remote).
  • workbench/contrib/localHistory and workbench/contrib/timeline: a click opens the comparison with preserveFocus (the IOpenEvent's editor options after _workbench.diff's arguments, editorCommands.ts mixinContext), so the row stays selected and focused (cargo test -p app a_click_opens_the_comparison_and_keeps_the_row_selected_and_focused); the inset rows match in timeline.json (third pass).
  • Breadcrumbs editor type control (fifth pass, coordinator's request): breadcrumbsControl.ts computes it per group when the group's active editor changes, never when extensions register editors later. An editor opened before registration (the command line's file, the restored editors) keeps none until its group's active editor changes. The port caches it per group (editor_type_controls, keyed by the active editor, its type and the two settings) and sets the startup editors' control to none (set_editor_type_control_before_registration). This replaces the global editor_type_picker_pending. cargo test -p app markdown_editor_files_offer. The chevron box is 13px (the codicon's font size), not 15. pixel-check split now matches the reference's breadcrumbs: dark went from 15593 to 15126 differing pixels, light from 12643 to 12257, hc from 9641 to 8790, hclight from 14302 to 13555. The rest is elsewhere in the window.
  • workbench/contrib/searchEditor and extension/search-result (fourth pass, ui-pair m12/search-editor.json after milestone 13): the reference underlines the file line notes.txt: (a detected link of the extension's DocumentLinkProvider) and draws the active indent guide of the result block; the port draws neither, so the extension's providers do not reach the search editor's model (search-editor scheme, language search-result, selector { language, exclusive: true }); host_sync sends onLanguage:search-result, but nothing in port.log shows the extension activating. Fifth pass: the extension did activate and register (EXTHOST_TRACE=1 port.log). Links were asked for once, on the empty model, because links_content_changed ran only for typed edits. replace_model_text now runs it for the active model, so the underline matches. The port had no active indent guide in any editor: active_indent_guide (editor.rs, getActiveIndentGuide) draws editorIndentGuide.activeBackground1, and it matches. search_editor_mouse_up runs the upstream commands and the native result_definition port is gone. search-editor.json's go-to-location frame (double click on a result line) matches: notes.txt at Ln 3, Col 22.
  • workbench/contrib/files: the editor placeholders (workbench/editor_placeholder.rs, TextDocument.open_error read by read_file_editor_document) cover binary (Open Anyway through the Open With picker; its Text Editor reopens in code-text-binary), too large (Open Anyway, Configure Limit), not found (Create File, and a reopen when the file appears) and the other read errors (Try Again, Show Logs). A placeholder is a tab with no extension host document. cargo test -p app files_that_do_not_resolve an_editor_placeholder_is_a_tab. ui-pair m12/editor-placeholders.json (FOLDER with a.bin, large.txt, and locked.txt at mode 000; SETTINGS {"workbench.editorLargeFileConfirmation":1}) matches in dark, light and hc (the third ui-pair argument), the binary size status entry included. GPUI's wrapper counts the space before a break where Chrome hangs it, so the label's max width is 454px (a shortcut: in editor_placeholder.rs), and "binary or" now wraps as in the reference. Not ported: .max-height-200px hiding the icon, the directory error (Open Folder). The Open Editors view (workbench/open_editors_view.rs, hidden by default): PaneView::set_body_limits gives a pane its own minimumBodySize/maximumBodySize (22px rows, at least explorer.openEditors.visible (9) rows or as many as there are, at most the row count or minVisible beside other views); group rows (GROUP n, Save All in Group, Close Group) from two groups on; explorer.openEditors.sortOrder; the "{n} unsaved" badge (a click opens the first dirty editor; the dirty count now counts a split copy once); the four title actions; the row's close action at its start, a dot while dirty; the row hover with the tab's title; drag and drop of rows onto rows and group rows; workbench.files.action.focusOpenEditorsView shows, expands and focuses it. cargo test -p app open_editors body_limits_clamp. ui-pair m12/open-editors.json (FILE=notes.txt: dirty, split, focus, hover, context menu) matches except the context menu. A row's right click shows MenuId.OpenEditorsContext (fileActions.contribution.ts and its electron-browser twin: Open to the Side, Reveal in Finder, Reopen Editor With, Copy Path, Save, Revert, the compare items, Close, Close Others, Close Saved, Close All) with the row's editor as the context, the row keeping its focus outline while the menu is up (.context-menu-visible .last-focused); a sticky row shows the Unpin action (pinned, pinned-dirty while dirty); a middle click closes a row unless preventPinnedEditorClose keeps it. The list takes the keyboard while openEditorsFocus: Up, Down, Home, End, Page Up and Page Down move the focused row (focusBorder outline, scrolled into view), Enter opens it pinned, Space opens it as preview and keeps the focus (listService.ts list.select/list.toggleExpand). Upstream binds no Delete in the view (Explorer's moveFileToTrash needs filesExplorerFocus), so neither does the port. Tests: cargo test -p app open_editors (the_keyboard_moves_the_focus_and_opens_rows, rows_show_the_open_editors_menu).
  • Pinned (sticky) editors (editorGroupModel.ts stick/unstick, editorCommands.ts, multiEditorTabsControl.ts): OpenEditor.sticky, sticky editors first in the group; Pin Editor and Unpin Editor (Cmd+K Shift+Enter, the tab menu, activeEditorIsPinned), a drag into or out of the sticky range sticks or unsticks, a new editor opens after the sticky ones; Close All, Close Others, Close to the Right, Close Saved and Close All in Group skip sticky editors (excludeSticky), closeActivePinnedEditor (Command Palette only) closes one; workbench.editor.preventPinnedEditorClose (keyboardAndMouse, keyboard, mouse, never) turns Cmd+W on a sticky editor into a switch to the next non-sticky one and keeps middle clicks; the tab shows the pinned action (pinned-dirty while dirty) that unpins; workbench.editor.pinnedTabSizing compact (28px icon-only, modern UI MODERN_UI_COMPACT_PINNED_TAB_WIDTH) and shrink (80px, label cut); workbench.editor.pinnedTabsOnSeparateRow puts sticky tabs in a 30px bar above the strip while the group has both kinds (two-tab-bars), its active tab a 24px fill inset 2px; the tabs API's isPinned. Inactive tabs show their close action on hover, and tabs abut (the port had 8px after every inactive tab; the reference has it only after the last). showPinnedEditorsInTabBar is not a 1.147.0 setting. The tab bars scroll (workbench/editor_view/tab_scroll.rs; multiEditorTabsControl.ts tabsScrollbar, doLayoutTabsNonWrapping, connectedTabClipping.ts): the wheel scrolls them sideways (scrollYToX), workbench.editor.scrollToSwitchTabs (or Shift) switches tabs instead, the 3px scrollbar (10px with titleScrollbarSizing: large, titleScrollbarVisibility) sits on the strip's top edge with a round slider and spans the sticky tabs too, the active tab is revealed with its shoulders when it or the bar's widths change, the last tab keeps 8px after it, sticky compact and shrink tabs stay in place unless that leaves under 120px (disable-sticky-tabs), and an active tab cut by the bar keeps its cap and shoulder at the bar's edge. GPUI clips a horizontally scrolled box vertically too, so the scrolled box reaches 1px up into the part's top border row. ui-pair port/fixtures/ui-pair/m12/tab-scroll.json (FOLDER of nine files, enablePreview: false, pinnedTabSizing: shrink, two pinned): overflow, reveal to the left, wheel and the scrollbar's fade match. A shrink tab's name keeps its first letter and clips the ellipsis after it ("m…"), as Chrome. A shrink sticky tab's name, lock and badge share one clipped box with 5px after them (.monaco-icon-label), so with no room the name goes and the badge stays: a pinned bad.ts with "1, U" (git and a TypeScript error) shows the badge alone, its glyph columns equal to the reference's and clipped at the same x (ui-pair, cargo test -p app a_shrink_sticky_tab_drops_its_name_before_its_badge). Compact sticky tabs show no badge (multiEditorTabsControl.ts fileDecorationBadges = false). After a native context menu closes, hide_context_menu dispatches a mouse move after the menu-less frame draws, matching Chromium's synthetic mouse move after layout; a tab action under the pointer immediately shows its hover without pointer motion. The tab menu has Copy Breadcrumbs Path (breadcrumbsControl.ts breadcrumbs.copyPath, breadcrumbsPossible, breadcrumbsVisible, breadcrumbsHasSymbols: the active editor's symbol path joined by breadcrumbs.symbolPathSeparator). Tests: cargo test -p app sticky pinned_editors editor_groups editor_menus outline_pane; ui-pair port/results/pinned-editors.md.
  • Session m12-files-done, Explorer and pinned tabs against the reference. Tree indent guides sit 16px into the row (GUIDES_LEFT). The Explorer guide is at the reference's x (138 device px), and a child's file icon starts 9 device px after it in both. Explorer rows get list.hoverBackground. The hover of a plain text target wraps at the 500px of .markdown-hover > .hover-contents (518px box). GPUI's wrapper breaks before a / where Chromium breaks after a -, so a long path's first line ends one segment earlier (Explorer row tooltip: "…/src" against "…/T/ui-pair-"). Decoration badges and the bubble dot are 11px and end 8px from the row's end. Modern UI fontRamp.css sets --vscode-fontSize-label2 and spacing-size80 on .monaco-icon-label::after, over iconlabel.css's 16px and the bubble rule's 14px (CDP on the reference: ::after margin-right 8px, font-size 11px). The pointer entering a list only reveals its scrollbars (scrollableElement.ts _reveal); before this, it left the hover target and dropped every pending tab hover. A context menu leaves the hover target under the pointer (its context view covers it), so after Escape the still pointer gets the hover again. The sticky tab's Unpin Editor hover is an action bar hover (instant delegate, below the action, centered). Tests: cargo test -p app hover unpin_hover (the_unpin_hover_comes_back_after_the_tab_menu_closes, a_right_clicked_target_gets_its_hover_after_the_menu_closes; both fail without their fix). ui-pair m12/explorer-guides.json (row hover, guides, selection, tooltip) and m12/pinned-tabs.json. pinned-tabs now starts with the pointer on the editor: a port launched under a pointer left over the Explorer showed the folder header actions. Both match except the tooltip line break above and, in pinned-tabs' pinned-dirty and pinned-hover, the reference's TypeScript completion list after the typed x, which the port did not show in this run (editor/contrib/suggest is verified elsewhere; not checked here). The readonly lock-small tab badge still uses iconlabel.css's 90% (11.7px); by the same Modern UI rule it should be 11px (readonly row, not checked). Difference left (pinned-tabs close-sticky-keyboard): after Cmd+W the reference keeps the pin action's hover background and icon under the still pointer; the port draws the action at rest (pinned-dirty, no background) until the pointer moves, because gpui reports no hover after keyboard input (as the sash after Cmd+B, milestone 11 notes). The Unpin Editor hover stays in both.
  • Session port-compare-fix, m12/compare.json (notes-open, compare-with-picker, compare-with, file-menu) against the reference: Explorer "Open With...", the diff's original side as its own editor, inline diff char changes and +/- signs, the outline cache keyed by provider handles (README.md > # Workspace in the breadcrumbs), the menu separator as a filled 1px box (2 device rows as the reference), 3px after a breadcrumb symbol icon, 4px before a pick separator's buttons ("recently opened" at the reference's x). The Outline view of a diff editor shows "The active editor cannot provide outline information." (outline_message; a diff input has no getOriginalUri) while the breadcrumbs keep the modified side's symbols, and outline.focus over a message leaves the focus where it was (the tree it focuses is hidden). Left: the breadcrumb separator chevron sits 2 device px right of the reference's after a label (also in notebooks, see m17), so # Workspace follows it; the scrollbar slider under the pointer (cua clicks arrive without a pointer move); the "Text Diff Editor" label 1px left (also in a plain editor); the tab label 1 device px off. ui-pair's reference cache can store a broken reference (a lost Return in gui-vm1 left the picker open); REF_FRESH=1 rebuilds it.
  • Fourth pass (port-m12b-verify, /tmp/m12d to m12g on the Studio):
    • Trust changes in place: workspace_trust_changed deltas in the extensions trust enables (Job::Delta), or restarts the host without them on Don't Trust (as the transition participant does), sends the restricted keys Settings::update_workspace_trust now returns and $onDidGrantWorkspaceTrust. Not done: $onDidChangeWorkspaceTrustedFolders when the trusted folders change (proposed API).
    • The editor type picker (milestone 17 built it for notebooks; this pass adds diffs, the exclusive filter, the "Editor: X" hover, the element anchor, custom documents' breadcrumbs). The menus now match the reference's width and right edge (editor-type-menu, editor-type-diff-menu). Differences left in editor-type-diff and editor-type-diff-menu, outside the picker: the reference draws the Explorer's notes.txt row with its focus outline, and the diff's original side with line 1's number as the current line.
    • Ordering: the m17 picker sorts the text editor first, then by rank; upstream findMatchingEditors sorts by rank then glob length with the text editor at builtin rank for *, so a builtin editor with a longer glob (image preview) comes before it. Not visible in the pairs.
  • Workspace Trust editor: "[N workspace settings] are not applied" leaves out deprecated restricted settings; upstream counts one when the workspace sets it (restrictedSettings.workspace), which the port's untrusted workspace layers drop while parsing.
  • Empty workspace Explorer: the port wraps "To learn more about how to use Git ..." one word earlier than the reference (workspace-folders.json, untitled-workspace frame).

Milestone 8: editor viewport and editing commands

Scope (milestone 8): scrolling with real visible ranges and the MainThreadTextEditors and MainThreadDocuments requests, then multi-cursor and editing commands, find/replace, folding, minimap, sticky scroll. Shipped: scrolling and the MainThread requests, then multi-cursor, then folding, then the minimap; the rest is open (last line of this section).

Done when (first item): api-tests vscode API - editors passes as in the reference; the text editor tests of vscode API - window that need one editor group only pass; pixel-check file and main windows unchanged.

  • editor/view.rs ports the scroll math of linesLayout.ts, viewLayout.ts and scrollbarState.ts: scrollBeyondLastLine leaves one viewport less one line below the last line, the wheel moves 50 px per delta line (mouseWheelScrollSensitivity 1, fastScrollSensitivity 5 with Alt), sliders are at least 20 px. Reveal follows viewModelImpl.revealRange: a keyboard move keeps cursorSurroundingLines and the sticky scroll lines in view; the API's TextEditorRevealType centers or tops the range.
  • Scrollbars fade like scrollbarVisibilityController.ts: shown on scroll or hover, hidden 500 ms after, fade out 800 ms. The scroll shadow is scrollbar.shadow under the top edge once scrolled.
  • Each editor keeps its own scroll position; switching tabs restores it. Visible ranges reach the host with $acceptEditorPropertiesChanged on every scroll.
  • MainThread requests: exthost/src/main_thread.rs lets the workbench answer a request; the session thread waits on a channel while the GPUI thread runs workbench/host_requests.rs. Requests the host sends meanwhile queue and run after it.
  • Documents are keyed by URI string, so fake-fs: documents of the test extension's file system provider open: the session thread reads them with ExtHostFileSystem.$readFile and saves with $writeFile, as mainThreadFileSystem.ts does through IFileService.
  • Models the host opens without an editor stay 3 minutes after the last reference, as BoundModelReferenceCollection.
  • $tryApplyEdits runs codeEditorWidget.executeEdits: edits apply as one undo step and the selection follows them as a tracked range (AlwaysGrowsWhenTypingAtEdges, intervalTree nodeAcceptEdit).
  • $tryInsertSnippet parses with the snippetParser.ts grammar (tab stops, placeholders, choices, variables, escapes), adjusts indentation like SnippetSession.adjustWhitespace and selects the first tab stop.
  • shortcut: no snippet session: Tab does not move through tab stops, placeholders are not linked, choices are not offered. It belongs to the editor/contrib/snippet row.
  • shortcut: one editor group, so ViewColumn other than One, onDidChangeTextEditorViewColumn and the tab API tests fail; they come with the editor groups row.
  • Multi-cursor (editor/multicursor.rs, editor/edit.rs): the cursors are a Vec<Selection>, the primary first, merged by CursorCollection.normalize (multiCursorMergeOverlapping, the last added cursor keeps its direction). Every edit runs per cursor and applies as one undo step; edits of overlapping cursors drop as in _getLoserCursorMap. Copy joins the selections in document order and stores multicursorText; paste spreads lines or pieces over the cursors (multiCursorPaste: spread). $trySetSelections and $tryInsertSnippet take every range.
  • Drawing: every selection and cursor, primary and secondary cursor colors (editorMultiCursor.*), the current line only with all selections empty, brackets at empty cursors up to 100 selections, cursors in the overview ruler. The status bar follows editorStatus.ts (N selections (M characters selected)). Reveal follows revealAll.
  • Keys: editor/commands.rs maps the upstream ids to functions; each id is a command of the M9 registry and its key comes from keybindings/default-macos.json with its when (editorHasMultipleSelections, editorColumnSelection, foldingEnabled). Cmd+Alt+Up/Down add a cursor above/below, Shift+Alt+I a cursor at each selected line end, Escape removes the secondary cursors then the selection, Cmd+Shift+Alt+arrows and PageUp/PageDown select a column (cursorColumnSelection.ts). addCursorsToTop/Bottom run by id, without a key. Mouse (dispatchMouse, multiCursorModifier alt): Alt+click adds or removes a cursor, Alt+drag extends the last added one, Alt+double/triple click selects its word/line, Shift+Alt+click or drag and the middle button select a column.
  • Find-match multi-cursor (editor/find/multicursor.rs): MultiCursorSession and MultiCursorSelectionController behind Cmd+D, Add Selection to Previous Find Match, Cmd+K Cmd+D, Move Last Selection to Previous Find Match, Cmd+Shift+L and Cmd+F2 (editor.action.changeAll, also in the editor context menu), with editor.selectedTextMatchMode. A session started from an empty cursor sets the find state's option overrides (whole word and match case on, regex off; FindState.overridden keeps the user's values, actual_options is what the query storage saves) until it ends. Upstream ends a session from listeners; the port checks the same events where they reach the find: find_editor_edited (a cursor move or edit it did not make), run_find (a find option change, another model, a selectedTextMatchMode change), and the editor text blur and focus listeners in watch_editor_focus. The Selection menu's 3_multi group is in menus.rs. Not ported: highlightFindOptions, the 100 ms flash of the find widget's option toggles when a session on the find options searches (the port's toggle commands do not flash either); announceCursorChange, the aria alert of the new cursors. SelectionHighlighter draws the selected text's other occurrences (.focused .selectionHighlight, under the word highlights) from refresh_selection_highlights, which runs on every workbench render and searches again only when the query, model version or selections changed; upstream waits 300 ms after an edit or an explicit empty cursor before it updates, the port updates at once. The textual document highlight provider is always registered, so the highlights draw no overview ruler or minimap marks (_SELECTION_HIGHLIGHT_OPTIONS_NO_OVERVIEW) unless editor.occurrencesHighlight is off, which the port does not read yet. Focus Next Cursor and Focus Previous Cursor rotate the cursors in editor/multicursor.rs. Test: cargo test -p app editor::find::multicursor. cursorUndo (Cmd+U) is its own row (editor/contrib/cursorUndo). Gutter clicks select no lines yet, so Alt+click on a line number adds no whole-line cursor.
  • shortcut: $trySetOptions applies tabSize, indentSize and insertSpaces; cursorStyle and lineNumbers wait for their render options. setEndOfLine in $tryApplyEdits is not applied.
  • shortcut: TextDocumentContentProvider documents (bikes: in window.test) and untitled documents ($tryCreateDocument) do not open; they come with their MainThread rows.
  • shortcut: the workbench's own save (Cmd+S) of a file system provider document fails; only $trySaveDocument writes through the provider, until the file service row.
  • Folding (editor/folding.rs, editor/folding_controller.rs): foldingRanges.ts, foldingModel.ts, hiddenRangeModel.ts and indentRangeProvider.ts with their unit tests (cargo test -p app editor::folding). Regions come from indentation and the language's folding.markers; manual ranges from selections survive provider updates (sanitizeAndMerge). Hidden lines are dropped from drawing, cursor moves skip them, an edit or cursor on a hidden line unfolds its region (revealCursor), and the folding actions reveal the cursor centered if outside the viewport.
  • Gutter: the folding lane after the line numbers shows codicon-folding-expanded/-collapsed on hover (fade as folding.css), always for collapsed regions; a click toggles, Alt the regions around, Shift or middle button the regions inside. A folded line ends in the ⋯ placeholder with editor.foldBackground; clicking after the line end unfolds.
  • Keys: Cmd+Alt+[ fold, Cmd+Alt+] unfold, and the Cmd+K chords (Cmd+K Cmd+0 fold all, Cmd+K Cmd+J unfold all, Cmd+K Cmd+[ / ] recursively, Cmd+K Cmd+1..7 levels) through the M9 chord dispatch (cargo test -p app folding_and_cursor_keys_run_through_the_keybindings).
  • Editor view state (editor/view_state.rs; editorWithViewState.ts, EditorMemento, TextFileEditor): a file editor that leaves the group (closed, replaced by a preview, Save As) keeps its cursors (saveCursorState), scroll (firstPosition and firstPositionDeltaTop) and folds (the folding contribution's collapsedRegions mementos with their line checksums, foldedImports) per file URI for group 0, the newest 100; the next editor of that file takes them back unless workbench.editor.restoreViewState is off. On quit the open editors' states are added and the cache is written to workspace storage as memento/workbench.editors.files.textFileEditor (textEditorViewState, LRUCache.toJSON pairs, oldest first). The port does not reopen the editors at startup, so the state comes back when a file is opened again. Test: cargo test -p app view_state.
  • Extension folding (workbench/folding_providers.rs, syntaxRangeProvider.ts, $registerFoldingRangeProvider through language_features.rs): a model whose language has providers folds by their ranges (sanitizeRanges, editor.foldingMaximumRegions), editor.defaultFoldingRangeProvider keeps only that extension's, a provider event or a settings change asks again, none answering an array falls back to indentation; editor.foldingImportsByDefault collapses the first imports regions once per model. The setting's enum is built from the running extensions when the registry is (_updateConfigValues): All, then the extensions with main or browser, Programming Languages first, each group by name.
  • Folding update delay (trigger_folding_model_changed, folding.ts updateScheduler): an edit only moves the regions and hidden lines with it (accept_replace); the indentation or provider ranges are computed again after the updateDebounceInfo delay, 300 ms (min * 1.5) first, then the average update time of the model clamped to 200 ms..40 s. On the 52k-line TypeScript file this took 7.6 ms off each typed char.
  • The scroll position truncates to whole pixels like the editor's Scrollable (forceIntegerValues), so a centered reveal in an odd height does not land on a half pixel.
  • Mouse cursors follow the reference CSS: text over .view-lines (monaco-mouse-cursor-text), default over line numbers, glyph margin, overview ruler, scrollbar sliders and the scroll shadow; pointer over folding icons, the ⋯ placeholder (folding.css), the title with tabs, close buttons and breadcrumbs (editortabscontrol.css, breadcrumbsWidget.css) and the editor actions (actionbar.css, the container default).
  • An edit sends the host new visibleRanges when the visible lines changed (editor_content_listeners in workbench/model_events.rs), so unfolding by an edit reaches the host without a scroll.
  • Minimap (editor/minimap.rs, workbench/minimap_view.rs): editorLayoutProvider minimap layout, MinimapLayout.create with its slider, MinimapCharRenderer and renderLines into one image, with the upstream unit tests (cargo test -p app minimap). The text area narrows by the minimap's width. Decorations as renderDecorations: selections in minimap.selectionHighlight, word highlights in minimap.selectionOccurrenceHighlight, collapsed folds in editor.foldBackground; a hidden line's decoration lands at the end of its fold line. The slider shows on hover and for 500 ms after a scroll, fades 100 ms, drags the editor; a press off the slider reveals that line centered. The shadow shows when the text is scrolled horizontally short of its end.
  • Section headers (editor/section_headers.rs): findSectionHeaders.ts with its tests: #region labels from the folding start marker's label group, MARK: comments (markSectionHeaderRegex) kept only on a comment token, with the block comment end stripped. Drawn as _renderSectionHeaders: 500 system font at sectionHeaderFontSize (9px, clamped 4 to 32), sectionHeaderLetterSpacing canvas pixels between letters (1, clamped 0 to 5), a 70% minimap background, labels of nearby lines stacked, long labels split around an ellipsis. showRegionSectionHeaders and showMarkSectionHeaders turn each kind off; a markSectionHeaderRegex that does not compile falls back to the default, as EditorMinimap.validate does (Oniguruma compiles it, where upstream asks JavaScript's RegExp).
  • Minimap settings (editorOptions.ts EditorMinimap): every editor.minimap.* is read (size, side, showSlider, autohide, renderCharacters, maxColumn, scale, the section headers). With side: left the margin and the content move right by the minimap's width; fill and fit sample long files (MinimapSamplingState). A right press on the scrollbars or the minimap shows _showScrollbarContextMenu (Minimap, Render Characters, Vertical size, Slider), disabled while the minimap is off or in a diff editor. Gaps: the context menu widget has no submenus, so Vertical size and Slider show as flat Label: Choice groups between separators (the widget belongs to platform/contextview, milestone 9); scale 3 and above stretch the scale 2 character table where upstream samples the font; the sampling is computed again on each frame where upstream keeps it across edits; autohide: scroll reacts to scroll top changes only. View: Toggle Minimap flips editor.minimap.enabled; off, the minimap takes no width. Section headers are found again on the UI thread for each model version, where upstream asks the editor worker 250 ms after the last edit. Tests: cargo test -p app minimap editor_menus.
  • The reference now draws the minimap (port/tools/ref-screenshot drops editor.minimap.enabled: false). The port's screenshot waits 1.5 s after activation even without keys, as the reference does with a file, so the scrollbars shown at open have faded.
  • Folding moves a hidden cursor to its fold line as an api cursor change, so the word highlight runs again for the new position (wordHighlighter.ts _onPositionChanged).
  • Sticky scroll (editor/sticky_scroll.rs, workbench/editor_view/sticky_scroll_view.rs): the folding-provider model (_fromFoldingRegions, each scope one line past its region), getCandidateStickyLinesIntersecting and findScrollWidgetState with the upstream unit tests (cargo test -p app sticky). Drawn as stickyScrollWidget.ts and stickyScroll.css: the gutter in editorStickyScrollGutter.background with line numbers and folding icons (collapsed always, expanded while the pointer is over the gutter, 0.5 s fade), the text in editorStickyScroll.background with token colors, hover in editorStickyScrollHover.background with a pointer cursor, the last line sliding up under the others, 0 4px 2px -2px shadow in editorStickyScroll.shadow (scrollbar.shadow), bottom border in high contrast. A click goes to the start of the clicked span (getColumnOfNodeOffset) or the line's start past the text, Shift click reveals the scope's end centered, Shift over a line shows its end line, an icon click toggles the region and keeps it under its sticky line. Keyboard: editor.action.focusStickyScroll focuses the last line (focusBorder outline), up and down move, Enter goes to the line, Escape back to the editor, through the default keybindings and stickyScrollFocused. editor.action.toggleStickyScroll writes editor.stickyScroll.enabled; both are in the Command Palette. maxLineCount (at most a quarter of the editor) also pads keyboard reveals (Viewport.sticky_scroll_lines); scrollWithEditor moves the text with the horizontal scroll.
  • A right press on sticky scroll shows MenuId.StickyScrollContext (_onContextMenu) with the two toggles under their checked titles, Breadcrumbs (breadcrumbs.toggle, which now also hides the breadcrumbs through breadcrumbs.enabled) and Sticky Scroll. Not done in sticky scroll: the Cmd hover underline and click to go to definition (no definition provider in this branch; milestone 13), the View > Appearance menubar entry (no Appearance submenu; milestone 11), defaultModel outlineModel (the outline service, milestone 13) and indentationModel.
  • Find logic (editor/find/): textModelSearch.ts (search.rs), replacePattern.ts, findState.ts, findModel.ts with findDecorations.ts (model.rs) and CommonFindController with the find actions' run functions (controller.rs), with the upstream tests of textModelSearch.test.ts, replacePattern.test.ts, findModel.test.ts, find.test.ts and findController.test.ts (cargo test -p app editor::find, 117 passed). Regexes run on Oniguruma (onig) with JS \u escapes rewritten. editor.find.globalFindClipboard (off by default) reads and writes the macOS find pasteboard (NSPasteboardNameFind) with upstream's commented-out clipboard tests and issue #151311. Replace All without a find scope over 19999 matches or more is _largeReplaceAll: one whole-text edit keeping the primary selection (20100 matches: 0.12 s, where one edit per match took 24 s on the Studio; cargo test -p app replace_all_past_the_matches_limit). execute_edits without end selections now collapses a grown caret to its end (readSelectionFromMarkers); before, it selected the inserted text.
  • Find widget (workbench/find_widget.rs): findWidget.ts with findWidget.css, findInput, replaceInput and toggle.css, laid out from the reference's DOM (measured over CDP, dark and hc): 419 by 33 px (62 with replace) at the editor's top right, 8 px corners, editorWidget.* and widget.border colors, 0 0 12px shadow, 200 ms slide. Find and replace inputs are InputId::Find and InputId::Replace on the shared input element; option toggles (Match Case, Whole Word, Regex, Preserve Case) in inputOption.*, "x of y" or "No results" in errorForeground, previous, next, Find in Selection (list-selection codicon), close, replace chevron, Replace and Replace All, the left sash (drag past 419 px, double click toggles the widest) with col-resize. The 16 find commands (FIND_IDS) run the controller on the active editor; typing searches, Tab and Shift+Tab move between the inputs, Cmd+Down focuses the editor, startFindReplaceAction focuses the replace input when the find input has the focus. Edits and cursor moves outside the find update its matches; switching editors rebinds the controller (onDidChangeModel). With editor.find.addExtraSpaceOnTop the widget's height is whitespace above line 1 (Viewport.top_whitespace, counted by every line top, the scroll height, sticky scroll and the overview ruler); showing it moves the scroll by that height unless a seeded selection sits under the widget (adjustEditorScrollTop); the research's reveal runs before the zone exists, as upstream, so a reopened widget keeps the text in place. The SimpleButtons, the replace chevron and Find in Selection are focusable (button_focus): a mouse down focuses them, the focus draws the workbench focusBorder outline, Enter and Space trigger them, and their focus counts as editorFocus. Replace and Replace All reveal the moved cursor (cursor.ts _executeEdit, sticky scroll padding included) before the research reveals the next match. Click-tested against the reference with port/tools/ui-pair (FILE=notes.txt): open, typing, toggles by click and Alt+Cmd+C/W/R, next and previous, replace, Replace All, close, reopen, Escape, history. editor.find.findOnType off leaves the search string to Enter in the find input (its keydown runs before the keybindings, as the input's listener does before the window's), editor.find.cursorMoveOnType off keeps the cursor while a research would move it. Test: cargo test -p app the_find_widget replace_reveals_the_cursor find_widget::tests.
  • Find decorations (find_line_decorations): findDecorations.ts on each view line: findScope (editor.findRangeHighlight*) and rangeHighlight across the line, findMatch (editor.findMatchHighlight*, through the line break on a multi-line match) and currentFindMatch (editor.findMatch*, 2 px border) on top, editor.findMatch(Highlight)Foreground as text color; color defaults from editorColorRegistry.ts and editorColors.ts, checked against the reference in dark and hc (resolves_like_the_reference_workbench, screenshot compare).
  • shortcut: High Contrast find match and range highlight borders are dashed; GPUI has no dotted border.
  • Find keybindings (keyboard.rs key_context, findModel.ts): findWidgetVisible, findInputFocussed, replaceInputFocussed; the widget's inputs count as editorFocus and inputFocus, so the default table's Enter, Shift+Enter, Escape, Cmd+Enter, Alt+Enter, Alt+Cmd+Enter, Shift+Cmd+1 and Alt+Cmd+C/W/R/L run the find commands from the inputs too. editor.actions.findWithArgs takes IFindStartArguments; editor.action.goToMatchFindAction is a quick input box (Owner::GoToMatch) that moves to the typed match, 1-based or negative, with toFindMatchIndex's validation message and a range highlight on the match while open. The Command Palette lists the active editor's find actions with upstream labels and preconditions (command_palette::EDITOR_ACTIONS, getCodeEditorCommandPicks). Tests: cargo test -p app the_find_widget go_to_match editor_actions_show.
  • Find history and query state (history.rs HistoryNavigator from base/common/history.ts, find_widget.rs): the find and replace inputs keep HistoryInputBox histories (100 entries), filled 500 ms after a state change (_updateHistory) and saved as JSON arrays under workbench.find.history and workbench.replace.history in workspace storage while editor.find.history and editor.find.replaceHistory are workspace. Up and Down (history.showPrevious, history.showNext, contexts historyNavigationWidgetFocus, historyNavigation{Backwards,Forwards}Enabled) walk them; the focused input's placeholder gets " (\u21C5 for history)" once it has one. saveQueryState writes editor.matchCase, editor.wholeWord, editor.isRegex, editor.preserveCase to workspace storage on change; loadQueryState reads them when the workspace opens and when the controller binds a new model. Tests: cargo test -p app history the_find_widget.
  • Find markers (find_marks, findDecorations.ts): the matches in editorOverviewRuler.findMatchForeground in the overview ruler's center lane after word highlights and brackets, the current match painted last (z-index 10, then 13); past 1000 matches the ruler gets line ranges joined within max(2, ceil(3 / pixels per line)) lines and the minimap only the current match. The minimap draws them inline in minimap.findMatchHighlight (80% of the ruler color, editor.findMatchHighlightBorder in high contrast) after its z-index 0 decorations. Tests: cargo test -p app the_find_widget merged_match_lines resolves_like_the_reference.
  • Word highlights while finding: wordHighlighter.ts _run reads the selection only while the editor has text focus, so a match selected from the find input keeps the word highlighted before (run_find); an edit's cursor change stops them and only a later find selection brings the word back, so Replace All leaves none; closing the widget focuses the editor and highlights the selection's word (onDidFocusEditorText). Test: cargo test -p app the_find_widget.
  • Command Palette: EDITOR_ACTIONS also lists the folding actions (foldingEnabled), the multi-cursor actions and Delete All Left/Right (!editorReadonly) with upstream titles. Editor actions without a palette entry upstream stay out: EditorCommands such as the find toggles, Replace, Replace All, Select All Matches and the cursorColumnSelect* commands. Test: cargo test -p app editor_actions_show.
  • Status bar: the selection, indentation, encoding, EOL and language items show the pointer cursor and keep the width of their tnum-shaped label. Each click runs its editorStatus.ts command: Go to Line, changeEditorIndentation1, Change File Encoding, Change End of Line Sequence, Change Language Mode. The indentation label shows Spaces: N (Tab Size: M) when the indent size differs; the encoding label is the encoding's labelShort.
  • Editor status pickers (workbench/editor_status.rs, editor/indentation.rs): showIndentationPicker ("change view": Indent Using Spaces/Tabs and Change Tab Display Size with the 1 to 8 size picker; "convert file": Detect Indentation, Convert Indentation to Spaces/Tabs, Trim Trailing Whitespace (Cmd+K Cmd+X)), ChangeEOLAction, ChangeLanguageAction (languages by name with their file icons, Auto Detect, Configure File Association writing files.associations to workspace or user settings, Configure language based settings opening settings.json) and ChangeEncodingAction (Reopen or Save with Encoding over the 49 SUPPORTED_ENCODINGS, configured first, a BOM/UTF-16 guess on top). indentation.ts getIndentationEditOperations and trimTrailingWhitespaceCommand.ts are ported with their upstream tests. A language change re-detects indentation like _setModelOptionsForModel and reaches the host with $acceptModelLanguageChanged; $changeLanguage answers languages.setTextDocumentLanguage. files.associations applies when a document opens. $trySetOptions takes "auto" for tabSize and insertSpaces (detect indentation) and "tabSize" for indentSize. Test: cargo test -p app editor_status indentation.
  • shortcut: Auto Detect guesses from the file name and first line only (no languageDetection model); the encoding guess has no jschardet; the read-only pick of the indentation picker never shows (no read-only editors).
  • Click-tested with port/tools/ui-pair (FILE=notes.txt, status bar clicks with "foreground": true; a background click does not reach the port's status bar): the indentation, encoding, EOL and language pickers match the reference row for row, except the reference's "Agent (chatagent)" language (chat, removed).
  • The quick input stays open while the window is inactive: GPUI reports a window deactivation as focus out, where the DOM keeps the active element and trackFocus sees no blur. cua-driver's background keys deactivate the window for a moment, so before this fix port/tools/ui-pair closed the palette and Quick Open on the first key (also on 19d56b0f, so not a regression of the pickers), and so did switching apps. Test: cargo test -p app the_quick_input_stays_open.
  • Word highlights stop on blur (Workbench::watch_editor_focus, wordHighlighter.ts onDidBlurEditorWidget/onDidFocusEditorText): a focus out of the editor clears them unless the focus stays inside it (a window deactivation), a focus in runs them again. --screenshot draws a frame 100 ms before saving, so the capture holds the caret phase of that moment. Test: cargo test -p app the_word_highlight_stops.
  • The unicode banner is focusable (bannerController.ts tabIndex = 0) and inside the editor widget: a press on it moves the focus there and keeps the highlights; its Disable action removes the banner, the focus leaves the widget and the highlights stop, as upstream. A window deactivation is a GPUI focus out with the DOM focus kept, so the reactivation runs no query: an edit made while inactive (a dialog's action, the unusual line terminators removal) leaves them off. ui-pair on many.ts (banner, Disable) and ult.txt (prompt, Remove): no highlight after either on both sides; the banner link sits 1 px off the reference. Tests: cargo test -p app the_banner_action the_word_highlight_stops.
  • Trap: a negative check that restores a source file with its old mtime leaves cargo's newer test binary in place, so the next run tests the restored-away code. Touch the file after restoring.
  • Comments (editor/comment.rs, editor/contrib/comment): LineCommentCommand and BlockCommentCommand per selection, run as one batch by execute_commands (edit.rs, CommandExecutor.executeCommands with tracked selections), the comment tokens from the language configuration of the language at the line (Syntax::language_at). editor.action.commentLine (Cmd+/), addCommentLine (Cmd+K Cmd+C), removeCommentLine (Cmd+K Cmd+U), blockComment (Shift+Alt+A), with editor.comments.insertSpace and ignoreEmptyLines; Edit menu group 5_insert and the palette. Tests: cargo test -p app editor::comment comment_keys (the 50 cases of lineCommentCommand.test.ts and blockCommentCommand.test.ts). ui-pair: Cmd+/ and Shift+Alt+A give the reference's text; a chord right after a background key sometimes drops, because cua-driver's background keys deactivate the window and the chord timer leaves on an inactive window as _documentHasFocus does.
  • Screenshots hide the input carets: ref-screenshot sets caret-color: transparent, the port's --screenshot sets Workbench::input_carets_hidden, so the find and quick input frames no longer depend on the blink phase. In high contrast the quick input sits inside the 1px window border, as the reference's workbench container, and its focused row gets the dotted listInactiveFocusOutline (dashed in GPUI).
  • Line operations (editor/lines_operations.rs, editor/contrib/linesOperations): CopyLinesCommand, MoveLinesCommand and SortLinesCommand per selection through execute_commands, the other actions through execute_edits between undo stops, each with its upstream keys, the Selection menu group 2_line and the palette; the case transforms register from CaseTransform::ALL. Computed end selections are validated as Cursor.setStates does (valid_position in edit.rs: a line past the document becomes the end of the last line, which Delete All Right relies on). Moved lines reindent by the language's rules (MoveLinesCommand with editor.autoIndent). Tests: cargo test -p app editor::lines_operations line_operation_keys, all of moveLinesCommand.test.ts. ui-pair: Alt+Down, Shift+Alt+Down, Ctrl+J give the reference's text and cursor.
  • Go to Line/Column and Go to Offset (workbench/quick_access/goto_line.rs, gotoLineQuickAccess.ts over editorNavigationQuickAccess.ts): workbench.action.gotoLine (Ctrl+G) and workbench.action.gotoOffset show quick access with : and ::, both in the Command Palette. parsePosition with line, line:col, line,col, line#col, negative values from the end, visible columns over tabs, UTF-16 offsets, and the zero-based offset toggle (index-zero input button, gotoLine.useZeroBasedOffset in application storage). While the value changes the line is revealed in the center with rangeHighlight and a full-lane editorOverviewRuler.rangeHighlightForeground mark; Enter moves the cursor there (code.jump) and focuses the editor, accept in background keeps the picker, Escape or another prefix restores the view state. With editor.lineNumbers relative the editor numbers as on while the picker previews in it. Not ported: Alt or Cmd accept opening to the side (no editor groups), the aria status. Tests: cargo test -p app go_to_line positions_parse.
  • editor.lineNumbers relative and interval render as lineNumbers.ts _getLineRenderLineNumber: distances from the primary cursor with its own line number left-aligned (.relative-current-line-number), or every tenth line, the cursor's and the last (cargo test -p app line_numbers). renderFinalNewline is not applied to the number of an empty last line.
  • Auto-indent (editor/auto_indent.rs, languages/autoIndent.ts, enterAction.ts, cursorTypeEditOperations.ts): Languages::configure parses onEnterRules and indentationRules beside the brackets; Model is upstream's virtual model over a document with one line replaced. Enter runs EnterOperation._enter (strategy none: plain newline; keep, or a line not cheap to tokenize: copy the indentation; else getEnterAction and getIndentForEnter), typing runs AutoIndentOperation then the electric closing bracket (getIndentActionForType, strategy full only), Tab on a blank line TabOperation._goodIndentForLine, Shift/Tab over lines ShiftCommand with its miss-aligned line heuristic (JSDoc * is not indentation). Insert Line Above/Below and Move Line Up/Down use the same rules. editor.action.reindentlines and reindentselectedlines (palette only, as upstream) run getReindentEditOperations. This replaces the milestone 5 shortcut "Enter copies the leading whitespace only". Not ported: auto-indent on paste (editor.autoIndentOnPaste, default off). Tests: cargo test -p app editor::auto_indent (cursor.test.ts indent cases, indentation.test.ts Auto Indent On Type - TypeScript/JavaScript, shiftCommand.test.ts issues #348 and #1609). ui-pair on a .ts file: Enter after { and after /** a gives the reference's text ( x, * b).
  • Auto-closing on type (editor/auto_closing.rs; cursorTypeEditOperations.ts AutoClosingOvertypeOperation, AutoClosingOpenCharTypeOperation, TypeWithAutoClosingCommand, SurroundSelectionOperation, cursor.ts AutoClosedAction): typeWithInterceptors runs AutoIndent (which auto-closes too), then the overtype of a close char, then the open char, then the surround of every selection, then the electric char. editor.autoClosingOvertype auto types over only a close char the editor auto-closed, always over any, never a quote after a backslash; editor.autoClosingDelete the same for Delete Left and Delete Word Left. editor.autoSurround wraps selections in the language's surroundingPairs, else its auto-closing pairs. The pairs are the language's autoClosingPairs (else its brackets) with notIn, beforeText and autoCloseBefore; editor.autoClosingBrackets, autoClosingQuotes, autoClosingComments and wordSeparators come from the editor's language. A typed multi-char open (begin) gets an undo stop before its close, so undo first removes the close. Each editor keeps its auto-closed ranges as edit-tracked positions that never grow, dropped once a cursor leaves them. No composition (chIsAlreadyTyped) path and no reentrant content listeners, so cursor.test.ts's composition and reentrant-edit cases are not ported. Snippet and suggestion edits go through execute_edits_tracking_pairs (cursor.ts executeEdits with _findAutoClosingPairs), so their pairs are auto-closed too. Tests: cargo test -p app auto_closing (cursor.test.ts autoClosingPairs open, quote, multi-character, beforeText, auto wrapping, issues #6841, #11476, #25658, #27937, #37315, #41825, #47733, #53357, #78527, #78975, #118270, #315131, all cursors deleting left, #55314, #61070, #72177, #78833, #84998, #132912, #206774, #338693).
  • Smart select (editor/smart_select.rs, smartSelect.ts, wordSelections.ts, bracketSelections.ts): OpenEditor::smart_select keeps each cursor's ranges while the selections are the ones it set; the bracket ranges come from Tokenization::pairs (DocumentBrackets.brackets), words use the language's wordPattern (LanguageRules::word_pattern), else word_at. ui-pair on foo(barBaz) in a .ts file (Ctrl+Shift+Right 3 times, Ctrl+Shift+Left once): shrink matches the reference; the third expand gives (barBaz) where the reference, with the TypeScript extension's provider, gives foo(barBaz). After the shrink the port draws the word highlight over the selected barBaz, the reference shows the plain selection color. In plain text both draw the highlight over the selected word (ui-pair on notes.txt), so the .ts difference is the TypeScript extension's document highlight provider; the port has only the textual one.
  • Word highlights follow wordHighlighter.ts _run: the word at the selection start, none when the selection reaches past it (refresh_highlights). The highlight paints above the selection as DecorationsOverlay sits above SelectionsOverlay (view.ts). Test: cargo test -p app the_cursor_highlights_its_word.
  • Word parts (wordPartOperations.ts, cursorWordOperations.ts _moveWordPartLeft/Right, deleteWordPartLeft/Right): the nearest of the word start, word end and camelCase/snake_case/kebab-case boundary; deletes take upstream's range comparators. Keys Ctrl+Alt+Left/Right (Shift selects), Ctrl+Alt+Backspace/Delete. Test: cargo test -p app word_part with the cases of wordPartOperations.test.ts.
  • Caret operations (editor/caret_operations.rs): Move Selected Text Left/Right as MoveCaretCommands through execute_commands, Transpose Letters (Ctrl+T) as one ReplaceCommand per empty cursor, given to cursor i in order as executeCommands does. ui-pair on notes.txt matches the text and selections.
  • Word highlights after a picked command: upstream's quick input hide focuses the editor before accept runs the command, so the command's edit cancels the query onDidFocusEditorText started. GPUI reports the restored focus on the next frame, after the command; watch_editor_focus skips the query when the model's version changed since the editor lost the focus. Test: cargo test -p app the_word_highlight_stops.
  • Keystrokes: GPUI reports Shift with a US symbol key as the shifted symbol without Shift (Cmd+Shift+. arrives as Cmd+>); Chord::from_keystroke maps it back to the key code and Shift, as upstream's KeyboardEvent.code does, so Shift+Cmd+. and Shift+Cmd+, resolve. Test: cargo test -p app a_shifted_symbol_keystroke.
  • Expand Line Selection (Cmd+L, CursorMoveCommands.expandLineSelection): OpenEditor::expand_line_selection after an undo stop. Test: cargo test -p app expand_line_selection.
  • Replace with Previous/Next Value (editor/in_place_replace.rs, inPlaceReplace.ts, BasicInplaceReplace): a caret takes the word at it (DEFAULT_WORD_REGEXP), a selection its text; numbers step their last digit, value sets (true/false, the access modifiers, ...) wrap; the selection becomes the new value. The 2px editorBracketMatch.border outline (.monaco-editor.vs .valueSetReplacement) shows 350 ms in light themes. Shift+Cmd+. resolves to breadcrumbs.focusAndSelect in the reference and the port (the later default binding, while breadcrumbsPossible && breadcrumbsVisible); with breadcrumbs off it is breadcrumbs.toggleToOn; only with breadcrumbs on but not possible (an untitled file) does the key run Next Value. ui-pair (light theme, palette): the values and selections match the reference; the outline was not caught in the shots of either side. Test: cargo test -p app editor::in_place_replace.
  • Rounded selections (editor.roundedSelection, selections.ts _enrichVisibleRangesWithStyle and selections.css): each line's piece gets external, internal or flat corners from the lines above and below (selection_corners, cargo test -p app selection_corners), radius 3 px, square in high contrast; internal corners are 10 px pieces painted first in the editor background (issue #77777); with more than one selection each line insets 1 px top and bottom. Upstream keeps the previous frame's corners at the viewport edges; the port reads the lines past the edge. ui-pair (FILE=notes.txt, word and multi-line selections, dark): the corners match at 300% (AE 64 over the crop, 0.0005). The reference also draws the selected whitespace (editor.renderWhitespace: selection), see the next entry.
  • Unicode highlighter (editor/unicode_highlighter.rs, workbench/unicode_highlight.rs; unicodeHighlighter.ts, unicodeTextModelHighlighter.ts, bannerController.ts): ambiguous, invisible and non-basic ASCII characters get the editorUnicodeHighlight.border box, comments and strings by includeComments/includeStrings (inUntrustedWorkspace resolves as trusted: the port has no workspace trust), allowedCharacters and allowedLocales (_os and _vscode are English). The confusables and invisibles come from strings.ts as unicode_data.json. Past 1000 characters the marks go and a banner names the most frequent reason with its Disable action (sets the editor.unicodeHighlight.* user setting); closing it holds until the editor shows another model. New theme defaults: editorWarning.foreground, editorInfo.foreground, the two editorUnicodeHighlight.* and banner.* (with darken, checked against upstream's color.ts output). Highlights are found on the UI thread per model version, where upstream asks the editor worker (shortcut: in the code). The hover reason and its exclude options came with the editor hover (unicode_hover_reason, unicode_exclude_options). ui-pair (uni.ts, many.ts): marks and banner match the reference. Tests: cargo test -p app unicode_highlighter, cargo test -p app theme::.
  • Unusual line terminators (editor/unusual_line_terminators.rs, workbench/unusual_line_terminators.rs; unusualLineTerminators.ts): when the editor shows a model, its content changes (not by undo) or editor.unusualLineTerminators changes, LS and PS are removed (auto), after the "Detected unusual line terminators" dialog (prompt), or left (off); Ignore holds for the resource. Test: cargo test -p app unusual_line_terminators.
  • Cursor undo (editor/cursor_undo.rs, cursorUndo.ts): set_cursor_states records the replaced selections and scroll when they changed, after_text_change and EditorGroup::activate/close (the group's one code editor shows another model) clear them. ui-pair (Down, End, Cmd+U twice) matches the reference. A fold that hides the cursor moves it with set_selections (folding.ts onHiddenRangesChanges calls setSelections), so Cursor Undo brings it back and unfolds the region: cargo test -p app cursor_undo_brings_back.
  • Read-only editors (workbench/readonly.rs, filesConfigurationService.ts isReadonly, fileActions.ts session commands): a file is read-only by the session override (setActiveEditorReadonlyInSession, WriteableInSession, toggleActiveEditorReadonlyInSession, resetActiveEditorReadonlyInSession), else by files.readonlyInclude minus files.readonlyExclude (the ResourceGlobMatcher of Quick Open's history exclude, resource_glob_matcher), else by files.readonlyFromPermissions and a cleared owner write bit; untitled never. The tab gets the lock-small badge at the iconlabel.css ::after size (90%, 11.7px: it wins over the decoration rule's 16px). Edit commands carry upstream's writable precondition and do nothing; typing, IME input, paste, cut and Delete/Backspace are cursor edits (onDidAttemptReadOnlyEdit) and show the reason. The find widget hides Replace and its toggle, startFindReplaceAction does nothing, the unusual line terminators check skips the editor. Not ported: updateReadonly with a custom reason (the upstream tests' subject; only chat and extension services call it), the orphaned (deleted) decoration, provider read-only file systems.
  • Editor message (workbench/editor_message.rs, messageController.ts and messageController.css): the 13px UI-font box with the editorHoverWidget.* colors, the inputValidation.infoBorder border and the 8px arrow, above the cursor (below when the window top is closer than 15px plus a line), revealed in the center when outside the viewport, 150ms fade in and 100ms out; links run their command. It closes on a cursor change, a model change, the text losing the focus (not to the message under the mouse), a mouse move outside the 3 lines above and below the first hovered line, and Escape (leaveEditorMessage, messageVisible). alert has no counterpart: GPUI has no screen reader announcements (shortcut: in the code). ui-pair (/tmp/m8ro, ro.txt in files.readonlyInclude; type, Escape, Delete, Down): text, links, position and closes match the reference; the box is 2px wider (text width), the tab lock 1px off. Tests: cargo test -p app readonly.
  • Active tab label color: tabs.css colors .tab-label:not(.monaco-decoration-itemColor) with modernEditorTab.activeForeground (#CCCCCC in Dark Modern); a label with a file decoration (the read-only lock) inherits the tab's tab.activeForeground (#FFFFFF), while the close action keeps the modern color. modernTabColorCustomizations.ts only reacts to workbench.colorCustomizations (getColorCustomization), not to theme files, so it changes nothing without user customizations, which the port does not read yet. ui-pair (notes.txt and /tmp/m8ro ro.txt, dark): label, icon, lock and close colors match.
  • Long lines (longLinesHelper.ts, viewLineRenderer.ts): a line past stopRenderingLineAfter (10000 chars, not a setting) draws its first 10000 chars and the .mtkoverflow "Show more (N)" span (button.* colors; the border is currentColor while contrastBorder is unset). A press on the text at or past the cut sets the group's code editor to -1 for every file. A cursor past the cut is not drawn, a reveal goes to the span's end, a press on the span puts the cursor before the last drawn char (all from the reference). With every line of the file drawn the content width is their widest (viewLines.ts _updateLineWidths), so it shrinks too. ui-pair (/tmp/m8long/long.txt, line 2 of 10003 chars; End, click on the span): span box pixel-identical, scroll and cursor column match. Not the port's: GPUI places glyphs of a 10000-char line about 2 chars right of column * typicalHalfwidthCharacterWidth, so the text drifts against the cursor, selections and the span there (before this change too).
  • Middle scroll (middleScrollController.ts): ui-pair /tmp/m8mid/lines.txt with editor.scrollOnMiddleClick in .vscode/settings.json, a 4 s middle drag of 120px down: both scroll down while held (the distance depends on frame timing: line 130 against 137 at the shot) and keep scrolling to the end after the cua release, the dot sits at the press within 1px. Not ported: the all-scroll cursor during a session, GPUI has no such cursor (shortcut: in middle_scroll.rs).
  • Selection anchor (anchorSelect.ts, editor/anchor_select.rs): set, go to, select from anchor to cursor, cancel (Escape with selectionAnchorSet); the anchor is a collapsed NeverGrowsWhenTypingAtEdges marker that edits move, drawn as the 2px #007ACC bar under the word highlights, and dropped when the group's code editor shows another model. The cursor now sits 1px left of its column like viewCursor.ts (it covered the anchor bar before). ui-pair (notes.txt, the commands through the Command Palette): anchor bar, cursor and the final selection match pixel for pixel. Through ui-pair the Cmd+K chords fail in the port only: cua's hotkey takes over 1.5 s and leaves the window inactive at a 500ms chord check, which leaves chord mode (the keys are covered by cargo test -p app selection_anchor). Not ported: the "Anchor set at" alert (no GPUI announcements) and the "Selection Anchor" hover message (no editor hover yet).
  • Drag and drop of text (dnd.ts, dragAndDropCommand.ts, mouseHandler.ts isDragAndDrop): a single press without Alt on the text inside the non-empty primary selection, with editor.dragAndDrop on, editor.columnSelection off and a writable model, starts a drag instead of a click. The first move over a selection takes it; the target outside it shows the .dnd-target dotted 2px bar (dots 2px every 4px, #AEAFAD dark, black light, white hc-black); the cursor is the arrow, or the copy cursor with Alt. The release moves the text, or with Alt copies it (also right beside the selection), between undo stops with only the primary cursor left; a release without a drag collapses the selections under the pointer (Shift extends the primary). A key press, a blur or a release off the lines ends the drag without a drop. ui-pair (notes.txt, double click on "notes", slow drag to the third line): the dropped text and selection match pixel for pixel; the held frame shows the same bar two columns apart, where the slow drag was when each shot was taken. Not ported: the drop below the last line (CONTENT_EMPTY) and on the margin, and revealPosition of the target while dragging.
  • Editor font zoom (fontZoom.ts, editorZoom.ts, fontInfo.ts, mouseHandler.ts _setupMouseWheelZoomListener): one level for every editor from -5 to 20, not persisted, scaling the font size and line height by 10% per level (no rounding, like upstream), so the glyph margin, gutter, sticky scroll, minimap, overview ruler, message placement and drop marker follow Viewport.line_height. The actions have no keybinding upstream, only the Command Palette. With editor.mouseWheelZoom, Cmd or Ctrl (no Shift, no Alt) and a mouse notch zoom one level; a trackpad gesture that began with them zooms by a fifth of its accumulated delta; GPUI's line delta stands in for MouseWheelClassifier.isPhysicalMouseWheel. ui-pair (notes.txt, zoom in twice, out three times): level -1 matches pixel for pixel; levels 1 and 2 place the gutter and text 2 and 1 device pixels right of the reference, Chrome's snapping of the fractional 19.8 and 21.6px margins.
  • Insert Final New Line (insertFinalNewLine.ts): the action appends the model's EOL to the last line even when that line is already empty, between undo stops, tracking the primary selection with trackSelection stickiness. That stickiness (NeverGrowsWhenTypingAtEdges for a selection) now also applies to Replace All and the indentation and trim commands, which tracked a selection as always growing. The files.insertFinalNewline save participant is in the save participants entry below. ui-pair (notes.txt): the new line 11 and the dirty tab match the reference.
  • Overtype (toggleOvertype.ts, inputMode.ts, replaceCommand.ts ReplaceOvertypeCommand and ReplaceOvertypeCommandOnCompositionEnd): one input mode for the window, insert at start, flipped by View: Toggle Overtype/Insert Mode. Its Alt+Cmd+O is shadowed by the later workbench.action.remote.showMenu rule in both apps, so the key runs nothing in the port (remote is removed). In overtype mode a typed character replaces as many characters after the selection up to the line's end, an IME commit removes as many characters after it, and a paste does the same when editor.overtypeOnPaste is on. The status bar shows the prominent OVR item (updateInputModeElement) and the Column Selection item (updateColumnSelectionModeElement) beside Tab Moves Focus. The cursor takes editor.overtypeCursorStyle in overtype mode and editor.cursorStyle otherwise; of their styles only block (one char wide, the char under it in editorCursor.background or the caret color's opposite) and line are drawn, the underline and outline styles draw a line.
  • Toggle Tab Key Moves Focus (toggleTabFocusMode.ts, tabFocus.ts, editorStatus.ts TabFocusMode): the mode starts from editor.tabFocusMode and follows each change of the setting; the toggle flips it in between. A setting changed and changed back within one toggle resumes the toggled mode, where upstream takes the setting's value. With the mode on, editorTabMovesFocus turns the tab and outdent keybindings off and Tab moves the focus from the editor text to the status bar, drawn with its 1px statusBar.focusBorder outline and rounded bottom corners; Shift+Tab returns. The terminal leaves Tab and Shift+Tab to that order while the mode is on (terminalInstance.ts attachCustomKeyEventHandler, terminal_key). Past the status bar Tab follows the browser's DOM order (probed on the reference with port/tools/ref-dom key:Tab): the editor group's tab, close actions and toolbar, the editor text, the panel, the status bar, the title bar (Go Back and Go Forward, the command center, the layout actions), the activity bar, the side bar's views, back to the editor. The workbench's Tab and Shift+Tab are a bubble-phase default (keyboard.rs tab_key_down, after every element's own handler, as the browser's default action) that call GPUI's focus_next / focus_prev over tab_stop handles in paint order (editor_status.rs move_tab_focus). Each action bar is one tab stop, the item it last focused or its first (actionbar.ts setFocusable, roving tabindex; action_bar.rs is_roving_tab_stop); the command center's center item and each editor tab's close action are bars of their own (commandCenterControl.ts, multiEditorTabsControl.ts), and an inactive tab's close action stays focusable at opacity: 0 (connectedEditorTabs.css). The content hover keeps its own order: Shift+Tab from the editor text enters it at its last element and Tab past its last element leaves it for the stop after the editor; Tab in the text hides it (contentHoverController.ts _onKeyDown). Tests: cargo test -p app -- tab_walks_the_parts_in_the_dom_order the_title_bar_toolbars_are_tab_stops_in_the_dom_order the_tab_close_actions_and_the_editor_actions_toolbar_are_tab_stops the_verbosity_actions_use_the_focused_part. ui-pair (Tab Focus Mode, notes.txt open, Tab five times from the text, then Shift+Tab twice): both apps go status bar, Go Back, command center, Customize Layout, Explorer in the activity bar, and back to the command center; the item outline used to sit one item lower (the outline canvas took its static position after the icon). The aria alert ("Pressing Tab will now ...") has no GPUI equivalent. The "Tab Moves Focus" item paints statusBarItem.prominentBackground around the label's margins with 4px corners (modernUI statusBar.css). ui-pair (notes.txt): the item and the status bar outline match the reference; the word highlight stays in the port's tab1 shot only because cua leaves the port window inactive, where GPUI sends no focus events (the tab_focus test covers the blur).
  • Render whitespace (viewParts/whitespace/whitespace.ts, the default experimentalWhitespaceRendering: svg): editor.renderWhitespace (none, boundary, selection by default, trailing, all) picks the spaces and tabs (editor/whitespace.rs, cargo test -p app whitespace) up to stopRenderingLineAfter; each space is a circle of radius spaceWidth / 7 at the middle of its cell and each tab the 10-point arrow of _renderArrow, in editorWhitespace.foreground, painted after the decorations and under the text. In selection mode a selection counts on a line only when it covers at least one character there. The port never wraps, so the wrapped-line cases of boundary and trailing do not apply. View: Toggle Render Whitespace (toggleRenderWhitespace.ts) writes all when the setting is none, else none; the View > Appearance > Render Whitespace submenu and its five Set Render Whitespace actions wait for the Appearance menu.
  • Column selection mode (toggleColumnSelection.ts): Toggle Column Selection Mode flips editor.columnSelection and is checked in the Selection menu (4_config). Turned on, the primary selection becomes a column selection from its anchor to its head; turned off, the column selection's corners become one selection (column_selection_mode_changed). While it is on, a drag or Shift+click on the text selects a column (dispatchMouse) and Shift+arrows run the cursorColumnSelect* keys. The Selection menu's other 4_config item runs Toggle Multi-Cursor Modifier (toggleMultiCursorModifier.ts), titled by the multiCursorModifier context key; with editor.multiCursorModifier ctrlCmd the text click takes Cmd as the multi-cursor modifier and Alt+drag selects a column (dispatchMouse).
  • Save participants (saveParticipants.ts, editor/save_participants.rs): every save of a model (Cmd+S, Save All, the host's $save, $saveAll and $trySaveDocument, search replace) first runs, with the settings of the model's language and resource, files.trimTrailingWhitespace (no cursor spared, as an explicit save), files.insertFinalNewline and files.trimFinalNewlines, after an undo stop, so their edits undo as one step; the selections stay as they were. Format on Save and Code Actions on Save wait for the formatting and code action providers (milestone 13); Save without Formatting (workbench.action.files.saveWithoutFormatting) skips all of them. The host's participants still run before the workbench's, where upstream registers the workbench's first.
  • Auto save (workbench/auto_save.rs; editorAutoSave.ts with filesConfigurationService.ts computeAutoSaveConfiguration and getAutoSaveMode): files.autoSave per resource and language. afterDelay saves a dirty file files.autoSaveDelay after its last edit (each edit restarts the timer), onFocusChange when the active editor changes or the editor widget loses the focus, onWindowChange (and onFocusChange) when the window deactivates; a change of the global mode saves every dirty model. autoSaveWorkspaceFilesOnly leaves files outside the folders alone, autoSaveWhenNoErrors holds a save while the file has error markers and runs it once they go. Untitled models and search editors without a file are never auto saved, read-only ones not on a focus change. An auto save spares the lines of the shown editor's cursors from the trim participants. A dirty tab with a delay up to 1000 ms is drawn clean (isSaving). File > Auto Save and File: Toggle Auto Save (workbench.action.toggleAutoSave) switch between off and afterDelay in the user settings. Not ported: enableAutoSaveAfterShortDelay and disableAutoSave overrides (only chat calls them). Test: cargo test -p app auto_save.
  • Settings reads: Configuration::get_value merged every layer on each call (0.7 ms for the files node on the Studio), and the tabs read files.autoSave for every tab every frame through editor_is_saving. The merged model is now kept per folder and language until a layer changes (configurationModels.ts _workspaceConsolidatedConfiguration, _foldersConsolidatedConfigurations): 7 us per call.
  • Text files (workbench/text_files.rs, textFileService.ts, textFileEditorModel.ts, textFileEditorModelManager.ts, textFileSaveErrorHandler.ts): Cmd+S saves even a clean model (force), auto save and the host's saves only dirty ones; a read-only model is not saved; the edits before a save close their undo group. The save checks the file's stat from the last read or write (fileService.ts validateWriteFile: newer and of another size) and fails with "The content of the file is newer..." unless files.saveConflictResolution is overwriteFileOnDisk; its message offers Overwrite and Configure. A file without the owner's write bit fails as read-only with Overwrite (unlock, chmod u+w), no permission with Retry as Sudo, an unlock that did not help with Overwrite as Sudo (writeElevated: the system administrator prompt through osascript ... with administrator privileges, sudo-prompt's macOS applet shows the same); other errors with Retry; all with Save As... and Revert. The message closes when the model saves or reverts. Not ported: Compare (the save conflict editor needs the diff editor), the Learn More conflict help.
  • Save As (Shift+Cmd+S, saveAs, doSaveAsTextFile): the save dialog at suggestSavePath (an untitled model's first-line name with the language's extension from suggestFilename, in files.dialog.defaultPath, else the active file's folder, else the first folder, else home); a read-only target asks "Save Anyway", an untitled model's associated file that appeared on disk asks to be replaced (#67946). The target's model takes the source's text through updateModel, its encoding, EOL, indentation and a more specific language, and is saved; the source reverts and the target's editor takes its place with the cursors and scroll. The dialog is GPUI's prompt_for_new_path, a separate panel: the reference's is a sheet with a Format popup of the language filters (getFileFilters), which come with the dialogs row of milestone 11. Save without Formatting (Cmd+K S) skips the save participants. Format on Save and Code Actions on Save wait for milestone 13's format and code action providers.
  • Untitled (untitledTextEditorModel.ts, untitledTextEditorService.ts, workbench.action.files.newUntitledFile, Cmd+N): files.defaultLanguage (${activeEditorLanguage} the active editor's) unless a language is given; the name is the first line's words (updateNameFromFirstLine: 40 UTF-16 units, no U+202E, a word required) unless workbench.editor.untitled.labelFormat is name or a path is associated; the tab then shows Untitled-N as its description and name • Untitled-N as its title (labels.ts), the host's tab label follows. No breadcrumbs for untitled models (no file system provider). A save asks for the path; the model is disposed after Save As or a revert, also when the host still holds it. $trySaveDocument of an untitled model without an associated file answers false and goes on in the dialog: the host request is answered on the session thread's wait (shortcut: in host_requests.rs).
  • Revert (workbench.action.files.revert, Don't Save on close, the save error's Revert): reads the file again in the model's encoding and applies it as one undoable updateModel edit (_computeEdits: the lines between the common prefix and suffix), clean before the host hears it; it writes nothing (it used to save the old bytes back). A tab's close button now asks to save a dirty editor (it closed it and lost the edits).
  • Files on disk (textFileEditorModelManager.ts onDidFilesChange, editorService.ts activeOutOfWorkspaceWatchers): a watcher over the folders (minus files.watcherExclude) and the visible file outside them; a clean model whose file changed reads it again unless the stat is the one it saved; a deleted file is confirmed 100 ms later (#13665), then its model is orphaned (tab struck through in list.errorForeground) or, with workbench.editor.closeOnFileDelete, its clean editors close; a file added back ends it. files.associations changes re-detect the language of file models whose language was not picked (onDidChangeFilesAssociation, preferredLanguageId), also after Configure File Association.
  • Closed-model undo cache (editor/model_service.rs, modelService.ts with workbench/services/model's file scheme): a disposed file model with undo or redo elements keeps them under 20 MB in all, oldest dropped first, unless files.restoreUndoStack is off; a new model of the same file with the same text (SHA-256 here, SHA-1 upstream) takes them back with its version ids and is clean. Tests: cargo test -p app model_service text_files untitled.
  • Control characters (viewLineRenderer.ts renderControlCharacters, .mtkcontrol): a C0 character other than a tab draws as its Control Pictures symbol (U+2400 + code, DEL U+2421) in white on rgb(150, 0, 0); the text under it is a space, so every column stays one char wide and the token byte offsets hold. Toggle Control Characters flips the setting; off, the space stays blank, as the reference shows it. ui-pair (.scratch-style file with BEL, ESC, SOH, DEL): same symbols and colors, on and off; the reference's red box is as wide as the fallback glyph (about 1.3 columns, pushing the rest of the line right) and only as tall as the glyph, the port's one column and the full line. ui-pair clicks on the line numbers reached neither app (cua-driver), so the gutter presses rest on cargo test -p app gutter_presses. Bidi format characters (U+202A..202E, U+2066..2069, U+200E, U+200F, U+061C) draw as [U+XXXX] in the same box, 8 columns wide (producedCharacters): visible_column, clicks, expand_tabs and the token offsets count them 8 wide, while cursor moves, column selection and the status bar's Col count them as one, as CursorColumns does. shortcut: with editor.renderControlCharacters off they still take 8 blank columns (the browser draws them zero-width); the drawn width is a pure function of the text. Test: cargo test -p app control_characters.
  • Large files (textModel.ts isTooLargeForTokenization: over 20 MB of UTF-16 or 300,000 lines, with editor.largeFileOptimizations on, decided when the model is made): no tokens, no folding regions (so no sticky scroll), no word highlights and no selection highlights; largeFileOptimizations.ts prompts when an editor shows such a model, with Don't Show Again (neverShowAgain, kept in the profile storage as the APPLICATION scope) and Forcefully Enable Features (writes the setting off, then "Please reopen file..."). Wrapping is off anyway (no word wrap yet).
  • Gutter presses (mouseHandler.ts with viewController.ts startedOnLineNumbers): a press on the glyph margin or the line numbers selects the line to the next line's start, a drag over the gutter or the text extends by whole lines from the pressed line (CursorMoveCommands.line), Shift extends from the cursor, the multi-cursor modifier adds a cursor selecting the line or with Shift selects the line with the last one (lastCursorLineSelect). A right press shows MenuId.EditorLineNumberContext (editor/lineNumber/context contributions, editorLineNumber, the { lineNumber, uri } argument), selecting the line first unless a selection touches it; its built-in items come from debug, testing and SCM, which have no port yet.
  • Word wrap (editor/word_wrap.rs, workbench/word_wrap.rs; monospaceLineBreaksComputer.ts, viewModelLines.ts ViewModelLinesFromProjectedModel, editorOptions.ts wrapping info, toggleWordWrap.ts, wordWrapIndicator.ts): editor.wordWrap on and bounded wrap at the viewport column (content width less the 14px scrollbar and 2px, in typicalHalfwidthCharacterWidths, less one with editor.wordWrapIndicator), wordWrapColumn and bounded at editor.wordWrapColumn, with wrappingIndent, wordBreak, wrapOnEscapedLineFeeds, fullwidthCharacterWidth and the break characters; a model too large for tokenization never wraps. The line breaks are computed for every line when the options change (a resize, a tab size, a setting, the toggle) and for the replaced lines on each edit; upstream's incremental createLineBreaksFromPreviousLineBreaks is an optimization the port leaves out (its tests check the fresh results, all 21 cases of monospaceLineBreaksComputer.test.ts without injected text: the port has none). View lines: the first view line of every model line is kept per folding state; view_line, model_line, view_line_count, segment and position_view_line serve drawing, reveal, sticky scroll, minimap (each view line's text is the wrapped indent and its segment, the token runs cut to it), the find widget, hovers and messages. Each view line draws its model line's decorations moved left by the segment's x and clipped to the segment; line numbers and folding icons only on the first, the current line border on the cursor's view line, the ↩ indicator in editorWordWrapIndicator.foreground with wordWrapIndicator. Cursor Up/Down go by view lines with the leftover columns, Home/End first to the view line's edge then the model line's (_moveToLineStart/_moveToLineEnd); a position at a wrap point shows at the next view line's start unless a move or a press past the line's end put it at the previous one's end (the view position's affinity, kept beside the selections). Insert Cursor Above/Below stay on model lines as upstream (logicalLine). Toggle Word Wrap (Alt+Z, View > Word Wrap checked by editorWordWrap, canToggleWordWrap) overrides the setting per editor, a second toggle drops it; a file dominated by lines of 10000 chars gets the editor title's Enable wrapping for this file. With viewport wrapping the content width is the widest drawn view line, so no horizontal scroll. shortcut: CJK counts two columns (typicalFullwidthCharacterWidth is not measured); wrappingStrategy: advanced (the DOM measuring computer) wraps as simple. Tests: cargo test -p app word_wrap. ui-pair (/tmp/m8wrap/wrap.ts, editor.wordWrap: on; Down, Down, End, Down, Alt+Z): the breaks, the cursor after End and Down and the unwrapped view after the toggle match the reference.
  • Inspect Editor Tokens and Scopes (workbench/inspect_tokens.rs, inspectEditorTokens.ts and .css): editor.action.inspectTMScopes in the Command Palette toggles the token-inspect-widget under the cursor (above when only that fits), rebuilt on each render so it follows cursor moves and theme changes; Escape (key up), another model or language closes it. It shows the token text (tab as U+2192, space as U+00B7, past 40 chars 20 + ... + 20) and its length, language, standard token type, foreground, background, contrast ratio and font style, the TextMate scopes innermost first, and the theme rule findMatchingThemeRule picks with its settings as JSON, or "No theme selector". With semantic coloring on, _computeSemanticTokens asks the first document provider, else the first range provider for the cursor line, on each cursor move ("Loading..." until it answers, a provider error warns and closes the widget); the semantic token at the cursor adds its type, modifiers and, per styled property, the rule that set it ("User settings:", "Color theme:", "Default:" or the probed TextMate scope and rule), its colors win in the first table in italics and strike the TextMate rule out. SemanticTheme keeps the settings' rules apart from the theme's for that origin. Tree-sitter is n/a. Test: cargo test -p app inspect_tokens.
  • Grapheme clusters (editor/graphemes.rs, strings.ts GraphemeIterator with its break table and breakBetweenGraphemeBreakType, which simplifies GB11 and GB12/13 without state, so a run of regional indicators is one cluster): Left, Right and Delete step over a cluster, Backspace removes the last emoji component, else one code point (getLeftDeleteOffset). Test: cargo test -p app graphemes editor::cursor.
  • placeholderText is n/a: placeholder is not in the settings schema (PlaceholderOption has no schema), extensions cannot set it, and the workbench text editor never does; only embedded editors do (commentReply.ts, chat and SCM inputs). Porting it now would be code nothing reaches; the first embedded editor ports it with its .editorPlaceholder overlay.
  • files.eol (textResourcePropertiesService.ts getEOL, modelService.ts _readModelOptions): a model created from a text without line breaks, untitled or empty, takes files.eol for its resource and language when that is \n or \r\n, else LF as auto gives on macOS; a text with breaks keeps the EOL of most of them.
  • Left todo with a reason: editorState (EditorStateCancellationTokenSource, editor.cancelOperation) only cancels provider requests, which come with format, rename and the other language features (milestone 13); its ported users, inPlaceReplace and $tryInsertSnippet's clipboard read, run synchronously.
  • Floating menu (workbench/floating_menu.rs, floatingMenu.ts FloatingEditorToolbar, floatingMenu.css): the primary actions of MenuId.EditorContent whose when holds, at the editor's bottom right (right of the scrollbar and minimap, above twice the horizontal scrollbar), each run with the model URI and labeled title (keybinding). One action is .single-button (28px, button.background, the 0 2px 8px widget.shadow); more are a 26px toolbar in editorWidget.background with --vscode-shadow-lg, the first action primary. Define Keybinding joins it over the user keybindings.json (its when is the profile's keybindings resource). Extensions contribute through editor/content only with the contribEditorContentMenu proposal; git's merge buttons run commands whose merge editor waits for milestone 14. Tests: cargo test -p app floating_menu editor_content.
  • Smooth scrolling (editor/smooth_scroll.rs scrollable.ts SmoothScrollingOperation with its easing and the composed curve past 2.5 viewports, workbench/smooth_scrolling.rs setScrollPositionSmooth): with editor.smoothScrolling the reveals upstream makes with ScrollType.Smooth (cursor reveals after commands, typing and clicks, find matches, TextEditor.revealRange) and a physical mouse wheel notch (ScrollDelta::Lines) move the scroll position over 125 ms. A reveal during the animation is computed from its target (getFutureViewport) and restarts it from the current position unless the target is the same; a scroll set at once (a scrollbar drag, a trackpad, a view state restore) ends it. Tests: cargo test -p app smooth_scroll (all scrollable.test.ts cases).
  • Find options widget (workbench/find_options_widget.rs, findOptionsWidget.ts, findInput.ts highlightFindOptions): with the find widget hidden, a change of the effective regex, whole word or case option (a toggle command, a toggle in the widget, a multi-cursor session's overrides) or a multi-cursor search over the find options (multicursor.ts _highlightFindOptions, each next match not taken from the word under the cursor, and Select All Occurrences) shows the three toggles at the editor's top right, 10px down, for 2 s, kept while hovered; with it shown, the search flashes the find input's options for 100 ms (white at 0.44 in dark themes, yellow at 0.8 in light ones). Test: cargo test -p app find_options. Not compared against the reference with ui-pair.
  • Open from the milestone: find/replace (with the multi-cursor find commands).
  • Breadcrumbs pickers against ui-pair m8/breadcrumbs-pickers.json: the GUI's Alt+Left "hid the picker" because cua-driver's background hotkey activates the port window and then deactivates it; the picker closes on window blur, as the reference does (ref-dom: document.hasFocus() false and no .monaco-breadcrumbs-picker after another app activates), so the fixture sends its keys in front. The picker sits 2px below the arrow (contextview.ts point anchor of height 2), its tree is the content width plus the 1px border, rows are rounded 4px (roundedCorners.css), a row's twistie starts after DefaultIndent 8px and is shifted 3px (tree.css), and in the file picker a file's twistie collapses with Seti (views.css align-icons-and-twisties, set only by BreadcrumbsFilePicker._createTree); outline picker icons are uncolored. The first item's anchor covers its 16px padding and the last item ends in 8px (editortitlecontrol.css). cargo test -p app workbench::breadcrumbs.

Milestone 13: language features

Split (coordinator, mid-milestone): this session keeps completion, snippets, signature help, code actions with the light bulb, code lens and inlay hints; two other sessions take navigation (definition to call hierarchy) and the rest (rename to the Problems panel).

Scope (milestone 13): diagnostics, hover, completion, go to definition and peek, then the rest of MainThreadLanguageFeatures in the milestone's order.

  • Diagnostics (markers.rs, workbench/diagnostics.rs; markerService.ts, mainThreadDiagnostics.ts): $changeMany and $clear fill the MarkerService (markers sanitized as _toMarker, unsupported schemes dropped, the host's markers tagged with its id as origin); every change sends ExtHostDiagnostics.$acceptMarkersChange with the markers of other origins, as _forwardMarkers. installResourceFilter is not ported, only chat calls it. Tests: cargo test -p app markers.
  • Marker decorations (editor/marker_decorations.rs, markerDecorationsService.ts): up to 5000 markers per model, ranges by _createDecorationRange (hints 2 columns wide, empty ranges grow to the word, whole-line markers start at the first non-whitespace), tracked through edits (NeverGrowsWhenTypingAtEdges). Squiggles from codeEditorWidget.ts's SVG waves (editorError/Warning/Info.foreground, the border and background variants as editor.css draws them), hints as 3 dots, unnecessary code faded by editorUnnecessaryCode.opacity, deprecated struck through; overview ruler lanes and minimap marks by severity. shortcut: GPUI has no dashed or dotted bottom border, so the .squiggly-unnecessary and hint borders are solid. Tests: cargo test -p app marker_decorations diagnostics.
  • Problems status bar entry: counts and tooltip from the markers (MarkersStatusBarContributions). The Problems panel needs milestone 11's panel part (workbench/parts/panel is todo), so it waits for it; the Next Problem widget ships first.
  • View zones (editor/view_zones.rs; viewZones.ts, linesLayout.ts): whitespace below a model line, hidden in a folded range, tracked through edits. line_top, the visible lines, the scroll height, reveals, the overview ruler, sticky scroll, the find widget and the editor message all count it. VerticalReveal::NearTop (NearTopIfOutsideViewport gap: 20% of the viewport, at least 5 lines).
  • Next Problem (workbench/marker_navigation.rs; gotoError.ts, markerNavigationService.ts, gotoErrorWidget.ts, peekView.ts, zoneWidget.ts): editor.action.marker.next/prev (Alt+F8, Shift+Alt+F8), nextInFiles/prevInFiles (F8, Shift+F8, opening the other file with the marker selected near the top), closeMarkersNavigation (Escape) and markersNavigationVisible. The list sorts by problems.sortOrder and follows the cursor and marker changes (stale widget at 60% italic). The widget is a peek view in a view zone of 3 + min(17, lines) lines: the 6px arrow and 1px frame in the severity's editorMarkerNavigation* color, the 22px head with the severity icon, file name, "N of M problems" and the next, previous and close actions, the message in the editor font with source, code (link) and related information. shortcuts in the code: no screen reader announcement (aria label), the message scrolls without its 6px scrollbars. Not ported: the zone's resize sash, the Go menu entries (the port has no Go menu). ui-pair (errors.ts with 3 TypeScript errors, dark; F8 twice, Escape): squiggles, widget head, arrow, message, code and zone height match the reference. Open: the problem count and color on the tab and Explorer row (MarkersFileDecorations, workbench/contrib/markers). Tests: cargo test -p app marker_navigation.
  • Hover (language_features.rs, markdown.rs, workbench/content_hover.rs, workbench/content_hover_view.rs, workbench/markdown_view.rs; contentHoverController.ts, hoverOperation.ts, contentHoverWidget.ts, markdownHoverParticipant.ts, markerHoverParticipant.ts, unicodeHighlighter.ts, languageFeatureRegistry.ts, languageSelector.ts): $register*Provider calls are kept with their selectors and ordered by score, then builtin last, then newest. Hover asks every matching provider with $provideHover through HostSync::call_cancellable; dropping the receiver sends the host a cancel, as the token does. Timing follows hoverOperation (delay/2, then the rest, "Loading..." at 3x). Sticky hovers stay while the pointer gets closer to the widget. Markdown goes through pulldown-cmark (allowed in place of marked) into blocks that GPUI text draws; code blocks use the TextMate grammar of their language. Marker parts show severity, message, source and code, the copy button and the View Problem status bar; Quick Fix waits for code actions. Unicode parts show the reason and "Adjust settings", which opens the reference's exclude-options quick pick. The copy button reads "Copied to clipboard" through the polite live region (aria.ts status). The resize sashes (resizableContentWidget.ts) are north and east above the line, east and south below it, with their corner; a drag clamps to minSize (150, or the contents' width when narrower, by a line plus 8) and to the limits _updateResizableNodeMaxDimensions leaves after each step: the contents' height within the space on the widget's side, and the page width less 14 only while the text wraps (_isHoverTextOverflowing, here the natural width capped by the max width or wider than the dragged one); the size holds until the next result and raises the max size of later hovers (_lastDimensions). A provider's hover with canIncreaseVerbosity or canDecreaseVerbosity gets the .verbosity-actions column, + and - at the bottom of the row's visible part; they and Increase/Decrease Hover Verbosity Level ask the provider again with verbosityRequest (the delta and the previous hover's id, which the host's HoverAdapter keeps), a request still out for the provider is cancelled and its delta added, and the answer replaces the part's contents. With no hover focus the commands without an index update every provider part, as focusedHoverPartIndex -1 does. ui-pair (src/main.ts, dark; pointer on main, then off): the hover text function main(): number with its syntax colors, frame and hide-on-leave match the reference; the rerun after the placement fix and the 2px border in the measured size matches. The reference's lightbulb and breadcrumb symbol need code actions and document symbols. Tests: cargo test -p app markdown language_features content_hover.
  • Completion (suggest.rs, workbench/suggest_controller.rs, workbench/suggest_widget.rs, symbol_icons.rs; completionModel.ts, suggest.ts, suggestModel.ts, suggestController.ts, suggestCommitCharacters.ts, suggestWidget.ts, suggestWidgetRenderer.ts, suggestWidgetDetails.ts, editorWorkerService.ts WordBasedCompletionItemProvider): sessions start from Ctrl+Space/Cmd+I, quick suggestions (editor.quickSuggestions per token kind, quickSuggestionsDelay) and trigger characters; providers are asked in orderedGroups until a group gives items, with providerItemsToReuse, incomplete lists re-asked as typing continues; the model filters with fuzzyScore (graceful with typo permutations) and sorts as upstream. The main thread's word based provider is a registration with handle u64::MAX and selector *. Accept (Tab, Enter with acceptSuggestionOnEnter, click, commit characters) inserts through the snippet controller with getOverwriteInfo and LineSuffix, applies additional edits (sync, or after resolve), runs the item's command; $releaseCompletionItems on clear. The widget: rows with kind icon and color, highlights, label detail/description, the focused row's detail, Loading.../No suggestions., above/below placement, 12 rows, resolve on focus, docs panel (Ctrl+Space, expandSuggestionDocs in profile storage) east/west/south. _executeCompletionItemProvider for vscode.executeCompletionItemProvider. Codicon aliases (symbol-function is symbol-method.svg) map in symbol_icons::svg_name. shortcuts in the code: docs panel without north placement, bottom alignment and resize sash. ui-pair (src/main.ts, dark: type ma, Down, Ctrl+Space details, Escape, Ctrl+Space, Enter): rows, icons, highlights, the 432px width, the details panel west of the list with the detail broken anywhere (auto-wrap) and the accepted text match the reference. Not ported: editor.suggestSelection recentlyUsed memories (only first), editor.suggest.localityBonus word distance, the status bar (editor.suggest.showStatusBar), the widget resize sash, insertBestCompletion/tab completion, explain mode, inline completions interplay. Tests: cargo test -p app -- suggest.
  • Snippet session (editor/snippet_session.rs, workbench/snippet_controller.rs; snippetSession.ts, snippetController2.ts): placeholders of every cursor's copy grouped by index, final tab stop last, tracked through edits (the current group grows at its edges); Tab/Shift+Tab, Escape, acceptSnippet, collapsed placeholders skipped, the session ends at the last placeholder, on undo to the insert or when the cursor leaves; choices show their options in the suggest widget (the choice provider as an exclusive registration); inSnippetMode, hasNextTabstop, hasPrevTabstop, inSnippetChoice; .snippet-placeholder and .finish-snippet-placeholder decorations. $tryInsertSnippet, completion and Define Keybinding insert through it. shortcuts in the code: a snippet with placeholders inside a session replaces the session (no merge), no transforms. Tests: cargo test -p app -- snippet.
  • Signature help (workbench/parameter_hints.rs; parameterHints.ts, parameterHintsModel.ts, parameterHintsWidget.ts, provideSignatureHelp.ts): the 120ms throttled trigger merges pending contexts as upstream (Invoke and trigger characters win over content changes), isRetrigger and activeSignatureHelp go to the host, the first provider with an answer wins and its result is released at once ($releaseSignatureHelp; the widget keeps the value). A mouse cursor move, another model or a blur cancels. The widget sits above the cursor, else below, max 440px wide; the active parameter is bold in editorHoverWidget.highlightForeground (string labels match as whole words, offset labels as UTF-16 offsets); overloads n/m with chevrons. shortcuts in the code: no docs scrollbar, no "hint" announcement. Tests: cargo test -p app parameter_hints.
  • Snippet completions (snippets.rs, workbench/snippet_completions.rs; snippetsFile.ts, snippetsService.ts, snippetCompletionProvider.ts, the snippet support of suggest.ts): snippet files from contributes.snippets (validated as toValidSnippet), the profile's snippets folder and each workspace folder's .vscode (.code-snippets); a file is read again when its modification time changes. The support answers beside the provider groups (handle u64::MAX - 2), its items resolved at once; _snippet.markAsUsed keeps snippets.usageTimestamps (last 100) in profile storage, snippets.ignoredSnippets hides. LanguageRules.auto_closing_pairs now keeps the pairs for the auto-closed end column. shortcuts in the code: no bogus-variable rewrite (SnippetBodyInsights), _executeCompletionItemProvider without snippets. Upstream _disambiguateSnippets compares label objects by identity and never relabels; the port keeps only its sort. Tests: cargo test -p app -- snippets:: suggest_controller.
  • Code actions (workbench/code_actions.rs, view workbench/action_widget.rs over action_list.rs; codeAction.ts, codeActionModel.ts, codeActionController.ts, codeActionCommands.ts, codeActionMenu.ts, codeActionKeybindingResolver.ts, lightBulbWidget.ts, actionWidget.ts): an automatic request 250ms after a cursor move, an edit or a marker change of the model (none with editor.lightbulb.enabled off, none for an empty selection between whitespace with onCode); the providers whose providedKinds may match, $provideCodeActions with { only, trigger }, the lists released with $releaseCodeActions once nothing shows them. An automatic request replacing a manual one at another position waits 500ms. The light bulb sits at the line's start when its indentation is over 22px, else on the line above or below with room, else in the glyph margin (lightbulb, lightbulb-autofix, lightbulb-sparkle, sparkle-filled; the title with the auto fix or quick fix keybinding shows as the workbench hover). Cmd+. and editor.action.codeAction/refactor/sourceAction/organizeImports/fixAll/autoFix with kind, apply and preferred arguments, the auto apply of ifSingle and first, the not available messages and the disabled reason over the cursor; editor.codeActionWidget.includeNearbyQuickFixes (quick fixes at the end of the markers on the cursor's line). The menu groups the actions under codeActionGroups headers (editor.codeActionWidget.showHeaders), with each kind's keybinding, Up/Down/Enter/Escape, Show or Hide Disabled and the providers' documentation in the action bar; the focused action's ranges or diagnostics get the editor.findMatchHighlightBackground highlight. Applying resolves ($resolveCodeAction), applies the text edits, runs the command and asks again. The marker hover asks for the marker's quick fixes: "Quick Fix..." opens the menu under the label, "Checking for quick fixes..." after 200ms, "No quick fixes available". _executeCodeActionProvider for any model. shortcuts in the code: only the text edits of a workspace edit apply, the menu does not take the focus (a cursor move or an edit closes it), previewing applies, no open animation, no AI fix entries or menu-contributed hover actions. Tests: cargo test -p app code_actions.
  • Code lens (workbench/code_lens.rs; codelens.ts, codelensController.ts, codelensWidget.ts, codeLensCache.ts): the lenses of the active model asked 250ms after it shows, an edit, the editor text's focus (a blur within the delay cancels), a provider registration or $emitCodeLensEvent; a model shown again first draws its cached lenses (CodeLensCache: last 20 models, titles without command ids, valid while the line count holds, the lines kept in the workspace storage codelens/cache2 on shutdown; without a provider they go after 30 seconds); each line's lenses in a view zone above the line (ViewZone.before, so a lens on the first line pushes it down) of codeLensFontSize (90% of the editor font) times the line height factor (at least 1.3), the lines in view kept in place; a group on a line that had one keeps its zone and its shown commands. Lenses in view resolve 250ms after a scroll or a render ($resolveCodeLens); commands show as $(icon) labels joined by |, the ones with an id as links in editorLink.activeForeground on hover, "no commands" when every resolve failed; a click runs the command, a failure is an error notification. codelens.showLensesInCurrentLine picks among the line's commands; _executeCodeLensProvider with itemResolveCount. The lenses use editor.codeLensFontFamily when set, else the UI font; commands that come with a resolve fade in over 100ms. Tests: cargo test -p app code_lens view_zones.
  • Injected text (editor/injected_text.rs; modelLineProjection.ts, lineDecorations.ts, viewModelDecorations.ts injectedText): per line, text before a model column (InjectedText with its owner: inlay hint, color box, ghost text); OpenEditor::line_layout gives every model column its x and every x its column, and every view part and widget placing itself at a column goes through it (no visible_column * char_width left). Word wrap breaks with the injections (ModelLineProjectionData with injected text). Injections track edits as their decorations do (at_range_start for AlwaysGrows). shortcuts in the code: the cursor never sits inside or after an injection at its column (upstream's PositionAffinity), an injection's width does not move later tab stops. Tests: cargo test -p app injected_text word_wrap.
  • Inlay hints (workbench/inlay_hints.rs; inlayHintsController.ts, inlayHints.ts, inlayHintsLocations.ts, inlayHintsHover.ts): editor.inlayHints.enabled (on, off, onUnlessPressed, offUnlessPressed with Ctrl+Alt), the visible ranges plus a viewport above and below asked 25 ms after a scroll and after an edit ($provideInlayHints, released with $releaseInlayHints), $emitInlayHintsEvent; the cache per model keeps the hints until the answer; while typing, hints keep their fixed lengths. Labels and parts in editorInlayHint.* colors (type and parameter kinds), paddingLeft/paddingRight, maximumLength with an ellipsis, the editor font at editor.inlayHints.fontSize (90%); Cmd+hover on a part with a location or command underlines it, click goes to the location or runs the command; the hover shows the tooltip after $resolveInlayHint; double click applies textEdits. _executeInlayHintProvider. shortcuts in the code: fixed debounces, labels measured in editor font columns. Tests: cargo test -p app inlay_hints.
  • Color decorators (workbench/color_detector.rs, default_document_colors.rs, workbench/color_picker.rs, workbench/standalone_color_picker.rs; colorDetector.ts, defaultDocumentColorsComputer.ts, colorHoverParticipant.ts, colorPickerWidget.ts and its parts, standaloneColorPickerActions.ts): editor.colorDecorators, colorDecoratorsLimit, defaultColorDecorators (auto, always, never: the regex computer for CSS-like colors when no extension provides), the 10px boxes as injected text; hovering or clicking a box (editor.colorDecoratorsActivatedOn) shows the picker in the content hover: header with the presentation (click cycles, $provideColorPresentations) and the original color, saturation box, hue and opacity strips by drag; a change writes the presentation's edit. Show or Focus Standalone Color Picker, Hide, Insert Color with the insert button. _executeDocumentColorProvider, _executeColorPresentationProvider. shortcut in the code: the standalone picker takes no keyboard focus. Tests: cargo test -p app default_document_colors color_picker.
  • Inline completions (workbench/inline_completions.rs, ghost_text.rs; inlineCompletionsController.ts, inlineCompletionsModel.ts, inlineCompletionsSource.ts, provideInlineCompletions.ts, computeGhostText.ts, ghostTextView.ts, commands.ts): providers from $registerInlineCompletionsSupport asked 50 ms after typing (Automatic) or by editor.action.inlineSuggest.trigger (Explicit), lists freed as replaced; the selected item (Alt+] and Alt+[) shows as ghost text, the parts on the cursor line as injected text in editorGhostText.foreground, further lines below; Tab commits (snippets through the snippet controller, then the item's command), Cmd+Right accepts the next word, Escape hides; $handleInlineCompletionDidShow, ...PartialAccept, ...EndOfLifetime. Context keys inlineSuggestionVisible, inlineSuggestionHasIndentation(LessThanTabSize), cursorBeforeGhostText. The AI parts (inline edits, next edit suggestions) are removed by decision. diff::lcs_diff is the port of base/common/diff/diff.ts for computeGhostText. Tests: cargo test -p app ghost_text inline_completions, cargo test -p diff lcs_diff.
  • workbench/services/suggest is the terminal's simple suggest widget (only terminalContrib/suggest uses it): moved to milestone 15.
  • api-tests MOCHA_GREP="vscode API - languages": 3 passing (both setTextDocumentLanguage tests, diagnostics, read & event), 4 failing (link detector, diagnostics & CodeActionProvider, completions with document filters, folding command: they need MainThreadLanguageFeatures).
  • Navigation (branch port-m13b-navigation; goToCommands.ts, goToSymbol.ts, symbolNavigation.ts, referencesModel.ts, referencesController.ts, referencesWidget.ts, referencesTree.ts, goToDefinitionAtPosition.ts, clickLinkGesture.ts, peekView.ts, zoneWidget.ts): workbench/goto_symbol.rs runs the eleven Go to/Peek actions with their aliases, editor.gotoLocation.multiple* (peek, gotoAndPeek, goto with the F12 walk and its "Symbol N of M" message), the _execute{Definition,Declaration,TypeDefinition,Implementation,Reference}Provider commands and goToLocations/peekLocations/findReferences; references_model.rs sorts, dedupes and groups; workbench/references_peek.rs is the peek in a view zone with the tree, the preview, the zone and split sashes (peekViewLayout in profile storage) and the list keys. workbench/goto_definition_link.rs: Cmd (Alt with multiCursorModifier: ctrlCmd) over a word asks the definition once per word, links it in editorLink.activeForeground with an underline and the pointer cursor, its hover shows the source preview (up to 8 lines by indentation) or "Click to show N definitions."; a Cmd+click on one line goes there, Alt for the side (to the side waits for editor groups); Show Definition Preview Hover. The editor context menu has the Go to items and the Peek submenu, the Go menu its symbol items. Tests: cargo test -p app goto_symbol references_model references_peek.
  • Document highlights (workbench/document_highlights.rs, wordHighlighter.ts getOccurrencesAtPosition): extension providers replace the textual occurrences; the first array answer in score order wins (an empty one too), null from all keeps the textual ones; editor.occurrencesHighlightFromAllProviders merges every answer without duplicate ranges. Write in editor.wordHighlightStrong*, Read in editor.wordHighlight*, Text as before, three overview ruler colors. Tests: cargo test -p app document_highlights.
  • Document symbols: outline_model.rs (outlineModel.ts) and workbench/document_symbols.rs (the OutlineModelService cache, 15 models, trimmed to 11); _executeDocumentSymbolProvider. Go to Symbol in Editor (workbench/quick_access/goto_symbol.rs, gotoSymbolQuickAccess.ts): @ and @: with Cmd+Shift+O, scored on $(icon) name with container matching, kind groups, the enclosing symbol active, the active pick revealed and its lines highlighted, deprecated symbols struck through; quick access help lists @ and @:. command_palette::locale_compare now orders ASCII punctuation as ICU does (@ before >). Tests: cargo test -p app outline_model quick_access symbol_icons.
  • Outline view and breadcrumb symbols (workbench/outline_pane.rs, outlinePane.ts, documentSymbolsOutline.ts, documentSymbolsTree.ts): one outline per active model version, asked on render; the breadcrumbs append the symbols around the cursor (breadcrumbs.symbolPath on/last/off, breadcrumbs.show* cut the path at the first hidden kind). The title actions are in workbench/outline_actions.rs. Not yet: the breadcrumbs symbol picker. Check: cargo test -p app outline_pane.
  • Go to Symbol in Workspace (workbench/quick_access/workspace_symbols.rs, symbolsQuickAccess.ts): Cmd+T and #; the providers ($registerNavigateTypeSupport, no selector, LanguageFeatures::all) get the filter's first word 200ms after the last keystroke, each provider's previous cacheId released; duplicates dropped as getWorkspaceSymbols, picks scored on the name and container • path, resolved before open, web links open outside. Open to the side waits for editor groups. Check: cargo test -p app workspace_symbols.
  • Call and type hierarchy (hierarchy_model.rs, workbench/hierarchy_peek.rs): one peek for both kinds; its frame, sashes and drawn preview are workbench/peek_view.rs, shared with the references peek (PeekKind, PeekLayout). The children of a row are asked when it first expands; switching direction asks again from the root. The references-view extension (Shift+Alt+F12 tree, its call/type hierarchy views) needs MainThreadTreeViews, still a stub. Check: cargo test -p app hierarchy.
  • Rename (workbench/rename.rs; rename.ts, renameWidget.ts): F2 (editorHasRenameProvider && editorTextFocus && !editorReadonly) asks the providers that can resolve, in order, for the location ($resolveRenameLocation), else takes the word at the cursor; a reject reason is an editor message. The input (InputId::Rename, the rename box of renameWidget.css with _updateStyles: editorWidget.background, widget.border, 0 0 8px 2px widget.shadow, the 26px input row in input.background with the focusBorder outline while focused, the editor font) sits at the symbol's start below the line, or above when fewer than six candidate rows fit below; the name is selected as far as the editor's one-line selection inside the range covers it. Enter (acceptRenameInput) asks $provideRenameEdits from the provider that resolved on, falling through on no result or a reject reason ("No result." info notification when none answers, "Rename failed to compute edits" on a failure); the selection collapses and the text edits apply as one undo step. Escape/Shift+Escape cancel; a change of the value, the model or a cursor outside the range cancels (checked on render, EditorStateCancellationTokenSource); a blur to another part of the window closes it. renameInputVisible and editorFocus while the input has the focus. _executeDocumentRenameProvider, _executePrepareRename. shortcuts in the code: no Refactor Preview (Cmd+Enter renames like Enter, and the "Enter to Rename, ⌘Enter to Preview" label never shows since supportPreview needs the bulk edit preview handler of workbench/contrib/bulkEdit), only text edits of the workspace edit apply. NewSymbolNamesProvider suggestions are AI (removed), so the candidate list stays empty and Up/Down restore the current name. Tests: cargo test -p app rename::.
  • Formatting (workbench/format.rs; format.ts, formatActions.ts, formattingEdit.ts, formatActionsMultiple.ts, formatActionsNone.ts, formatModified.ts, saveParticipants.ts FormatOnSaveParticipant, editorWebWorker.ts $computeMoreMinimalEdits over diff::string_diff): Format Document (Shift+Alt+F) with document formatters then range formatters of other extensions asked for the whole model; Format Selection (Cmd+K Cmd+F) per selection (an empty one as its line), touching ranges merged, provideDocumentRangesFormattingEdits when supported, else per range with intersecting results asked again for their union; editor.action.format; Format Document With... / Format Selection With... pickers (formatter args.formatter matched ignoring case, "(default)" focused, Configure Default Formatter... writing editor.defaultFormatter under the language in user settings); Format Document (none) with its "There is no formatter for '{0}' files installed." dialog opening the Extensions search; Format Modified Lines from the quick diff. _selectFormatter: the configured or only formatter, else the "Configure Default Formatter" dialog (explicit) or a silent notification with Configure... (save). Edits are made minimal, then applied between undo stops unless the model or the editor's cursor changed; the cursor keeps its place on screen (StableEditorScrollState) and is revealed centered when outside. Format on type: the first on-type provider's trigger characters, with editor.formatOnType; an edit ending on or before the typed line cancels, one below keeps it. Format on Save: trim trailing whitespace, then the formatter (editor.formatOnSaveMode file / modifications / modificationsIfAvailable), then the final newline participants, then the write; not on auto save. The editor.defaultFormatter enum lists the extensions with code, the ones with a formatter registration first (list_default_formatters). Context keys editorHasDocumentFormattingProvider, ...SelectionFormattingProvider, ...Multiple...; editor context menu and palette entries. _executeFormatDocumentProvider, _executeFormatRangeProvider, _executeFormatOnTypeProvider. Not ported: the "Formatting" language status item of a formatter conflict (it comes with the language status row), format on paste (editor.formatOnPaste, needs the paste range event), the code-action-on-save participant. stringDiff runs this crate's Myers diff where upstream runs LcsDiff; both give a shortest edit script. Tests: cargo test -p app format:: (the MoreMinimal cases of editorWebWorker.test.ts and the cases of formatActionsMultiple.test.ts), cargo test -p diff string_diff, cargo test -p config default_formatter.
  • ui-pair rename and format (/tmp/rename-format.json on a.ts main(); / function main() {}: Shift+Option+F, F2, type "start", Enter): the input, the renamed text and the caret after "st" match the reference; the caret needs bulkTextEdits.ts _createEditsTasks, which makes the active editor's edits more minimal (workbench/bulk_text_edits.rs). Differences outside these rows: the reference's input shows the "Enter to Rename, ⌘Enter to Preview" label (no preview, above), the breadcrumbs' "> ..." and the lightbulb's timing.
  • Links (workbench/links.rs; links.ts, getLinks.ts, links.css, linkComputer.ts through link_computer::compute_links as the worker's provider for every model): the providers' lists are united as LinksList._union (a later list's link drops an earlier touching one), tracked through edits (NeverGrowsWhenTypingAtEdges) and asked again after 1000 ms; underlined, the link under the pointer in editorLink.activeForeground with a pointer cursor while the trigger modifier is down (Cmd when editor.multiCursorModifier is alt, else Alt); the modifier plus click or a middle click opens it (resolving first when the provider supports it), editor.action.openLink opens the links at the selections; the hover names the gesture. _executeLinkProvider. Tests: cargo test -p app links::.
  • Linked editing (workbench/linked_editing.rs; linkedEditing.ts): ranges tracked as AlwaysGrowsWhenTypingAtEdges; an edit inside the reference range syncs the mirrors (common prefix and suffix trimmed) through OpenEditor::execute_edits_in_last_undo_group (popUndoStop plus the kept edit type), any other edit or move asks again after 75 ms. shortcuts in the code: fixed debounce, an empty range draws no 1px box.
  • Semantic tokens (semantic_tokens.rs for the theme and DTO logic, workbench/semantic_tokens.rs for the feature): the theme reads semanticTokenColors and semanticHighlighting along its include chain (Theme::semantic, Theme::set_semantic_customizations); a set property of a semantic token replaces the TextMate one, bracket pair colors are applied before it (upstream draws them as decorations over it). The extension host session now forwards VSBuffer replies as byte arrays and answers a command's {"$vsbuffer": base64} as a buffer (exthost session.rs). shortcuts in the code: fixed debounces, only the active model keeps tokens, no reset on a language change.
  • Closed on branch port-m13c-refactor:
    1. Done (branch port-m13c-refactor after the port-integrate merge b29e58af878): language status hover rows (HoverContent::LanguageStatus, hover_rows: severity codicon in notificationsErrorIcon/notificationsInfoIcon colors when the first status is a warning or error, label with icons, detail after an en dash, command link, pin/unpin action), the combined and language entries drawn as statusbarpart.css .compact-right/.compact-left (ui-pair src/main.ts: {} and TypeScript now as close as in the reference), the formatter.conflict Formatting status from analyze_formatter with Configure... (formatter/configure/dfl). _executeCodeLensProvider, $provideInlayHints and $resolveDocumentLink send cancellable requests (milestone 10's note: providers read token.isCancellationRequested).
    2. Done: injected text, inlay hints, color decorators and pickers (entries above).
    3. Done: inline completions from extensions (entry above).
    4. Done: Problems (workbench/contrib/markers). MarkersFileDecorations (decorations.rs MARKERS_PROVIDER, a synchronous provider whose data set fills; DecorationData.weight, 100 x severity, sorts it before extension data at 10). The filter box (workbench/view_filter.rs, viewFilter.ts FilterWidget, shared with the Output view: the "Showing N of M" badge while focused, the More Filters menu checked when a filter is off its default) with markers_filter.rs (markersFilterOptions.ts: @source: filters, include and ! exclude globs, files.exclude per folder for Hide Excluded Files, fuzzy text on file names, messages, source and code with highlights, negation as markersTreeViewer.ts Filter); Show Errors/Warnings/Infos, Show Active File Only, Hide Excluded Files; Clear Filters; Cmd+F, Cmd+Down, Escape on the filter; the state in the workbench.panel.markers workspace memento. Related information rows under their marker with a twistie, multi-line messages with the per-row chevron and Show message in multiple/single lines. View as Table / View as Tree (workbench/problems_table.rs, markersTable.ts columns and sort; problems.defaultViewMode). Quick fixes (workbench/problems_quick_fix.rs): a hovered row asks its marker's quick fixes after 300 ms, the light bulb replaces the severity icon, a click lists them, running one opens the file and applies. shortcuts in the code: no row focus (no Cmd+. or Enter on rows), no column sashes, fixes only for open models. Tests: cargo test -p app markers_filter problems_view problems_table.
    5. Done: language detection (language_detection.rs, workbench/language_detection.rs): @vscode/vscode-languagedetection in a Bun worker (bun --eval of language_detection/worker.mjs, JSON lines on stdin and stdout) loaded from the app's node_modules (port/tools/package-app copies it); the auto-detect of untitled and extensionless plain text models, the status light bulb, editor.detectLanguage and Auto Detect. The regexp model is not in 1.147.0's dependencies, so the history biases have nothing to feed. shortcut in the code: only edits of the active editor trigger the detection. Finding: the reference checkout (unbuilt, run from source) detects nothing. A typed Python snippet stays Plain Text after 14 s, and Detect Language from Content (Shift+Alt+D) answers "Unable to detect editor language", though its node_modules/@vscode/vscode-languagedetection has the model and that model in node gives py 0.33 over hs 0.07, which detectLanguagesImpl yields (0.38 after the bucket 1 correction, 0.31 ahead). So the worker of the source run fails to load the model; vscode-regexp-languagedetection is also missing there, as in 1.147.0's dependencies. The port follows the code, not that run.
    6. Done: snippet actions (workbench/snippet_actions.rs: Insert Snippet, Surround With, Fill File with Snippet, Configure Snippets, the snippet code actions), Tab completion (workbench/tab_completion.rs), Emmet Expand Abbreviation (workbench/emmet.rs), code actions on save (workbench/code_actions/on_save.rs, editor.codeActionsOnSave schema per provided source kind), Read Line with Inlay Hints (workbench/inlay_hints_accessibility.rs), $tokensAtPosition, the Outline title actions (workbench/outline_actions.rs: Collapse/Expand All, Follow Cursor, Filter on Type as stored state only, Sort By; outline/state), the outline rebuilt when a symbol provider registers. Comments (workbench/comments.rs, workbench/comments_view.rs, workbench/editor_view/comment_glyph.rs): controllers and threads from MainThreadComments, the Comments panel (hideIfEmpty) and the gutter glyph. The comment thread widget (workbench/comment_thread_widget.rs): a zone per expanded thread in every editor of its resource, resized from the comment count (body lines taken as 18px, shortcut:), the glyph toggles it, replies run the comments/commentThread/context items with the CommentThreadReply argument ($mid 9, the thread as $mid 7), Cmd+Enter runs the first; the reply is a single-line input box in the editor frame. The Comments panel gained the filter box (Show Resolved/Unresolved, Sort By, stored in memento/commentsViewState), Collapse/Expand All, row selection and the unresolved badge. _executeFoldingRangeProvider (workbench/folding_providers.rs) made the vscode API - languages api-tests pass (7 of 7). Extension selection range providers (workbench/selection_ranges.rs) are asked once per Expand from a new selection; their ranges replace the bracket ones (providers.length === 1). Left: comment edit mode, reactions and comment menus, commenting ranges, Filter on Type in the outline tree (explorer_find.rs generalised), dropOrPasteInto, inlineProgress, the language feature extension rows.

Milestone 11: workbench layout and chrome

  • Notifications (notifications.rs model, workbench/notifications_view.rs views; notifications.ts, notificationsToasts.ts, notificationsCenter.ts, notificationsViewer.ts, notificationsStatus.ts, notificationsCommands.ts, notificationService.ts): toasts (3 at most, newest on top, purge after 10/12/15 s unless sticky, hovered, focused or the window is in the background; 800 ms spam protection of 3), the center (Clear All, Configure Do Not Disturb with per-source filters stored in notifications.doNotDisturbMode and notifications.perSourceDoNotDisturbMode, Configure Notifications Position, Hide), rows with expand/collapse/clear/More Actions, buttons, command:/file:/http(s): links, Copy Text, double-click toggle, middle-click close, a 2px progress bar; the status bar bell ($(bell), $(bell-dot), $(bell-slash), its tooltips) and for workbench.notifications.position: top-right the title bar bell. Commands and context keys from notificationsCommands.ts. Not ported: toast slide animation, screen reader announcements (GPUI has neither), notifications.toggleDoNotDisturbModeBySource (quick pick "More..."). Tests: cargo test -p app notification.
  • $showMessage (main_thread_message.rs, mainThreadMessageService.ts): non-modal as a notification with the items as buttons, the extension as source and Manage Extension; answers the picked handle, undefined when closed. Modal as an NSAlert sheet (dialog.rs), the close affordance or Cancel/OK last. No urgent sources (sign-in removed).
  • Former shortcut: logs that now notify as upstream does: runCommands argument errors and failures, system-wide keybinding warnings, command failures from keybindings and menus, explorer errors (with Retry), find "No matches", and file save errors (textFileSaveErrorHandler.ts's generic message; its Retry, Save As and Revert actions are not ported).
  • Progress (main_thread_progress.rs, mainThreadProgress.ts, progressService.ts): Notification location as an info notification with the progress bar, Cancel when cancellable and Manage Extension, kept 800 ms from the start; Window location as a silent notification after 150 ms. A progress notification that is neither a toast nor in the open center shows as the status.progress entry (spinner, {title}: {message}, tooltip [source] ..., click shows the center) 150 ms after it appears, for at least 150 ms. Source Control location shows nothing (no SCM view). Tests: cargo test -p app progress.
  • Extension status bar entries (main_thread_status_bar.rs, workbench/status_entries.rs; mainThreadStatusBar.ts, statusBarExtensionPoint.ts, statusbarModel.ts): $setEntry/$disposeEntry, error and warning backgrounds as entry kinds, $(icon) text, colors, tooltip, command; static statusBarItems (with contribStatusBarItems) shown from the start and sent with $acceptStaticEntries. Order: higher priority first, then the extension id hash; left entries above 50 go before Problems, right entries above 100.1 before the editor items (shortcut: extensions between the editor entries' 100.1 and 100.8 all go first).
  • Checks: port/tools/ref-dom reads geometry from the running reference over CDP (dump:<selector>); the port/fixtures/extensions/messages extension shows the same messages in both apps (PORT_MESSAGES=error,info,long).
  • Split view (split_view.rs, splitview.ts): views with minimum, maximum, snap, layout priority and visibility; proportional layout or priority layout (proportionalLayout: false), Alt sash drags, snapping past half a view's minimum, resizeView, setViewVisible with the cached visible size, updateSashEnablement for the sash cursors. Shared by the keybindings table and the part grid. Tests mirror splitview.test.ts.
  • Part grid (workbench/layout.rs model, workbench/part_grid.rs drawing and state; layout.ts): the floating layout's middle row of activity bar, side bar, editor column (editor over panel, panel centered) and secondary side bar, with the 4px card margins inside the part views as the reference's grid views have them. Sizes are LayoutStateModel keys in profile storage (workbench.sideBar.size, workbench.panel.size, workbench.auxiliaryBar.size, defaults from the window size), visibility in workspace storage (workbench.sideBar.hidden, default hidden in an empty window, panel.hidden and auxiliaryBar.hidden default hidden). Upstream saves sizes on shutdown; the port saves after each sash drag. The activity bar follows workbench.activityBar.location (default shows it; top, bottom and hidden hide its grid view as upstream). Sashes: 4px in the gap after their boundary, mac cursors of sash.css, sash.hoverBorder after the 300 ms hover delay and while dragged; double click does nothing (the workbench grid has no sash reset). Commands: Toggle Primary Side Bar (Cmd+B), Close Primary Side Bar, Move Activity Bar to Side, Hide Activity Bar; the active activity bar icon hides the side bar unless workbench.activityBar.iconClickBehavior is focus. Tests: cargo test -p app layout part_grid split_view; ui-pair in port/results/layout.md.
  • GPUI's keyboard hover suppression is removed in the vendored wu (HitboxId::is_hovered no longer returns false after a key press): CSS :hover follows only the pointer, and the suppression also split one element's hover, as a status bar entry under a still pointer kept the hover text color of its layout pass but lost its outline and icon colors once typing started (cargo test -p app a_hovered_status_item_is_outlined_and_its_icons_take_the_hover_foreground). It was also the cause given for a sash shown again under a still pointer after Cmd+B highlighting only on the next mouse move; not rechecked since.
  • Panel and secondary side bar (workbench/panel.rs; panelPart.ts, auxiliaryBarPart.ts, paneCompositePart.ts): cards with a 32px composite title (view tabs, Maximize/Restore and Close for the panel, Toggle Maximized and Hide for the secondary side bar) over the active view or "Drag a view here to display.". Views register with register_panel_view(PanelView { id, title, render }); the active one is workbench.panelpart.activepanelid (workbench.auxiliarybar.activepanelid in the secondary side bar) in workspace storage. Commands: Toggle Panel (Cmd+J), Close Panel, Toggle Maximized Panel (the editor column's editor view hidden), Toggle Secondary Side Bar (Alt+Cmd+B), Close Secondary Side Bar, Maximize/Restore/Toggle Maximized Secondary Side Bar (layout.ts setAuxiliaryBarMaximized: side bar, panel and editor hidden and brought back as they were, the bar back at auxiliaryBar.lastNonMaximizedSize; showing another part or hiding the bar leaves the state first). Context keys panelVisible, panelMaximized, panelPosition, panelAlignment, auxiliaryBarVisible, auxiliaryBarMaximized. A composite tab dragged onto the other part moves its container there (moveViewContainerToLocation, views.customizations in profile storage, only moved containers kept) and opens it; the panel falls back to Terminal. While a tab is over a part without an active view, its title and message take editorGroup.dropBackground; over a part with one there is no feedback (the composite bar's insertion markers and reordering are not ported), and the drag shows the tab's label as GPUI's drag preview where Chromium's OS drag image is not in a window capture. Filter views (Problems, Output, Comments) put their filter at the top of the view when it is narrower than 600px and taller than 100px (viewPane.ts shouldShowFilterInHeader), its badge hidden below 400px. Tabs take Chromium's fractional text widths: GPUI rounds a text element's width up, which made the Problems tab with its badge 2px wider. Not ported: moving side bar containers or single views (Move View), the title's actions-grow relayout is approximated (tabs_that_fit).
  • Side bar card and compact activity bar (workbench/side_bar.rs): with workbench.activityBar.location top or bottom the view containers are 36x32 tabs in the side bar's header or footer on the tab strip's background, and the Manage gear moves to the title bar (workbench.action.activityBarLocation.top/.bottom).
  • Empty window Explorer (workbench/empty_view.rs; emptyView.ts, explorerViewlet.ts): No Folder Opened expanded with "You have not yet opened a folder." and Open Folder, plus the noFolderButEditorsHelp line while editors are open. workbench.action.files.openFolder picks a folder and relaunches the binary with this window's flags and the folder, then quits (as upstream replaces the window). shortcut: with unsaved editors this window stays open (hot exit is item 5); the git extension's Clone Repository welcome item and workbench.action.addRootFolder are not ported.
  • View panes (workbench/view_panes.rs; paneview.ts, viewPaneContainer.ts, viewContainerModel.ts): the Explorer's views (the folder's or No Folder Opened, Outline, Timeline) and Source Control's (Changes, Graph while the active repository has a history provider, contributed views collapsed) and the Extensions viewlet's (extensionsViewlet.ts: below its 41px search header, one view merged with the container; flexibleHeight Installed and Recommended store their count as {id}.size and take no body while it is 0, Outdated expands while it lists any, Workspace Recommendations and, without installed extensions, Recommended expand on show if not empty; header count badges except Popular's, Update All Extensions and the workspace recommendation actions always shown; cargo test -p app the_views_are_panes) in a split view per PaneContainer, a collapsed pane its 28px header, an expanded one at least the header and 120px. A header click, Enter or Space toggles, Left collapses, Right expands, Up and Down move between headers; an expanded pane comes back at its last size. Sashes between panes as the grid's (300 ms hover, mac cursors). Dragging a header onto another pane moves it before or after that pane by the half it is over, with the sideBar.dropBackground overlay (dashed contrastActiveBorder outline in high contrast). State as ViewDescriptorsState: collapsed and size per view in workspace storage workbench.explorer.views.state (workbench.scm.views.state), order in profile storage <storageId>.hidden. A single view merges into the container (mergeViewWithContainerWhenSingleView): no header, the composite title is its singleViewPaneContainerTitle ("Source Control") or "Container: View", its actions beside it. A header's actions show on hover, with focus in the header or the body (:focus-within), for Graph whenever expanded (ViewPaneShowActions.WhenExpanded), or with workbench.view.alwaysShowHeaderActions; a header focused by a click has no outline (:focus-visible). The Changes header carries SCMTitle's navigation actions and "..." (isHiddenByDefault View as List/Tree not listed: no toolbar menu shows a hidden action); the container title's "..." is the Views submenu. ui-pair port/fixtures/ui-pair/m11/scm-panes.json (FOLDER: port/fixtures/workspace as a git repository with two commits and notes.txt changed): the Changes and Graph headers with their actions, Graph collapsed, Changes collapsed, as the reference. Session m11f, the pair again with FOLDER a git repository of port/fixtures/workspace (two commits, notes.txt changed; the script makes it in /tmp): the Changes group row and resource rows at the reference's x (group twistie 7px further in and the label 3px after it, resource icon 4px past its indent, measured), the Graph header's "Auto" ref picker (SCMHistoryItemRefsActionViewItem of the 'auto' filter: git-branch, "Auto" at 11px in icon.foreground, the current, remote and base refs as tooltip), disabled header actions at 0.4 opacity (git.pullRef without a remote), the decoration letter in gitDecoration.* colors and the name in the row's foreground (fileDecorations: { colors: false }), from contributed colors (theme.rs extension_colors, colorExtensionPoint.ts). Since the fourth pass equal there too: the header actions 24px apart with the title ellipsized ("Gr..."), git-fetch drawn as repo-fetch (codicons.ts registers it again at 0xec1d over codiconsLibrary.ts's 0xecb2), and the Graph pane 3px above the middle (computeInitialSizes shares the container's height with its 5px bottom gap). The Run and Debug, Extensions and webview containers still use section_header.
  • Views drag and drop (branch views-dnd; compositeBar.ts, compositeBarActions.ts, viewPaneContainer.ts, dnd.ts): a view header dropped on a bar item gets a new container before or after it by the half it is over (compositeBar.ts drop), a container dropped on a pane merges its views there with its first active view at the drop position, a composite dropped where it already is opens focused. Held 800 ms over a bar item, a drag opens it (DelayedDragHandler). The active side bar container (workbench.sidebar.activeviewletid) is stored at quit and on release, not on each open as compositePart.ts does: the port sets the side bar view in 14 places without one change event, and only the value at quit is read back.
  • Text models and editors (coordinator decision, option A): TextModel (document, version, undo stack, guides, markers, host reference) is shared as SharedModel = Rc<RefCell<TextModel>> by every editor of its resource in any group; OpenEditor keeps the view state (selections, scroll, folding, highlights, view zones). An edit is logged on the model (TextModel.edits, 1000 replaces); an editor of another group follows it in sync_with_model (cursors tracked as decorations are, else clamped), run each frame and on group activation.
  • Editor groups (editor_grid.rs, workbench/editor_groups.rs; gridview.ts, grid.ts, editorPart.ts, editorCommands.ts): EditorGroup holds the active group in its fields and the others in other_groups; activate_group swaps them, and another group draws through the same editor code while swapped in (with_group, drawing_inactive leaves out its focus, input handler and widgets; a press activates it first). Models, diffs, disposed models and view states are the part's. The host sees one text editor per group showing one (editorPosition = grid order) and every group in $acceptEditorTabModel; tab ids start with the group id. A tab drags within its group, onto another group's tabs, or onto a group's body, whose edges split it (editorDropTarget.ts getSplitDirection, split_direction). The grid and each group's file editors (tab order, MRU, preview) persist in the workspace memento memento/workbench.parts.editor under editorpart.state in upstream's JSON shape, saved on every editor change and restored with the workspace state (editor_groups/part_state.rs; the sticky count per group restores pinned file and notebook editors; other editor kinds and locked groups store locked). shortcut: $closeTab across several groups at once is not ported yet.
  • History (navigation.rs, workbench/history_actions.rs; historyService.ts): the three navigation stacks per workbench.editor.navigationScope key, fed by editor changes (editors_changed), cursor moves (cursor_position_changed, source to reason as textEditor.ts) and edits. Reopen Closed Editor keeps file editors only (a diff or untitled editor has no reopenable input in the port). shortcut: mouse buttons 4 and 5 (workbench.editor.mouseBackForwardToNavigate) are not read.
  • Sash settings (contrib/sash): sash_size, sash_hover_size, sash_hover_delay in part_grid.rs; the grippers recede after autoHideGrippersDelay without a mouse move. shortcut: no opacity transition (no motion support in GPUI elements here).
  • Panel views (PanelView in panel.rs: id, title, body and title actions). The Output view's code editor lives in the hidden group PANEL_GROUP (u32::MAX), outside the grid, the MRU order and $acceptEditorTabModel; focusing it swaps that group in as split groups do, so editorPosition stays the grid's. Terminal is a panel view with its own body. Its title actions (channel dropdown, filter, Clear, gear) are in the panel's title bar as upstream.
  • Tree views (custom_tree.rs model, workbench/tree_view.rs; mainThreadTreeViews.ts, treeView.ts): the views of contributes.views.explorer whose when holds are Explorer panes, collapsed at first (showCollapsed). A view's tree exists only while its pane is expanded and the Explorer shows ($setVisible, onView:<id> on the first show), as upstream creates the tree on render: a $refresh or $reveal of a hidden view fetches nothing. The root fetch is shared (AsyncDataTree), so a reveal during it does not fetch twice. Pane ids are &'static str; a contributed id is interned once (static_id). The views of the other containers (scm, debug, test, viewsContainers.activitybar) follow the same rule in their container (tree_view_body_visible, workbench/view_containers.rs); the open gaps are in the ledger rows of workbench/services/views and mainthread/MainThreadTreeViews.
  • View columns (activate_column, editorGroupColumn.ts columnToEditorGroup): $tryShowTextDocument and _workbench.open pick the nth group in grid order, adding groups in the side-by-side direction below 9, else the group beside; MainThreadTextEditors requests address the active editor of any group.
  • Panel views since the port-integrate merge (624b11540c5): Problems (workbench/problems_view.rs, order 0), Output, Debug Console (workbench.panel.repl), Test Results (workbench.panel.testResults, a tab only while results exist: PanelView.visible), Terminal. PanelView.badge draws the tab's count (activityBarBadge.*). Ports is n/a: forwarded ports belong to remote and tunnels, removed by decision.
  • 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 (":