Repository navigation
Description
Problem
On an Android phone, removing the last saved server from the server list (Remove Server › Remove) does not return the app to the sign-in screen. The server's credentials are forgotten, but the user is left in the app with no server instead of being taken back to add or sign in to one.
Seen by the maintainer on an Android phone running Silo Android 1.0.0 (build number not recorded) while preparing devices for Notifications validation on 2026-11-02.
Source evidence
origin/main at 51d4f9013:
ServerListViewModel.onRemove(androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/servers/ServerListViewModel.kt:124-165) unregisters push, callsserverRegistry.remove(serverId), and only navigates when the removed server was active and another server was promoted (if (wasActive && promotedId != null)), sending the user to Profile Selection when needed. When the removed server was the last one,promotedIdis null and no destination is set.ServerListScreen(.../ui/screens/servers/ServerListScreen.kt:117-123,EmptyStateat:387) then shows "No saved servers / Add your first Silo server to get started." inside the server list; nothing routes to sign-in.- The Android TV app handles the same case with an explicit "Sign out & remove" for the active server (
androidTvApp/.../servers/TvServerListScreen.kt:194,TvSignOutDialog.kt:30).
Expected behavior
Removing the active server when it is the last saved server signs the user out and returns the app to the first-run sign-in / add-server screen, the same place a fresh install starts, with no way back into the signed-in app.
Validation
- Sign in to a single server on an Android phone.
- Open the server list, long-press the server, choose Remove Server, confirm Remove.
- The app should land on the sign-in / add-server screen; Back should not return to the signed-in app.
- Repeat with two servers, removing the inactive one and then the active one: the remaining server should become active as today.
Non-blocking; found during Notifications validation (Android task silo-android#346).
AI-assisted: drafted with Claude Code (claude-opus-5-5) and GitHub CLI at the maintainer's direction. Behavior observed by the maintainer on a phone; source location traced by the agent on origin/main.
Activity