Skip to content

fix: smooth "Working for" timer progression#1034

Open
neriousy wants to merge 4 commits intopingdotgg:mainfrom
neriousy:fix/proper-working-time
Open

fix: smooth "Working for" timer progression#1034
neriousy wants to merge 4 commits intopingdotgg:mainfrom
neriousy:fix/proper-working-time

Conversation

@neriousy
Copy link

@neriousy neriousy commented Mar 13, 2026

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 running phase.

Why

The timer could sit at 0s for too long and then jump to 2s because 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

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Note

Fix smooth timer progression for 'Working for' display in ChatView

The shouldTickNow flag in ChatView.tsx replaces the phase === 'running' check as the gate for the time-ticking effect. An immediate setNowTick(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 when activeWorkStartedAt is set and the latest turn is not yet settled, covering cases where work has ended but the turn hasn't finalized.

Macroscope summarized a1e9935.

- derive `shouldTickNow` from `isWorking` or unsettled latest turn
- update tick effect to depend on `shouldTickNow` instead of send phase
Copilot AI review requested due to automatic review settings March 13, 2026 16:53
@coderabbitai
Copy link

coderabbitai bot commented Mar 13, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 7202d067-e390-47a5-84bd-10a9062f380d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

You can disable sequence diagrams in the walkthrough.

Disable the reviews.sequence_diagrams setting to disable sequence diagrams in the walkthrough.

@github-actions github-actions bot added size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Mar 13, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 nowTick interval whenever work appears to be in progress (not just when phase === "running").
  • Trigger an immediate nowTick update 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants