UX pass: timing, honest summaries, dashboard-style inspect, richer banner - #8
Merged
Merged
Conversation
…nner
Scoped implementation of the terminal-polish feedback: real, achievable
improvements to the existing scrolling-output model. Explicitly did not
build a live-redrawing TUI, a web dashboard, doctor --fix, an interactive
replay picker, or config profiles — those are separate features/decisions,
not polish, and are called out as deferred rather than attempted here.
doctor:
- Every check now times itself and prints its duration
- A conversational line ("Authenticating with Daraja...") precedes each
check as it runs, instead of a batch of results dumped at the end
- Sandbox/callback reachability wording no longer reads as ambiguous when
the response is a non-2xx status (e.g. 404) — the detail text now says
explicitly that any response confirms the network path, not that the
route serves anything
- Summary block shows real numbers (pass count, environment, total time)
instead of a bare "N/M checks passed" — deliberately not a fabricated
"health score", since there's no real formula behind one
inspect:
- Startup is now a small dashboard block (heavy rule, URL, waiting state)
- Each callback prints as a labeled "Incoming STK Callback" card (status,
amount, receipt, masked phone) ahead of the raw JSON, which is now
dimmed underneath for anyone who wants the full payload
- A running tally (payments/callbacks/errors) prints after every event via
shared Arc<Mutex<Stats>> state, so the terminal has a sense of history
instead of being a flat scrolling log
- No fabricated "latency" on the card — there's no legitimate timestamp
to measure it from (we don't see when the STK push was initiated)
banner:
- The "M" mark stays; the dotted frame now also shows which environment
you're pointed at, highlighted in yellow when it's "production" since
that's real money
Verified locally: full doctor run against real (and deliberately broken)
sandbox credentials, inspect receiving success/failure/malformed payloads
with counters incrementing correctly and singular/plural grammar fixed,
and replay --corrupt's diff view still working on top of the new card
layout. build/clippy -D warnings/fmt --check/test all pass.
There was a problem hiding this comment.
Pull request overview
This PR implements terminal UX polish across doctor, inspect, and the startup banner: timing/progress output for checks, a more “dashboard-like” callback inspector with per-event cards and running totals, and an environment indicator in the banner (with a production highlight). It also updates RUNNING.md to reflect the new output and behaviors.
Changes:
- Add per-check timings, live “doing this now” progress lines, clearer reachability wording, and a real summary block to
doctor. - Rework
inspectstartup + callback rendering into a dashboard/card layout, and introduce running stats printed after each event. - Extend the startup banner to display the active environment (highlighting
production), and update documentation examples accordingly.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/main.rs | Passes the configured environment into the banner printer. |
| src/commands/inspect.rs | Adds inspector dashboard output, callback cards, and shared running totals state. |
| src/commands/doctor.rs | Adds timing/progress output for checks and a richer end-of-run summary. |
| src/banner.rs | Prints an environment line and highlights production. |
| RUNNING.md | Updates docs and examples to match the new terminal output. |
Comments suppressed due to low confidence (1)
src/commands/inspect.rs:133
- With
callbackscounted per request, the stats update inside the recognized STK branch should not re-incrementcallbacks, and failures should contribute toerrors(the PR description/test plan says counters increment for success/failure/malformed payloads). As written,Outcome::Failurecallbacks don't incrementerrors.
{
let mut s = stats.lock().unwrap();
s.callbacks += 1;
if outcome == Outcome::Success {
s.payments += 1;
}
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
109
to
110
| println!("{}", rule.dimmed()); | ||
| println!("{} [{now}] callback from {addr}", icon::arrow()); | ||
|
|
DENNIS-CODES
added a commit
that referenced
this pull request
Aug 11, 2026
…enz0d UX pass: timing, honest summaries, dashboard-style inspect, richer banner
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.
Summary
Scoped implementation of the terminal-polish feedback from the "before we release" review. This covers the achievable-now bucket of that feedback within the existing scrolling-output model. It deliberately does not build a live-redrawing TUI (
ratatui), a web dashboard + auto-open browser,doctor --fix, an interactive arrow-keyreplaypicker, or config profiles (profile create/use) — those are separate features and architectural decisions, not polish, and are worth their own scoping conversation rather than a rushed bolt-on here.Also deliberately did not fabricate a "Health Score: 98/100" or per-callback "Latency" — there's no real formula behind a health score, and no legitimate timestamp to compute latency from (we never see when the STK push was initiated, only when the callback arrives).
doctor✓ OAuth round trip (612ms)inspect254712••••78) ahead of the raw JSON, which is now dimmed underneath for anyone who wants the full payloadTotals so far: N payments · N callbacks · N errors) prints after every event via sharedArc<Mutex<Stats>>state, so the terminal has a sense of history instead of being a flat scrolling logBanner
Environment: sandbox), highlighted in yellow when it'sproductionsince that's real moneyTest plan
cargo build --all-targets,cargo clippy --all-targets -- -D warnings,cargo fmt --all -- --check,cargo testall passdoctorrun against real (and deliberately broken) sandbox credentials — timing, progress lines, and summary all render correctly, including correct singular/plural grammar in the failure countinspectagainst success/failure/malformed payloads: card layout, phone masking, and counters all increment correctly (including singular "1 payment" vs plural "2 payments")replay --corrupt's diff highlighting still works on top of the new card layoutsandboxandproductionenvironmentshttps://claude.ai/code/session_01BE4uE4wMaDgqN43zXvbqHH
Generated by Claude Code