Repository navigation
Use core v0.48.0 - #202
Merged
Merged
Use core v0.48.0#202
Conversation
…ats, ChatGPT account from the token
- Pin every tw-* crate to v0.48.0 (CONTROL_API_VERSION 21) and regenerate
src/generated/tw-api.ts. No new or changed message codes.
- /in-flight is now { now_ms, requests: [{ id, events }] }. The traffic list
(applyInFlight), the overview's in-flight count, the routing map (useFlights)
and the upstreams' per-upstream count replay each request's events through
their existing reducers, so a page opened mid-request shows the status code,
the serving upstream and the whole routing path, not just the start.
- request_started carries the stored session id: RequestRow.session is set at
the start, so a running turn is grouped into its session right away. The
history merge only fills a missing session now.
- Rule-refused requests are stored rows with an empty upstream: the traffic
table and drawer show "—" there, drop "only this upstream" for them, and
session headers skip the empty name. The drawer's routing tab reads routing
that is now present for every non-local row: empty attempts say "pending"
while running and "no upstream attempts" afterwards; the "no routing" text
only covers local answers.
- ChatgptUsage lost email and plan: the upstream table and the account section
label ChatGPT upstreams from ProviderView.oauth.account. The page still asks
ChatgptUsage once on open for the cold-start quota (useAccountQuotas). All 17
known plans are labelled like Codex does; unknown words are shown as they are.
- SecurityEventsPage gains total and by_outcome; loading another page keeps
the new page's totals.
- Whitelist the read-only RouteStats endpoint (call.rs ALLOWED and control.ts).
- Menu bar: running time comes from core's elapsed_ms rebased onto this
machine's clock, not from comparing core's at_ms with the local clock.
- Screenshot pipeline: the ChatGPT account comes from a JWT in the sample
config (oracle JSON regenerated against v0.48.0), mocks follow the new
shapes, and a RouteStats mock counts rows like tw-store.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Sep 25, 2026
fylorn
added a commit
that referenced
this pull request
Sep 25, 2026
`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>
fylorn
added a commit
that referenced
this pull request
Sep 25, 2026
`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>
This was referenced Sep 25, 2026
fylorn
added a commit
that referenced
this pull request
Sep 25, 2026
`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>
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>
This was referenced Sep 25, 2026
Merged
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.
What this changes
Pins ThinkWatch Core v0.48.0 (control API 21) and adapts the app to its protocol changes, keeping the current UI:
GET /in-flightnow answers{ now_ms, requests: [{ id, events }] }. The traffic list (applyInFlight), the overview's in-flight count, the routing map (useFlights) and the upstreams' per-upstream count replay each running request's events through their existing reducers. A page opened mid-request now shows the status code, the serving upstream and the whole routing path, where it used to know only the start.request_started.sessionis the stored session id, soRequestRow.sessionis set when the request starts and a running turn is grouped into its session at once (grouped traffic view). The history merge only fills a missing session.ChatgptUsageno longer carries email and plan. The upstream table and the account section label the row fromProviderView.oauth.account(read by core from the token, no upstream call). The page still callsChatgptUsageonce on open for the cold-start quota (useAccountQuotas). All 17 known plans get Codex's display names (team→ Business,prolite→ Pro, …); unknown words are shown as they come. The sign-in dialog labels the plan the same way.SecurityEventsPagegainstotalandby_outcome; "load more" keeps the new page's values. The header is unchanged here.RouteStats(GET /summary/routes) is added tocall.rsALLOWEDandcontrol.tsWEBVIEW_ENDPOINTS.elapsed_msrebased onto this machine's clock instead ofat_mscompared with the local clock (they differ on a remote core).oauth.accountfrom real core; mocks follow the new shapes, including aRouteStatsmock that counts rows like tw-store.No new or changed message codes.
Why
Core v0.48.0 fills the protocol gaps the page redesigns ran into (ThinkWatch-Core#193, #195, #197). The breaking shape changes (
/in-flight,session_fp→session,ChatgptUsage,CostBucketGroup,SecurityEventsPage, the routing view) have to land in one step with the pin, because the control handshake requires an exact API version.How it was verified
pnpm typecheck,pnpm test(361 tests, new ones for snapshot replay, sessions at start, refused rows and plan labels),pnpm build.cargo fmt --check,cargo clippy --all-targets -D warnings,cargo clippy --lib -D warnings,cargo testinsrc-tauri, with atwcorebuilt from the v0.48.0 tag: the 7 control-plane tests complete the handshake against it; the ts_bindings and msg_codes checks pass.200and1180→…on anthropic and sits inside its session when grouped; the routing map lights key → route → group → upstream (3 edges) for it right after opening; the refused request shows "—" and its Routing tab reads "Matched rule no-opus / No upstream attempts were recorded"; the ChatGPT row reads "Plus · dev@example.com" fromoauth.account;SecurityEventstotals are equal on every page and add up by outcome.🤖 Generated with Claude Code