github Arindam200/cc-lens v0.2.5
v0.2.5 — Fix hydration errors and stats-cache missing crash

latest releases: v0.4.0, v0.3.3, v0.2.8...
2 months ago

Bug Fixes

Hydration mismatch (affects all team members)

The TopBar clock and ThemeProvider both caused React hydration mismatches because they read Date.now() / localStorage during the initial server render, producing different values than the client.

Fixes:

  • TopBar: clock now initializes to '' on the server and is set client-side in useEffect. Added suppressHydrationWarning on the element.
  • ThemeProvider: always starts as 'dark' to match server, then reads localStorage in useEffect.
  • layout.tsx: replaced bare <script dangerouslySetInnerHTML> with <Script strategy="beforeInteractive"> to silence the React 19 script-in-component warning.

Stats 404 on machines without stats-cache.json

Team members who haven't run Claude Code long enough for ~/.claude/stats-cache.json to exist were getting a 404 from /api/stats, crashing the overview page.

Fix: /api/stats now builds a minimal valid response from session JSONL data when stats-cache.json is absent — the dashboard shows real session counts, daily activity, and tool usage even without the cache file.

Don't miss a new cc-lens release

NewReleases is sending notifications on new releases.