fix: smooth "Working for" timer progression#1034
fix: smooth "Working for" timer progression#1034neriousy wants to merge 4 commits intopingdotgg:mainfrom
Conversation
- derive `shouldTickNow` from `isWorking` or unsettled latest turn - update tick effect to depend on `shouldTickNow` instead of send phase
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip You can disable sequence diagrams in the walkthrough.Disable the |
There was a problem hiding this comment.
Pull request overview
Improves the chat “Working for …” timer behavior so elapsed time starts updating immediately when the working indicator is shown, rather than waiting for the thread to reach the running phase.
Changes:
- Start the
nowTickinterval whenever work appears to be in progress (not just whenphase === "running"). - Trigger an immediate
nowTickupdate when ticking begins to avoid the initial “0s” stall.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
What Changed
Fixed the chat "Working for Xs" timer so it starts updating as soon as the working indicator is shown, instead of waiting for the thread to fully enter the
runningphase.Why
The timer could sit at
0sfor too long and then jump to2sbecause the UI rendered the working state before the 1-second ticker started. This keeps the elapsed time display aligned with the actual visible working state and makes the interaction feel consistent.UI Changes
No visible ui changes, just smoother "Working for..." experience
Checklist
Note
Fix smooth timer progression for 'Working for' display in ChatView
The
shouldTickNowflag in ChatView.tsx replaces thephase === 'running'check as the gate for the time-ticking effect. An immediatesetNowTick(Date.now())call is added before the interval starts, eliminating the 1-second delay before the timer first updates. The effect now also continues ticking whenactiveWorkStartedAtis set and the latest turn is not yet settled, covering cases where work has ended but the turn hasn't finalized.Macroscope summarized a1e9935.