Skip to content

Conversation

@liwilliam2021
Copy link
Contributor

@liwilliam2021 liwilliam2021 commented Jul 3, 2025

the timer for auto question doesn't unmount when user sends input

Before: (the timer continues counting down even after the user enters a response to the follow-up)
image
After (the timer unmounts on any user input, eg. typed response or selection):
image


Important

Fix auto question timer to stop on user response, preventing unwanted auto-approvals, with updates in ChatView.tsx, ChatRow.tsx, and FollowUpSuggest.tsx.

  • Behavior:
    • Timer for auto questions now stops when user responds, preventing unwanted auto-approvals.
    • isFollowUpAnswered prop added to ChatRow and FollowUpSuggest to track user response.
  • Components:
    • ChatView.tsx: Added userRespondedRef and currentFollowUpTs to manage timer state.
    • ChatRow.tsx: Updated ChatRowContent to pass isFollowUpAnswered to FollowUpSuggest.
    • FollowUpSuggest.tsx: Uses isAnswered to conditionally stop countdown.
  • Tests:
    • Added FollowUpSuggest.spec.tsx to test countdown behavior and user interaction handling.

This description was created by Ellipsis for 2d49c16. You can customize this summary. It will automatically update as commits are pushed.

@liwilliam2021 liwilliam2021 requested review from cte, jr and mrubens as code owners July 3, 2025 04:31
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. bug Something isn't working labels Jul 3, 2025
@delve-auditor
Copy link

delve-auditor bot commented Jul 3, 2025

No security or compliance issues detected. Reviewed everything up to 2d49c16.

Security Overview
  • 🔎 Scanned files: 4 changed file(s)
Detected Code Changes
Change Type Relevant files
Enhancement ► ChatRow.tsx
    Add isFollowUpAnswered prop
► ChatView.tsx
    Implement follow-up state management
► FollowUpSuggest.tsx
    Rename onUnmount to onCancelAutoApproval
    Add isAnswered prop
► FollowUpSuggest.spec.tsx
    Add test cases for FollowUpSuggest component

Reply to this PR with @delve-auditor followed by a description of what change you want and we'll auto-submit a change to this PR to implement it.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jul 3, 2025
@daniel-lxs daniel-lxs moved this from Triage to PR [Needs Prelim Review] in Roo Code Roadmap Jul 3, 2025
@hannesrudolph hannesrudolph added PR - Needs Preliminary Review and removed Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. labels Jul 3, 2025
Copy link
Member

@daniel-lxs daniel-lxs left a comment

Choose a reason for hiding this comment

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

Hey @liwilliam2021, I left a couple of suggestions that might be worth taking a look at.

Let me know what you think!

@daniel-lxs daniel-lxs moved this from PR [Needs Prelim Review] to PR [Changes Requested] in Roo Code Roadmap Jul 3, 2025
@liwilliam2021
Copy link
Contributor Author

@daniel-lxs nice comments! Fixed!

Copy link
Member

@daniel-lxs daniel-lxs left a comment

Choose a reason for hiding this comment

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

Hey @liwilliam2021, thank you for addressing the earlier suggestions. I really appreciate the updates.

Looking at the latest implementation, I noticed a couple of new things worth tweaking based on the recent changes. Everything’s looking solid overall, just a few small follow-ups.

Let me know what you think!

@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Jul 7, 2025
@daniel-lxs daniel-lxs moved this from PR [Changes Requested] to PR [Needs Prelim Review] in Roo Code Roadmap Jul 7, 2025
Copy link
Member

@daniel-lxs daniel-lxs left a comment

Choose a reason for hiding this comment

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

Everything from my previous feedback looks good!

One small suggestion: in FollowUpSuggest.tsx, the onUnmount prop is used both during unmount and when cancelling the auto-approval timer. That name might be a bit misleading in the click handler context.

What do you think about renaming it to something like onCancelAutoApproval to better reflect its intent? This would also apply to the corresponding props in ChatRow and ChatView.

It’s a minor naming cleanup, but could make the logic easier to follow.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jul 7, 2025
@daniel-lxs daniel-lxs moved this from PR [Needs Prelim Review] to PR [Needs Review] in Roo Code Roadmap Jul 8, 2025
@mrubens mrubens merged commit 15586d3 into main Jul 9, 2025
21 of 22 checks passed
@mrubens mrubens deleted the will/auto-question-timer-unmount branch July 9, 2025 00:19
@github-project-automation github-project-automation bot moved this from PR [Needs Review] to Done in Roo Code Roadmap Jul 9, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jul 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working lgtm This PR has been approved by a maintainer PR - Needs Review size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants