Skip to content

Conversation

@mapitman
Copy link
Owner

@mapitman mapitman commented Feb 5, 2026

Summary

  • prevent progress tasks from overwriting the initial stop time
  • add regression coverage for stop-time preservation

Copilot AI review requested due to automatic review settings February 5, 2026 07:52
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

This PR prevents progress tasks from overwriting their initial stop time when StopTask() is called multiple times. The fix adds an early return guard in the StopTask() method that checks if the task is already stopped, preserving the original stop time and elapsed duration.

Changes:

  • Added idempotency guard to StopTask() method to prevent overwriting stop time on subsequent calls
  • Added regression test to verify stop time preservation when StopTask() is called multiple times

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/RipSharp/Utilities/SpectreProgressDisplay.cs Added early return in StopTask() if task is already stopped to preserve the initial stop time
src/RipSharp.Tests/Utilities/SpectreProgressDisplayTests.cs Added test case StopTask_DoesNotOverwriteStopTime to verify stop time is preserved when StopTask() is called multiple times

@mapitman mapitman merged commit 8c83e0c into main Feb 5, 2026
7 checks passed
@mapitman mapitman deleted the fix-final-time branch February 5, 2026 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant