Skip to content

fix: show cold-start loading label during engine warmup#287

Merged
quiet-node merged 1 commit into
mainfrom
claude/kind-antonelli-abf382
Jul 1, 2026
Merged

fix: show cold-start loading label during engine warmup#287
quiet-node merged 1 commit into
mainfrom
claude/kind-antonelli-abf382

Conversation

@quiet-node

Copy link
Copy Markdown
Owner

Description

While the built-in llama.cpp engine or a local Ollama model is cold-starting, the chat view showed only the bare typing dots with no indication of what was happening. This adds a phased loading label next to the dots that narrates the wait, and marks the engine warmed the instant a real chat request's first token proves it (rather than waiting on a separately-queued warm-up prime).

Key changes

  • useEngineLoadingLabel hook: shows nothing for sub-second waits, then cycles phase-1 filler ("Starting up the model…", "Reading model weights…"), and jumps to phase-2 filler ("Warming up…", "Bigger models take a little longer…") the instant the built-in engine's real warmup:builtin-warming signal fires. Progress is monotonic — once phase 2 is entered it never falls back to phase 1.
  • useEngineWarmupStatus hook: app-root-mounted subscriber to the existing warmup:builtin-warming/-warmed events, shared with the Settings status line.
  • ConversationView: wires the label into the existing loading row, deferring to an active search-stage label when one is present. Remote (openai-kind) providers never show a label.
  • Backend: stream_builtin_chat now marks the engine warmed off the real request's own first streamed token (BuiltinWarmState::mark_warmed_by_real_request), independent of a proactive prime that may still be queued behind it at the engine's single execution slot. This fixes the Settings "warming" status getting stuck for the duration of a response that raced ahead of its own prime.

Testing

  • bun run test:all:coverage — frontend 100/100/100/100, backend --fail-under-lines 100, all passing.
  • bun run validate-build — clean (lint, format, typecheck, build).

Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>
@quiet-node quiet-node force-pushed the claude/kind-antonelli-abf382 branch from 904d4ed to e8c479a Compare July 1, 2026 20:50
@quiet-node quiet-node changed the title Show cold-start loading label during engine warmup fix: show cold-start loading label during engine warmup Jul 1, 2026
@quiet-node quiet-node merged commit bf75c42 into main Jul 1, 2026
5 checks passed
@quiet-node quiet-node deleted the claude/kind-antonelli-abf382 branch July 1, 2026 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant