feat(ux): add actionable error guidance for common failures#44
Open
thinkingjet wants to merge 2 commits into
Open
feat(ux): add actionable error guidance for common failures#44thinkingjet wants to merge 2 commits into
thinkingjet wants to merge 2 commits into
Conversation
Implements issue codesoda#13 by improving first-run error messages without touching claude_code.rs. Changes: - main: missing test-file errors now suggest running bugatti test for discovery - main: no-tests-discovered message now links to getting-started docs - main: provider init errors add Claude Code install hint when binary is missing from PATH - config: parse/read errors now include actionable guidance and docs link - tests: add focused unit tests for new message helpers and config error text Validation: - cargo test -q --all-targets - cargo run --quiet -- test does-not-exist - empty-dir discovery run prints getting-started hint
Contributor
There was a problem hiding this comment.
Pull request overview
Improves first-run CLI UX by making common failure modes (missing test file, no tests discovered, provider init failures, and config read/parse failures) more actionable via clearer guidance and relevant documentation links.
Changes:
- Add centralized helper messages in
mainfor missing test files, no discovered root tests, and provider init errors (including Claude Code install hint whenclaudeis missing fromPATH). - Enhance
ConfigErrordisplay text to include actionable remediation guidance + config format docs link. - Add focused unit tests covering the new message helpers and updated config error strings.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/main.rs |
Adds user-facing message helpers, wires them into error paths, and introduces unit tests for the new message behavior. |
src/config.rs |
Updates config read/parse error text to include guidance + docs link, and adds tests validating the new wording. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Match on ProviderError::InitializationFailed(inner) and inspect inner message directly; keep fallback to err.to_string() for other variants. Adds test to ensure install hint is not duplicated when already present.
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.
Implements issue #13 by improving first-run error messages without touching claude_code.rs.
Changes:
main: missing test-file errors now suggest running bugatti test for discovery
main: no-tests-discovered message now links to getting-started docs
main: provider init errors add Claude Code install hint when binary is missing from PATH
config: parse/read errors now include actionable guidance and docs link
tests: add focused unit tests for new message helpers and config error text
Validation:
cargo test -q --all-targets
cargo run --quiet -- test does-not-exist
empty-dir discovery run prints getting-started hint