Skip to content

Every agent's model. One place. Codex on DeepSeek, Claude Code on Kimi, from the menu bar.

usage: TestClearedUsageLeavesThePages leaves no clear behind for the next test

yetonefb5959553025
diff --git a/internal/usage/cleared_test.go b/internal/usage/cleared_test.go
index b779f6cd2..d35df08cb 100644
--- a/internal/usage/cleared_test.go
+++ b/internal/usage/cleared_test.go
@@ -17,6 +17,9 @@ import (
// Visit (key spending limits, window holds) still counts them all.
func TestClearedUsageLeavesThePages(t *testing.T) {
resetUsageTest(t)
+ // the clears read last stay read for a test that builds a page without
+ // reading them again (readCleared)
+ t.Cleanup(func() { clearedAs.Store(nil) })
now := Clock()
at := now.Add(-2 * time.Hour)
Append(Record{Time: at, Agent: "codex", Provider: "ollama", Model: "qwen3:32b", Input: 100, Output: 10, Status: 200})