Skip to content

repl: inline ghost-text suggestions for symbol autocomplete - #30413

Merged
alii merged 8 commits into
mainfrom
farm/a2da00c4/repl-inline-suggestions
Aug 15, 2026
Merged

repl: inline ghost-text suggestions for symbol autocomplete#30413
alii merged 8 commits into
mainfrom
farm/a2da00c4/repl-inline-suggestions

repl: collapse getProperty comment to one line

d0d4f20
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Aug 14, 2026 in 39m 29s

Code review found 4 potential issues

Found 2 candidates, confirmed 4. See review comments for details.

Details

Severity Count
🔴 Important 0
🟡 Nit 4
🟣 Pre-existing 0
Severity File:Line Issue
🟡 Nit src/runtime/cli/repl.rs:2591-2606 handle_tab lacks the ends_inside_string guard applied to update_suggestion
🟡 Nit src/jsc/bindings/bindings.cpp:6832-6836 Bun__REPL__getProperty doesn't box primitives, so chains through string/number intermediates don't complete

Annotations

Check warning on line 2606 in src/runtime/cli/repl.rs

See this annotation in the file changed.

@claude claude / Claude Code Review

handle_tab lacks the ends_inside_string guard applied to update_suggestion

`handle_tab()` lacks the `ends_inside_string()` guard that `update_suggestion()` has (repl.rs:1339), so `let s = "process.env.PA` + Tab walks the `process.env` chain (running the Proxy's traps) and can splice a completion into the string literal. Add `if ends_inside_string(&line[..cursor]) { self.insert_tab_spaces(); return; }` after capturing `cursor`, before `parse_completion_context` — the helper already exists and is applied to the sibling call site.

Check warning on line 6836 in src/jsc/bindings/bindings.cpp

See this annotation in the file changed.

@claude claude / Claude Code Review

Bun__REPL__getProperty doesn't box primitives, so chains through string/number intermediates don't complete

`Bun__REPL__getProperty` uses `.getObject()` (nullptr on primitives) while its sibling `Bun__REPL__getCompletions` boxes with `toObject()`, so a chain whose *intermediate* segment is a primitive — `process.version.length.toF|` — hits `resolve_object_expr`'s `!current.is_object()` guard, returns `UNDEFINED`, and no ghost/Tab completion is offered (Node completes `Number.prototype` methods here). Switching `getObject()` → `toObject(globalObject)` under the existing exception scope, and dropping th