perf(warmup): add conversation bootstrap preheating on input focus#1703
Merged
perf(warmup): add conversation bootstrap preheating on input focus#1703
Conversation
- Add warmup IPC channel to trigger getOrBuildTask + initAgent early - For ACP agents, initAgent spawns CLI subprocess (~7s) during warmup - Add bootstrapping flag to suppress stream events during warmup, preventing sidebar loading spinner; cleared on sendMessage - Trigger warmup on SendBox focus with 1s debounce to avoid rapid conversation switching from spawning multiple processes - Trigger warmup after new conversation creation in GuidPage - Clean up temporary [Send-PERF] logging from conversationBridge and AcpAgentManager - Add unit tests for warmup provider and SendBox debounce logic
* main: fix: ensure SQLite WAL is checkpointed on graceful shutdown test: mock UserRepository in webuiQR unit test chore: revert oss-pr command to simpler version and remove commit skill test: fix local env isolation and remove invalid BetterSqlite3Driver unit test
Add missing warmup channel to ipcBridge mock in conversationBridge.tray.test.ts to fix test failure after warmup provider was added.
- Use globalThis.localStorage?.clear?.() instead of localStorage.clear() in useConversationShortcuts and conversationHistoryContext dom tests to handle environments where localStorage.clear is not a function - Skip i18n-packaged test when out/renderer directory does not exist, preventing false failure when build artifacts are partially cleaned
Add initStorage mock to tray.test.ts to break the import chain tray → workerTaskManagerSingleton → GeminiAgentManager → initStorage → getPlatformServices() which throws in CI when modules are reset between tests and re-resolved without platform registration.
piorpua
approved these changes
Mar 25, 2026
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
Changes
IPC Layer
conversation.warmupIPC channel (ipcBridge.ts)getOrBuildTaskfor all agents, plusinitAgent()for ACP (conversationBridge.ts)ACP Agent
bootstrappingflag to suppressonStreamEventduring warmup, preventing sidebar loading spinnerbootstrappingonsendMessage()so progress events show during actual user waits[Send-PERF]logging (AcpAgentManager.ts)Renderer
sendbox.tsx)useGuidSend.ts)Tests
conversationBridge.test.ts)sendboxWarmup.dom.test.ts)Related Issue
Closes #1701
Test Plan
bun run testpasses (13 tests in warmup-related files)