Repository navigation
fix: apply prompt suggestion toggle immediately - #3423
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Make the existing prompt suggestion setting take effect immediately across the composer and prediction runtime.
Type and Areas
Type: Bug fix
Areas: Rust core, Web UI, AI settings, chat composer
Motivation / Impact
Previously, disabling prompt suggestions could leave an existing hint visible and allow an already-running prediction to finish. Turning the setting off now clears existing hints and cancels active prediction work. Turning it back on enables new predictions without restoring cleared hints.
Verification
pnpm run fmt:rs— passed.cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git --lib agentic::execution::prompt_suggestion::tests— 12 tests passed.pnpm --dir src/web-ui run test:run src/flow_chat/store/promptSuggestionStore.test.ts src/flow_chat/hooks/usePromptSuggestionsEnabled.test.tsx src/app/scenes/settings/pages/ai/PromptSuggestionSection.test.tsx src/infrastructure/config/hooks/useAIExperienceSettings.test.tsx src/infrastructure/config/services/AIExperienceConfigService.test.ts src/flow_chat/services/flow-chat-manager/EventHandlerModule.test.ts— 92 tests passed.pnpm run type-check:web— passed.pnpm run check:web— blocked by 25 existing typography audit violations in five unchanged design-system files, verified identical toupstream/main.pnpm run desktop:dev, real DeepSeek/GLM calls, and native WebDriver clicks on the settings switch: existing hints cleared approximately 64 ms after the toggle event; an in-flight prediction reached the cancellation path in approximately 32 ms; no late suggestion event appeared during more than 100 seconds of observation. A new turn while disabled made zero prediction requests, and re-enabling restored new suggestions. Temporary cancellation logging used for this observation was removed before committing.Reviewer Notes
Reuses the existing persisted setting, default, localized UI, and device-scoped configuration service. No persisted schema, protocol, or migration changes are introduced. Existing prediction prompts, model selection, reasoning fallback, and timeout behavior are preserved.
Live verification covered Windows local desktop only. Remote workspace, remote control, Peer Device Mode, and detached dispatch were not exercised with actual connections; host isolation and unsupported-host behavior have focused unit/component coverage. Cancellation evidence establishes client-side task cancellation, not termination of computation on the upstream model server.
Checklist