fix: add next-step hints to CLI errors and standardize empty states#456
Merged
Conversation
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>
Contributor
There was a problem hiding this comment.
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 pcviews 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
no supported harness is available; run \coven doctor` for setup guidance,session `{id}` not found; run `coven sessions --all` ...`).crates/coven-cli/src/main.rs,crates/coven-cli/src/pc/display.rsImplementation
--jsonbodies changed. The Cancelled no-Error:-prefix contract is untouched.prompt must not be empty→ addsquote a task string, e.g. \coven run codex "fix the failing tests"`` (existing test asserts the stable prefix and still passes)--non-interactivebails: issue-text bail now shows the full command shape;--harnessbail names the flag values (codex/claude/copilot)issue text must not be empty when provided→ adds an example invocationa response is required→type a non-empty answer, or press Ctrl-C to cancelsession {} not found in local storeand summon'ssession \{id}` not found→ aligned with thecoven sessions --all` exemplarcheck \coven daemon status` and `coven sessions` for session state`see the report above for per-familiar detailsnothing to do:→nothing to do;(punctuation aligned with the standard)observe.rsandtui/sessions.rs) — left alone.coven pc/pc top/pc diskprinted bare section headers on zero rows; they now print one-lineNo processes to show./No disks detected.(human mode only).coven sessions searchnow prints one stderr note after ingest warnings that fresh TUI transcripts may not be searchable until ingest completes.--detach/--continueconflict (clap'sconflicts_withproduces 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'sis not running (status: ...)(already states the blocking status inline), and other modules' errors (out of scope for a reviewable diff).--json-capable paths; stdout JSON bodies byte-identical.Verification
cargo fmt --checkcargo clippy --workspace --all-targets -- -D warningscargo test --workspace --locked(1269 + suite green)python3 scripts/check-secrets.py(passed: no current-tree or history findings)prompt must not be emptyis pinned, as a prefix, and still passes); verified Cancelled contract block unmodified.Risk and Rollback
Agent Handoff
routingempty state has no next-step line (registering routes isn't a CLI action; kept one factual line).