Repository navigation
fix(cli): keep the spinner on one row, and warn before the cost cap cuts the review off - #7
Merged
Merged
Conversation
…uts the review off Two problems seen on a narrow terminal with budget.max_cost_usd set: - clack's spinner counts rows to erase from the bare message but renders it with a frame glyph and up to three dots, so a message that fits only without them wraps every few frames and leaves a stale row behind each tick. Truncate spinner messages to the terminal width minus that chrome. - The 75% budget notice only considered steps and tokens, so a run that hit the dollar cap first was aborted mid-flow without the model ever being asked to finalize. Include the cost ratio in the notice. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
gribble-website | a2e7c12 | Commit Preview URL Branch Preview URL |
Sep 15 2026, 02:50 PM |
Contributor
🐛 Gribble (apps/website): gate passedThe gribbles went hungry. Ship it.
Gribble 0.2.1 · mode gate · http://localhost:4173 ✅ Step passed: No new findings at or above error. (fail-on: error) |
…e after the upstream rework Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Merged
3 tasks done
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
Two problems seen running
gribble auditon a ~55-column terminal withbudget.max_cost_usd: 3set.Progress line repeats instead of updating.
@clack/prompts' spinner (1.8.0, still present in 1.8.1) computes how many rows to erase from the bare message, but renders◐+ message + up to three dots. A message that only fits without that chrome wraps whenever the dot count reaches 2–3 — about 1.3 s of every 2.56 s cycle — and each of those frames leaves a stale row behind. Thereviewing (55/200 steps · 1.2M/2.0M tokens · $3.25)line is 51 characters, which is exactly that case at 55 columns.Fix:
fitSpinnerMessageinprompts.tstruncates spinner messages tooutput.columnsminus 7 (frame, spaces, dots, one column of margin) and appends…. Applies to every spinner fromclackPrompter. Driving clack with a 55-column fake stream: 17 of 34 frames wrapped before, 0 after.Cost cap ends the review with no warning. The 75% budget notice that asks the model to close the flow and call
finalize_reportonly looked at steps and tokens. A run that hit the dollar cap first (55/200 steps, 1.2M/2.0M tokens, $3.25/$3) was aborted mid-flow without the model ever being told to wrap up. The cost ratio now feeds the same notice, and the notice text includes$x.xx/$capwhen a cap is set.Neither change affects exit codes: the run in question exited 1 because the gate found 2 new
errorfindings, which is the intended behaviour.Checklist
pnpm lint && pnpm typecheck && pnpm testpasspnpm changeset) if a published package changeddocs/) if behavior changed — no documented behaviour changed; the notice and spinner are not described indocs/🤖 Generated with Claude Code