镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

feat(cli): report auth_url in context, time waits, and list items one per line - #19

Merged
thebrandonlucas merged 1 commit into
masterfrom
feat/cli-ux-followups
Oct 20, 2026
Merged

thebrandonlucas merged 1 commit into
masterfrom
feat/cli-ux-followups

Conversation

@thebrandonlucas

@thebrandonlucas thebrandonlucas commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Stack: master ← #24 ← #19 ← #26 ← #27 ← #28 ← #29 ← #30 ← #55 ← #59. #20, #22 and #57 are merged.

  • String lists: each item gets its own line in human output, aligned with the value column, so a dry run's notes no longer run together. An empty list shows as -, for local and API results.
  • voltage context shows auth_url beside api_url. For a saved browser login it is the URL the login was saved with, sourced like the credential. Otherwise it is the --auth-url flag, normalized as commands normalize it, or the built-in default.
  • auth_url_mismatch: a --auth-url that differs from a saved login's URL is a new credential problem. voltage context reports it, and commands still refuse with exit 2 ("Saved credentials cannot be refreshed at a different auth URL"), now with a hint: omit --auth-url, or sign in at the new URL with voltage login --account NAME --auth-url URL. Before, context showed the flag as if it would be used.
  • Elapsed time on long waits: payment waits and device approval show the time waited so far, such as Waiting for the payment to be completed... 1m 05s, so a slow wait does not look stuck.

Changes after review

  • Progress has its doc comment and #[must_use] again. They had moved onto the new elapsed function, so dropping a progress guard by mistake no longer warned.
  • The mismatch check moved from auth::resolve into auth::select, which commands and voltage context both use.
  • The wait label reads "Waiting for the payment to be {target}…" instead of "Waiting for {target}…".
  • New tests: the auth_url default, flag, and saved sources; flag normalization; the mismatch in context and in a command; an invalid --auth-url; the device-approval elapsed label; and an empty API string list rendering as -.

Checks

On eeed075:

  • cargo fmt --check, cargo clippy --locked --all-targets -- -D warnings, cargo machete --with-metadata: pass.
  • cargo test --locked: 98 unit and 85 integration tests pass. VOLTAGE_BLESS=1 cargo test --locked leaves the tree clean.
  • python3 scripts/check-coverage.py: pass.
  • CRAP (scripts/crap-report.sh): no function at or above 20. Highest is api::wait_for_payment at 19.24, unchanged from or lower than master (19.66).
  • Skill review: voltage-pr-review and the voltage-backend-engineering Rust checklist, against the stack base. Findings are fixed in this commit.

Not run: the staging and live tutorials, which need credentials.

Base automatically changed from feat/cli-human-output to master October 9, 2026 20:11
@thebrandonlucas
thebrandonlucas changed the base branch from master to feat/cli-error-hints October 13, 2026 18:56
@thebrandonlucas
thebrandonlucas marked this pull request as ready for review October 13, 2026 18:56
@thebrandonlucas
thebrandonlucas added this pull request to stack #25 October 13, 2026 18:56
@thebrandonlucas
thebrandonlucas force-pushed the feat/cli-ux-followups branch 3 times, most recently from d0e7694 to 979d77b Compare October 19, 2026 13:47
@thebrandonlucas
thebrandonlucas force-pushed the feat/cli-ux-followups branch 2 times, most recently from 33b3ff1 to aaccd91 Compare October 19, 2026 18:39
@thebrandonlucas
thebrandonlucas removed this pull request from stack #25 October 20, 2026 11:59
@thebrandonlucas
thebrandonlucas added this pull request to stack #58 October 20, 2026 11:59
@thebrandonlucas thebrandonlucas changed the title feat(cli): human output UX follow-ups feat(cli): report auth_url in context, time waits, and list items one per line Oct 20, 2026
@thebrandonlucas thebrandonlucas added the human review wanted CI passes; ready for a human reviewer label Oct 20, 2026
@tee8z
tee8z self-requested a review October 20, 2026 12:33

@tee8z tee8z 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.

Looks good. The robot has two small comments, both about --auth-url:

  • The new auth_url_mismatch hint suggests a voltage login that always fails, because the name is already saved.
  • For a saved API key, voltage context reports an auth URL that nothing uses, and labels its source flag when no --auth-url was passed.

Each comment has a suggestion. The robot built the branch and checked both against the binary.

Comment thread src/config.rs Resolved
Comment thread src/context.rs Resolved

@tee8z tee8z 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.

The two --auth-url comments from the last round still apply at c42a8c7. They look like they were missed in the restack after #24. I replied on each thread with what is still there:

  • The auth_url_mismatch hint (src/config.rs:149) still suggests a voltage login that login refuses for a saved name.
  • voltage context still reports a saved API key's auth_url (src/context.rs:145), and tests/cli_integration.rs:919 now asserts it.

Everything else looks good. The robot ran the CRAP report on c42a8c7: no function at or above 20, highest api::wait_for_payment at 19.24, which matches the description. The full test suite passed in the same run.

Base automatically changed from feat/cli-error-hints to master October 20, 2026 15:17
… per line

Each item of a string list now gets its own line in human output, aligned
with the value column, so a dry run's notes no longer run together. An empty
list shows as -.

voltage context reports auth_url beside api_url: for a saved browser login,
the URL it was saved with (sourced like the credential), else the
normalized --auth-url flag, else the built-in default. A --auth-url that
differs from a saved login's URL is the credential problem
auth_url_mismatch, which context reports and commands reject (exit 2) with
a hint to omit the flag or sign in at the new URL.

Payment waits and device approval show how long they have waited, such as
"Waiting for the payment to be completed... 1m 05s", so a status line on a
slow wait does not look stuck. Progress keeps its #[must_use].
@tee8z
tee8z self-requested a review October 20, 2026 15:43
@thebrandonlucas
thebrandonlucas merged commit f4b1d79 into master Oct 20, 2026
6 checks passed
@thebrandonlucas
thebrandonlucas deleted the feat/cli-ux-followups branch October 20, 2026 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

human review wanted CI passes; ready for a human reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants