{{ message }}
Add spelling suggestions to the Integrated Browser context menu - #333043
Merged
Joaquín Ruales (jruales) merged 3 commits intoAug 27, 2026
Merged
Conversation
The custom context menu replaced Chromium's, so misspelled words still get red underlines but right-click only showed Cut/Copy/Paste/Inspect. Surface dictionarySuggestions and Add to Dictionary via Electron's replaceMisspelling / addWordToSpellCheckerDictionary APIs.
Copilot started reviewing on behalf of
David B. Bitton (davidbitton)
August 27, 2026 21:18
View session
Contributor
Contributor
There was a problem hiding this comment.
Pull request overview
Adds spelling correction actions to the Integrated Browser context menu.
Changes:
- Displays Chromium spelling suggestions.
- Adds a localized Add to Dictionary action.
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+577
to
+580
| menu.append(new MenuItem({ | ||
| label: localize('browser.contextMenu.addToDictionary', 'Add to Dictionary'), | ||
| click: () => webContents.session.addWordToSpellCheckerDictionary(params.misspelledWord) | ||
| })); |
Contributor
Author
There was a problem hiding this comment.
Fixed in 8655718. Add to Dictionary is only shown when webContents.session.isPersistent() is true (global persist / workspace-fromPath). Ephemeral sessions still get Chromium suggestions via replaceMisspelling. If there are no suggestions and the session cannot persist a dictionary word, the spelling section is omitted entirely.
Contributor
Author
|
@microsoft-github-policy-service agree company="Code No Evil, LLC" |
This was referenced Aug 27, 2026
Electron's addWordToSpellCheckerDictionary returns false for ephemeral partitions, which Integrated Browser uses for untrusted workspaces and workbench.browser.dataStorage=ephemeral. Hide that item unless session.isPersistent(), and skip an empty spelling section when there are no suggestions either.
Contributor
Author
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Joaquín Ruales (jruales)
approved these changes
Aug 27, 2026
Joaquín Ruales (jruales)
left a comment
Contributor
There was a problem hiding this comment.
Thanks!
Raymond Zhao (rzhao271)
approved these changes
Aug 27, 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.

Fixes #333042
Problem
The Integrated Browser spellchecks editable fields (red underlines), but the custom context menu never reads
params.misspelledWord/params.dictionarySuggestions. Right-clicking a misspelled word only shows Cut / Copy / Paste / Inspect.Change
When the click is on a misspelled word:
webContents.replaceMisspelling)session.isPersistent()is true (ephemeral sessions used for untrusted workspaces /workbench.browser.dataStorage: ephemeralcannot persist that API)Inspect / Add Element to Chat are unchanged.
How to test
workbench.browser.dataStorage: ephemeral. Confirm suggestions still work and Add to Dictionary is not shown.