Skip to content

feat(desktop): enable native spellcheck in message composer#1515

Merged
wesbillman merged 2 commits into
mainfrom
feat/spellcheck
Jul 6, 2026
Merged

feat(desktop): enable native spellcheck in message composer#1515
wesbillman merged 2 commits into
mainfrom
feat/spellcheck

Conversation

@klopez4212

Copy link
Copy Markdown
Contributor

Flips the Tiptap editor's spellcheck attribute from false to true so macOS provides the red underline on misspelled words and the standard right-click → spelling suggestions context menu.

autocorrect remains off to avoid unwanted inline auto-replacement.

Changes

  • desktop/src/features/messages/lib/useRichTextEditor.ts: spellcheck: "false"" → spellcheck: "true"`

Testing

  • Typed misspelled words in the message composer → red underline appears
  • Right-click on misspelled word → macOS spelling suggestions shown
  • Autocorrect does not fire (no surprise replacements)

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 90dd051183

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread desktop/src-tauri/src/commands/channels.rs Outdated
Comment thread desktop/src/features/chats/hooks.ts Outdated
Comment thread crates/buzz-acp/src/lib.rs Outdated
Flips the Tiptap editor's spellcheck attribute from "false" to "true"
so macOS provides the red underline on misspelled words and the standard
right-click → spelling suggestions context menu.

autocorrect remains off to avoid unwanted inline auto-replacement.

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Review (Brain, agent review on Wes's behalf) — LGTM

One-line flip, full CI green including all desktop e2e shards. I checked the history: spellcheck: "false" came in with #1000 ("Polish channel modal forms") with no recorded rationale — it looks incidental, not a deliberate product decision, so enabling it is safe. Note autocorrect: "off" stays as-is, which is the right split: red squiggles without the browser rewriting your text.

Only real risk is cosmetic — squiggles inside code spans/blocks in the ProseMirror doc — and that's easy to revisit if it annoys anyone.

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Follow-up (Brain): Wes flagged a concern from history — before spellcheck was disabled, squiggles appeared under @mentions and #channel-names while typing.

I checked how mentions render in the composer: mentionHighlightExtension.ts decorates @Name / #channel matches with Decoration.inline(..., { class: "mention-chip" }) — they stay plain text nodes in the ProseMirror doc, not atomic mention nodes. So with spellcheck: "true" on the editable, the native spellchecker will absolutely treat @Pinky or #wes-code-reviews as misspelled words and squiggle them. Same applies to code spans/blocks.

The fix is cheap and surgical: add spellcheck: "false" to the attributes of those inline decorations (ProseMirror applies decoration attributes to the rendered span), e.g.

Decoration.inline(from, to, { class: className, spellcheck: "false" });

…and equivalently for the code-mark ranges if we want to spare code spans too.

Suggest this PR either includes that decoration attribute or holds until it does — otherwise we reintroduce the exact noise that got spellcheck turned off last time. Downgrading my earlier LGTM to "needs the mention-decoration exclusion first."

Add spellcheck="false" to mention/channel inline decorations in
mentionHighlightExtension.ts so the native spellchecker skips @name
and #channel-name tokens. Also set spellcheck="false" on inline code
and code block HTMLAttributes to prevent squiggles on identifiers.

Addresses review feedback from wesbillman — without these exclusions,
enabling spellcheck reintroduces the noise that got it disabled in #1000.
@klopez4212 klopez4212 requested a review from wesbillman July 6, 2026 07:32
@klopez4212

Copy link
Copy Markdown
Contributor Author

Addressed the feedback — pushed 943f467:

  • Mention/channel decorations: Added spellcheck: "false" to all Decoration.inline() calls in mentionHighlightExtension.ts so @Name and #channel-name tokens won't get red-squiggled.
  • Inline code spans: Added HTMLAttributes: { spellcheck: "false" } to the code StarterKit option so identifiers in backticks are excluded.
  • Code blocks: Same treatment on codeBlock for explicitness (browsers usually skip <pre><code> already, but belt-and-suspenders).

All desktop tests pass. Ready for re-review @wesbillman.

@wesbillman wesbillman merged commit a1b5983 into main Jul 6, 2026
25 checks passed
@wesbillman wesbillman deleted the feat/spellcheck branch July 6, 2026 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants