Skip to content

fix: timer stops counting when waiting for user input (#1069)#1074

Open
Saikrishna1876 wants to merge 5 commits intopingdotgg:mainfrom
Saikrishna1876:fix/timer-stops-on-user-input-1069
Open

fix: timer stops counting when waiting for user input (#1069)#1074
Saikrishna1876 wants to merge 5 commits intopingdotgg:mainfrom
Saikrishna1876:fix/timer-stops-on-user-input-1069

Conversation

@Saikrishna1876
Copy link

@Saikrishna1876 Saikrishna1876 commented Mar 14, 2026

Summary

This PR fixes issue #1069 where the "Working..." timer continued to count even while the agent was waiting for user input.

Changes:

  • UI Logic: Updated isWorking state in ChatView to exclude phases where the agent is waiting for user input.
  • Duration Calculation: Implemented formatTurnWorkElapsedExcludingUserInputWait helper to accurately calculate "Worked for" duration by subtracting intervals spent waiting for user feedback.
  • Stability: Increased timeouts for app-server and test suites to prevent flakiness during long-running operations.

Verification:

  • Video 1 (Agent stops counting when user is asked a question):
    /Users/saikrishnaambeti/Documents/Screenshots/Screen Screen Recording 2026-03-14 at 17.36.11.mov
  • Video 2 (Normal working of the timer when agent is working):
    /Users/saikrishnaambeti/Documents/Screenshots/Screen Screen Recording 2026-03-14 at 17.36.44.mov

This PR adheres to the @CONTRIBUTING.md guidelines:

  • Small, focused bug fix.
  • Tightly scoped maintenance.
  • Includes video evidence for timing/interaction changes.

Note

Fix timer to stop counting while waiting for user input

  • Adds deriveUserInputWaitIntervals and formatTurnWorkElapsedExcludingUserInputWait to session-logic.ts to compute and format working time with user-input wait periods subtracted.
  • Updates ChatView.tsx to pause the live timer when waiting for user input and to display elapsed time excluding wait durations.
  • Adds a 'waiting' row variant to MessagesTimeline.tsx that renders an animated 'Waiting for you' indicator when the agent is blocked on user input.
  • Behavioral Change: the working timer now pauses (rather than continues ticking) while the agent is waiting for user input, and the elapsed time shown in completion summaries excludes user-input wait durations.

Macroscope summarized a52aa83.

- Excludes user input wait time from work duration in UI
- Increases timeouts in app-server and tests for reliability
@coderabbitai
Copy link

coderabbitai bot commented Mar 14, 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: cbecc03b-0a1a-49eb-8a16-206bac55a55f

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.

@github-actions github-actions bot added size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Mar 14, 2026
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 717d800847

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Saikrishna1876 Saikrishna1876 marked this pull request as draft March 14, 2026 13:32
@Saikrishna1876 Saikrishna1876 marked this pull request as ready for review March 14, 2026 13:47
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e3a7e9f257

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Saikrishna1876
Copy link
Author

Screen.Recording.2026-03-14.at.17.36.44.mov

Agent working normally and it's time is being counted. ☝️

Screen.Recording.2026-03-14.at.17.36.11.mov

Agent is waiting for the user and the time counter is paused. ☝️

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

Labels

size:L 100-499 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.

1 participant