Skip to content

fix(code): anchor toasts above the chat input - #5101

Merged
Johannes du Plessis (johannes117) merged 2 commits into
mainfrom
mdrxy/code/toast-above-chat-input
Jul 27, 2026
Merged

fix(code): anchor toasts above the chat input#5101
Johannes du Plessis (johannes117) merged 2 commits into
mainfrom
mdrxy/code/toast-above-chat-input

Conversation

@mdrxy

@mdrxy Mason Daugherty (mdrxy) commented Jul 27, 2026

Copy link
Copy Markdown
Member

Toasts no longer cover the chat input — they now float directly above the input box.


Textual docks its ToastRack to the bottom of the screen, which puts every toast on top of the composer the user is typing into. Rather than restyling individual toasts, the app now tracks the bottom chrome (subagent panel, startup tip, goal status, chat input, and status bar) and widens the rack's bottom margin so the stack ends exactly at the top edge of that chrome.

The bottom container announces its own resizes, so the anchor follows the chat input as it grows with a multi-line message and as the bottom panels come and go; terminal resizes re-anchor too. On a terminal too short to fit both, the offset is clamped so a toast is never pushed off screen. Modal screens compose their own rack and are deliberately left alone.

Worth a careful look: the anchoring math lives in _anchor_toast_rack, and _BottomChrome is a thin Container subclass that exists only to surface Resize (which does not bubble) to the app.

Screenshots

Screenshot 2026-07-27 at 4 35 45 PM
Test plan
  • New pilot-driven tests cover the resting offset, that stacked toasts end flush above the chrome, that growing the chat input lifts the rack, and the short-terminal clamp. Three of the four fail without the change.

Made by Open SWE

Textual docks its `ToastRack` to the bottom of the screen, so every toast
lands on top of the chat input the user is typing into. Track the bottom
chrome's geometry and widen the rack's bottom margin so toasts float
directly above the input box instead.

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
@github-actions github-actions Bot added dcode Related to `deepagents-code` fix A bug fix (PATCH) internal User is a member of the `langchain-ai` GitHub organization size: S 50-199 LOC labels Jul 27, 2026

@open-swe open-swe Bot 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.

Open SWE Review found 1 potential issue.

Open in WebView Open SWE trace

Comment thread libs/code/deepagents_code/app.py
Anchoring the rack above the bottom chrome could dock a tall (heavily
wrapped) toast past the top of the screen on a short terminal, hiding its
opening lines. Bound the rack's height to the space the anchor leaves it
so the overflow scrolls inside the rack instead.

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
@johannes117
Johannes du Plessis (johannes117) merged commit f1727c7 into main Jul 27, 2026
55 checks passed
@johannes117
Johannes du Plessis (johannes117) deleted the mdrxy/code/toast-above-chat-input branch July 27, 2026 23:52
Marcelo5444 pushed a commit to Marcelo5444/deepagents that referenced this pull request Jul 30, 2026
Toasts no longer cover the chat input — they now float directly above
the input box.

---

Textual docks its `ToastRack` to the bottom of the screen, which puts
every toast on top of the composer the user is typing into. Rather than
restyling individual toasts, the app now tracks the bottom chrome
(subagent panel, startup tip, goal status, chat input, and status bar)
and widens the rack's bottom margin so the stack ends exactly at the top
edge of that chrome.

The bottom container announces its own resizes, so the anchor follows
the chat input as it grows with a multi-line message and as the bottom
panels come and go; terminal resizes re-anchor too. On a terminal too
short to fit both, the offset is clamped so a toast is never pushed off
screen. Modal screens compose their own rack and are deliberately left
alone.

Worth a careful look: the anchoring math lives in `_anchor_toast_rack`,
and `_BottomChrome` is a thin `Container` subclass that exists only to
surface `Resize` (which does not bubble) to the app.

## Screenshots
<img width="586" height="224" alt="Screenshot 2026-07-27 at 4 35 45 PM"
src="https://github.com/user-attachments/assets/d9c5d4a2-a4d9-410e-ad85-a8aacef89bf6"
/>


<details>
<summary>Test plan</summary>

- New pilot-driven tests cover the resting offset, that stacked toasts
end flush above the chrome, that growing the chat input lifts the rack,
and the short-terminal clamp. Three of the four fail without the change.

</details>

Made by [Open
SWE](https://openswe.vercel.app/agents/40b5babe-cea3-6b01-d998-fc3b980ad406)

---------

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
Mason Daugherty (mdrxy) pushed a commit that referenced this pull request Jul 30, 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.50](deepagents-code==0.1.49...deepagents-code==0.1.50)
(2026-07-30)

### Highlights

- Added project hooks workspace trust and expanded Hooks v2 support with
client and server lifecycle events plus runtime feedback
([#5105](#5105),
[#5104](#5104),
[#4997](#4997),
[#5045](#5045)).
- Added an option to mute the “YOLO is active” toast
([#5103](#5103)).
- Made the splash screen `thread` ID clickable to copy it
([#5173](#5173)).
- Show `ask_user` answers directly on the answered tool row
([#5100](#5100)).
- Show a toast when submitting an empty required `ask_user` answer
([#5095](#5095)).
- Added thread message counts to the Debug Console
([#5117](#5117)).

### Fixes and improvements

- Gated Hooks v2 behind `DEEPAGENTS_CODE_EXPERIMENTAL` and improved hook
resume stability across identity and Command tool results
([#5146](#5146),
[#5176](#5176)).
- Kept server hook state out of task results
([#5164](#5164)).
- Stopped duplicate Auto transcript events during interrupt replay
([#5157](#5157)).
- Kept `/update` and `/install --package` prompts responsive
([#5127](#5127)).
- Refreshed the `/threads` cache after each turn
([#5174](#5174)).
- Anchored toasts above the chat input and added a toast when media is
dropped into a free-text question
([#5101](#5101),
[#5099](#5099)).
- Improved thread status message styling and links
([#5118](#5118)).
- Made resume hints echo the launched command name
([#5119](#5119)).
- Scoped selection copy to the clicked screen
([#5140](#5140)).
- Ignored mouse hits on detached widgets
([#5114](#5114)).

_End release notes preview._

---

> [!NOTE]
> A **New Contributors** section is 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 2).

---------

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>
Co-authored-by: Johannes du Plessis <johannes@langchain.dev>
Mason Daugherty (mdrxy) pushed a commit that referenced this pull request Jul 30, 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.50](deepagents-code==0.1.49...deepagents-code==0.1.50)
(2026-07-30)

### Highlights

- Added project hooks workspace trust and expanded Hooks v2 support with
client and server lifecycle events plus runtime feedback
([#5105](#5105),
[#5104](#5104),
[#4997](#4997),
[#5045](#5045)).
- Added an option to mute the “YOLO is active” toast
([#5103](#5103)).
- Made the splash screen `thread` ID clickable to copy it
([#5173](#5173)).
- Show `ask_user` answers directly on the answered tool row
([#5100](#5100)).
- Show a toast when submitting an empty required `ask_user` answer
([#5095](#5095)).
- Added thread message counts to the Debug Console
([#5117](#5117)).

### Fixes and improvements

- Gated Hooks v2 behind `DEEPAGENTS_CODE_EXPERIMENTAL` and improved hook
resume stability across identity and Command tool results
([#5146](#5146),
[#5176](#5176)).
- Kept server hook state out of task results
([#5164](#5164)).
- Stopped duplicate Auto transcript events during interrupt replay
([#5157](#5157)).
- Kept `/update` and `/install --package` prompts responsive
([#5127](#5127)).
- Refreshed the `/threads` cache after each turn
([#5174](#5174)).
- Anchored toasts above the chat input and added a toast when media is
dropped into a free-text question
([#5101](#5101),
[#5099](#5099)).
- Improved thread status message styling and links
([#5118](#5118)).
- Made resume hints echo the launched command name
([#5119](#5119)).
- Scoped selection copy to the clicked screen
([#5140](#5140)).
- Ignored mouse hits on detached widgets
([#5114](#5114)).

_End release notes preview._

---

> [!NOTE]
> A **New Contributors** section is 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 2).

---------

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>
Co-authored-by: Johannes du Plessis <johannes@langchain.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dcode Related to `deepagents-code` fix A bug fix (PATCH) internal User is a member of the `langchain-ai` GitHub organization size: S 50-199 LOC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants