Skip to content

Studio chat: show long and invisible-character shell commands faithfully on the approval card #2259

Closed

Description

@peppescg

Parent: #2210. Found in the final review of #2251.

Problem

The approval card's shell command view (apps/web/src/features/chat/ask-args-view.tsx) renders the command in a fixed-height scroll box:

  • No size hint. A long or multi-line command shows only its first lines above the fold, and nothing tells the reader that more follows. The Edit/Write diff view has a "N more lines" indicator; the command view doesn't.
  • Invisible characters render as-is. Bidirectional controls (U+202A–U+202E, U+2066–U+2069) and zero-width characters (U+200B–U+200D, U+FEFF) reach the command, raw and JSON views unchanged. They can make the text a reviewer reads differ from the text that runs.

Expected

A reviewer approving a command can always see all of it, and sees exactly the characters that will run.

Scope

  • Show the line count and a "N more lines" affordance when the command overflows, or expand it on demand.
  • Render bidi and zero-width characters visibly, e.g. as ⟨U+202E⟩ badges, in the command, raw and JSON views. Consider a warning chip when any are present.
  • Tests: a 60-line command shows the overflow indicator; each listed code point renders visibly.

Metadata

Metadata

Assignees

Labels

WebUIApplies to the WebUI interfaceenhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions