feat: command output capture for troubleshooting sessions #74

Merged
chihlasm merged 1 commits from feat/command-output-capture into main 2026-02-12 06:04:15 +00:00
chihlasm commented 2026-02-12 05:57:52 +00:00 (Migrated from github.com)

Summary

  • Adds a collapsible "Paste Output" textarea on action nodes (built-in and custom) so engineers can capture command output during troubleshooting sessions
  • Output is stored in the JSONB decisions array (no migration needed), displayed in session review with monospace formatting, and included in all 4 export formats (markdown, text, HTML, PSA) with command context
  • Session-to-tree conversion preserves captured output in forked trees

Changes

  • Backend: command_output field on DecisionRecord schema (10K char limit), export service renders output in all formats with command context helpers, session-to-tree appends output to action nodes
  • Frontend: commandOutput state + collapsible textarea UI on action nodes with commands, live character count, preloads on Go Back, clipboard copy includes output, session detail page renders <pre> block

Test plan

  • Start a session on a tree with action nodes that have commands — paste output, continue, verify it persists
  • Add a custom action step with commands — paste output, continue, verify it persists
  • Complete session — check SessionDetailPage shows command output with monospace formatting
  • Export in all 4 formats — verify output appears correctly formatted with command context
  • Copy step to clipboard — verify output is included
  • Test with existing sessions (no command_output) — verify no errors
  • Test Go Back — verify output preloads from removed decision
  • Test near 10K character limit — verify character count and enforcement

Closes #57

🤖 Generated with Claude Code

## Summary - Adds a collapsible "Paste Output" textarea on action nodes (built-in and custom) so engineers can capture command output during troubleshooting sessions - Output is stored in the JSONB decisions array (no migration needed), displayed in session review with monospace formatting, and included in all 4 export formats (markdown, text, HTML, PSA) with command context - Session-to-tree conversion preserves captured output in forked trees ## Changes - **Backend:** `command_output` field on `DecisionRecord` schema (10K char limit), export service renders output in all formats with command context helpers, session-to-tree appends output to action nodes - **Frontend:** `commandOutput` state + collapsible textarea UI on action nodes with commands, live character count, preloads on Go Back, clipboard copy includes output, session detail page renders `<pre>` block ## Test plan - [ ] Start a session on a tree with action nodes that have commands — paste output, continue, verify it persists - [ ] Add a custom action step with commands — paste output, continue, verify it persists - [ ] Complete session — check SessionDetailPage shows command output with monospace formatting - [ ] Export in all 4 formats — verify output appears correctly formatted with command context - [ ] Copy step to clipboard — verify output is included - [ ] Test with existing sessions (no command_output) — verify no errors - [ ] Test Go Back — verify output preloads from removed decision - [ ] Test near 10K character limit — verify character count and enforcement Closes #57 🤖 Generated with [Claude Code](https://claude.com/claude-code)
railway-app[bot] commented 2026-02-12 05:58:03 +00:00 (Migrated from github.com)

🚅 Deployed to the patherly-pr-74 environment in selfless-grace

Service Status Web Updated (UTC)
hopeful-liberation Success (View Logs) Web Feb 12, 2026 at 6:01 am
patherly Success (View Logs) Web Feb 12, 2026 at 6:01 am
<!-- railway-bot-comment-version=2 --> <!-- railway-project-id="22b9b58c-271b-42e5-a10e-6fdec8d00134" railway-project-name="selfless-grace" --> 🚅 Deployed to the [patherly-pr-74](https://railway.com/project/22b9b58c-271b-42e5-a10e-6fdec8d00134?environmentId=757d0d60-1d19-415f-90b6-9799c8422e04) environment in **[selfless-grace](https://railway.com/project/22b9b58c-271b-42e5-a10e-6fdec8d00134)** | **Service** | **Status** | **Web** | **Updated** (UTC) | | :--- | :--- | :--- | :--- | | hopeful-liberation | ✅ Success ([View Logs](https://railway.com/project/22b9b58c-271b-42e5-a10e-6fdec8d00134/service/e1db2ee3-d241-4f45-abe4-c9c5fdf483d5?id=a817f50f-b074-4c8f-9362-bb2dc0d20fda&environmentId=757d0d60-1d19-415f-90b6-9799c8422e04)) | [Web](https://hopeful-liberation-patherly-pr-74.up.railway.app) | Feb 12, 2026 at 6:01 am | | patherly | ✅ Success ([View Logs](https://railway.com/project/22b9b58c-271b-42e5-a10e-6fdec8d00134/service/95f556ff-5264-4116-a0c2-618a2fc53ba4?id=f0a63b57-4743-4be9-9853-6b637c9b19d8&environmentId=757d0d60-1d19-415f-90b6-9799c8422e04)) | [Web](https://patherly-patherly-pr-74.up.railway.app) | Feb 12, 2026 at 6:01 am |
Sign in to join this conversation.