Repository navigation
chore(upstream): update cswap to b83b910 (v1.1.0) - #22
Conversation
All six patches stay: upstream covers none of them in full. Three are adjusted where they meet new upstream code. - live owner: upstream now repairs the same stale-config state at switch time (realiti4/claude-swap#523) and writes only a strictly later generation. The collect-time heal follows the same ordering, and leaves an unreadable backup, a login with no expiry and an API-key slot alone. - share history: upstream lists settings.json keys nothing reads (realiti4/claude-swap#581). `session.shareHistory` is left out of that list while it still decides. - refresh: the test double takes the stored reading upstream now passes to `_fetch_account_usage`. The desktop and chrome patches only conflicted in text with upstream's new `usage.fableProbe` setting.
|
No actionable comments were generated in the recent review. Summary by CodeRabbit
WalkthroughThis patch series adds serial usage refresh, stored Chrome and Claude Desktop profiles, and distribution-aware version and installation reporting. It also changes live credential owner resolution, adds a legacy share-history fallback, and updates the tracked upstream revision. ChangesUsage refresh
Chrome account profiles
Claude Desktop account profiles
Distribution-aware reporting
Live credential ownership
Share-history compatibility
Tracked upstream revision
Estimated code review effort: 5 (Critical) | ~120 minutes Change: Other Possibly related PRs
Merge Risk:
|
Moves the pinned cswap from v1.0.0 to v1.1.0. The patch series stays at six: upstream fixed things near three of them but covers none in full, so nothing is dropped and three are adjusted where they meet the new code.
The live-owner patch and realiti4/claude-swap#523 share a root cause,
~/.claude.jsonnaming one slot while the live credential belongs to another. Upstream repairs it at switch time, the patch on every collect pass, so both are needed. Upstream's repair writes only a strictly later generation, and the patch's heal wrote on ownership alone, so the heal now follows the same ordering: a stored login is replaced only by a laterexpiresAt, and a login with no expiry (a setup token), a backup that cannot be read and an API-key slot are left alone. Four new tests fail without the guard. A backup the heal already advanced reads asforeign-syncedat the switch, so the two never write twice. This guard is a hardening on top of the sync and can be dropped on its own.realiti4/claude-swap#581 lists the settings.json keys nothing reads in
cswap configand the auto-switch log. It knows only upstream's sections, so it reportedsession.shareHistoryas having no effect while the share-history patch still reads it. The key is now left out of that list while it decides, and is listed, pointing atrun.shareHistory, once the new key answers.cswap refreshgoes through upstream's shared collector, so it picks up the read-only rule for a default login polled from another profile (realiti4/claude-swap#433), the Fable probe pause (realiti4/claude-swap#583) and the new error texts without changes. Only its test double needed the extra argument upstream now passes to_fetch_account_usage.The desktop and chrome patches conflicted in text only, against the new
usage.fableProbesetting. The distribution patch is unchanged apart from line numbers.The base stops at the v1.1.0 tag, with
origin/mainthree commits ahead at 1.2.0b1 (ui.orgTag, realiti4/claude-swap#426).bun run patches export --check,bun run patches verifyandbun run test(4021 passed, 10 skipped, macOS) pass. Not run:bun run build, a local install, other platforms.