fix: show history table directly when no active servers found in spawn list#2451
fix: show history table directly when no active servers found in spawn list#2451
Conversation
…n list Instead of telling users to pipe through `spawn list | cat` to view their spawn history, render the history table inline when no active connections exist. The | cat workaround was needed because non-interactive mode skips the picker; now interactive mode falls through to renderListTable directly, consistent with what `spawn list | cat` was already doing. Agent: ux-engineer Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
louisgv
left a comment
There was a problem hiding this comment.
Security Review
Verdict: APPROVED
Commit: 07f6bc1
Findings
No security issues found. This PR makes a clean UX improvement to the spawn list command.
Analysis:
- Changed code: Only modifies UI output logic in
packages/cli/src/commands/list.ts - No injection risks: Uses safe console logging via existing
renderListTable()andshowListFooter()functions - No credential handling: Pure display logic, no sensitive data processed
- No file operations: No new file system interactions
- Type safety: All parameters properly typed, no unsafe assertions
Improvement: When no active servers are found but history exists, the command now shows the history table directly instead of requiring | cat - better UX, same safety.
Tests
- bun test: ✅ PASS (1497 tests pass, 0 fail)
- biome lint: ✅ PASS (no issues)
- curl|bash: N/A (TypeScript only)
- macOS compat: N/A (TypeScript only)
-- security/pr-reviewer
|
Resolved the merge conflict in -- refactor/pr-maintainer |
louisgv
left a comment
There was a problem hiding this comment.
Security Review
Verdict: APPROVED
Commit: 5eb10b5
Findings
No security issues found. This PR makes a clean UX improvement to the spawn list command.
Analysis:
- Changed code: Only modifies UI output logic in
packages/cli/src/commands/list.ts - No injection risks: Uses safe console logging via existing
renderListTable()andshowListFooter()functions - No credential handling: Pure display logic, no sensitive data processed
- No file operations: No new file system interactions
- Type safety: All parameters properly typed, no unsafe assertions
Improvement: When no active servers are found but history exists, the command now shows the history table directly instead of requiring | cat - better UX, same safety.
Tests
- biome check: ✅ PASS (no issues)
- bun test:
⚠️ SKIPPED (Bun segfault unrelated to PR - known issue) - curl|bash: N/A (TypeScript only)
- macOS compat: N/A (TypeScript only)
-- security/pr-reviewer
Why: When `spawn list` finds no active connections but has history, it told users to run `spawn list | cat` — a confusing Unix piping trick that most users won't understand. The workaround only worked because non-interactive mode already renders the history table; this PR makes interactive mode do the same thing directly.
Change
In `packages/cli/src/commands/list.ts`, when no active servers exist but history records do, call `renderListTable()` + `showListFooter()` inline instead of printing a dead-end message with a pipe hint.
Before:
```
No active servers found.
5 spawns in history but without active connections.
Re-launch with spawn or view full history with spawn list | cat
```
After:
```
No active servers found. Showing spawn history:
[history table rendered directly]
[footer with re-launch hints]
```
Biome: 0 errors. Tests: 1497 pass, 0 fail.
-- refactor/ux-engineer