Skip to content

ADFA-2681: Fix autocomplete display#932

Merged
dara-abijo-adfa merged 4 commits intostagefrom
ADFA-2681-fix-autocomplete-display
Feb 6, 2026
Merged

ADFA-2681: Fix autocomplete display#932
dara-abijo-adfa merged 4 commits intostagefrom
ADFA-2681-fix-autocomplete-display

Conversation

@dara-abijo-adfa
Copy link
Contributor

Prevent autocomplete suggestions from disappearing too quickly by showing the autocomplete window alongside the diagnostics popup.

@dara-abijo-adfa dara-abijo-adfa requested a review from a team February 5, 2026 13:10
@dara-abijo-adfa dara-abijo-adfa self-assigned this Feb 5, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 5, 2026

📝 Walkthrough

Release Notes

Autocomplete Display Fix

  • Prevent autocomplete window dismissal: Autocomplete suggestions no longer disappear when diagnostics, signature help, or action menus are displayed alongside them

    • New dismissPopupWindows() utility method selectively dismisses diagnostics, signature help, and actions menus while preserving the autocomplete window
    • ensureWindowsDismissed() continues to dismiss all windows including autocomplete when needed (e.g., on editor release or focus loss)
  • Improved fast typing support: Removed aggressive early-hide optimization that was cancelling completion requests when typed too quickly

    • Previously, completion was cancelled if the request arrived within cancelCompletionNs threshold; now the completion process continues uninterrupted
  • Updated component replacement API: replaceComponent() now accepts an additional replacement parameter to provide the replacement instance

    • Method signature changed from replaceComponent(clazz: Class<T>) to replaceComponent(clazz: Class<T>, replacement: T & Any)

Risks & Breaking Changes

⚠️ API Breaking Change: The replaceComponent() method signature has been modified with a new required parameter. Any code calling this method will need to be updated.

⚠️ Behavioral Change Risk: The shift from ensureWindowsDismissed() to dismissPopupWindows() in popup window display logic means autocomplete windows now coexist with other popups. Monitor for potential UI overlap issues or unexpected interaction patterns.

⚠️ Timing Optimization Removal: The early-hide mechanism removal could impact performance on low-end devices or rapid completion requests. Verify no adverse effects under high-frequency typing scenarios.

Walkthrough

These changes refactor popup window dismissal behavior in the editor UI by introducing a new dismissPopupWindows() utility method, removing an early-hide optimization from the completion window, and updating the replaceComponent() API to accept a replacement parameter.

Changes

Cohort / File(s) Summary
Popup Window Dismissal Refactoring
AbstractPopupWindow.kt, IDEEditor.kt
Introduces new dismissPopupWindows() method in IDEEditor and updates AbstractPopupWindow.show() to call it instead of ensureWindowsDismissed() for pre-show cleanup.
Completion Window Optimization
EditorCompletionWindow.kt
Removes early-hide optimization that previously called hide() when consecutive completion requests arrived in rapid succession.
Component Replacement API
IDEEditor.kt
Updates replaceComponent() method signature to accept a replacement parameter alongside the class parameter.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

Popups bow and windows fall with grace,
A speedy dismiss fills the space,
No early hiding—let completions run free!
Components swap perfectly as can be,
~ The Hoppy Editor Rabbit 🐰

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title directly addresses the main objective: fixing autocomplete display by preventing it from disappearing too quickly.
Description check ✅ Passed The description is directly related to the changeset, explaining the specific problem being solved: preventing autocomplete from disappearing when showing diagnostics.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ADFA-2681-fix-autocomplete-display

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@dara-abijo-adfa dara-abijo-adfa merged commit 6de2b53 into stage Feb 6, 2026
2 checks passed
@dara-abijo-adfa dara-abijo-adfa deleted the ADFA-2681-fix-autocomplete-display branch February 6, 2026 16:14
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