You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
UX Constraints: The delete (bin) icon on suggestion chips disappears automatically after a 3-second timeout (postDelayed), and it is completely disabled for raw user-typed words (DICTIONARY_USER_TYPED).
Real-time Filtering: Blacklisted words can still appear during active typing because the filter only applies to dictionary suggestions, not the raw input stream.
Proposed Solutions
1. UI & State Management Improvements
Remove the 3-second timeout (postDelayed). Ensure that only one word can be in delete mode at a time—long-pressing a new word must instantly clear the bin icon from the previous word. Let the delete state persist until the user taps the bin or interacts elsewhere.
Track a single active delete view state so long-pressing a new word automatically resets the previous one.
Remove the restriction on DICTIONARY_USER_TYPED so users can delete and blacklist any word they type.
2. Engine-Level Filtering with Zero Performance Impact (Caching)
To prevent heavy file I/O or lag on every keystroke, load the blacklist .txt files into an in-memory HashSet upon initialization or dictionary reload.
Perform real-time checks against this in-memory Set (microseconds lookup time). This ensures blacklisted words are completely suppressed from both raw typing and suggestions without adding any performance overhead or lag to the core engine.
Current Limitations
postDelayed), and it is completely disabled for raw user-typed words (DICTIONARY_USER_TYPED).Proposed Solutions
1. UI & State Management Improvements
postDelayed). Ensure that only one word can be in delete mode at a time—long-pressing a new word must instantly clear the bin icon from the previous word. Let the delete state persist until the user taps the bin or interacts elsewhere.DICTIONARY_USER_TYPEDso users can delete and blacklist any word they type.2. Engine-Level Filtering with Zero Performance Impact (Caching)
.txtfiles into an in-memoryHashSetupon initialization or dictionary reload.Set(microseconds lookup time). This ensures blacklisted words are completely suppressed from both raw typing and suggestions without adding any performance overhead or lag to the core engine.