Skip to content

fix(integrations): namespace GitHub connect DI tokens to avoid collision#2579

Merged
jonathanlab merged 2 commits into
mainfrom
posthog-code/namespace-github-connect-di-tokens
Jun 10, 2026
Merged

fix(integrations): namespace GitHub connect DI tokens to avoid collision#2579
jonathanlab merged 2 commits into
mainfrom
posthog-code/namespace-github-connect-di-tokens

Conversation

@jonathanlab

Copy link
Copy Markdown
Contributor

Summary

The integrations and onboarding modules both defined GITHUB_CONNECT_CLIENT and GITHUB_CONNECT_SERVICE using identical Symbol.for() keys:

  • "posthog.core.githubConnectClient"
  • "posthog.core.githubConnectService"

Because Symbol.for() returns the same global symbol for a given key, the two token sets collided in the DI container — binding one set silently overwrote the other.

Changes

  • Namespace the tokens under their owning module:
    • posthog.core.integrations.githubConnectClient / ...githubConnectService
    • posthog.core.onboarding.githubConnectClient / ...githubConnectService
  • Add githubConnect.module.ts to bind the integrations GithubConnectService.
  • Register githubConnectModule in desktop-contributions.ts.
  • Bind the integrations GithubConnectClient (UiGithubConnectClient) and add its RendererBindings map entry in the renderer DI wiring.

Verification

  • pnpm typecheck passes (run by the pre-commit hook).
  • Biome check clean.

Created with PostHog Code

The integrations and onboarding modules both defined GITHUB_CONNECT_CLIENT
and GITHUB_CONNECT_SERVICE using identical Symbol.for() keys
("posthog.core.githubConnectClient" / "...githubConnectService"). Because
Symbol.for() returns the same global symbol, the two token sets collided in
the DI container, so binding one overwrote the other.

Namespace each set under its owning module ("posthog.core.integrations.*"
and "posthog.core.onboarding.*"), add a dedicated githubConnectModule to
bind the integrations GithubConnectService, register it in desktop
contributions, and wire the integrations GithubConnectClient (UI impl) plus
its binding-map entry in the renderer.

Generated-By: PostHog Code
Task-Id: ab590a64-c7b3-45eb-b381-083a3c75b3f0
@github-actions

github-actions Bot commented Jun 10, 2026

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit 551c79f.

@jonathanlab jonathanlab added the Create Release This will trigger a new release label Jun 10, 2026
@greptile-apps

greptile-apps Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "Merge branch 'main' into posthog-code/na..." | Re-trigger Greptile

@jonathanlab jonathanlab merged commit 71cb5f1 into main Jun 10, 2026
20 of 22 checks passed
@jonathanlab jonathanlab deleted the posthog-code/namespace-github-connect-di-tokens branch June 10, 2026 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Create Release This will trigger a new release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants