Keep phone chat back on the list

Treat server-synced open workspace snapshots as pane membership only so they do not show or retain a phone chat page. Add regression coverage for repeated system, button, and predictive Back cycles with tiled and floating entries.
This commit is contained in:
2026-11-12 13:18:05 +00:00
parent 692ce7ec1a
commit 45f5323c75
4 changed files with 423 additions and 10 deletions
@@ -229,19 +229,12 @@ mixin _ChatScreenWorkspace on State<ChatScreen> {
.firstOrNull;
if (pane != null) _workspace.activate(pane.id);
}
if (_workspace.paneCount == 0 && _workspaceVisible) _back();
} finally {
_applyingServerWorkspace = false;
}
// The first snapshot shows the server's chats as a restored layout does;
// later ones never pull this device into a chat another one opened.
if (first && _workspace.paneCount > 0 && !_workspaceVisible) {
setState(() {
_usedWorkspace = true;
_workspaceVisible = true;
});
_publishWorkspaceRoute();
}
// A snapshot only changes pane membership. It never shows the workspace,
// pushes a chat route or changes the view: on a phone the list stays the
// list until the user opens a chat.
if (keepInitial) _syncOpenWorkspace();
}