mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #5422] [GUI] the browser-chat handover runs twice when two windows open on the first 0.2.11 start #3240
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#3240
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @TheHubUser4860938 on GitHub (Nov 6, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5422
Problem: on the first start after the 0.2.10 -> 0.2.11 upgrade, two windows opened together each hand the whole browser archive to the host: for a multi-MB archive the first start writes the archive twice and every moved chat lands at rev 2.
Environment: Strata 0.2.11 (app and Terminal 0.2.11, Control and engine 0.1.57) · Linux x86_64 · NVIDIA RTX 4090 24 GB, 125 GB RAM · Qwen3.8-Flash-Next family
Reproduce: fill one browser profile's localStorage with several chats (two windows share it), start the 0.2.11 host, open the app in two windows at once: both requests import; the host takes each chat once (content-safe) and the second window's writes raise every rev.
Expected: one import request from the window that claims the handover; the other window sees the claimed archive.
Actual:
chat-sync.tshydrateChatssetsHOST_FLAG_KEYonly aftertransport.importManyreturns, andimportManyis a loop of per-chat saves, not one queued unit - both windows read "not flagged" before either has set it.Reproduction status: reproduced locally (two
hydrateChatscalls sharing one localStorage stub and one chat store: both reportmoved = N).The fix we run: claim the flag synchronously before requesting the import, and read it after the initial
list(a pre-list read is a snapshot the other window's claim cannot reach); a refused move clears the flag again so a disk-full handover is retried. Happy to PR it.