Skip to content

fix(flow-chat): wrap long computer use error text (#3796) - #3812

Merged
bobleer merged 1 commit into
openBitFun:mainfrom
sodous-s:main
Nov 8, 2026
Merged

bobleer merged 1 commit into
openBitFun:mainfrom
sodous-s:main

Conversation

@sodous-s

@sodous-s sodous-s commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Summary

The ComputerUse tool card rendered its error body in a bare <pre>, which inherited the
global overflow-x: auto and default white-space: pre. Long plain-text errors such as
Tool error: [TARGET_SURFACE_UNAVAILABLE] ... could only be read by scrolling horizontally.
The error body now wraps naturally.

Fixes #3796

Type and Areas

Type: Bug fix / UI/UX

Areas: Web UI

Motivation / Impact

Long ComputerUse error output was clipped into a horizontal scroll area, which made
automation failures hard to read in the transcript. The error body now uses
white-space: pre-wrap and overflow-wrap: anywhere, so it wraps inside the card.

Scope is limited to the ComputerUse card's error body. Code previews, diffs, and terminal
output keep their existing scrolling behavior. No user-visible strings, locales, or theme
tokens changed.

Verification

  • pnpm --dir src/web-ui exec sass src/flow_chat/tool-cards/ComputerUseToolCard.scss /tmp/cu.css --no-source-map — compiles.
  • node scripts/audit-appearance-contracts.mjs — passed (264 surfaces, 3119 DOM contracts).
  • node scripts/audit-typography-tokens.mjs — passed with zero violations.
  • pnpm run type-check:web and node scripts/audit-frontend-colors.mjs could not complete
    in a clean checkout because generated artifacts were absent (@/generated/api,
    src/web-ui/public/monaco-editor); both failures reproduce without this change.
  • Manual check: expand a failed ComputerUse card with a long error and confirm the text wraps
    without a horizontal scrollbar.

AI assistance: prepared with AI assistance; verification is limited to the static checks
above — no native desktop UI run.

Reviewer Notes

Before: the error is cut off behind a horizontal scrollbar (see #3796 screenshot).

One file changed, two CSS declarations; no behavior change outside the error body.

Checklist

  • This PR is focused and does not include secrets, temporary prompts, generated scratch files, or unrelated artifacts.
  • Relevant verification is recorded above, or skipped checks are explained.
  • User-facing strings, docs, and locales are updated where applicable.

@sodous-s

sodous-s commented Nov 8, 2026

Copy link
Copy Markdown
Contributor Author

@GCWing

@GCWing
GCWing requested a review from bobleer November 8, 2026 01:54
@bobleer
bobleer merged commit cf4a544 into openBitFun:main Nov 8, 2026
9 checks passed
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.

[Bug]: 输出文字应该支持自然换行

2 participants