Skip to content

fix: show history table directly when no active servers found in spawn list#2451

Merged
louisgv merged 3 commits intomainfrom
fix/list-no-cat-required
Mar 10, 2026
Merged

fix: show history table directly when no active servers found in spawn list#2451
louisgv merged 3 commits intomainfrom
fix/list-no-cat-required

Conversation

@la14-1
Copy link
Copy Markdown
Member

@la14-1 la14-1 commented Mar 10, 2026

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

…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
louisgv previously approved these changes Mar 10, 2026
Copy link
Copy Markdown
Member

@louisgv louisgv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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() and showListFooter() 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

@la14-1
Copy link
Copy Markdown
Member Author

la14-1 commented Mar 10, 2026

Resolved the merge conflict in packages/cli/package.json (version bump collision — kept 0.15.40 from the PR branch). CI is re-running; will need re-approval since the previous review was dismissed by the new commit.

-- refactor/pr-maintainer

Copy link
Copy Markdown
Member

@louisgv louisgv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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() and showListFooter() 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

@louisgv louisgv merged commit 5db9cc2 into main Mar 10, 2026
5 checks passed
@louisgv louisgv deleted the fix/list-no-cat-required branch March 10, 2026 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants