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

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>
This commit is contained in:
jaredandClaude Opus 5.5 committed 2026-11-23 16:10:52 -05:00
1 parent 64703482fd
commit ecc1b447be
6 files changed
+162 -22

No files matched your search

+5 -4
View File
@@ -282,8 +282,9 @@
return '<div class="ex-log-field"><span class="ex-log-label">' + esc(label) + ':</span> ' + value + '</div>';
}
function out(text, isErr) {
return '<pre class="lt-log-output' + (isErr ? ' ex-log-output-err' : '') + '">' + esc(text) + '</pre>';
// Shared output block: ANSI stripped, Copy / Wrap / Expand / .txt (#27).
function out(text, isErr, name) {
return Pulse.output.render(text, { err: isErr, name: (name || 'pulse-output') + (isErr ? '-stderr' : '') });
}
function promptOptions(options, executionId) {
@@ -314,8 +315,8 @@
(ok ? '&#x2713;' : '&#x2717;') + ' Command Result',
field('Status', ok ? 'Success' : 'Failed') +
(log.duration ? field('Duration', esc(log.duration) + 'ms') : '') +
(log.stdout ? field('Output', out(log.stdout, false)) : '') +
(log.stderr ? field('Errors', out(log.stderr, true)) : '') +
(log.stdout ? field('Output', out(log.stdout, false, 'pulse-' + String(log.command_id || '').slice(0, 8))) : '') +
(log.stderr ? field('Errors', out(log.stderr, true, 'pulse-' + String(log.command_id || '').slice(0, 8))) : '') +
(log.error ? field('Error', esc(log.error)) : ''));
}