Repository navigation
fix(build): App.xaml.cs called the removed SessionService.Logout() - #186
Merged
Merged
Conversation
``` error CS1061: 'SessionService' does not contain a definition for 'Logout' App.xaml.cs(62,37) App.xaml.cs(136,37) ``` ## Cause #148 replaced the synchronous `Logout()` with `async Task<LogoutOutcome> LogoutAsync()` and split out `ClearLocalSession()`. #170 was branched before that landed and added two `App.xaml.cs` call sites using the old name — for the account-status work, discarding a session belonging to a **closed (banned)** account. Git merged both cleanly: #148 changed `SessionService.cs`, #170 changed `App.xaml.cs`. Neither touched the other's file, so there was no textual conflict. **The third cross-PR break of this shape in this pass** — after the duplicate header helpers (#183) and the contract suite's missing includes (#185). `MERGEABLE` keeps not meaning "compiles after merging". ## Fix Both sites now call `ClearLocalSession()`, which is the right method rather than merely the one that compiles: - The account is **closed**, so there's no useful server call to make — `LogoutAsync()` would attempt a logout and a session revoke for a token that's already dead. - Both call sites are **synchronous** (`OnStartup`'s decision branch and the post-sign-in guard), and `LogoutAsync` is async. - `ClearLocalSession()` is documented for exactly this: drop local state when the server side is already gone. `LogoutAsync()` remains what a user-initiated sign-out calls. A comment at each site records the distinction so neither gets "upgraded" to the async version. ## Verification - `dotnet build -c Debug` — **green** - `dotnet build -c Release` — **green** 🤖 Generated with [Claude Code](https://claude.com/claude-code) PRBODY fix(build): App.xaml.cs called the removed SessionService.Logout() main did not compile after #170 merged — two CS1061s in App.xaml.cs. #148 replaced the synchronous Logout() with async Task<LogoutOutcome> LogoutAsync() and split out ClearLocalSession(). #170 was branched before that landed and added two App.xaml.cs call sites using the old name, for the account-status work that discards a session belonging to a closed account. Git merged both cleanly because #148 changed SessionService.cs and #170 changed App.xaml.cs — neither touched the other's file, so no textual conflict. Third cross-PR break of this shape in this pass, after the duplicate header helpers (#183) and the contract suite's missing includes (#185). Both sites now call ClearLocalSession(), which is the correct method and not just the one that compiles: the account is closed so there is no useful server call to make, both call sites are synchronous, and ClearLocalSession is documented for exactly this case. LogoutAsync stays what a user-initiated sign-out calls; a comment at each site records the distinction. Verified: Debug and Release both build clean. Co-Authored-By: Claude Opus 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.
/tmp/batch.sh $(gh pr list --repo $R --state open --limit 5 --json number,headRefName --jq '.[]|select(.headRefName=="fix-app-logout-rename")|.number')