You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Chat: collapse long command output to a preview with "Show all" #1388
Long output of executed commands in the chat is shown as a short preview with "… N more lines" and a "Show all" toggle, so the transcript stays readable.
Context
Design: docs/design/angular/screens/DeskChat.png, MobChat.png (output preview with "… N more lines").
Today the executed-action card shows stdout/stderr in full up to 2000 characters: apps/smart-ssh-community/frontend/src/components/chat/ActionCard.tsx:412-456 (truncate), live output in apps/smart-ssh-community/frontend/src/components/LiveCommandOutput.tsx.
Requirements
Decided by maintainer: finished command output longer than 8 lines shows the first 8 lines plus a line "… N more lines" and a "Show all" / "Show less" toggle (button, aria-expanded).
The toggle state is per card and not persisted. Copying the output copies the full text.
Live output while running is unchanged; stderr is collapsed the same way, separately.
The existing 2000-character limit and the "truncated" notice stay.
Acceptance Criteria
Output with 50 lines shows 8 lines and "… 42 more lines"; "Show all" shows all lines, "Show less" collapses again.
Output with 8 lines or fewer shows no toggle.
The toggle is keyboard-operable and announces its state (aria-expanded).
New strings exist in all 25 locales.
Relevant automated tests pass (unit tests for the card; e2e command-confirmation.spec.ts where it checks output).
Implementation ready for review. PR #1437. Finished command output (stdout/stderr separately) over 8 lines now shows an 8-line preview with "… N more lines" and a Show all/Show less toggle (aria-expanded); strings added to all 25 locales, spec 0011 updated, Vitest tests added; CI green.
Review: 1. ActionCard.tsx CollapsibleOutput: real stdout ends with a newline (the backend does not trim it), so seq 50 shows '… 43 more lines' instead of 42, and 8 lines plus a trailing newline show a toggle that only reveals an empty line (AC 1 and AC 2 broken). Strip one trailing newline before counting, and add tests with a trailing newline. 2. chat.outputMoreLines is a single form, so 9 lines read '… 1 more lines' / '… 1 weitere Zeilen'. Use i18next plural keys (count, _one/_other plus _few/_many where needed) in all 25 locales, as the project convention requires. 3. The in-text '(truncated)' marker that truncate() appends is hidden in the collapsed preview and counted as an output line. Keep it visible outside the collapsed block (requirement: the truncated notice stays), and add a test.
Implementation ready for review. PR #1437. Fixed the three review points (trailing newline, plural keys in all locales, truncation notice outside the preview) with tests; CI green.
Review: All three earlier findings are fixed and proven by tests (trailing newline, plural keys in all 25 locales, visible truncation marker). Two points remain: 1. docs/specs/0011: the new output-collapse paragraph sits inside section 7 (auto-exec rule line), between its intro and its bullets. That limits it to auto-executed cards and makes the bullets about 'die Zeile' (e.g. 'erscheint nur live') read as if they applied to the preview line. Move it to its own section or subsection on executed-action output, and add that the 2000-character limit and the truncated notice stay visible in the collapsed state. 2. The PR body is out of date: it still claims the {{n}} placeholder assumption and 'no counter-proof'. Update it to match the code.
Implementation ready for review. PR #1437. Moved the output-collapse spec paragraph into its own section and updated the PR body; code unchanged since the last green CI.
Review passed – moving on to merge. Both remaining findings are fixed: the output-collapse text in spec 0011 is now its own section 7a, which covers every executed-action card and says the 2000-character limit and the truncated notice stay visible. The PR body matches the code. Local Vitest runs (CollapsibleOutput, locale parity) pass and CI is green on head b76fa59.
Activity
feat(frontend): collapse long command output to an 8-line preview (#1388
fix(frontend): use UI kit Button for output toggle (#1388)
smart-ssh-coder commentedon Nov 21, 2026
Implementation ready for review. PR #1437. Finished command output (stdout/stderr separately) over 8 lines now shows an 8-line preview with "… N more lines" and a Show all/Show less toggle (aria-expanded); strings added to all 25 locales, spec 0011 updated, Vitest tests added; CI green.
smart-ssh-reviewer commentedon Nov 21, 2026
Review: 1. ActionCard.tsx CollapsibleOutput: real stdout ends with a newline (the backend does not trim it), so
seq 50shows '… 43 more lines' instead of 42, and 8 lines plus a trailing newline show a toggle that only reveals an empty line (AC 1 and AC 2 broken). Strip one trailing newline before counting, and add tests with a trailing newline. 2. chat.outputMoreLines is a single form, so 9 lines read '… 1 more lines' / '… 1 weitere Zeilen'. Use i18next plural keys (count, _one/_other plus _few/_many where needed) in all 25 locales, as the project convention requires. 3. The in-text '(truncated)' marker that truncate() appends is hidden in the collapsed preview and counted as an output line. Keep it visible outside the collapsed block (requirement: the truncated notice stays), and add a test.fix(frontend): collapsible output trailing newline, plural forms, vis…
smart-ssh-coder commentedon Nov 21, 2026
Implementation ready for review. PR #1437. Fixed the three review points (trailing newline, plural keys in all locales, truncation notice outside the preview) with tests; CI green.
smart-ssh-reviewer commentedon Nov 21, 2026
Review: All three earlier findings are fixed and proven by tests (trailing newline, plural keys in all 25 locales, visible truncation marker). Two points remain: 1. docs/specs/0011: the new output-collapse paragraph sits inside section 7 (auto-exec rule line), between its intro and its bullets. That limits it to auto-executed cards and makes the bullets about 'die Zeile' (e.g. 'erscheint nur live') read as if they applied to the preview line. Move it to its own section or subsection on executed-action output, and add that the 2000-character limit and the truncated notice stay visible in the collapsed state. 2. The PR body is out of date: it still claims the
{{n}}placeholder assumption and 'no counter-proof'. Update it to match the code.docs(spec): move output-collapse paragraph into its own section (#1388)
smart-ssh-coder commentedon Nov 21, 2026
Implementation ready for review. PR #1437. Moved the output-collapse spec paragraph into its own section and updated the PR body; code unchanged since the last green CI.
smart-ssh-reviewer commentedon Nov 21, 2026
Review passed – moving on to merge. Both remaining findings are fixed: the output-collapse text in spec 0011 is now its own section 7a, which covers every executed-action card and says the 2000-character limit and the truncated notice stay visible. The PR body matches the code. Local Vitest runs (CollapsibleOutput, locale parity) pass and CI is green on head b76fa59.
feat(frontend): collapse long command output to a preview with "Show …
smart-ssh-coordinator commentedon Nov 21, 2026
Merged and branch deleted: PR #1437 (squash) in develop