Skip to content

Resolve Desktop person identity through authenticated Cloud API - #1530

Draft
benceruleanlu wants to merge 1 commit into
bl/desktop-messaging-targetsfrom
bl/desktop-cloud-person-identity
Draft

benceruleanlu wants to merge 1 commit into
bl/desktop-messaging-targetsfrom
bl/desktop-cloud-person-identity

Conversation

@benceruleanlu

@benceruleanlu benceruleanlu commented Sep 16, 2026

Copy link
Copy Markdown
Member

Behavior

Add a main-process Cloud identity client for GET /api/user. Keep the canonical account ID separate from the optional firebase_uid used by existing Customer.io profiles. Legacy responses without that field remain usable account responses; callers must not substitute the canonical ID for a Firebase UID.

CloudSession shares concurrent identity lookups and announces credential changes immediately. Logout, login completion, active-token refresh, and workspace switches cancel obsolete lookups; a late response cannot supply the previous account's identity. Tokens remain in the main process. This library layer is consumed by launcher messaging later in the stack.

The optional field requires Cloud #9467 and #9468 before launcher messaging can identify newly authorized sessions. Existing grants need fresh authorization to acquire proven Firebase provenance.

Validation

28 focused Cloud identity/session tests passed. Coverage includes linked identities, absent legacy metadata, rejected/malformed responses, cancellation, shared requests, logout and workspace-switch races. Required pre-commit typechecks, lint, and formatting passed. No live authenticated request or deployment was performed.

Change breakdown

Changed lines = additions + deletions. No merge-only changes.

Category Files Added Deleted Share of changed lines
Test code 2 153 0 61.9%
Product code 2 93 1 38.1%
Total 4 246 1 100%

Test code paths

  • src/main/cloud/identity.test.ts
  • src/main/cloud/session.test.ts

Product code paths

  • src/main/cloud/identity.ts
  • src/main/cloud/session.ts

No generated or vendored files changed.

@coderabbitai

coderabbitai Bot commented Sep 16, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Comment @coderabbitai help to get the list of available commands.

@benceruleanlu
benceruleanlu added this pull request to stack #1529 September 16, 2026 03:07
@benceruleanlu
benceruleanlu force-pushed the bl/desktop-cloud-person-identity branch from 0e1fbdf to 2eb004f Compare September 16, 2026 03:47

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant