Skip to content

PCC: session persistence — one opt-in per conversation, not per message #364

Description

@kpmmmurphy

The problem

The current PCC design requires tapping the cloud button on EVERY message (ADR 0006's conservative per-message consent). That makes PCC feel like a novelty, not a feature. If you chose PCC once in a conversation, you probably want it for the rest of that conversation.

The shape

Once the user taps the cloud button (and accepts the consent sheet) in a conversation, PCC stays on for the duration of that chat session. The cloud button shows as "active" and subsequent messages route through PCC without a re-tap.

  • A new conversation starts local again (no carry-over between sessions)
  • The user can tap the cloud button off mid-conversation to go back to local
  • The Settings toggle still gates availability globally
  • The consent sheet still shows on the FIRST PCC message in a session

This respects the principle: you opted in for THIS conversation, not globally. The consent moment is the first tap; after that, the intent is clear.

Implementation

ChatSession tracks a pccActiveForSession: Bool (default false). The cloud button's tap sets it; a new conversation resets it. The send path reads it to decide the route. The button's visual state reflects it (filled vs outlined cloud).

Exit criterion

Tap the cloud button once → the next three messages route through PCC without re-tapping. Start a new chat → back to local. Tap the cloud button off mid-conversation → back to local immediately.

Complements #363 (onboarding: Full Experience makes PCC available; this makes it usable).

🤖 Generated with Claude Code

https://claude.ai/code/session_01BQnQqi2fSXaeY12dare7hB

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions