Readable command output: colours stripped, Copy / Wrap / Expand / .txt #83

Merged
jared merged 1 commits from output-readability into main 2026-11-23 16:18:45 -05:00
Owner

Closes #27. This is a UI change, so it needs your approval.

Command output, before and after

Every command output, in the Executions detail and in Quick Command's new result cards, now uses one shared block (Pulse.output.render):

  • ANSI escape codes are stripped. That covers colours, cursor moves, terminal titles and charset switches, so systemctl status, ls --color and docker read cleanly.
  • Copy copies the full, clean text. .txt downloads it as pulse-<id>.txt.
  • Wrap turns long-line wrapping on or off for every block, and the choice is remembered.
  • Expand: output longer than 25 lines starts at a fixed height with an Expand button.
  • Over 100,000 characters, the display is cut with a notice saying how much is hidden. Copy and .txt still include everything.

Tests: a new UI test runs a command that prints colour codes and 40 lines. It checks:

  • no escape characters remain;
  • the block starts collapsed, and Expand and Collapse work;
  • Wrap toggles;
  • Copy puts the full clean text on the clipboard;
  • .txt downloads the same text.

Locally: UI 45/46. The one failure is the local #40 version artifact explained in #80. Lint and the innerHTML semgrep rule are clean.

🤖 Generated with Claude Code

Closes #27. **This is a UI change, so it needs your approval.** ![Command output, before and after](https://code.lotusguild.org/LotusGuild/pulse/raw/branch/pr-assets/pr-83/output.png) Every command output, in the Executions detail and in Quick Command's new result cards, now uses one shared block (`Pulse.output.render`): - **ANSI escape codes are stripped.** That covers colours, cursor moves, terminal titles and charset switches, so `systemctl status`, `ls --color` and `docker` read cleanly. - **Copy** copies the full, clean text. **.txt** downloads it as `pulse-<id>.txt`. - **Wrap** turns long-line wrapping on or off for every block, and the choice is remembered. - **Expand:** output longer than 25 lines starts at a fixed height with an Expand button. - **Over 100,000 characters,** the display is cut with a notice saying how much is hidden. Copy and .txt still include everything. **Tests:** a new UI test runs a command that prints colour codes and 40 lines. It checks: - no escape characters remain; - the block starts collapsed, and Expand and Collapse work; - Wrap toggles; - Copy puts the full clean text on the clipboard; - `.txt` downloads the same text. Locally: UI 45/46. The one failure is the local #40 version artifact explained in #80. Lint and the `innerHTML` semgrep rule are clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
jared added 1 commit 2026-11-23 16:10:54 -05:00
Readable command output: ANSI stripped, Copy / Wrap / Expand / .txt (#27)
CI / Lint (eslint) (pull_request) Successful in 20s
CI / Test (jest) (pull_request) Successful in 21s
CI / Security (npm audit) (pull_request) Successful in 15s
CI / Integration (api) (pull_request) Successful in 2m43s
CI / Scan (secrets, workflows, shell) (pull_request) Successful in 2m44s
CI / UI (playwright) (pull_request) Successful in 2m35s
CI / Deploy (pull_request) Skipped
CI / Deploy worker (pull_request) Skipped
CI / Notify (pull_request) Skipped
CI / UI screenshots (before/after) (pull_request) Successful in 1m54s
ecc1b447be
A shared output block (Pulse.output.render) now draws every command
output in Executions and Quick Command:
- ANSI escape codes (colours, cursor moves, titles, charset switches)
  are stripped, so systemctl, ls --color and docker read cleanly.
- Copy and .txt use the full, clean text; .txt downloads it as a file.
- Wrap turns long-line wrapping on or off for every block, remembered.
- Output over 25 lines starts at 24rem high with an Expand button.
- Over 100,000 characters, the display is cut with a notice saying how
  much is hidden; Copy and .txt still include all of it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jared force-pushed output-readability from b1357cbccf to ecc1b447be 2026-11-23 16:10:54 -05:00 Compare
jared merged commit 7204c806df into main 2026-11-23 16:18:45 -05:00
jared deleted branch output-readability 2026-11-23 16:18:47 -05:00
Sign in to join this conversation.