Add a wait spinner covering waits on the API #10
No reviewers
Labels
No labels
⏳in-progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Grey.ooo/someones.computer_agent!10
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/api-wait-spinner"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
scprinted nothing between packing the bundle and the deployment line. On aslow uplink with a large build context that is a long, unexplained pause, and
there was no way to tell a stalled upload from a busy platform.
What it looks like
A die tumbling between the brand's initials. Every glyph in the slot comes from
the braille block, whose cell is the same 2×3 grid as a die's pips, so they
all share one advance width and the line cannot jitter mid-spin — the reason the
real die faces (
⚀⚁⚂⚃⚄⚅) were rejected: most monospace fonts do not cover themand the substituted glyph arrives at different metrics.
⡀⣀⣄⣤⣦⣶⣷⣿— 8-step gaugeProgress(sent, total),0 ≤ sent < total⠙⠸⠴⠦⠇⠋— 3 of 6 pipssent ≥ total·⠒•Progressfor 2s⠿— every pip litDone(summary); the line persistsEight is the ceiling for one cell's gauge and is plenty, since the label carries
the exact percentage.
⠿is excluded from the idle pool so it means "finished"and nothing else; the idle mark is drawn once per run so a command keeps one
character rather than flickering between them.
The seam, deliberately not wired
The gauge and the idle state need per-byte progress.
UploadBundlenow takes afunc(sent, total int64)anddeploypasses(*ui.Spinner).Progress, so thewiring is end to end — but the client never calls it. The body is assembled
in memory and handed to
net/httpin one piece, so there is no moment between"nothing sent" and "all sent" to report.
Faking it with a
(0, total)call at the start was tempting and would have beenworse: the spinner would sit in the breathing idle state for the entire upload.
So
sc deploytoday tumbles for the whole wait, exactly as before, and thegauge and idle states are unreachable until the client is reworked to stream the
multipart through an
io.Pipewith a counting reader — which also drops peakmemory from the whole bundle to a fixed buffer. That rework is deliberately
out of scope here and is being done in a separate worktree.
Verification
gofmt,go vet,go test, andgo test -race -count=3all clean.both dim and bold,
$NO_COLOR, the non-terminal path, idempotent finish, andthat every resting mark comes up across 200 spinners.
script: 41 framesdrawn, then
[S⠿C] Uploaded 646 B in 4sleft above the deployment line.cat: no escape codes at all, justUploading 646 B to …oncefollowed by the summary. Same under
NO_COLOR=1on a pty, with the animationintact and the colour gone.
Terminal output is not screenshottable in the harness that produced it, so the
captures above are raw pty byte dumps rather than images.
Notes for the reviewer
bundle.Bundlegrows aSize()helper for the label's byte count.UploadBundle's signature changed; the only caller isdeploy.compose parsing and context packing — often the slower half — still happen in
silence beforehand.
WIP: Add a wait spinner covering waits on the APIto Add a wait spinner covering waits on the API