fix(app): restore local-only conversation from the local server - #2667
Dani Akash (DaniAkash) merged 1 commit into
Conversation
… local server Since browseros-ai#2542 the local server owns chat history for signed-in users too, and the side panel history always lists those local conversations. Opening one still went through the cloud query only (the pre-browseros-ai#2542 path), so a conversation without a cloud record produced no restore: the query param was cleared and the panel snapped back to its previous view. Cloud-backed conversations kept working, which is exactly the split reported in browseros-ai#2665. When the cloud has no record, fall through to the local server restore that logged-out and new-tab users already use. A conversation that exists in the cloud is restored from there as before. Closes browseros-ai#2665
|
All contributors have signed the CLA. Thank you! |
|
I have read the CLA Document and I hereby sign the CLA |
|
|
Thanks for the re-run. Greptile came back 4/5 with one substantive item, and I think it is right: there is no focused regression test for the path this PR actually adds — signed-in, cloud has no record, fall through to the local server restore. That gap is real rather than cosmetic. I'd like to close it. What I'd add is a cell that drives the effect with a signed-in session and a conversation the cloud query resolves to nothing for, and asserts the local restore is called and the Two questions before I write it:
On the current state: |
|
Lukas (@L4XB) we can merge this PR, i'll handle the test coverage separately on a new PR |
cd1b12c
into
browseros-ai:main
Closes #2665.
What was wrong
Since #2542 the local server owns chat history for signed-in users too, and the side panel history always lists those local conversations first. Opening one still went through the cloud query only, the path from before #2542: for a conversation without a cloud record the query resolved to nothing, the
conversationIdparam was cleared and the panel snapped back to its previous view. Cloud-backed conversations kept working, which is exactly the split reported in #2665 (local-only fails, account-backed opens).#2625 added the local restore for the new tab and for logged-out users (
restoreLocally), but the signed-in side panel never reached it.Change
In the side panel restore effect, when the cloud has no record of the requested conversation, fall through to the same local server restore that logged-out and new-tab users already use (
fetchServerConversationviarestoreServerConversation). A conversation that does exist in the cloud is restored from there as before, so nothing changes for account-backed history. On a real miss the local path settles the UI the same way the cloud miss did (param cleared, no error banner in the side panel).Validation
bun run scripts/run-bun-test.ts --cwd=apps/app ./apps/app: 433 pass, 0 fail across 61 files.bunx wxt prepare && tsc --noEmitinapps/app: clean (GraphQL types generated fromschema/schema.graphql).bunx @biomejs/biome checkon the changed file: clean.Not done here: a browser check against a running local server. The change is confined to the branch that already runs for logged-out users, so the manual check that would help most is a signed-in user opening a local-only conversation from the side panel history.