fix(ingestion,frontend): show live counter immediately on run start #47

Merged
JustinZeus merged 1 commit from feat/live-scholar-progress-counter into main 2026-03-03 18:38:37 +01:00
JustinZeus commented 2026-03-03 18:38:28 +01:00 (Migrated from github.com)

Two issues with the initial implementation:

  • Counter only appeared after the first SSE event arrived (scholarProgress null kept the v-else static template showing until a scholar completed)
  • First events were often dropped because the EventSource hadn't subscribed yet

Fix:

  • Backend: emit an initial scholar_progress kickoff event (0/0/N) at the start of run_scholar_iteration so the frontend receives total early
  • Frontend: gate on isLikelyRunning alone (not scholarProgress); use optional chaining with fallbacks so "0 / … visited · 0 finished" shows immediately when a run starts, before any SSE events arrive
Two issues with the initial implementation: - Counter only appeared after the first SSE event arrived (scholarProgress null kept the v-else static template showing until a scholar completed) - First events were often dropped because the EventSource hadn't subscribed yet Fix: - Backend: emit an initial scholar_progress kickoff event (0/0/N) at the start of run_scholar_iteration so the frontend receives total early - Frontend: gate on isLikelyRunning alone (not scholarProgress); use optional chaining with fallbacks so "0 / … visited · 0 finished" shows immediately when a run starts, before any SSE events arrive
Sign in to join this conversation.
No description provided.