Skip to content

fix(cli): show the mascot during cached reports - #52

Merged
rainhuang0220 merged 5 commits into
mainfrom
feat/cached-report-mascot
Nov 10, 2026
Merged

rainhuang0220 merged 5 commits into
mainfrom
feat/cached-report-mascot

Conversation

@rainhuang0220

Copy link
Copy Markdown
Owner

Summary

  • Ordinary cached reports and pricing --usage arm the existing mascot after 140ms. JSON, quiet, pipes, and TERM=dumb stay quiet. The sprite is erased before the result is written.
  • docs/performance.md records why reports got faster (index read and fewer scans, not a cheaper aggregate) and the measurements from this machine.
  • scripts/candidate-upgrade.sh updates a published v0.7.18 binary to a local candidate. It does not tag or publish.

Not done

  • No version tag and no GitHub Release. Waiting for acceptance.
  • macOS amd64, Linux arm64, and Windows arm64 are not in the GitHub-hosted matrix. ubuntu, macOS, and Windows runners execute the native update script.

Test

  • go test ./... and go vet ./... passed locally.
  • PTY test TestPTYShowsMascotBeforeFinish passed on darwin.
  • Interactive PTY samples: first byte about 173ms, dozens of frames, then the report. --quiet stayed in the same multi-second band.
  • bash scripts/candidate-upgrade.sh on darwin/arm64 printed candidate upgrade PASS.

Record why interactive reports stopped parsing Cursor on every run, which releases changed the plan versus the schedule, and the v0.7.18 cache measurements on this machine. Full Cursor scans were not re-run.
Cache hits never entered scanHUD, so a multi-second report printed nothing until it finished. Arm the existing sprite after 140ms, keep it off JSON, quiet, pipes, and dumb terminals, and erase it before the result is written.
Record when the mascot appears, when it stays off, and the PTY timings that separate first visible output from the unchanged aggregate.
Run the real update path from v0.7.18 to a build of this commit on the native runner, including a second update and a rejected checksum. It does not tag or publish.
Copilot AI balanced review requested due to automatic review settings November 10, 2026 10:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

The race detector flagged TestWaitHUDAnimatesBeforeFinish for calling bytes.Buffer.String while the HUD goroutine was still painting. The frames are still in the buffer after finish.
@rainhuang0220
rainhuang0220 merged commit b5eeb01 into main Nov 10, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants