fix(ai): mirror shared-surface AI autocomplete fixes from openplc-web#922
Conversation
Byte-identical mirror of the shared frontend / middleware changes that land in openplc-web (PR fix/ai-autocomplete-empty-completions), kept in sync by the mirror gate: - monaco editor: `editContext: false` (Safari Tab-accept fix) and `inlineSuggest.experimental.showOnSuggestConflict: 'always'` so AI ghost text renders alongside the STruC++ LSP suggest widget. - ai-port: new `completion_empty` telemetry event name. The empty-completion behavioural fixes themselves live in the web-only AI adapter (context builder + inline completion provider) and the autonomy-edge backend, so no desktop release is required — this only keeps the shared surface identical. Also documents the app-version bump procedure in CLAUDE.md. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
WalkthroughThis PR updates Monaco editor configuration to disable EditContext for reliable Tab-based AI suggestion acceptance and forces ghost text visibility during suggest widget conflicts, adds a new telemetry event name, and documents the app version bump process in CLAUDE.md. ChangesMonaco Editor AI Suggestion Behavior
Telemetry Event and Documentation
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration. 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)
src/frontend/components/_features/[workspace]/editor/monaco/index.tsx (1)
1295-1313: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick winAdd a regression check for Monaco’s inline-suggest conflict mode
inlineSuggest.experimental.showOnSuggestConflictsits outside Monaco’s publicIInlineSuggestOptionssurface, so a Monaco bump can quietly disable this ghost-text/suggest coexistence path. Add a small runtime/e2e check — or at least a version-bump note — to keep this from regressing.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/frontend/components/_features/`[workspace]/editor/monaco/index.tsx around lines 1295 - 1313, Add a regression check around the Monaco inlineSuggest configuration in the editor setup so `experimental.showOnSuggestConflict` cannot silently stop working on a Monaco upgrade. In `monaco/index.tsx`, where `inlineSuggest` is built and cast to `monacoEditorOptionsType['inlineSuggest']`, add a small runtime/e2e assertion (or a version-bump guard/note in the same flow) that verifies the ghost text still coexists with the suggest widget when `installAiLspCoexistenceKeybindings` is active, and keep the check tied to the inline-suggest option path so future Monaco bumps are caught early.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@src/frontend/components/_features/`[workspace]/editor/monaco/index.tsx:
- Around line 1295-1313: Add a regression check around the Monaco inlineSuggest
configuration in the editor setup so `experimental.showOnSuggestConflict` cannot
silently stop working on a Monaco upgrade. In `monaco/index.tsx`, where
`inlineSuggest` is built and cast to `monacoEditorOptionsType['inlineSuggest']`,
add a small runtime/e2e assertion (or a version-bump guard/note in the same
flow) that verifies the ghost text still coexists with the suggest widget when
`installAiLspCoexistenceKeybindings` is active, and keep the check tied to the
inline-suggest option path so future Monaco bumps are caught early.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 535d9ae1-6908-4bd3-ad29-93a60dec653b
📒 Files selected for processing (3)
CLAUDE.mdsrc/frontend/components/_features/[workspace]/editor/monaco/index.tsxsrc/middleware/shared/ports/ai-port.ts
Summary
Byte-identical mirror of the shared frontend / middleware changes landing in openplc-web#583 (
fix/ai-autocomplete-empty-completions), kept in sync by the mirror gate.Changes (shared surface only)
monaco/index.tsx:editContext: false(Safari Tab-accept fix) andinlineSuggest.experimental.showOnSuggestConflict: 'always'so AI ghost text renders alongside the STruC++ LSP suggest widget.middleware/shared/ports/ai-port.ts: newcompletion_emptytelemetry event name.No desktop release
The empty-completion behavioural fixes live in the web-only AI adapter and the autonomy-edge backend. This PR only keeps the shared surface identical — no version bump, no tag, no new build. Merge to
developmentonly.🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes
Documentation