Platform
Web (any Chromium/Firefox tab-throttling browser)
Problem
When Concierge streams a reply and you switch to another browser tab, the visible text stops advancing. When you return to the tab, it resumes streaming from where it left off — even though the full response was delivered long ago. Streaming should keep up (or complete) regardless of whether the tab is focused.
Root Cause
The Concierge draft pacer reveals the reply one markdown unit per setInterval tick (PUSHER_DRAFT_PACE_INTERVAL_MS = 10ms), and the reveal amount is driven by tick count, not wall-clock time. Browsers throttle/freeze setInterval in backgrounded tabs (Chrome clamps to ≥1000ms after ~1s hidden, effectively freezing timers after ~5 min), so the reveal stalls while hidden and drains rapidly on refocus. The full server text is already buffered over Pusher; only the reveal is gated on the throttled timer.
Key files:
Contrast with the working path: src/hooks/usePendingConciergeResponse.ts computes progress from Date.now() - trickleStart, so a single throttled tick recomputes the correct wall-clock stage and self-corrects on tab return. The Pusher pacer lacks this anchor.
Suggested Fix
- Anchor the reveal to wall-clock elapsed time — reveal up to
rate × elapsed characters so one post-refocus tick catches up instantly. The optimistic trickle in src/hooks/usePendingConciergeResponse.ts already does this and can serve as a reference.
- Use
@libs/Visibility — listen for visibilitychange: when the tab becomes hidden (or on becoming visible with a completed response already buffered), reveal the full buffered target immediately instead of pacing through it tick by tick.
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @mallenexpensify
Platform
Web (any Chromium/Firefox tab-throttling browser)
Problem
When Concierge streams a reply and you switch to another browser tab, the visible text stops advancing. When you return to the tab, it resumes streaming from where it left off — even though the full response was delivered long ago. Streaming should keep up (or complete) regardless of whether the tab is focused.
Root Cause
The Concierge draft pacer reveals the reply one markdown unit per
setIntervaltick (PUSHER_DRAFT_PACE_INTERVAL_MS = 10ms), and the reveal amount is driven by tick count, not wall-clock time. Browsers throttle/freezesetIntervalin backgrounded tabs (Chrome clamps to ≥1000ms after ~1s hidden, effectively freezing timers after ~5 min), so the reveal stalls while hidden and drains rapidly on refocus. The full server text is already buffered over Pusher; only the reveal is gated on the throttled timer.Key files:
src/pages/inbox/usePusherDraftPacing.ts—startPusherDraftPace/tickPacing: thesetInterval(tickPacing, 10)loop that drives the reveal — one markdown unit per tick, no wall-clock anchor.src/pages/inbox/conciergeDraftState.ts—getNextVisibleConciergeDraftMarkdown: advances exactly one unit per call with no time reference.Contrast with the working path:
src/hooks/usePendingConciergeResponse.tscomputes progress fromDate.now() - trickleStart, so a single throttled tick recomputes the correct wall-clock stage and self-corrects on tab return. The Pusher pacer lacks this anchor.Suggested Fix
rate × elapsedcharacters so one post-refocus tick catches up instantly. The optimistic trickle insrc/hooks/usePendingConciergeResponse.tsalready does this and can serve as a reference.@libs/Visibility— listen forvisibilitychange: when the tab becomes hidden (or on becoming visible with a completed response already buffered), reveal the full buffered target immediately instead of pacing through it tick by tick.Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @mallenexpensify