Repository navigation
Overview: tell unpriced, free and no-usage models apart - #206
Merged
Merged
Conversation
fylorn
force-pushed
the
ui/overview-core-data
branch
from
September 25, 2026 06:14
5090c8f to
cb40988
Compare
The model ranking now reads each model's unpriced / no-usage counts and estimated part from CostBucketGroup (core v0.48) instead of showing an ambiguous "—" whenever a model had tokens but no cost: - usage known, nothing priced: 无法计价 / Unpriced, in the warning colour; clicking it opens Traffic filtered to that model's unpriced requests (the row itself still opens the model's traffic) - no usage at all: 无用量 / No usage - otherwise the amount: "≥" when some requests could not be priced, "~" when part of it is estimated, and $0 only when it really is zero (free upstreams). The reasons are in the tooltip, as in the session cost cell. Live mode makes the same distinction: a request_priced without a cost marks the sample unpriced. The live backfill from History is placed on core's clock (/in-flight's now_ms) instead of the UI's, so a remote core with a skewed clock no longer shifts it, and local answers are skipped like in core's aggregates. In the cost measure, the chart tooltip writes a bucket's total the same way (a word, or the amount with its marks) and its note lists the bucket's unpriced / no-usage requests. LinkText now forwards the tooltip trigger's props: the tooltips on "N 条无法计价", "N 次失败" and "N 个不可用" never appeared. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fylorn
force-pushed
the
ui/overview-core-data
branch
from
September 25, 2026 06:15
cb40988 to
35bb5d8
Compare
fylorn
added a commit
that referenced
this pull request
Sep 25, 2026
…anges; fetch-core.sh says dev builds need it too Overview, routing, dry-run, remote-switcher and traffic changed on dev (#206, #207, #208). The comment at the top of fetch-core.sh still said a dev build needs neither the network nor resources/twcore; the Tauri build checks the resource at compile time, so a fresh checkout runs the script once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fylorn
added a commit
that referenced
this pull request
Sep 25, 2026
…hots (#201) * docs: rewrite the READMEs for the current app and use the new screenshots The READMEs showed screenshots of the old sidebar, including a Findings page that no longer exists, and said nothing about connecting to a remote core, the interface languages or the system tray. Both are rewritten in the same structure, from what the code does today: - An opening in the approved register, then the platforms, the interface languages and in-app updates. - One section per page (Overview, Traffic, Clients, Keys, Upstreams, Routing, Security, MCP, Settings). Security is written from tw-config's guard defaults and built-in rules, MCP from tw-adopt's targets and tw-scan's sources, and the list of system notifications from src-tauri/src/notices/rules.rs. - "Connecting to a remote core": Settings > Connection, the pages that always act on this machine (Clients, MCP), where the connection key is kept, what changes while connected; links to Core's server deployment guide. - Layout: the control channel over a unix socket, a loopback port or a remote TCP port, each behind the Noise NNpsk0 handshake, replacing the per-launch credential the old text described. Images now come from the committed pipeline: the zh README uses docs/screenshots/zh/, the English one docs/screenshots/en/, both with the light/dark <picture> switch, and the overview sits in the introduction of both. A fresh `pnpm shots` run on this base produced identical files, so no image changes. The 28 old root-level images are deleted; nothing in this repository, the website or the organization profile links to them (the latter two keep their own copies). Build from source now fetches twcore first: Tauri checks declared resources at compile time, so `pnpm tauri dev` fails in a fresh checkout without it, while CONTRIBUTING said it needed nothing. Also spell "Apple silicon", and give package.json and Cargo.toml a description that names the platforms. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: name the platforms before the gateway in the English opening Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: say how a new version is announced, and give the mismatch command The Updates section said a small window appears when there is a new version. The automatic check sends a system notification instead (updater.rs: update_loop -> notify_update), and only when notices are set to system notifications. The update window opens from that notification, from the Install Version item that replaces Check for Updates in the menu bar or tray menu, and from Settings > About. The notifications paragraph now mentions the new-version notification too. For a Homebrew installation the check reads the tap's cask, so the sentence that said when the window appears now says when a new version is reported. Connecting to a remote core: when the server's core version differs, the app gives `sudo twcore upgrade --version <version> --restart`, which installs the expected version whether it is newer or older than the installed one (#204). Both languages say the same. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: re-shoot the screenshots on core v0.48.0 `pnpm shots` on dev 2fa65fd changes five scenes, because #202 and #203 changed what they show: - remote-add: the connection test reports core 0.48.0, the version the app now pins (a 0.47.0 server would be a version mismatch). The alt text in both READMEs says 0.48.0. - traffic: the request in progress shows its status code and token count, replayed from /in-flight. - routing and dry-run: the map marks the upstream with a request in flight. - security: the header counts the entries by outcome. The other alt texts still describe their images. The website copies in docs/screenshots/web/ are regenerated with them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: re-shoot five scenes after the overview, routing and traffic changes; fetch-core.sh says dev builds need it too Overview, routing, dry-run, remote-switcher and traffic changed on dev (#206, #207, #208). The comment at the top of fetch-core.sh still said a dev build needs neither the network nor resources/twcore; the Tauri build checks the resource at compile time, so a fresh checkout runs the script once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
fylorn
pushed a commit
that referenced
this pull request
Sep 27, 2026
… Upstreams The Keys page (each key's cost and the 24-hour total) and the Upstreams page (the total in the header and each row's cost) printed one plain figure. It included estimated cost with no "~", and requests that could not be priced were simply missing, so a key whose requests all hit a model without a price read "$0", as if it cost nothing. That is what the Overview's model ranking stopped doing in #206, and what CONTRIBUTING asks never to do. These figures now go through the ranking's own rule (`rankCost`), via a small shared `CostFigure`: "Unpriced" or "No usage" instead of $0 when nothing could be priced, "≥" when some requests are missing from the amount, "~" when part of it is estimated, and the explanation in the tooltip. The estimated part is summed from the buckets both endpoints already return, since the totals carry exact and estimated as one sum. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0182jRYSA2HY98GmbHidNTia
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.
Uses the per-group
unpriced_requests/no_usage_requeststhatCostBucketGroupcarries since core v0.48 (ThinkWatch-Core#193) to remove the ambiguous "—" from the Overview's model ranking.Model ranking: the cost cell
Before, a model with tokens but no cost showed "—" with a tooltip saying "unpriced or not billed": the grouped buckets had no unpriced count, so the UI could not tell which. Now each row carries its unpriced / no-usage counts and the estimated part (history from
buckets_by_model, live mode from the event stream), and the cell follows the same rules as the session cost cell (costCell):≥$6.12(lower bound)~$33.94$0.855, or$0when it really is zero (free upstreams such as Ollama)When a single model has unpriced requests, the cost cell is its own link: it opens Traffic filtered to that model's unpriced requests (
{ model, unpricedOnly: true }). The row keeps opening the model's traffic. Click and Enter/Space on the cell do not bubble to the row. The merged "Other" row has no link; its cell shows the tooltip only. The cost column widens from 64 to 80px so that≥~$1234.56fits (79px measured).Live mode
request_pricedwithout a cost marks the live sample as unpriced, so the live ranking makes the same distinction. A sample whose price has not arrived yet is not counted as unpriced.Historynow uses core's clock:/in-flight'snow_msgives the window start and the offset for mapping storedat_msonto the UI's timeline. Before, it compared the UI'sDate.now()with core timestamps, so a remote core with a skewed clock shifted the backfilled part of the curve. Checked against the harness with ±5 min of simulated skew: the ranking is now identical to no skew; the old code counted 17 / 6 requests instead of 13.RunningViewonly comes fromGET /live, which the webview cannot call (menu bar only). The Overview has no list of running requests, so I did not add one.Chart tooltip (cost measure)
The bucket total is written like the ranking cell: 无法计价 / 无用量 when nothing in the bucket was priced, otherwise the amount with its
≥/~marks (no "≥$0"). The note adds the bucket's unpriced / no-usage counts, for example "8 次请求,1 次失败,1 条无法计价", worded like the qualifiers under the cost figure.Fix: tooltips on overview links never appeared
LinkTextdropped the props thatTip's trigger passes throughasChild(pointer and focus handlers, ref). As a result the tooltips on "N 条无法计价", "N 次失败" and "N 个不可用" never opened. It now spreads them onto its span and composes its own click and key handlers with them.Checks
pnpm typecheck && pnpm test && pnpm build, rebased on the latest dev (after Security header: exact match count from core, broken down by outcome #203 and Upstreams: one account label everywhere, read from the token; no live call for a broken sign-in #205).series.test.ts:rankCostfor every state; history and live counts, including the merged row; the cost-measure tooltip, including buckets where nothing was priced.?empty;?fail=History,InFlight. For the cell link: a real click and Enter on the cell open Traffic with the model filter and "仅显示无法计价" set; Enter on the row sets only the model filter.🤖 Generated with Claude Code