Repository navigation
1.37.1: ask the server again after a sign-in and a sign-out - #3
Merged
Merged
Conversation
The Account window's Replay casts line (and anything else /v1/info says per caller) was learned once, from the first answer. When that answer came before signing in, it was a guest's, and an admin kept seeing "Off · Not offered to this account for now." until the page reloaded. A sign-in now re-reads /v1/info before refreshing the account, and a sign-out asks again as a guest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
The Account window's Replay casts line could say "Off · Not offered to this account for now." to a signed-in admin.
Why: the plugin reads the
castrecipe'senabledfrom/v1/infoinconnect(), and only asks once (the dialog connects only while it has no answer yet). If the first answer came while signed out — the Account window opened before signing in — it was a guest's answer, and the server'senabled: falsestuck after the sign-in.signIn()andrefresh()updated the balance but never asked/v1/infoagain. A sign-out had the opposite problem: an "On" line stayed.Change:
connect()(re-read/v1/info) beforerefresh()connect()again as a guestAftermath's Cast button was not affected: it asks
/v1/infoitself with the session.Tests: a new account-manager test (guest answer → sign in → On → sign out → Off) fails without the change and passes with it. The AI-offer test's fake server now ends its session on logout like the real one does; with the new re-ask after a sign-out, the old fake kept answering as the admin.
npm test248 passed,npm run typecheckclean.After merging: tag v1.37.1 and bump the pin in scm-js.
🤖 Generated with Claude Code