Decision
Connecting a wallet should not auto-sync the device's local (guest) sessions into that wallet's identity. Local sessions stay local and are only synced when the user explicitly chooses to, per session.
Current behavior (to change)
On connect, adoptWallet() calls migrateGuestSessions(connected), which copies every guest session into the connected wallet's store (decrypt with the device key, re-encrypt with the wallet key). So all local chats are silently adopted into whatever wallet is connected — even when the user connected a wallet just to buy one skill.
surfaces/localhost/src/index.ts — adoptWallet() → migrateGuestSessions()
Proposed
- Stop auto-migrating on connect. Local sessions keep a
Local tag and are never bound to a wallet unless the user opts in.
- A small sync icon in the chat screen, shown only when: a wallet is connected AND the current session is local. One appropriate placement — not sprinkled around.
- Tap → confirm flow: show the connected wallet address + that agent's profile, then ask "Sync this session with this agent?" → on confirm, migrate that one session into the wallet's store.
- Protocol: add a
syncSessionToWallet (single session) client message + server handler; reuse the existing migrateGuestSessions machinery scoped to one session.
Rationale
Auto-adopting all local work on connect is presumptuous and surprising. Value-first onboarding means chat/local work exists before any wallet; binding it to an identity should be a deliberate, per-session action with the destination agent shown up front.
Notes
Context from the wallet-connect work (local-wallet unlock + centralized adoptWallet adapters) already in main. This issue tracks the follow-up behavior change + the chat sync UI.
Decision
Connecting a wallet should not auto-sync the device's local (guest) sessions into that wallet's identity. Local sessions stay local and are only synced when the user explicitly chooses to, per session.
Current behavior (to change)
On connect,
adoptWallet()callsmigrateGuestSessions(connected), which copies every guest session into the connected wallet's store (decrypt with the device key, re-encrypt with the wallet key). So all local chats are silently adopted into whatever wallet is connected — even when the user connected a wallet just to buy one skill.surfaces/localhost/src/index.ts—adoptWallet()→migrateGuestSessions()Proposed
Localtag and are never bound to a wallet unless the user opts in.syncSessionToWallet(single session) client message + server handler; reuse the existingmigrateGuestSessionsmachinery scoped to one session.Rationale
Auto-adopting all local work on connect is presumptuous and surprising. Value-first onboarding means chat/local work exists before any wallet; binding it to an identity should be a deliberate, per-session action with the destination agent shown up front.
Notes
Context from the wallet-connect work (local-wallet unlock + centralized
adoptWalletadapters) already inmain. This issue tracks the follow-up behavior change + the chat sync UI.