Open chats: the server moves a restarted chat (/new) to its new session
The server-stored open-chat set kept a /new'd chat's old session unless the restarting device's own write landed, so another device (the phone) came back to the old conversation. chat_new_session now replaces the session in the stored set in place (position and floating kept) and pushes the new revision to every connection. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -108,6 +108,7 @@ func handleChatNewSession(ctx context.Context, request protocol.Message, broker
|
||||
fail("session " + created.ID + " was started but the chat could not move to it: " + err.Error())
|
||||
return
|
||||
}
|
||||
replaceInChatWorkspace(ctx, registry, hub.changes(), oldID, created.ID)
|
||||
row, found, err := registry.OperatorSession(ctx, created.ID)
|
||||
if err != nil || !found {
|
||||
fail("session " + created.ID + " was recorded but could not be read back")
|
||||
|
||||
Reference in New Issue
Block a user