Skip to content

Commit 456c80e

Browse files
committed
Release v0.3.2: dashboard bug fixes (Cache tab + browser navigation)
Patch release for two bugs caught by /qa right after 0.3.1 shipped. - Cache tab was rendering as a blank page due to undefined identifiers in src/web/app/pages/Cache.tsx (showApril2, APRIL_2_2026 — leftovers from a prior refactor that updated the callout banner but not the chart's reference line). Fixed by 47f79de. - Browser back/forward and deep-link bookmarks left the URL hash desynced from the active tab. App.tsx now installs a hashchange listener. Fixed by cd0378e. Plus 4 source-scan regression tests in test/web-regression.test.ts to lock in both fixes (47f79de). Total 59 tests, all passing. Why CI didn't catch the Cache bug: the root tsconfig excludes src/web/app/** from typecheck, and Vite's esbuild transform doesn't flag undefined identifiers. Tracked as a follow-up to re-enable web typecheck after modernizing React 19 JSX type usage across 6 files. See CHANGELOG.md for full details.
1 parent 47f79de commit 456c80e

4 files changed

Lines changed: 36 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,39 @@ All notable changes to ccmeter will be documented here. Format: [Keep a Changelo
44

55
## [Unreleased]
66

7+
## [0.3.2] — 2026-04-28
8+
9+
Patch release for two dashboard bugs caught by `/qa` shortly after 0.3.1
10+
shipped. No CLI changes.
11+
12+
### Fixed
13+
14+
- **Cache tab rendered as a blank page.** `src/web/app/pages/Cache.tsx`
15+
referenced `showApril2` and `APRIL_2_2026`, which were defined nowhere.
16+
ReferenceError fired silently on mount and the entire route unmounted to
17+
empty. Replaced with the constants that the rest of the file already
18+
uses (`showTtlCallout`, `TTL_ROLLOUT_START`). The chart's TTL-rollout
19+
reference line now labels correctly (`"TTL rollout"` instead of the
20+
stale `"Apr 2"`).
21+
22+
Why this slipped past CI: the project's root `tsconfig.json` excludes
23+
`src/web/app/**` from typecheck, and Vite's esbuild transform doesn't
24+
flag undefined identifiers. Tracked as a follow-up to modernize the
25+
React 19 `JSX.Element` type usage and re-enable web typecheck.
26+
27+
- **Browser back/forward and deep-link bookmarks left the URL desynced
28+
from the active tab.** `src/web/app/App.tsx` read `window.location.hash`
29+
once at mount and never installed a listener. Added a `hashchange`
30+
effect that calls `setTab` when the hash changes externally, with a
31+
paired `removeEventListener` cleanup.
32+
33+
### Tests
34+
35+
- Added `test/web-regression.test.ts` (4 source-scan tests) that lock in
36+
both fixes — assert Cache.tsx no longer references the bad identifiers
37+
and that App.tsx installs the hashchange listener with a setTab call.
38+
Total now 59 tests, still under one second.
39+
740
## [0.3.1] — 2026-04-28
841

942
Bug-fix release driven by a `/devex-review` of the CLI surface and a `/cso`

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ccmeter",
3-
"version": "0.3.1",
3+
"version": "0.3.2",
44
"description": "Local-first spend & cache-efficiency dashboard for Claude Code. Reads ~/.claude/projects, tells you exactly what's costing you.",
55
"keywords": [
66
"claude",

src/cli/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { Command, InvalidArgumentError } from "commander";
55
import pc from "picocolors";
66
import { setLevel } from "../core/logger.js";
77

8-
export const VERSION = "0.3.1";
8+
export const VERSION = "0.3.2";
99

1010
function parsePositiveInt(name: string) {
1111
return (raw: string): number => {

test/cli-validation.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ describe("selftest version", () => {
4646
const r = run(["selftest", "--max-files", "1"]);
4747
// selftest prints "ccmeter X.Y.Z · node ..." in its environment line.
4848
// Should match the version from package.json (read via src/cli/index.ts).
49-
expect(r.stdout).toMatch(/ccmeter 0\.3\.1\b/);
49+
expect(r.stdout).toMatch(/ccmeter 0\.3\.2\b/);
5050
expect(r.stdout).not.toMatch(/ccmeter 0\.2\.0\b/);
5151
});
5252
});

0 commit comments

Comments
 (0)