Skip to content

fix: add next-step hints to CLI errors and standardize empty states#456

Merged
BunsDev merged 1 commit into
mainfrom
fix/449-cli-error-hints
Jul 22, 2026
Merged

fix: add next-step hints to CLI errors and standardize empty states#456
BunsDev merged 1 commit into
mainfrom
fix/449-cli-error-hints

Conversation

@BunsDev

@BunsDev BunsDev commented Jul 22, 2026

Copy link
Copy Markdown
Member

Context

Implementation

  • Approach: human-facing strings only; no control flow, exit codes, or --json bodies changed. The Cancelled no-Error:-prefix contract is untouched.
  • Error sites upgraded (semicolon + next step, lowercase leaf voice):
    • prompt must not be empty → adds quote a task string, e.g. \coven run codex "fix the failing tests"`` (existing test asserts the stable prefix and still passes)
    • patch --non-interactive bails: issue-text bail now shows the full command shape; --harness bail names the flag values (codex/claude/copilot)
    • issue text must not be empty when provided → adds an example invocation
    • a response is requiredtype a non-empty answer, or press Ctrl-C to cancel
    • session {} not found in local store and summon's session \{id}` not found→ aligned with thecoven sessions --all` exemplar
    • daemon kill/input HTTP rejections → append check \coven daemon status` and `coven sessions` for session state`
    • Ward migrate summary bail → see the report above for per-familiar details
    • run's nothing to do:nothing to do; (punctuation aligned with the standard)
  • Empty states: sessions/status/familiars/skills/memory/research/calls/hub/ward surfaces already print explicit empty lines (verified each renderer in observe.rs and tui/sessions.rs) — left alone. coven pc / pc top / pc disk printed bare section headers on zero rows; they now print one-line No processes to show. / No disks detected. (human mode only).
  • Search ingest hint: coven sessions search now prints one stderr note after ingest warnings that fresh TUI transcripts may not be searchable until ingest completes.
  • Deliberate skips (kept terse on purpose): --detach/--continue conflict (clap's conflicts_with produces the user-facing error first), non-Unix/Windows platform stubs (kill/attach-input/daemon-serve — factual limits with no next step), ambiguous session-prefix bail (already lists candidate ids), no active session to continue (already has a next step), kill's is not running (status: ...) (already states the blocking status inline), and other modules' errors (out of scope for a reviewable diff).
  • Compatibility notes: stderr-only additions in --json-capable paths; stdout JSON bodies byte-identical.

Verification

  • cargo fmt --check
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --workspace --locked (1269 + suite green)
  • python3 scripts/check-secrets.py (passed: no current-tree or history findings)
  • Additional manual checks: grepped every changed fragment for pinned test assertions (only prompt must not be empty is pinned, as a prefix, and still passes); verified Cancelled contract block unmodified.

Risk and Rollback

  • Risk level: low — message-string and stderr-hint diff.
  • Rollback plan: revert the single commit.

Agent Handoff

Upgrade terse, user-reachable bail! messages in coven-cli to the
existing 'problem; next step' exemplar voice: empty prompt, patch
--non-interactive requirements, empty issue text, empty interactive
response, session-not-found (both local-store sites now point at
`coven sessions --all`), daemon kill/input HTTP rejections (point at
`coven daemon status` / `coven sessions`), and the Ward migration
summary. Align the run 'nothing to do' bail with the same punctuation.

Add explicit one-line empty states to `coven pc` disk/process sections
(previously bare headers), and print a one-line note after
sessions-search ingest warnings that fresh TUI transcripts may not be
searchable until ingest completes.

No control-flow, exit-code, or --json changes; the Cancelled
no-Error-prefix contract is untouched.

Closes #449

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Val Alexander <68980965+BunsDev@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 22, 2026 01:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR improves the Coven CLI’s human-facing UX by adding “next step” hints to several common error messages and by standardizing empty-state output for coven pc subcommands, without changing control flow, exit codes, or --json stdout bodies.

Changes:

  • Add a single stderr “note” after transcript-ingest warnings in coven sessions search, clarifying that very recent TUI transcripts may not be searchable until ingest completes.
  • Upgrade multiple anyhow::bail! messages to include semicolon + next-step guidance (examples/commands) while keeping existing behavioral contracts intact.
  • Add explicit human-mode empty-state lines for coven pc views that previously printed only section headers when there were zero rows.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
crates/coven-cli/src/main.rs Adds next-step hints to selected CLI errors and a post-ingest warning note for sessions search (stderr only).
crates/coven-cli/src/pc/display.rs Standardizes pc/pc top/pc disk human output by printing explicit empty-state lines when there are no processes or disks.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@BunsDev
BunsDev merged commit 3cd3821 into main Jul 22, 2026
34 of 36 checks passed
@BunsDev
BunsDev deleted the fix/449-cli-error-hints branch July 22, 2026 01:34
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.

cli: terse errors lack next-step hints; empty-state output is inconsistent

2 participants