Files
magpie/docs
yetone bc2496dca8 gui, provider: the menu bar's "Account in use" moves as soon as another account answers, and a plugin's shows the one that answered last (#1516, ikxlpz)
f5c062677 made the menu bar's account-in-use card ("codex|*") follow the
account that answered through the gateway within the last hour. Two gaps
were left:

- The tray read its cards again only every few minutes, so after the
  gateway moved to another account, or the user switched, the menu bar
  kept the old account's numbers until the next tick. NoteServed now calls
  OnServedMoved when a provider's answers move to another account or key
  (and on the first one this process sees), and SwitchLogin calls it after
  a switch; the tray loop is woken by it, as by OnSubscriptionUsage.
- A plugin's accounts (moved Kiro, Devin, ...) are no sign-in InUseLogin
  knows, so with nothing served in the last hour the first card was shown
  even when the gateway had last gone to another. trayInUseCard now takes,
  after InUseLogin, the one that answered last at any age, before the first.

Run: TestTrayInUsePluginFollowsLastServed fails without the fallback
("plugin: ... User:k1@x.y"); TestServedMovedWakesTheMenuBar fails with
the hook's firing removed ("the first answer told nobody", "b@ answering
after a@ told nobody"); both pass now, with TestTrayInUse and
TestTrayInUseFollowsWhoAnswered. go test -tags nogui ./... (-timeout 40m)
passes; gofmt -l, go vet (gui with and without nogui), GOOS=linux and
GOOS=windows go vet -tags nogui on gui, provider, autostart pass. No GUI asset changed.
Not tried with the real menu bar and two real accounts.
2026-10-11 01:20:18 +08:00
..