Skip to content

Add Insights: local token usage dashboard for Herdr - #103

Merged
GaganSD merged 35 commits into
mainfrom
feat/herdr-insights
Oct 30, 2026
Merged

GaganSD merged 35 commits into
mainfrom
feat/herdr-insights

Conversation

@GaganSD

@GaganSD GaganSD commented Oct 30, 2026

Copy link
Copy Markdown
Owner
  • Add a native Herdr dashboard for model usage, token trends, and activity history.
  • Read local Pi, Codex, Claude Code, and OpenCode sessions without uploading transcripts.
  • Include safe local installation, configuration, usage accounting, and regression coverage.
  • Package Insights for Herdr Community with a preview, rebuild recipe, clear documentation, and CI checks.

Validation

  • 149 package tests, 29 tooling tests, lint, and package checks pass locally.
  • Native dashboard, settings, and filter-menu smoke checks pass with 10,000 rows.

Check Node >=22.15 before app-home or target writes, share the version helper with package checks, and cover old-runtime rejection plus uninstaller compatibility.
- Detect zstd via a namespace import so Node 20 still starts and skips .jsonl.zst safely
- Reconcile Codex legacy prefixes, modern records, twins, suffixes, and resets
- Migrate old file-level Codex modern state with a one-time rescan
- Transfer usage and task ownership to copy candidates when the owner resets
- Add runtime, mixed-mode, migration, and copy-ownership regression tests
- Count Pi usage, compaction, and branch-summary carriers without persisting summaries
- Deduplicate carrier usage by type, entry ID, and timestamp across forks
- Key Pi task spans by stable entry identity instead of the fork session header
- Retain the first Codex thread header and use record thread/session identity
- Rescan old Pi and Codex file state once with the current parsers
- Add Pi fork/carrier and Codex fork fixtures and regression tests
- Track per-file modern Codex usage instead of global dedup deltas
- Subtract locally observed token_usage_records from legacy cumulative suffixes
- Use thread/turn cumulative counters to prove token_count twins
- Rescan Codex state once with the corrected parser
- Add copied-file, append, revision, and identical-vector regressions
- Canonicalize the entry and module paths before deciding to run main
- Add CLI coverage for symlinked help and snapshot invocations
- Keep imported collector modules quiet and run export usable
- Add shared semantic theme tokens and native button, toggle, input, card and stat primitives.
- Restyle the dashboard, day detail, leaderboard, filters, menus and settings around restrained neutral surfaces.
- Extend component and native checks for the visual system and isolated screenshot runs.
- Remove page subtitles, preference help text, and source card captions
- Fold the save action into the configuration card footer
- Keep save errors and confirmations in place
- scanSources reports each discovered file through an optional callback
- the collector writes a throttled progress sidecar next to the store and
  removes it when the scan settles
- Section the dashboard into Token usage and Model usage with hairline headers
- Rename Tokens History and Model Usage; drop the providers leaderboard mode
- Add a weekly stacked top-models chart computed in the Node presenter
- Restyle leaders as ranked rows with by-provider labels and change deltas
- Replace the five metric boxes with one divided summary band
- Grow and center heatmap cells on wide views; toolbar-style filters
- Move scan status into settings and show live progress while loading
- Capitalize duration units and trim streak subtext
- Read assistant message rows from opencode.db via node:sqlite
- Count canonical per-message tokens once by id and exact task durations
- Fingerprint the database and its WAL so unchanged scans read nothing
- Default new installs to Pi, Codex, and OpenCode sources
- Move the period and provider/model toolbar into the Model usage section;
  token usage is always the full heatmap plus a merged day/all-time card
- Remove the source and project filter menus
- Render bundled monochrome brand logos for known providers in Model Usage
- Carry each leader's top provider for logo mapping
- All time on the left, today on the right, one divided card
- Keep only input, output, cache hit rate, and top model per column
- Drop cache read/write cells, sessions, usage events, and task stats
@GaganSD
GaganSD merged commit 83a4e9a into main Oct 30, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant