Skip to content

fix: preserve chat cancel state during active turns - #378

Open
jdneo wants to merge 1 commit into
mainfrom
fix/chat-action-button-state
Open

fix: preserve chat cancel state during active turns#378
jdneo wants to merge 1 commit into
mainfrom
fix/chat-action-button-state

Conversation

@jdneo

@jdneo jdneo commented Jul 29, 2026

Copy link
Copy Markdown
Member

fix #99

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: fbabf492-eab9-4d8c-bb95-87b1df6ff332
Copilot AI review requested due to automatic review settings July 29, 2026 08:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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 ActionBar into an explicit state machine (ActionButtonState) to preserve Send/Cancel behavior across UI rebuilds and input changes.
  • Updates ChatView to 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);
}
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.

Missing stop button

2 participants