feat: add cross-device primary session resume with continue prompt#184
Draft
Copilot wants to merge 3 commits into
Draft
feat: add cross-device primary session resume with continue prompt#184Copilot wants to merge 3 commits into
Copilot wants to merge 3 commits into
Conversation
Copilot
AI
changed the title
[WIP] Add primary session concept for cross-device conversation continuity
feat: add cross-device primary session resume with continue prompt
May 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Cross-device switches were starting empty chats because history/session state was scoped to
userId + tabId. This change introduces a per-user primary session pointer and a resume-offer flow so a new device can continue the most recent conversation.Server: primary session metadata + offer flow
setPrimarySession()/getPrimarySession()to chat state store.tabId,sdkSessionId,model,mode,updatedAt) and refreshed it on message/session activity.primary_session_availablewith restorable history.Protocol + conflict signal
primary_session_availablesession_takensession_takenemit when another device is actively processing the same SDK session.Client UX + behavior
ContinueSessionBanner.svelte.Tests
Type of Change
Testing
npm run test:unit)npx playwright test)docs/TEST-MATRIX.mdif this PR adds or modifies a featureQuality Checklist
npm run checkwith no new errorsnpm run buildsuccessfullyconsole.logor debug code left inSecurity (for public repo)
Screenshots / Recordings
/tmp/continue-session-banner.png