Skip to content

SD-2875 - fix: context menu not showing suggestions after typecheck#3174

Merged
chittolinag merged 4 commits intomainfrom
gabriel/sd-2875-bug-spellcheck-suggestions-missing-from-context-menu-in-129
May 6, 2026
Merged

SD-2875 - fix: context menu not showing suggestions after typecheck#3174
chittolinag merged 4 commits intomainfrom
gabriel/sd-2875-bug-spellcheck-suggestions-missing-from-context-menu-in-129

Conversation

@chittolinag
Copy link
Copy Markdown
Contributor

@chittolinag chittolinag commented May 5, 2026

Issue

  • Right-click on a misspelled word stopped showing spelling suggestions in 1.29+.
  • <ContextMenu> was rebound from the inner Editor to the PresentationEditor wrapper.
  • resolveProofingContext only looked up editor._presentationEditor, which the wrapper doesn't have — so it returned null and the menu dropped every suggestion.

Proposed solution

  • In resolveProofingContext (context-menu/utils.js), resolve the manager from any of the three editor handles the menu can be wired to:
    • inner editor → _presentationEditor.proofingManager
    • story editor → presentationEditor.proofingManager
    • wrapper → proofingManager

Behavior tests

  • tests/behavior/tests/slash-menu/proofing-context-menu.spec.ts:
    • Types "Hello teh world", attaches a stub provider, right-clicks teh, asserts the suggestions appear and clicking the rewrites the doc.
    • Negative test: no proofing-replace-* rows appear when there's no issue at the cursor.
  • Verified to fail without the fix.

@linear
Copy link
Copy Markdown

linear Bot commented May 5, 2026

@chittolinag chittolinag marked this pull request as ready for review May 5, 2026 20:46
@chittolinag chittolinag requested a review from a team as a code owner May 5, 2026 20:46
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown
Contributor

@caio-pizzol caio-pizzol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chittolinag lgtm :)

left two optional notes inline - skip if you'd rather move on.

Comment thread tests/behavior/tests/slash-menu/proofing-context-menu.spec.ts Outdated
Comment thread packages/super-editor/src/editors/v1/components/context-menu/tests/utils.test.js Outdated
chittolinag and others added 3 commits May 5, 2026 19:12
Co-authored-by: Caio Pizzol <97641911+caio-pizzol@users.noreply.github.com>
Co-authored-by: Caio Pizzol <97641911+caio-pizzol@users.noreply.github.com>
@chittolinag chittolinag merged commit 2fa9769 into main May 6, 2026
68 checks passed
@chittolinag chittolinag deleted the gabriel/sd-2875-bug-spellcheck-suggestions-missing-from-context-menu-in-129 branch May 6, 2026 02:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants