fix: preserve chat cancel state during active turns - #378
Open
jdneo wants to merge 1 commit into
Open
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: fbabf492-eab9-4d8c-bb95-87b1df6ff332
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes the chat action button state so Cancel/Stop remains available throughout a top-level chat turn, even when nested sub-agent turns complete, addressing issue #99 (“Missing stop button”).
Changes:
- Refactors
ActionBarinto an explicit state machine (ActionButtonState) to preserve Send/Cancel behavior across UI rebuilds and input changes. - Updates
ChatViewto finish the action button state only when a top-level turn ends (not when a sub-agent turn ends). - Adds unit coverage for the state transition logic and extends SWTBot test plan coverage for the regression scenario.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| CONTEXT.md | Documents terminology for top-level vs sub-agent turn lifecycles. |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/ChatView.java | Ensures UI “turn finished” actions occur only on top-level turn completion. |
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/ActionBar.java | Introduces action-button state machine and rendering based on state. |
| com.microsoft.copilot.eclipse.ui.test/src/com/microsoft/copilot/eclipse/ui/chat/ActionBarActionButtonStateTest.java | Adds unit tests validating state transitions and invariants. |
| com.microsoft.copilot.eclipse.swtbot.test/test-plans/subagent/subagent.md | Adds regression test case validating Cancel remains available after sub-agent completion. |
| ACTION_BAR_LAYOUT_OPTIMIZATION.md | Captures deferred follow-up work for reducing control recreation/layout churn. |
Comment on lines
479
to
481
| AccessibilityUtils.addAccessibilityNameForUiComponent(this.btnMsgToggle, | ||
| Messages.chat_actionBar_sendButton_Tooltip); | ||
| } |
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.
fix #99