From 4b0ef46964e83c2214d76dcd7f6e9aca2c970e0d Mon Sep 17 00:00:00 2001 From: Adron Hall Date: Wed, 23 Sep 2026 23:12:11 -0700 Subject: [PATCH] `main` did not compile after #170 merged: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ``` 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 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 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 --- InterlinedList/App.xaml.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/InterlinedList/App.xaml.cs b/InterlinedList/App.xaml.cs index 6d683ba..73c4952 100644 --- a/InterlinedList/App.xaml.cs +++ b/InterlinedList/App.xaml.cs @@ -59,7 +59,10 @@ protected override async void OnStartup(StartupEventArgs e) // so drop the session instead and let the login screen surface // the server's own rejection when they try again (#50). AppLog.Info("Restored session belongs to a closed account; discarding it and showing login."); - AppServices.Session.Logout(); + // ClearLocalSession, not LogoutAsync: the account is closed, so + // there is no useful server call to make — and both call sites are + // synchronous. LogoutAsync is for a user-initiated sign-out. + AppServices.Session.ClearLocalSession(); ShowLoginWindow(); } else if (restored) @@ -133,7 +136,10 @@ private void ShowLoginWindow() if (IsAccountClosed()) { AppLog.Info("Sign-in produced a closed account; refusing to open the shell."); - AppServices.Session.Logout(); + // ClearLocalSession, not LogoutAsync: the account is closed, so + // there is no useful server call to make — and both call sites are + // synchronous. LogoutAsync is for a user-initiated sign-out. + AppServices.Session.ClearLocalSession(); return; }