fix(fund): render receive QR + address on stderr before polling#16
Merged
vvillait88 merged 1 commit intomainfrom May 4, 2026
Merged
fix(fund): render receive QR + address on stderr before polling#16vvillait88 merged 1 commit intomainfrom
vvillait88 merged 1 commit intomainfrom
Conversation
Pre-existing UX bug surfaced by a user: agentscore-pay fund --chain base --amount 10 hung silently in the terminal. fund() was polling balance for up to 15 minutes before printing anything — the QR + address only landed in the final result that incur renders after the call returns. Now fund() emits a `funding_started` event via emitProgress (stderr, JSON in non-TTY, plain in TTY) before entering the poll loop, and in TTY mode also writes the rendered ASCII QR + the actionable status message to stderr immediately. JSON consumers see one structured event on stderr; humans see scannable QR + address + polling cadence right away. Stdout (incur's structured result) is unchanged — same FundResult shape with qr_uri, initial_usdc, etc. landing at the end. Tempo testnet path is unaffected (programmatic mint returns instantly, doesn't enter the poll loop). Brings fund's UX in line with the rest of pay's polling commands — passport login, passport resume/bootstrap, and retry already emit to stderr before/during their waits via onVerifyUrl / onRetry callbacks. Bumps to 0.1.0-rc.15. Test plan: 352/352 vitest pass; tsc --noEmit clean; live test against the smoke wallet on all 3 chains confirms structured event + QR URI shape. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
Pre-existing UX bug surfaced by a user:
agentscore-pay fund --chain base --amount 10hung silently in the terminal.fund()was polling balance for up to 15 minutes before printing anything — the QR + address only landed in the final result that incur renders after the call returns.Fix
fund()now emits afunding_startedevent viaemitProgress(stderr, JSON in non-TTY, plain in TTY) before entering the poll loop. In TTY mode it also writes the rendered ASCII QR + the polling-cadence status message to stderr immediately.Stdout (incur's structured result) is unchanged — same
FundResultshape withqr_uri,initial_usdc, etc. landing at the end. The new event is purely additive on stderr.Why this matches the rest of pay
Brings fund's UX in line with every other polling command:
passport loginonVerifyUrlcallback writes verify URL to stderrpassport resume(auto-bootstrap)pay(retry on transient errors)onRetrycallback emitsretryprogress eventfundmainnetfundtempo testnetTest plan
tsc --noEmitcleanfunding_startedevents with correct QR URIBumps to
0.1.0-rc.15.🤖 Generated with Claude Code