yetone
|
bc8d0f8381
|
gui: in Chinese a large count is shortened in K / M / B by default, 万 / 亿 kept as Settings' other choice (#740, hisiling: the Usage page and tray panel said 9557.8 万 and 104.31 亿 beside a model's 1M and context buttons of 128K / 200K / 1M, two scales of four and three digits to convert between, and few find the switch) — fmtN said a count in 万 and 亿 when magpie spoke Chinese unless westernUnits was set; it now does so only when chineseUnits is, so Chinese counts read as English's (1.54B, 80M) and as the prices per million tokens and context windows around them. The setting is a new one, chineseUnits, rather than westernUnits turned around: westernUnits=true chose what is now the default, and an unset one can't tell someone who never looked from someone who chose 万/亿, so an old file's westernUnits is left unread (whoever wants 万/亿 picks it once). Settings → Usage's Number units lists K / M / B first, picked by default, then 万 / 亿; the row is still Chinese's alone. number-units.test.cjs (webkit) now checks K/M/B by default in both languages, picking 万 / 亿 saves chineseUnits without scrolling, the Requests tab, Overview, Sessions tab and tray panel then say 15.4 亿 / 8000 万 and keep it after a reload, and Routing's "today" turns back to 1.54B when the setting does; it fails on the old code. go vet, builds (darwin, GOOS=linux, GOOS=windows) and go test -tags nogui -count=1 ./... under a temp HOME pass.
|
2026-10-04 11:28:50 +08:00 |
|
yetone
|
2d5905ffc8
|
usage: every count on the Usage page and in the panel follows Settings' number units (#476: with 万 / 亿 picked, the Overview, the Requests summary line, Sessions and the panel's Routing "today" still said K/M/B, two units on one page) — the setting reached only ledShort, which the Requests tab's totals and axis and the panel's Usage tab used, while fmtN, behind the Overview's tiles and chart peak, the Requests summary (#ledSum), every Sessions figure and Routing's "today N tokens", always said K/M/B. fmtN now says a count in 万 and 亿 in Chinese unless K / M / B is picked, ledShort is gone and its callers use fmtN, and the panel's Routing redraws when the setting changes, not at the next request. Small counts (the scan's file counts, a picker's search count) are as they were below 10000 and in 万 above it in Chinese. English is unchanged. number-units.test.cjs (Chromium, WebKit, en, zh) now checks the Overview, the Requests summary, Sessions and the panel's Routing in both units and fails without the change; sessions-overview, sessions-today, panel-routing and api-key-usage expect 万 in Chinese. go vet, go build -tags nogui (darwin, GOOS=linux), GOOS=windows go build, go test -tags nogui ./... pass; number-units, sessions-overview, sessions-today, panel-routing, api-key-usage, usage-chart-axis, panel-usage, usage-ledger, usage-ledger-chart, currency, sessions-bar-names, click-scroll, old-webkit pass.
|
2026-10-02 05:46:16 +08:00 |
|
yetone
|
5a54338744
|
panel: the Routing tab gets a small stage, agents → magpie → where their requests went, each new request a dot flying there and back, and its rows line up (the user: 这个页面有点乱,另外这个在Tree的window中能否也能有一个比较迷你版的路由动画,直观、优雅。) — the tab listed eight two-line rows with an agent's colour dot and a status dot (both green for Pi), the times left in their cells so the right column ran jagged. Over the list there is now a stage, 104px, in a card: up to three agents that asked lately on the left (icon and name), magpie's bird in the middle, up to three accounts they went to on the right (provider, then the account or key in grey, and a dot for how its latest try there went: green, grey pulsing while answering, red when it failed), joined by thin curved wires. Each place keeps its spot while it stays; a newcomer takes the place of the one heard of longest ago. A request as it comes plays as a dot in its agent's colour: along its agent's wire into magpie, out on the wire to the account it was routed to (the wires it travels lit in that colour, the hub's ring pulsing), waiting there, pulsing, while that answers; a try that failed turns red and comes back to magpie for the next account, and the answer flies home green, or red when nobody could answer. At most four play at once, from the same trace the list is drawn from (no new endpoint); nothing plays with reduced motion or while the tab isn't shown. The rows: the agent's colour dot is gone (its icon says who), the second line starts with a faint → (accent when moved, red when failed, pulsing while waiting) instead of a second dot, and the time (now 24-hour, 20:50:53) and the tokens · time taken are both right-aligned; six rows instead of eight, the panel about as tall as before. No border stripes, nothing scrolls. Tested in panel-routing.test.cjs, Chromium and WebKit, en and zh: the stage lists Codex and Claude Code, Relay·team and Claude·ann@example.com with their status, four drawn wires, the hub, everything inside it and above the list, no left border; every row's time and totals share one right edge and each row has one mark; and, with motion allowed, a request coming once the tab is shown makes a dot fly, the wire lit and the hub busy, the dot waiting beside the Claude account while it answers, turning green and gone after, the row's tokens updated. The whole GUI suite passes (login-import, a timing test of an import's passing status, failed once under concurrency and passes alone), go build -tags nogui (and GOOS=linux, GOOS=windows) and go test ./internal/gui pass. Checked by eye with a fake live trace in light and dark (a 429 on Relay failing over to DeepSeek, then a Claude request). Not tried in the real tray panel.
|
2026-09-29 21:16:56 +08:00 |
|
yetone
|
04dc3bca72
|
panel: a Routing tab shows the gateway's latest requests, and the allowances' tab is named Allowances (v on Discord #feedback: the panel's Usage tab and the window's Usage page mean different things, and the panel had no routing) — the tray panel had Agents, Usage and Profiles, its Usage being each subscription's allowance while the window's Usage counts requests and Routing shows where they went. The panel's tab now reads Allowances (额度; the window keeps Usage/用量, and the tab's id and remembered choice are unchanged), and a new Routing tab (路由) lists the gateway's last 8 requests as they come, from the trace the Routing page already long-polls (/api/gateway/trace, which routing.js polled in the panel too; no new endpoint): each a two-line row with the agent's dot, icon and name and the model it asked for, the time, then where it went (provider · account or key), the model that try sent and, when the reply named another model (the new served/swapped fields), the amber "served gpt-6-luna" (实际 …) tag of the Requests list, beside the tokens and time taken; a failed one says its status and why (429 · rate limited), one under way who is answering. Over them, today's calls and tokens (the Usage page's /api/usage?period=today, read when the tab is shown and after a request ends, at most every 5 s) and Open Routing. A click on a request opens the window's Routing page on it: POST /api/window/main takes req beside view=routing (mainView lets only a positive id through), and the page, loaded so, picks that request as a click in its list would (its story told) and drops req from the address. The panel's height counts the tab as its tallest, as the others; the tab redraws keeping the panel's scroll, the click moves nothing, no border stripe. Tested with a new internal/gui/tests/panel-routing.test.cjs in Chromium and WebKit, en and zh: the Routing and Allowances labels, four fixture requests listed newest first with agent, model, "Relay · team" and "Claude · ann@example.com", the served tag on the swapped one only (not on a dated name), the 429 row, times, no row overflowing, today's 42 calls · 1.2M tokens, a click with the panel scrolled asking for view=routing&req=100 and leaving the scroll as it was, Open Routing, and the window opened on ?view=routing&req=101 with that request picked and its story shown; and TestMainView. go build -tags nogui (and GOOS=linux, GOOS=windows), go test -tags nogui ./... and the whole GUI suite (102 tests) pass. Not tried in the real tray panel or with a live gateway: the window opening on the request is tested in the page, not through Wails.
|
2026-09-29 20:22:19 +08:00 |
|