feat(code): resize chat input by dragging its top border - #5524
Merged
Conversation
Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
Mason Daugherty (mdrxy)
marked this pull request as ready for review
August 14, 2026 21:38
Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
Drag-to-resize could get into two states that no test covered. A double-click that drifted a cell between press and release emitted a zero-delta move, which established a manual height and flipped the following click from "expand" to "collapse". Zero-delta moves are now ignored, and the toggle branches on whether the composer is already at its maximum rather than on whether any manual height exists, so a small real drag cannot invert the gesture either. Drag state was only cleared on a left mouse up, so a capture revoked by another widget, a hidden composer, or a release outside the window left a phantom drag: the hover highlight stayed lit and later pointer motion resized from a stale baseline. MouseRelease and Hide now abandon the drag, and the parent drops its baseline on a new DragEnded message. A manual height is also no longer destroyed by a terminal shrink. The requested height is kept verbatim and re-fitted on the screen's layout-refresh signal, which -- unlike this box's own Resize -- still fires once the composer is pinned, so growing the terminal back restores the size the user chose. Alongside those: - Derive the composer, box, and popup max-heights in DEFAULT_CSS from the module constants; the Python copies shadowed the stylesheet as inline styles, so the two could drift silently. - Drop the per-mode resize handle CSS rules, which inline styles made unreachable, and repaint the handle when a mode change backs out, so an incognito-colored line cannot outlive incognito mode. - Document all eight new constants, matching the file's convention, and rename the screen reservation to reflect that it excludes the box gutter (it reserves 5 rows at 24, not 7). - Give ChatInputBox a public API instead of three privates called from the parent, guard its composer and screen lookups, and dedupe RowsChanged so the message means what its name says.
Mason Daugherty (mdrxy)
pushed a commit
that referenced
this pull request
Aug 18, 2026
> [!CAUTION] > Merging this PR will automatically publish to **PyPI** and create a **GitHub release**. For the full release process, see [`.github/RELEASING.md`](https://github.com/langchain-ai/deepagents/blob/main/.github/RELEASING.md). --- _Release notes preview: keep this section in sync with the package `CHANGELOG.md`. Publish reads the merged CHANGELOG via `release.yml`, not this PR description — keep them aligned anyway so the PR stays an accurate historical record for reviewers and anyone returning later._ --- ## [0.1.57](deepagents-code==0.1.56...deepagents-code==0.1.57) (2026-08-18) ### Features - Added warnings before expensive cold-cache turns and trust user-declared endpoints for cold-cache policies ([#5439](#5439), [#5462](#5462)). - Made the chat input resizable by dragging its top border ([#5524](#5524)). - Added a `multi_select` question type to `ask_user` ([#5097](#5097)). - Added support for ACP approval modes ([#5394](#5394)). - Added `DeepSeek-V4-Pro-0813` to the model picker ([#5512](#5512)). - Show conversation turns alongside message counts ([#5571](#5571)). - Include `TERM_PROGRAM` in the resume hint ([#5548](#5548)). ### Bug Fixes - Report total context after `/offload` ([#5488](#5488)). - Fixed transcript and thread restoration issues, including hydration lag, scrolling resumed threads to the bottom, and hiding empty previous-thread hints ([#5479](#5479), [#5543](#5543), [#5552](#5552)). - Fixed Auto-mode approval handling by binding “yes” to the paired `ask_user` question and avoiding duplicate Auto denial notices ([#5038](#5038), [#5501](#5501)). - Improved reload behavior by keeping the chat input responsive during `/reload`, reporting MCP server changes, and avoiding plugin reload prompt flashes or startup hints ([#5529](#5529), [#5504](#5504), [#5500](#5500), [#5502](#5502)). - Improved dependency update UI by preserving editable fields and hiding dependency details after updates ([#5521](#5521), [#5519](#5519)). - Fixed chat UI polish issues, including detached spacer mount anchors, the unfocused input cursor, and relative timestamp toggle display ([#5516](#5516), [#5258](#5258), [#5503](#5503)). - Refresh the splash version after updates ([#5520](#5520)). _End release notes preview._ --- > [!NOTE] > A **community contributors** list and a **Special thanks** section (crediting the users who filed the issues this release's PRs closed) are appended to the GitHub release notes automatically at publish time (see [Release Pipeline](https://github.com/langchain-ai/deepagents/blob/main/.github/RELEASING.md#release-pipeline), step 3). --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: langchain-oss-automated-triage[bot] <248757908+langchain-oss-automated-triage[bot]@users.noreply.github.com>
Mason Daugherty (mdrxy)
added a commit
that referenced
this pull request
Aug 18, 2026
Follow-up to #5524 Double-clicking the chat input resize handle now expands only from automatic sizing and collapses every manually resized height around the current draft. --- `ChatInputBox.toggle_expanded` now treats any `_requested_height` as resized state instead of only recognizing the maximum. The regression test covers a partial manual size with a multiline draft. Made by [Open SWE](https://openswe.vercel.app/agents/f022b6eb-54bd-1086-033e-5b3afc57c85b) --------- Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
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 chat input can now be resized by dragging its highlighted top border; double-clicking toggles between maximum and automatic sizing.
An explicit inset handle makes mouse targeting reliable while preserving corner colors, and only the interior rule highlights with the active mode color. Manual resizing remembers the requested height while temporarily expanding to keep up to eight visual draft rows visible, so deleting/backspacing lines retracts the composer again; screen and autocomplete space remain authoritative. Focused Textual interaction, content growth/retraction, hover, mode-color, geometry, scrollbar, action-button, autocomplete, and startup-tip tests cover the behavior.
Made by Open SWE