Skip to content

Conversation

@PraveenDevamane
Copy link

@PraveenDevamane PraveenDevamane commented Nov 24, 2025

This PR implements the feature described in issue #1165: a real-time spell checker in the AppFlowy Editor. It includes dictionary loading, word scanning & suggestion generation, visual underlines for misspelled words, hover suggestion menus, and word replacement functionality — all integrated in a performant, non-intrusive way.

@CLAassistant
Copy link

CLAassistant commented Nov 24, 2025

CLA assistant check
All committers have signed the CLA.

Copilot AI review requested due to automatic review settings December 13, 2025 14:52
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR implements a comprehensive spell checking feature for the AppFlowy Editor, adding real-time dictionary-based spell checking with visual underlines, hover-based suggestion menus, and autocorrect functionality for desktop platforms.

Key Changes

  • Dictionary-based spell checker with a 10,000-word dictionary and smart exclusion rules for technical terms, proper nouns, and code identifiers
  • Visual spell check indicators with red wavy underlines for misspelled words integrated into the rich text rendering
  • Interactive suggestion system with hover-based popup menus for word corrections and automatic word replacement

Reviewed changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
lib/src/service/spell_check/spell_checker.dart Core spell checker implementation with dictionary loading, word validation, Levenshtein-based suggestions, and grammatical variation detection
lib/src/editor/block_component/rich_text/appflowy_rich_text.dart Integration of spell checking into rich text rendering with word tokenization, async checking, and visual underlines
lib/src/editor/block_component/rich_text/spell_check_overlay.dart Hover-based overlay widget for displaying spell check suggestions and handling word replacements
lib/src/editor/block_component/rich_text/spell_hover.dart Reusable hover widget for managing suggestion popups with mouse region handling
lib/src/editor/editor_component/service/ime/delta_input_on_replace_impl.dart Desktop autocorrect integration that automatically applies top suggestions during text input
test/spell_checker_test.dart Comprehensive test suite covering dictionary lookup, exclusion rules, suggestions, and grammatical variations
pubspec.yaml Asset configuration to include the dictionary file
assets/dictionary/words.txt 10,000-word English dictionary for spell checking
example/macos/Runner.xcodeproj/project.pbxproj macOS deployment target update from 10.14 to 10.15
example/macos/Podfile Podfile platform version update to match deployment target
devtools_options.yaml New DevTools configuration file

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

3 participants