feat(io.github.muzimu217.usage-dashboard): add a PI-Desktop-native usage dashboard 0.1.0 - #53
Merged
Merged
Conversation
…age dashboard 0.1.0 A local usage dashboard panel built entirely on the formal pi.usage.listTurns contract (PI-Desktop PR #503): no message bodies, no direct database access, no write path. Requires the host build with the usage facts surface. - lib/aggregate.js: pure aggregation (headline tokens are input+output; cache/reasoning stay in a separate diagnostics row; local-day daily buckets, model share, top sessions, streaks) - main.js: pulls the full history through the keyset-paginated API in 365-day windows (walking backward until an empty window), publishes the cube to plugin settings for the read-only panel bridge - renderer: self-contained panel (own light/dark tokens, no host design tokens) with metric cards, a GitHub-style activity heatmap, model donut, per-day trend with toggleable per-model lines, top sessions, sr-only data tables, and a provenance footnote - en/zh-CN throughout; usage.read is the only data permission
|
@muzimu217 is attempting to deploy a commit to the vastsa's projects Team on Vercel. A member of the Team first needs to authorize it. |
Owner
|
Merged into Review: principle is sound. Read-only dashboard on catalog.json conflicted with main and was rebuilt. tests/panel-chrome.test.mjs expected 20 panel plugins; current tree has 19 (this plugin included), so the count was corrected in 09c832f. Not on https://plugins.aiuo.net yet — merge here does not publish to the live center. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A PI-Desktop-native usage dashboard panel, built entirely on the formal
read-only usage facts surface (
pi.usage.listTurns, host PRvastsa/PI-Desktop#503). No message bodies, no direct database access, no
write path.
peak day
today outline
toggleable per-model lines)
the headline totals (headline = input+output, matching the host's own
convention)
dark themes, en/zh-CN throughout
Data flow
Plugin process pulls the full history through the keyset-paginated API
(365-day windows stepping backward until an empty window, turnId dedup
across seams, 8-window ceiling), aggregates into a fact cube, and publishes
it to plugin settings; the read-only panel bridge renders it. Scan state is
published alongside so the panel can show progress and an explicit
"host does not provide the usage surface" state on older hosts.
Dependencies and rollout
that host change ships; on older hosts the panel shows the explicit
unsupported state rather than an empty board.
same contract): one adds the facts surface's first-party consumer, the
other adds a second consumer proving the surface is sufficient for a
full dashboard.
Tests
fallback state, render hooks), full repo suite green, security audit
passed, catalog + .piplug generated via the standard scripts