Skip to content

refactor(cloud): share task engine and session orchestration#3624

Draft
richardsolomou wants to merge 4 commits into
posthog-code/share-cloud-task-policiesfrom
posthog-code/share-cloud-task-engine
Draft

refactor(cloud): share task engine and session orchestration#3624
richardsolomou wants to merge 4 commits into
posthog-code/share-cloud-task-policiesfrom
posthog-code/share-cloud-task-engine

Conversation

@richardsolomou

@richardsolomou richardsolomou commented Jul 21, 2026

Copy link
Copy Markdown
Member

Problem

Desktop and mobile maintained separate cloud streaming, queueing, reconnect, permission, and run-lifecycle behavior. Extracting that code without adopting it would leave another parallel implementation to maintain.

Depends on #3623
Refs #2416

Changes

I moved the portable cloud engine and session orchestration into @posthog/core, then switched both hosts to use it in the same PR. Desktop delegates cloud commands and run lifecycle to the shared services. Mobile replaces its SSE parser, message queue store, and async session store with the shared engine and a thin native adapter.

Follow-up: #3608

How did you test this?

  • Ran 2,622 core tests, the core typecheck, and 339 mobile tests.
  • Ran Biome and host-boundary checks.
  • Exported the production iOS Expo bundle.

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

Created with PostHog Code

@github-actions

github-actions Bot commented Jul 21, 2026

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit 32895be.

@richardsolomou richardsolomou changed the title refactor(cloud): share portable task engine refactor(cloud): share task engine and session orchestration Jul 21, 2026
@richardsolomou
richardsolomou force-pushed the posthog-code/share-cloud-task-policies branch from c05b44e to dc82fa7 Compare July 21, 2026 13:38
Generated-By: PostHog Code
Task-Id: 40c57a59-b4e1-4760-8e56-ecd03e9c2f0f
Generated-By: PostHog Code
Task-Id: 40c57a59-b4e1-4760-8e56-ecd03e9c2f0f
@richardsolomou
richardsolomou force-pushed the posthog-code/share-cloud-task-engine branch from 2dafbcd to 1b48f46 Compare July 21, 2026 13:46
Generated-By: PostHog Code
Task-Id: 40c57a59-b4e1-4760-8e56-ecd03e9c2f0f
Generated-By: PostHog Code
Task-Id: 40c57a59-b4e1-4760-8e56-ecd03e9c2f0f
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