Repository navigation
feat: sign in on another device, and read the table in one pass - #46
Merged
Merged
Conversation
Three things the upstreams page could not do. **Sign in without this computer's browser.** The login dialog now asks where to authorise: here, or with a code typed on a device that is already signed in. The code, like the authorize URL before it, stays in Rust — the webview is handed the code to display and a command to copy it, never a clipboard it can write anything into. Signing in again on an existing account reuses its name and egress and skips the notice it already accepted. **Read a row in one pass.** The table was eight columns wide and the answer to "can I still use this one" was split across three of them. Protocol, address and egress are one line under the name; requests and cost are one cell; and subscription quota is a bar where per-token upstreams say what they bill by. An upstream that has never reported quota still says how it bills — an empty bar would claim it had used nothing. **Edit an account for what it is.** A ChatGPT account has no address, protocol or credential to fill in, so its dialog is 账号 / 模型 / 安全: name and egress, the login and what it costs, the quota windows and the reset credits — the last two moved here from a separate dialog, which is where they were already being looked for. Pins core v0.7.0, whose usage call now fills the in-memory quota, so the bars are there on a cold start instead of after the first request. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This was referenced Sep 19, 2026
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.
Pins core v0.7.0 (ThinkWatchProject/ThinkWatch-Core#42, #43) and builds the three things on top of it.
Sign in on another device
The login dialog asks where to authorise: 在这台电脑上登录 (unchanged) or 在其他设备上登录, which shows a one-time code and the page to type it on. The code stays in Rust exactly as the authorize URL does — the webview gets the code to display and a
copy_chatgpt_codecommand, never an arbitrary clipboard write. Codex's caution is there too: only the code shown here, never one somebody sent you.Signing in again on an existing account (from its edit dialog) keeps its name and egress and skips the notice it already accepted.
The table, in one pass
Eight columns became five. Protocol, address and egress are one line under the name; 24-hour requests and cost are one cell; subscription quota is a bar where per-token upstreams name what they bill by. An upstream that has never reported quota still says how it bills — an empty bar would claim it had used nothing.
The account dialog
A ChatGPT account has no address, protocol or credential to fill in, so its edit dialog is 账号 / 模型 / 安全. The quota windows and reset credits moved into it from the separate 额度与重置卡 dialog, which is where people were already looking for them; the row menu item now opens that tab.
Checked
Isolated preview (
.claude/preview/upstreams.tsx, not committed) on the real components: table, account dialog, login dialog, the device-code screen and the re-login variant.pnpm typecheck,pnpm test(92),pnpm build,cargo fmt --check,cargo clippy -D warningsall pass.🤖 Generated with Claude Code