Remove the system-wide keybindings first-run dialog#324045
Open
ulugbekna wants to merge 2 commits into
Open
Conversation
The first-run notice could appear in multiple windows at once on startup, and the single-window election meant to prevent that was racy across concurrently syncing renderers. Rather than harden the election, remove the dialog entirely: the feature is always on and users who opt a keybinding into "systemWide" know what they are doing. This deletes the whole notice path, which existed only to serve the dialog: - renderer: drop the first-run notification, the acknowledged-storage gate, and the IDialogService/IStorageService deps; sync() now just warns about ignored when-clauses and pushes to the main process. - main process: drop the elected-window bookkeeping so INativeSystemWideKeybindingResult only reports failures. - update the systemWide keybindings.json schema description and drop the now-obsolete election unit tests. Global registration and trigger routing are unchanged. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Removes the first-run “system-wide keybindings” notice path to avoid racy multi-window startup behavior, keeping the underlying global shortcut registration/routing intact while simplifying the renderer↔main-process sync contract.
Changes:
- Drops the renderer-side first-run dialog, storage gating, and related service dependencies; sync now only warns about ignored
whenclauses and pushes keybindings to the main process. - Simplifies main-process sync results to report only registration failures via
INativeSystemWideKeybindingResult. - Updates schema text and adapts unit tests to the updated return shape.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/services/keybinding/browser/keybindingService.ts | Updates the systemWide schema description to remove the first-run notice wording. |
| src/vs/workbench/contrib/keybindings/electron-browser/systemWideKeybindings.contribution.ts | Removes the first-run dialog/storage gate and leaves only warning + sync behavior. |
| src/vs/platform/native/electron-main/nativeHostMainService.ts | Returns the main-service result directly from syncSystemWideKeybindings (failures only). |
| src/vs/platform/globalKeybindings/test/electron-main/globalKeybindingsMainService.test.ts | Updates tests to destructure { failed } from the new result shape. |
| src/vs/platform/globalKeybindings/electron-main/globalKeybindingsMainService.ts | Changes updateKeybindings to return INativeSystemWideKeybindingResult instead of a raw string array. |
Review details
- Files reviewed: 5/5 changed files
- Comments generated: 0
- Review effort level: Low
alexr00
previously approved these changes
Jul 2, 2026
Co-locate an architecture/spec document next to the renderer contribution so future work has the full feature context (user contract, renderer<->main-process flow, the systemWide flag plumbing, design rationale, tests, and gotchas). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
aeschli
approved these changes
Jul 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #323871.
Why
We got feedback that the first-run notice for system-wide keybindings can pop up in more than one window at the same time on startup. The feature had a main-process "elect one window" mechanism meant to prevent that, but it was racy across renderers that sync concurrently, so the notice still leaked into multiple windows.
Rather than harden the election, we're removing the dialog entirely. The feature is always on, and a user who marks a keybinding
"systemWide": trueinkeybindings.jsonalready knows what they are doing, so a one-time notice adds little.What
Deletes the whole notice path, which only existed to serve that dialog:
systemWideKeybindings.contribution.ts): drops the first-run notification, the acknowledged-storage gate, and theIDialogService/IStorageServicedependencies.sync()now just warns about ignoredwhenclauses and pushes bindings to the main process.globalKeybindingsMainService.ts,nativeHostMainService.ts): drops the elected-window bookkeeping, soINativeSystemWideKeybindingResultreports only registration failures.systemWidedescription in thekeybindings.jsonschema and removes the now-obsolete election unit tests.Global registration and trigger routing are unchanged.
Notes for reviewers
The diff is a net removal (+17 / -63 across 5 files). It builds on an unmerged follow-up that had added the election machinery, so the squashed change relative to
maincleanly deletes the dialog without leavingnative.tsor the test service mock touched.How to test
systemWidekeybinding tokeybindings.json, e.g.{ "key": "ctrl+cmd+a", "command": "workbench.action.openAgentsWindow", "systemWide": true }.