Skip to content

fix(code): only highlight actionable tool rows - #5769

Merged
Mason Daugherty (mdrxy) merged 8 commits into
mainfrom
mdrxy/code/widget-action-hover
Aug 24, 2026
Merged

fix(code): only highlight actionable tool rows#5769
Mason Daugherty (mdrxy) merged 8 commits into
mainfrom
mdrxy/code/widget-action-hover

Conversation

@mdrxy

@mdrxy Mason Daugherty (mdrxy) commented Aug 24, 2026

Copy link
Copy Markdown
Member

Fixed misleading hover feedback on non-expandable tool results in the terminal UI.


Tool rows now expose the hover gutter only when clicking can expand or collapse hidden detail. Fully visible results ignore row clicks, while expandable output, arguments, and task descriptions retain their affordance.

Made by Open SWE

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 Aug 24, 2026
@mdrxy
Mason Daugherty (mdrxy) marked this pull request as ready for review August 24, 2026 14:11
Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
`_update_output_display` bails out early when `_output` is empty or the
child widgets are not yet cached, and that exit was the only one of four
that did not re-sync `-row-actionable`. A row that lost its expandable
output kept the hover border while `on_click` refused the click.

No caller reaches it today (every `set_error` call site passes non-empty
text, and `textual_adapter` pops a row before completing it), so this
closes a latent gap rather than a live bug — but the invariant now holds
in the widget instead of relying on caller discipline elsewhere.
Both existing tests used a short-command `execute` row, where the args
and `task`-description terms of `has_row_action` are False and only the
final sync site in `_update_output_display` runs. Deleting either term,
the `on_mount` sync, or the collapse-by-default sync therefore left the
suite green — and losing a term makes those rows unclickable, not merely
unhighlighted, because `on_click` returns before its fallthroughs.

Adds coverage for args-only rows (long `execute` command, multi-line
`js_eval`), description-only `task` rows, pending rows classed by
`on_mount`, `_COLLAPSE_OUTPUT_BY_DEFAULT` output, the grep/glob
no-result sentinels, force-expanded short errors, and rehydration via
`MessageData`. Also asserts the CSS selector still names
`_TOOL_ROW_ACTION_CLASS`, since a rename that missed the selector would
kill hover with nothing failing.

Each of the four mutations above now fails at least one test.
The guard added to `on_click` changed the method's contract without
touching its docstring, and left `event.stop()  # Prevent click from
bubbling up and scrolling` reading as unconditional when it is now
conditional. States that non-actionable rows bubble on purpose, and why
that is harmless: `_ChatScroll` sets `FOCUS_ON_CLICK = False`, and tool
group members are DOM siblings rather than children, so the click can
neither scroll the transcript nor collapse a group.

Also records the two invariants a reader would otherwise have to
reconstruct: `has_row_action` must stay in exact lockstep with
`on_click`'s routing, and `_sync_row_actionability`'s call sites are
sufficient because `_args` is written once in `__init__`. Gives
`_TOOL_ROW_ACTION_CLASS` the trailer and annotation its sibling class
constants carry, noting both selectors that name the literal.
@github-actions github-actions Bot added size: M 200-499 LOC and removed size: S 50-199 LOC labels Aug 24, 2026
@mdrxy
Mason Daugherty (mdrxy) merged commit b78413c into main Aug 24, 2026
57 checks passed
@mdrxy
Mason Daugherty (mdrxy) deleted the mdrxy/code/widget-action-hover branch August 24, 2026 17:16
Mason Daugherty (mdrxy) pushed a commit that referenced this pull request Aug 24, 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.61](deepagents-code==0.1.60...deepagents-code==0.1.61)
(2026-08-24)

### Features

- Added `google_anthropic_vertex` provider support for Claude on Vertex
AI ([#5760](#5760)).
- Enforced configured model allowlists
([#5649](#5649)).
- Injected goal and rubric context directly, replacing `get_goal` and
`get_rubric`
([#5041](#5041)).
- Made `/offload` server-owned
([#5261](#5261)).
- Added prompt clipboard support
([#5733](#5733)).
- Show Auto approval review progress
([#5729](#5729)).

### Bug Fixes

- Kept long thread resumes responsive
([#5772](#5772)).
- Render first streamed text immediately
([#5761](#5761)).
- Show the incognito shell command widget
([#5768](#5768)).
- Only highlight actionable tool rows
([#5769](#5769)).
- Warn and ignore `--auto-approve` and `--yolo` in headless mode
([#5750](#5750)).
- Sweep expired history archives at startup
([#5751](#5751)).
- Clarified auth environment setup
([#5767](#5767)).

_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>
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: M 200-499 LOC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant