v0.3.1 - fix scanner accounting (per-content-block format)
Fixes the dashboard's accounting for the current Claude Code transcript format (one disjoint record per content block sharing a message.id, each repeating the final usage), based on the analysis in nateherkai#25 by @sdkkds.
Fixes
- Tool/skill undercount (bug #1): parallel
tool_useblocks living in non-final snapshot siblings were dropped (~28% of tool calls on real data). The snapshot dedup now re-points evicted siblings'tool_callsonto the surviving keeper (deduped bytool_use_id) instead of deleting them — recovered 553 tool calls locally, with no orphaned rows so thetool_calls->messagesjoins still resolve. - Turn inflation (bug #3): "turns" counted tool-result-as-user records, inflating it ~6-8x. Turn counts now filter
prompt_text IS NOT NULLacross the live queries and the materialised summary tables. - Bug #2 (prompt linkage) was already fixed in this fork via session+time-window linkage.
Token/cost figures are unchanged. Verified idempotent and token-neutral across full rescans on real transcripts. Existing DBs need one rescan to recover the previously-dropped tool rows.