fix: skip false starting-up copy when engine is already loaded#291
Merged
Conversation
Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>
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
useEngineWarmupStatusnow also tracksengine:status(engineState), anduseEngineLoadingLabelbranches on it: a genuinely cold engine still gets the phase-1 "starting up" / "reading weights" copy, but an already-loadedengine that's just slow (e.g. long-conversation prefill) gets a new dedicated phrase, "Processing your message…", instead of a false cold-start claim./thinkturns now share the same label instead of ReasoningBlock's own hardcoded "Warming up..." string:ConversationViewcomputes the engine label once and passes it down aspendingLabel, and the bare-dots row is suppressed for/thinkturns so the label only renders once (insideReasoningBlock's pending row).ReasoningBlock's pending row and its clickable summary row now share oneSUMMARY_ROW_CLASSconstant plus an invisible chevron-width spacer, so the label lands at the same x-position whether or not thinking has started yet.How it works
EngineStatus['state'](stopped | starting | loaded | stopping | failed) is already broadcast onengine:status; this only adds a subscriber.useEngineLoadingLabel's turn-lifecycle effect readsengineStateonce when a turn starts (like it already did forwarming), and picks between the phase-1 schedule and the singleENGINE_SLOW_WARM_LABELtimer accordingly. The realwarmingsignal still overrides either path the instant it fires, unchanged from before.Testing
bun run test:all:coverage— 2250 frontend + 1500 backend tests pass, 100% coverage on both.bun run validate-build— typecheck, lint, format, and build all clean (two pre-existing ESLint warnings in unrelated files, present onmain, untouched by this diff).Note: the chevron-spacer alignment is asserted structurally in tests (matching classes, same glyph,
opacity-0on the placeholder) rather than visually — this repo's UI is a native Tauri/NSPanel shell, not reachable through a plain browser dev server, so I wasn't able to eyeball the actual pixel alignment in this environment.