Repository navigation
v1.1.18
A seven-day range, a switchable heatmap, and a version indicator
Both requests from #3 by @bubbear, plus the version chip the same reporter asked for in that round.
Added
- A “Last 7 Days” range. The presets are now Today / Last 7 Days / Last 30 Days / Last 90 Days / All Time / Custom. It covers seven calendar days including today, scopes the summary, trend, model tables, request log, filters and CSV export exactly like the other presets, and is remembered in the browser with them.
- A switchable heatmap span: 30 days / 90 days / 12 months. The activity heatmap no longer forces 53 columns — the grid follows the span (5 / 13 / 53 columns), every column is a week and every cell keeps a 1:1 aspect ratio, so a shorter span also gets larger cells: 18×18px at twelve months, 34×34px at 30 or 90 days, capped so five columns cannot stretch into 200px tiles. Twelve months stays the default, the choice is stored with the other UI preferences, and the span is independent of the time range above (changing one never resizes the other).
- A version indicator next to the dashboard title. It shows the running plugin version, “已是最新 / Up to date” in small text when it matches the newest release on npm, a highlighted “最新 vX.Y.Z / Latest vX.Y.Z” when it is behind, and clicking it opens the GitHub repository. The host performs the check (
GET /api/all-usage/version): one read-only GET of a small JSON document (no body, no cookies), cached for six hours with at most one upstream request every 30 seconds per process, which also keeps the page from amplifying its own requests. A page that cannot reach the registry — the desktop shell — still shows its running version, and an unreachable registry or an unparseable tag degrades to “unknown” instead of claiming either verdict.
Verification
271 tests (266 passing, 0 failing; five runtime profiles are skipped without a runtime root), npm run check:pack (36 files, the new module included), the fixture replay, and the real Cordis smoke on DSH 0.2.0-rc.2.
Rendered and measured on a live dashboard: 12 months 18×18px cells (unchanged from before), 30/90 days 34×34px, the seven-day preset and the three-state version chip.