ADFA-3867: member completions do not show up without non-empty partial#1260
ADFA-3867: member completions do not show up without non-empty partial#1260itsaky-adfa merged 1 commit intostagefrom
Conversation
Signed-off-by: Akash Yadav <itsaky01@gmail.com>
📝 WalkthroughWalkthroughA guard checking for blank partial identifiers in Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
lsp/kotlin/src/main/java/com/itsaky/androidide/lsp/kotlin/completion/KotlinCompletions.kt (1)
292-295: Remove the redundant blank-partial early return in scope completions.This guard is now redundant and can unnecessarily suppress scope/snippet/keyword completions if upstream filtering regresses; better to rely on the existing upstream invariant here.
♻️ Proposed cleanup
- if (ctx.partial.isBlank()) { - logger.warn("cannot complete for blank partial candidate") - return - } - abortIfCancelled()Based on learnings: empty-prefix completion requests are already filtered upstream in this project, so no empty-prefix guard is needed at this call site.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@lsp/kotlin/src/main/java/com/itsaky/androidide/lsp/kotlin/completion/KotlinCompletions.kt` around lines 292 - 295, The early-return guard in KotlinCompletions.kt that checks ctx.partial.isBlank() and logs via logger.warn should be removed because empty-prefix filtering is handled upstream; delete the if-block that references ctx.partial.isBlank(), logger.warn("cannot complete for blank partial candidate"), and the subsequent return so scope/snippet/keyword completions are not suppressed here (locate the check inside the scope completion path in KotlinCompletions.kt and remove those three statements).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In
`@lsp/kotlin/src/main/java/com/itsaky/androidide/lsp/kotlin/completion/KotlinCompletions.kt`:
- Around line 292-295: The early-return guard in KotlinCompletions.kt that
checks ctx.partial.isBlank() and logs via logger.warn should be removed because
empty-prefix filtering is handled upstream; delete the if-block that references
ctx.partial.isBlank(), logger.warn("cannot complete for blank partial
candidate"), and the subsequent return so scope/snippet/keyword completions are
not suppressed here (locate the check inside the scope completion path in
KotlinCompletions.kt and remove those three statements).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 7b030138-9847-4bdc-94a0-454d6e60296b
📒 Files selected for processing (1)
lsp/kotlin/src/main/java/com/itsaky/androidide/lsp/kotlin/completion/KotlinCompletions.kt
See ADFA-3867 for more details.