Claude CLI source drops "Current week (all models)" when /usage redraws over earlier screen content
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 30/100
Direzione di ricerca
Start with ClaudeCLIScreen replay and weeklyModelName(from:) in the Claude status probe, and see how ClaudeStatusProbe.parse consumes the captured /usage bytes. Reproduce by replaying the saved bytes through parse to confirm weekly=-1 and the Fable-only extra window. Done means the all-models weekly window parses from a capture that starts mid-session, while the full-stream capture still gives weekly=47. Pick one of the three fixes in the issue first, since the thread does not settle which.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
With the Claude CLI source, CodexBar shows only the "Fable only" weekly bar. It drops the all-models weekly window, although /usage shows it.
Environment
- CodexBar 0.84.0 (Homebrew), macOS 27.2, Apple Silicon
- Claude Code 2.1.330, Ultra plan (weekly limits only, no session row)
- Source: Auto. OAuth fails with "Claude Code credentials changed … Click Refresh", so Auto falls back to the CLI.
What happens
codexbar usage --provider claude --source cli --json returns primary: null, secondary: null, and one extra window, claude-weekly-scoped-fable (8% used). The probe log reads sessionPercentLeft=-1 weeklyPercentLeft=-1.
/usage in the same probe directory shows:
Current week (all models)
██████████████████████████▌ 53% used
Resets Nov 24 at 4:59am (America/Los_Angeles)
Current week (Fable)
████ 8% used
Cause
The capture starts when /usage is sent. Claude Code's renderer writes only the cells that differ from the screen it already shows, and that screen predates the capture. ClaudeCLIScreen replays the capture onto a blank screen, so those unchanged cells stay blank. The captured bytes for the label row are:
ESC[3GCur ESC[7Gent week (all models)
The column-6 "r" is never written, and the replayed line reads Cur ent week (all models). weeklyModelName(from:) requires current\s*week\s*\(, so the line is never recognized. The fuzzy all-models match in matchesLabel runs only after that regex matches, so it never runs here. The Fable row is drawn later on rows that were blank, so it survives. Other labels lose characters the same way: Conf g, S ats, Re ets.
Reproduced on 0.84.0 and on main at 5dd48ca by replaying the saved /usage bytes through ClaudeStatusProbe.parse: weekly=-1, extra=["Fable only 8.0"]. A capture of the full PTY stream from process start parses correctly (weekly=47) with the same parser.
Possible fixes
- Feed the pre-
/usageoutput into theClaudeCLIScreenreplay, so the diff redraw lands on the real prior screen. - Or force a full repaint before capturing, for example by sending a redraw or clearing the screen before
/usage. - Or make
weeklyModelNametolerate one dropped character in "current week", asmatchesLabelalready does for "all models".
The capture also included a "Refreshing usage…" redraw that changed only the percent digit (52% to 53%), so the same replay gap can also report a stale percent.
- Lingua principale
- Swift
- Stelle
- 23.3k
- Fork
- 2.2k
- Merge medio
- 1g 18h
- PR unite (30g)
- 231
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di steipete/CodexBar
-
clawsweeper:needs-maintainer-review clawsweeper:no-new-fix-pr impact:other issue-rating: 🦪 silver shellfish P2
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
steipete/CodexBar#5147 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
googledeveloper: unclaimed Ultra credit (null remaining amount) fails with "unrecognized response" instead of "Not applied"Forse già presa @djbclark l’ha presa oggi. Apertaclawsweeper:linked-pr-open clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 28/100
steipete/CodexBar#5145 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
clawsweeper:needs-maintainer-review clawsweeper:no-new-fix-pr impact:other issue-rating: 🦪 silver shellfish P2
Difficoltà 3/5 1-2 giorni Idoneità per principianti 50/100
steipete/CodexBar#5144 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
clawsweeper:needs-info clawsweeper:needs-maintainer-review clawsweeper:no-new-fix-pr impact:ux-friction issue-rating: 🦐 gold shrimp P2
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
steipete/CodexBar#5132 · 5 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
issue-rating: 🌊 off-meta tidepool
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 1/100
steipete/CodexBar#5131 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di steipete/CodexBar
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
nwverse/persona#12800 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug documentation
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 86/100
ajithrnayak/xpunge#7 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
DuarteSantos8/openGym#1469 ·
I maintainer di solito rispondono entro 2 giorni