Add loading spinner to Cancel Coding Agent button#7466
Merged
Conversation
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] "Cancel coding agent" could use status
Add loading spinner to Cancel Coding Agent button
Jul 30, 2025
alexr00
approved these changes
Jul 30, 2025
joshspicer
approved these changes
Jul 30, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The "Cancel Coding Agent" button now shows a loading spinner during the cancellation process to provide clear visual feedback to users.
Problem
Users reported that when clicking "Cancel Coding Agent", the button would become disabled for ~10 seconds with no visual indication that the cancellation was still in progress. This left users uncertain whether the action was working or if the button was stuck.
Solution
Added a spinning loading icon that appears inline with the button text when the cancellation is in progress:
Implementation Details
isBusystate management inCancelCodingAgentButtonloadingIconcomponent with CSS animations already present in the codebaseContextDropdowninterface to support React nodes in button labelsTechnical Changes
ContextDropdownProps.defaultOptionLabelto acceptstring | React.ReactNodeContextDropdownto safely handle React nodes in the title attributeCancelCodingAgentButtonto conditionally show spinner whenisBusyis trueThe implementation provides immediate visual feedback that the cancellation is actively processing, improving the user experience during the 10-second operation.
Fixes #7451.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.