mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-10-25 17:22:27 +08:00
Deleting a managed ChatGPT account (or logging out of all of them) left every Codex provider bound to that account pointing at a dead local ID. #7395 made such cards recoverable by hand (switch away, pick another account); this removes the dangling bindings where they are created. - Remove/logout detach the affected Codex providers in one SQLite transaction: drop the binding, store an empty auth like a manual unbind, backfill category=official for legacy cards, keep unknown meta keys. The card then follows the native Codex login. - Only this device's account IDs are unbound. Provider rows sync across devices, so a row bound to another device's account stays bound. - The command reports "account removed but unbinding failed" separately. Any row still left dangling (failed unbinding, older versions, synced rows) keeps going through the #7395 recovery path, whose tests now create such rows directly. - Frontend invalidates the Codex provider list after remove/logout, including on partial failure. Thanks @SaladDay for the report and the first fix in #7060. Fixes #7055 Refs #6969