Skip to content

[eas-cli] Connect existing PostHog accounts via browser handoff#3895

Open
gwdp wants to merge 1 commit into
mainfrom
gwdp/posthog-existing-user-connect
Open

[eas-cli] Connect existing PostHog accounts via browser handoff#3895
gwdp wants to merge 1 commit into
mainfrom
gwdp/posthog-existing-user-connect

Conversation

@gwdp

@gwdp gwdp commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Why

Existing PostHog users couldn't connect — eas integrations:posthog:connect dead-ended with a "not supported yet" message when the account's email already had a PostHog account.

How

On the existing-user (requires_auth) branch, open the approval URL in the browser, poll for the connection the website callback creates, then continue with the rest of connect. Non-interactive runs refuse with a clear message instead of hanging. Pairs with the universe stack (the startPostHogConnection / completePostHogConnection mutations + the /posthog/callback website scene).

Test Plan

  • yarn test connect (added: browser handoff opens the URL + polls, non-interactive refusal, poll timeout).
  • run connect with an email that already has a PostHog account, approve in the browser, confirm it links and continues.
carbon (4)

@gwdp gwdp force-pushed the gwdp/posthog-existing-user-connect branch 2 times, most recently from 99196eb to 563d9a2 Compare June 25, 2026 05:36
@codecov

codecov Bot commented Jun 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.58824% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.11%. Comparing base (efc78f4) to head (cb15ee2).

Files with missing lines Patch % Lines
...ckages/eas-cli/src/graphql/queries/PostHogQuery.ts 0.00% 2 Missing ⚠️
...s/eas-cli/src/graphql/mutations/PostHogMutation.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3895      +/-   ##
==========================================
+ Coverage   59.05%   59.11%   +0.06%     
==========================================
  Files         935      935              
  Lines       40959    41019      +60     
  Branches     8630     8643      +13     
==========================================
+ Hits        24185    24244      +59     
- Misses      16678    16679       +1     
  Partials       96       96              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gwdp gwdp force-pushed the gwdp/posthog-existing-user-connect branch 5 times, most recently from 336b80f to 0b4567e Compare June 27, 2026 03:37
@gwdp gwdp force-pushed the gwdp/posthog-existing-user-connect branch from 0b4567e to cb15ee2 Compare June 27, 2026 03:44
@github-actions

Copy link
Copy Markdown

✅ Thank you for adding the changelog entry!

@gwdp gwdp requested a review from mackenco June 27, 2026 03:54
@gwdp gwdp marked this pull request as ready for review June 27, 2026 03:54
@github-actions

Copy link
Copy Markdown

Subscribed to pull request

File Patterns Mentions
**/* @douglowder

Generated by CodeMention

Warning: The preamble and epilogue options in commentConfiguration are deprecated. Use template instead.

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