Skip to content

Local sessions should stay local on wallet connect; add opt-in per-session sync from chat #123

Description

@zo-sol

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.tsadoptWallet()migrateGuestSessions()

Proposed

  1. Stop auto-migrating on connect. Local sessions keep a Local tag and are never bound to a wallet unless the user opts in.
  2. 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.
  3. 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.
  4. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestmobileAndroid / mobile app surface

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions