Repository navigation
Releases: rongyishuaige7/dsh-stats
Release list
0.5.1
Patch release, 2026-10-23. Correctness only: no new features, no pricing-catalog
change, no peer-range change, no new dependency.
What changed
0.5.0 shipped a large UI release. This patch is the result of a full review
sweep over the plugin's data path, pricing engine and client state, run as
small, individually tested fixes. 95 commits since v0.5.0; every confirmed
defect carries a regression test under tests/regression/.
Aggregation and time boundaries
- A session whose activity spans midnight no longer loses tokens in either day
window, and UTC slots are attributed to the local day that contains them.
The previous slot loop keyed days byslot * 30min, so a local evening in a
non-UTC zone could land on the wrong date. updatedAtis now the maximum of the real timestamps instead of
max(...) || null, so a session whose only timestamp is0keeps it.- An invalid or out-of-range timestamp no longer aborts the whole export or the
whole aggregate; it degrades to an empty field. - One unreadable session no longer fails the entire aggregate: the session is
reported asunavailablewith a warning and the rest of the data still loads.
Pricing
- DeepSeek legacy peak rates now exclude Beijing weekends, matching the
time-of-use rules. Previously a Saturday morning was billed at peak. contextOver512k: falseis honoured instead of being treated as "unknown".providerIdcomparisons are case-insensitive, soDeepSeekanddeepseek
no longer resolve to different rules (and no longer reportunsupported).- A historical USD total converts at the FX row for its own usage day instead of
the newest row; the day is carried through merges and the wire payload. - Calendar validation rejects impossible dates (
2026-02-30) and an empty
catalog is rejected instead of validating successfully. tierMultiplierswith a falsy value can no longer bypass validation, and a
multiplier of1is no longer shown as an extra pricing condition.- A summary mixing free rows with unpriced rows no longer reports
free.
State, cache and versions
- Route rows stay ordered after a cache hit; previously an updated row was
spliced into a stale position. - The pricing store keeps the previous settings when a settings read fails,
restores the pinned catalog version exactly, and returns a copy of its history
instead of the internal array. - Projection cache rows are rejected when their identity (
id,cwd,
createdAt) or lifecycle does not match the session header. - Warning objects no longer leak their internal
countfield to the RPC payload.
Null and prototype safety
- Lookups keyed by user data (
__proto__,constructor) use own-property checks
in the project filter, balance chips, route cache and trend series. nullprojects, sessions, windows and balance entries are skipped instead of
throwing, and an empty-string balance is treated as "not reported" rather than
"invalid".
Client behaviour
- The balance alert bell appears again (it was suppressed by a truthiness bug),
and the alert input no longer keeps a stale value after an external change. - An expired
resetsAtno longer reads as "resets soon". - The session table's "sessions" column sorts by a real value; the model share
ring, heatmap legend and average line match what is actually drawn. - The day-mode button restores the day you left instead of writing
null, so
switching Overview → All → Day no longer resets to the newest day. - Closing the pricing drawer returns focus to the trigger, and Tab stays inside
the modal drawer. - CSV export uses the session-level authoritative cost when the host provides
one, so a session no longer shows two different amounts in the summary column
and in its detail rows.
Kept as-is on purpose
One review finding was rejected during release review because the proposed
change contradicted an existing, documented contract:
- The subagent group header keeps showing the project-wide subagent count. A
per-page count makes the same header change while paging and breaks the
browser fixture baseline.
Compatibility
Unchanged from 0.5.0: same peer ranges, same engines.dsh
(>=0.1.0-rc.6 <0.3.0), same signed catalog. The only wire change is one
optional pricing field on a cost total; older payloads remain valid and the
schema still rejects unknown fields.
| Harness | Verification |
|---|---|
0.2.1-rc.2 |
isolated real-module contract: 6/6 checks pass on Node 22.22.0 |
| earlier rows | unchanged, see docs/compatibility.md |
Verification
- Full test suite: 652 tests / 152 files pass in the default timezone and
TZ=UTC(up from 505 at0.5.0; 125 regression tests). - Browser fixture: 50 check groups / 80 screenshots, 0 console errors,
0 runtime exceptions, 0 failed requests at 1440/390/320 px, including the
preview-before-save hint added in this release. - Real Harness contract on
0.2.1-rc.2: TYPERT manifest, JSONL persistence,
projection init/restore/checkpoint with fork exclusion, aggregate wire schema
and livesnapshotEventsagreement. - Signed catalog
2026101824: 900 rules, verified against the pinned public key. - Fresh build matches committed
lib/*;npm packpreview contains the same ten
files as0.5.0(282 kB).
Upgrade
# Web
dsh plugin --profile web add -w @rongyi7/dsh-stats@0.5.1
# Desktop app: use the CLI bundled with the app
"/Applications/DeepSeek Harness.app/Contents/Resources/runtime/cli/bin/dsh" plugin \
--profile desktop add -w @rongyi7/dsh-stats@0.5.1Restart the host after replacing the plugin. The signed catalog updates
independently; do not reinstall merely to receive new prices.
Known limitations
- The sweep is not exhaustive: open findings that would need a product decision
rather than a defect fix are left for a later release. - Live balances, unpriced-price flows and partial/stale banners remain
fixture-only on this release; no new real-account run was performed. - The browser fixture runs headless Chrome; it cannot cover OS-level focus
behaviour in the desktop shell.
0.5.0
Pre-1.0 feature release, 2026-10-21.
Highlights
- DSH 0.2.1-rc.2 support: peer ranges, isolated Harness contract matrix and
compatibility docs now include0.2.1-rc.2. The contract smoke accepts both
plugin export shapes used by 0.2.0 (default) and 0.2.1 (applyobject). - Official new-model onboarding: the 30-minute pricing workflow collects
OpenAI, Anthropic and Google official pages. A new text model with an
unambiguous standard price is appended as anestimatedrule carrying a
[provisional]note and auto-signed. Existing model price changes,
retired/limited models, non-text models and ambiguous identities remain
review candidates. - Longest-known model fallback: route suffixes such as
global:...-sgcan resolve through the longest known alias instead of
becoming待计价; estimated pricing is never presented as exact. - Latest catalog coverage: GPT-6.1 Sol, Claude Opus 5.5 and Gemini 4 Argon
rules, plus provisional official coverage for current Anthropic and Google
models. - Project overview rework (0.5.0): a cost-first KPI row, Token-structure
legend, active-span strip, a seven-column project table with a sticky header,
a filter menu with hidden-state persistence, and expandable project/session
details. The panel has a fixed height and a single body scroll for both the
overview and the timeline. The header, status banner and pricing drawer stay
in place. Esc closes the top layer (filter, menu, drawer) before the panel. - Pricing settings drawer (0.5.0): the old long pricing page is replaced by
a 560px three-section drawer (full panel width on narrow screens): Models,
Custom rules, and Updates & versions. Models use 25-group pages with
used/all filtering, search, flat/tiered summaries, and complete rule detail;
custom rules use a list/editor split with conditions, two-layer drafts,
pending removal/undo, preview invalidation, and a fixed action footer.
Updates & versions separates the current catalog, check/sync times, the
auto-update draft, and 5-at-a-time catalog snapshots. Restoring a snapshot
pins it and pauses automatic updates while preserving custom rules; unpinning
requires a previewed save and does not trigger a refresh. Model history rates
remain distinct from whole-catalog snapshots. See
docs/pricing-settings-0.5.0.md. - Timeline rework (0.5.0): the day view now uses project lanes above
half-hour cost/token bars, a keyboard-reachable half-hour detail popover and
expandable session rows. The all view is a calendar matrix, 30 days per page,
with intensity/project coloring, idle rows, week gaps, a time-of-day profile
and daily bars. The timeline has no internal viewport; the panel keeps its
single body scroll. - Balance page rework (0.5.0): all connected accounts now appear in one
urgency-ordered list instead of a provider dropdown. A summary strip totals
available balance per currency, highlights the tightest quota and counts the
accounts that need attention. Rows show the balance breakdown or remaining
quota bars, can link to the provider console, and support a per-account alert
line stored in the browser only. First load uses astats/providersskeleton;
a single failed account stays in its own row while a whole-query failure moves
to the header and a retry banner. - Responsive detail: 320/390/640 layouts keep session time, turns/steps,
LLM and tool time, cache hit, input/output and model in a non-truncated meta
line; wide rows keep every column unclipped. - Trends rework (0.5.0): the trends tab now offers 7/30/90-day ranges and a
cost/token switch, with a summary strip, daily bars, a fixed 26-week heatmap
and a model ring plus sortable table. Clicking a bar or a heat cell opens that
day in the overview, and the page follows the project filter. - Repository entry: the panel title (“DSH 用量” / “DSH Usage”) is now a link
to https://github.com/rongyishuaige7/dsh-stats, opened in a new window with
noopener noreferrer. It is keyboard reachable, keeps the dialog's accessible
name, and is not reachable while the pricing drawer is open. - README and bilingual guide: the README now covers desktop and Web
installation side by side, and the detailed install, pricing, account,
data-status and export material moved todocs/usage-guide.mdand
docs/usage-guide.en.md.README.zh.mdstays a pointer page.
Trends page (0.5.0)
- Ranges: the last 7, 30 or 90 days, always ending today. The range drives
the summary strip, the daily bars and the model section; the heatmap is fixed
at 26 weeks and says so in its own heading. - Metrics: cost or tokens. Switching changes the bars, the heatmap shading,
the model shares and the ring. - 26-week heatmap: one cell per day, shaded by quartiles of active days, with
active days, current streak and longest streak beside it. - Day jump: clicking a bar or a heat cell opens that day in the overview and
moves focus to the overview tab. - Project filter: hidden projects are excluded here exactly as in the
overview and timeline, and the hidden state is shared across the three pages. - Current streak: it now means a run that reaches today or yesterday, so a
streak that ended last month no longer reads as current. The previous
"current streak" counted back from the most recent active day.
Compatibility
| Harness | Verification |
|---|---|
0.1.3-alpha.2 through 0.2.0-rc.2 |
previously verified; see docs/compatibility.md |
0.2.1-rc.2 |
isolated real-module contract: 6/6 checks pass on Node 22.22.0; real Web runs at 8b047ce (R1/R16 and UI checks) and at 9611c25 (shell, four tabs, pricing drawer, 0 errors) |
0.2.1-rc.2 is supported by peer ranges. The desktop app currently bundles
this Harness release; clean installation should no longer report peer mismatches.
Verification
- Full test suite: 505 tests pass in the default timezone and
TZ=UTC. - Browser fixture: 50 check groups / 80 screenshots, 0 console errors,
0 runtime exceptions, 0 failed requests at 1440/390/320 px. The fixture covers
the pricing drawer model list/detail, custom drafts, preview races, pinned and
unpinned updates, seven signed historical snapshots, empty history, restore
success/failure, long identities/forms, short windows, and the previous
6b–6e regressions. - Pricing collector: the OpenAI Standard section now carries an 11-column table
(output moved to the second column, cache writes split into 30m and 12h) next
to the 4-column table for older models. The adapter maps columns by header
name, keeps the 30m write as the cache-write rate, and leaves the 12h write
unmodelled. Before this fix every row was skipped and the run failed closed. - Real Harness contracts: matrix includes
0.1.3-alpha.2,0.1.5-rc.1,
0.1.5-rc.2,0.1.5-rc.3,0.1.6-alpha.1,0.1.7-rc.2,0.2.0-rc.2,
and0.2.1-rc.2. - Real Web (
0.2.1-rc.2, plugin built at9611c25):npm run smoke:webpassed
with the panel, four tabs,exactstatus and the pricing drawer (catalog
2026101817, 876 rules); 0 console errors, 0 runtime exceptions, 0 failed
requests. The temporary home had no credentials or sessions, so the balance
and overview zero states were exercised, not live data. See
docs/compatibility.md. - Desktop real device (DeepSeek Harness on macOS, bundled Harness
0.2.1-rc.2;
plugin tarball built at9611c25, whoselib/*is identical to this release):
the maintainer reviewed every page and reported no blocking issue; the panel
title opened the repository in the system browser; a custom rule was added,
previewed and saved, then removed and saved again. - Signed catalog
2026101817: 876 rules, verified against the pinned public key. - Fresh build matches committed
lib/*;npm packpreview contains the four
runtime bundles, license and READMEs. - Pricing auto-publish workflow remains separate from this UI slice.
Upgrade
# Web
dsh plugin --profile web add -w @rongyi7/dsh-stats@0.5.0
# Desktop app: use the CLI bundled with the app
"/Applications/DeepSeek Harness.app/Contents/Resources/runtime/cli/bin/dsh" plugin \
--profile desktop add -w @rongyi7/dsh-stats@0.5.0Both commands install the published 0.5.0. To try a local build first, install the
rongyi7-dsh-stats-0.5.0.tgz tarball with the same command shape. The desktop profile is managed
by the app, so a separately installed npm dsh refuses it.
Restart the host after replacing the plugin. The signed catalog updates
independently; do not reinstall merely to receive new prices.
Known limitations
- Provisional rules cover standard rates only. Fast/Priority/Batch/Flex,
1-hour cache writes and special tiers require review or remain unsupported.
OpenAI's 12-hour cache write is not modelled; the 30-minute write is used. - Provisional rules are not promoted automatically. A maintainer reviews the
[provisional]rule, changes confidence toexact, removes the marker and
signs throughsign_reviewed_catalog. - Existing model price changes intentionally require review.
- Meta open-weight models do not have a single first-party token price; they
follow the actual host/OpenRouter route. - Real Web verification at
9611c25covered the shell, four tabs, exact status
and the pricing drawer. Live balances, non-zero statistics, unpriced-price
flows and partial/stale banners remain fixture-only. The R1 generation Esc and
R16 approval Esc checks date from the8b047cerun and were not repeated. - The fixed-height panel aligns day, all and timeline bottoms at 1440 px;
the timeline no longer has an internal viewport. Narrow layout and
non-truncation are asserted separately at 320/390/640 px. - Desktop acceptance did not itemize Chinese/English, light/dark, a narrow
window or opening a pending model directly; those states have fixture
scree...