From e821653b7edf514ea5f30fa3509c1752540034d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20GS=20Pereira?= Date: Wed, 27 May 2026 16:22:56 -0300 Subject: [PATCH 1/2] fix(ai): decouple quick suggestions from inline completion + round ACU display Quick suggestions were hard-disabled whenever the AI assistant was available, so turning inline completion off left the user with no autocomplete at all. Gate quickSuggestions / inlineSuggest on the same condition as the inline-completion provider (effective inline enabled) so: inline ON keeps Ctrl+Space-only quick suggestions; inline OFF restores automatic quick suggestions. Ctrl+Space works in both modes. Also round the ACU figure in AcuExhaustionModal for display (ACU is a float internally; users don't need decimals). Co-Authored-By: Claude Opus 4.7 (1M context) --- .../ai-settings-panel/AcuExhaustionModal.tsx | 2 +- .../[workspace]/editor/monaco/index.tsx | 17 +++++++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/frontend/components/_features/[workspace]/ai-settings-panel/AcuExhaustionModal.tsx b/src/frontend/components/_features/[workspace]/ai-settings-panel/AcuExhaustionModal.tsx index fb57d7b8a..fe401f543 100644 --- a/src/frontend/components/_features/[workspace]/ai-settings-panel/AcuExhaustionModal.tsx +++ b/src/frontend/components/_features/[workspace]/ai-settings-panel/AcuExhaustionModal.tsx @@ -51,7 +51,7 @@ export const AcuExhaustionModal = ({ const description = isInactive ? `Your subscription is ${billingError.subscriptionStatus ?? 'inactive'}. Reactivate it to keep using AI features.` : billingError.monthlyLimit != null - ? `You've used all ${billingError.monthlyLimit} ACU for this billing period. Buy more ACU or upgrade your plan to keep going.` + ? `You've used all ${Math.round(billingError.monthlyLimit)} ACU for this billing period. Buy more ACU or upgrade your plan to keep going.` : "You're out of ACU for this billing period. Buy more ACU or upgrade your plan to keep going." const ctaLabel = isInactive ? 'Reactivate subscription' : 'Upgrade plan' // subscription_inactive carries its own reactivation URL; insufficient_acu doesn't. diff --git a/src/frontend/components/_features/[workspace]/editor/monaco/index.tsx b/src/frontend/components/_features/[workspace]/editor/monaco/index.tsx index 87a4452f7..c8b2bc264 100644 --- a/src/frontend/components/_features/[workspace]/editor/monaco/index.tsx +++ b/src/frontend/components/_features/[workspace]/editor/monaco/index.tsx @@ -1257,6 +1257,19 @@ void loop() // Editor options // ----------------------------------------------------------------------- + // Inline AI completions take over the suggest widget only while they are + // actually active (same gate as the provider registration above). When the + // user turns inline completions off, fall back to Monaco's normal quick + // suggestions (the auto-dropdown). Ctrl+Space still triggers the suggest + // widget manually in both modes — `quickSuggestions` only governs the + // automatic popup, and `suppressSuggestions` only suppresses the auto popup + // while an inline suggestion is showing. + const inlineCompletionsActive = + capabilities.hasAIAssistant && + aiState.isEnabled && + aiState.hasConsented && + aiState.preferences.inlineCompletionsEnabled + const monacoEditorUserOptions: monacoEditorOptionsType = { minimap: { enabled: false }, dropIntoEditor: { enabled: true }, @@ -1273,7 +1286,7 @@ void loop() tabSize: 4, insertSpaces: true, detectIndentation: false, - quickSuggestions: capabilities.hasAIAssistant ? false : undefined, + quickSuggestions: inlineCompletionsActive ? false : undefined, // Pinned for cross-platform consistency with the variables-code-editor. // Monaco's default is platform-dependent (12 on macOS, 14 elsewhere) — // without this both surfaces would mismatch on Linux/Windows even @@ -1295,7 +1308,7 @@ void loop() // `document.body` with `position: fixed`, so they escape both // the editor container and the variables table above it. fixedOverflowWidgets: true, - ...(capabilities.hasAIAssistant && { + ...(inlineCompletionsActive && { inlineSuggest: { enabled: true, suppressSuggestions: true, From aada0a9a53adf7300055beb27fe2d0fdb72b286b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20GS=20Pereira?= Date: Wed, 27 May 2026 16:29:52 -0300 Subject: [PATCH 2/2] fix(billing): round needed/remaining ACU in exhaustion modal The "This request needed X ACU; only Y remaining" line rendered the raw float required/remaining values (e.g. 1.3303750000000036). Round them for display like the rest of the ACU UI. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../[workspace]/ai-settings-panel/AcuExhaustionModal.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/frontend/components/_features/[workspace]/ai-settings-panel/AcuExhaustionModal.tsx b/src/frontend/components/_features/[workspace]/ai-settings-panel/AcuExhaustionModal.tsx index fe401f543..b6c1de015 100644 --- a/src/frontend/components/_features/[workspace]/ai-settings-panel/AcuExhaustionModal.tsx +++ b/src/frontend/components/_features/[workspace]/ai-settings-panel/AcuExhaustionModal.tsx @@ -76,7 +76,8 @@ export const AcuExhaustionModal = ({ typeof billingError.remaining === 'number' && typeof billingError.required === 'number' && (

- This request needed {billingError.required} ACU; only {billingError.remaining} remaining. + This request needed {Math.round(billingError.required)} ACU; only {Math.round(billingError.remaining)}{' '} + remaining.

)}