Skip to content

fix: Add layout refresher callback to ChatInputTextViewer for dynamic height adjustments#219

Merged
ethanyhou merged 2 commits into
mainfrom
ethan/fix-input-height
May 18, 2026
Merged

fix: Add layout refresher callback to ChatInputTextViewer for dynamic height adjustments#219
ethanyhou merged 2 commits into
mainfrom
ethan/fix-input-height

Conversation

@ethanyhou
Copy link
Copy Markdown
Contributor

fix #215

Copilot AI review requested due to automatic review settings May 18, 2026 05:59
Copy link
Copy Markdown
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 addresses issue #215 where recalling long chat input history could cause the chat input to grow without the containing chat view relayouting, hiding the bottom picker/action row. It does so by replacing a brittle fixed parent traversal in ChatInputTextViewer with an owner-provided relayout callback, and adds SWTBot coverage to validate picker visibility after history recall.

Changes:

  • Add a layoutRefresher callback hook to ChatInputTextViewer and invoke it after height-hint updates.
  • Wire the relayout callback from ActionBar to request a relayout of the chat view container when the input height changes, and tag the mode picker with a SWTBot widget id.
  • Update SWTBot probe execution to support arrow key posting and add a new probe script reproducing the history-recall layout scenario.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/ChatInputTextViewer.java Introduces a relayout callback to avoid fixed-depth parent layout calls when input height changes.
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/ActionBar.java Wires the new relayout callback and adds a SWTBot widget id for the mode picker.
com.microsoft.copilot.eclipse.swtbot.test/src/com/microsoft/copilot/eclipse/swtbot/test/probe/StepExecutor.java Enhances probe key handling by posting SWT key events and adds direct StyledText focus/text support.
com.microsoft.copilot.eclipse.swtbot.test/probe-scripts/chat-input-history-layout-001.json Adds an SWTBot probe to validate pickers remain visible after recalling a long input from history.

Copy link
Copy Markdown
Member

@jdneo jdneo left a comment

Choose a reason for hiding this comment

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

Please create a new PR for the skill modification.

A UX regression in this PR, when input multiple lines, only single line is visible.

Image

Expected:

Image

Note there is no scroll bar in input box

@ethanyhou ethanyhou force-pushed the ethan/fix-input-height branch from d7ae58d to 9378d97 Compare May 18, 2026 07:21
@ethanyhou ethanyhou merged commit 4bc02dd into main May 18, 2026
4 checks passed
@ethanyhou ethanyhou deleted the ethan/fix-input-height branch May 18, 2026 07:40
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.

Chat input overflows and hides bottom pickers when recalling long history

4 participants