Skip to content

fix(ux): actionable auth errors and improved CLI help for new users (#1852) - #2315

Merged
serrrfirat merged 3 commits into
stagingfrom
fix/1852-ux-improvements
Apr 14, 2026
Merged

serrrfirat merged 3 commits into
stagingfrom
fix/1852-ux-improvements

Conversation

@ilblackdragon

Copy link
Copy Markdown
Member

Summary

Addresses #1852 with targeted UX improvements for non-technical users:

  • src/llm/error.rs: AuthFailed now includes provider-specific guidance with env var name, signup URL, and ironclaw onboard --step provider hint. Covers all providers (4 new tests)
  • src/cli/mod.rs: Top-level --help now has "Getting started" and "Common commands" sections; onboard/config/models/doctor/login long_about improved
  • src/cli/models.rs: Unknown provider errors list available providers; warns when API key env var not set after switching; model list footer shows how to switch

Test plan

  • cargo fmt, cargo clippy --all-features zero warnings
  • All 4037 unit tests pass

🤖 Generated with Claude Code

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@github-actions github-actions Bot added scope: agent Agent core (agent loop, router, scheduler) scope: channel Channel infrastructure scope: channel/cli TUI / CLI channel scope: channel/web Web gateway channel scope: channel/wasm WASM channel runtime scope: tool Tool infrastructure scope: tool/builtin Built-in tools scope: tool/wasm WASM tool sandbox scope: tool/builder Dynamic tool builder scope: db Database trait / abstraction scope: db/postgres PostgreSQL backend scope: db/libsql libSQL / Turso backend scope: llm LLM integration scope: orchestrator Container orchestrator scope: worker Container worker scope: config Configuration scope: setup Onboarding / setup scope: sandbox Docker sandbox scope: ci CI/CD workflows scope: docs Documentation size: XL 500+ changed lines risk: high Safety, secrets, auth, or critical infrastructure contributor: core 20+ merged PRs labels Apr 11, 2026

@ilblackdragon ilblackdragon left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I did not find a blocking issue here.

This is mostly UX text, and the change is scoped. The provider-specific guidance in AuthFailed is useful. Minor note: because the error text is now policy-bearing product guidance, it is worth treating it as compatibility-sensitive and keeping snapshot-style coverage around the rendered messages for the important providers, not just the helper function.

ilblackdragon added a commit that referenced this pull request Apr 11, 2026
…vider

Addresses PR #2315 review note: auth error text is now policy-bearing
product guidance and warrants explicit coverage so future edits are
deliberate.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ilblackdragon

Copy link
Copy Markdown
Member Author

Addressed in 282e695: added snapshot-style assertions over the rendered AuthFailed messages for each important provider (nearai, openai, anthropic, ollama, openai_compatible, tinfoil, bedrock, plus the generic unknown-provider fallback). Tests use insta::assert_snapshot! with inline snapshots and render through LlmError::AuthFailed.to_string() so the outer #[error(..)] format string is also covered. Future edits to the user-facing auth guidance now require a deliberate test update.

ilblackdragon and others added 2 commits April 13, 2026 03:57


AuthFailed errors now include provider-specific guidance (which env var
to set, relevant URLs, and how to run `ironclaw onboard --step provider`).
CLI help text improved across top-level, onboard, models, config, and
doctor commands to help new users discover the setup wizard and provider
configuration commands. `models set-provider` now warns when an API key
is missing after switching providers.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…vider

Addresses PR #2315 review note: auth error text is now policy-bearing
product guidance and warrants explicit coverage so future edits are
deliberate.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ilblackdragon
ilblackdragon force-pushed the fix/1852-ux-improvements branch from 282e695 to 5ed7902 Compare April 13, 2026 04:02
This was referenced Apr 16, 2026
@henrypark133 henrypark133 mentioned this pull request Apr 21, 2026
theredspoon pushed a commit to theredspoon/ironclaw that referenced this pull request Jun 21, 2026
…earai#1852) (nearai#2315)

* fix(ux): actionable error messages and improved CLI help for issue nearai#1852

AuthFailed errors now include provider-specific guidance (which env var
to set, relevant URLs, and how to run `ironclaw onboard --step provider`).
CLI help text improved across top-level, onboard, models, config, and
doctor commands to help new users discover the setup wizard and provider
configuration commands. `models set-provider` now warns when an API key
is missing after switching providers.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* test(llm): snapshot coverage for rendered AuthFailed messages per provider

Addresses PR nearai#2315 review note: auth error text is now policy-bearing
product guidance and warrants explicit coverage so future edits are
deliberate.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(cli): use secrets-aware optional_env for API key check

Addresses PR nearai#2315 review: API key warning now checks the secrets
store overlay via optional_env() instead of raw std::env::var(),
preventing false "API key required" warnings for users who stored
keys via `ironclaw secrets`.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor: core 20+ merged PRs risk: low Changes to docs, tests, or low-risk modules scope: agent Agent core (agent loop, router, scheduler) scope: channel/cli TUI / CLI channel scope: channel/wasm WASM channel runtime scope: channel/web Web gateway channel scope: channel Channel infrastructure scope: ci CI/CD workflows scope: config Configuration scope: db/libsql libSQL / Turso backend scope: db/postgres PostgreSQL backend scope: db Database trait / abstraction scope: docs Documentation scope: llm LLM integration scope: orchestrator Container orchestrator scope: sandbox Docker sandbox scope: setup Onboarding / setup scope: tool/builder Dynamic tool builder scope: tool/builtin Built-in tools scope: tool/wasm WASM tool sandbox scope: tool Tool infrastructure scope: worker Container worker size: L 200-499 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants