Skip to content

fix(ai): make reasoning text selectable after streaming completes#11635

Open
rawsyntax wants to merge 1 commit into
warpdotdev:masterfrom
rawsyntax:rawsyntax/9702-reasoning-text-selectable
Open

fix(ai): make reasoning text selectable after streaming completes#11635
rawsyntax wants to merge 1 commit into
warpdotdev:masterfrom
rawsyntax:rawsyntax/9702-reasoning-text-selectable

Conversation

@rawsyntax
Copy link
Copy Markdown

@rawsyntax rawsyntax commented May 24, 2026

Description

Agent thinking/reasoning traces were rendered with selectable: false inside render_collapsible_text_block_section, making it impossible for users to select or copy any part of the reasoning content—even after the response had fully streamed in.

The fix swaps the declaration order of selectable and is_streaming so selectability derives from stream state: when the agent is done streaming, selectable = !is_streaming = true. This matches the existing height logic in the same function, which already switches the collapsible viewport from 120 px (streaming) to 360 px (complete).

Linked Issue

Closes #9702

  • The linked issue is labeled ready-to-spec or ready-to-implement.
  • Where appropriate, screenshots or a short video of the implementation are included below.

Note: Issue #9702 is labeled enhancement / triaged (not yet ready-to-implement). The fix is a targeted 3-line change to a hardcoded false that the triage analysis identified as the root cause. Happy to hold off if the team prefers to label first.

Testing

  • cargo fmt --check — clean
  • cargo clippy -p warp --lib --tests --no-deps -- -D warnings — clean (0 warnings, finished in ~2m 40s)

Manual smoke test requires the full app running (./script/run) which needs internal build deps not present on this machine. A maintainer should verify the behaviour end-to-end: open a completed agent response with "Always show" thinking enabled and confirm the reasoning text is now selectable/copyable.

  • I have manually tested my changes locally with ./script/run

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

CHANGELOG-IMPROVEMENT: Agent reasoning/thinking traces are now selectable and copyable once the response finishes streaming.

…rpdotdev#9702)

Reasoning/thinking traces were rendered with `selectable: false` in
`render_collapsible_text_block_section`, making it impossible for users
to select or copy any of the reasoning text even after the stream finished.

Swap the declaration order so `selectable` is derived from
`is_streaming`: the text becomes selectable once the agent has stopped
streaming, matching the existing height behaviour that already switches
from 120 → 360 px when streaming ends.

Co-Authored-By: Oz <oz-agent@warp.dev>
@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented May 24, 2026

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @rawsyntax on file. In order for us to review and merge your code, each contributor must visit https://cla.warp.dev to read and agree to our CLA. Once you have done so, please comment @cla-bot check to trigger another check.

@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 24, 2026

@rawsyntax

This PR is not linked to an issue that is marked with ready-to-implement.

Issue-state enforcement details:

  • Associated same-repo issues checked: none

  • Required readiness label: ready-to-implement

To continue, link this PR to a same-repo issue such as Closes #123 in the PR description, and make sure that issue has ready-to-implement.

Powered by Oz

@github-actions github-actions Bot added the external-contributor Indicates that a PR has been opened by someone outside the Warp team. label May 24, 2026
Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

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

@rawsyntax

This PR is not linked to an issue that is marked with ready-to-implement.

Issue-state enforcement details:

  • Associated same-repo issues checked: none

  • Required readiness label: ready-to-implement

To continue, link this PR to a same-repo issue such as Closes #123 in the PR description, and make sure that issue has ready-to-implement.

Powered by Oz

@rawsyntax
Copy link
Copy Markdown
Author

@cla-bot check

@cla-bot cla-bot Bot added the cla-signed label May 24, 2026
@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented May 24, 2026

The cla-bot has been summoned, and re-checked this pull request!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed external-contributor Indicates that a PR has been opened by someone outside the Warp team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: Persist agent thinking/reasoning output for review after response completes

1 participant