Skip to content

[codex] Add survey identity bridge#1151

Draft
benceruleanlu wants to merge 1 commit into
mainfrom
codex/survey-identity-bridge
Draft

[codex] Add survey identity bridge#1151
benceruleanlu wants to merge 1 commit into
mainfrom
codex/survey-identity-bridge

Conversation

@benceruleanlu

@benceruleanlu benceruleanlu commented Jun 19, 2026

Copy link
Copy Markdown
Member

Summary

Adds a Desktop-owned survey identity bridge for Typeform flows.

  • exposes window.__comfyDesktop2.Surveys.getIdentity() for hosted frontend bundles
  • exposes window.api.getSurveyIdentity() for Desktop renderer surfaces
  • returns null unless telemetry consent is granted
  • returns Desktop's existing anonymous installation id plus the active PostHog distinct/user id when available
  • adds the identity fields to Desktop2's existing Typeform feedback URL fragment while preserving the old ver and platform query params
  • updates the bridge-types package declarations for the new Surveys surface

Related frontend PR

ComfyUI_frontend #13021 consumes window.__comfyDesktop2.Surveys.getIdentity() from the hosted frontend Typeform path. Older frontend/Desktop combinations continue to fall back to anonymous survey ids.

Why

Typeform submissions go directly to Typeform, so they cannot inherit identity through the existing PostHog telemetry capture relay. Desktop needs to provide the consent-gated identity tags before the form opens.

Validation

  • pnpm typecheck
  • pnpm exec eslint src/types/comfyDesktopBridge.ts src/preload/comfyPreload.ts src/preload/api.ts src/main/lib/telemetry.ts src/main/lib/telemetry.test.ts src/main/lib/ipc/registerTelemetryHandlers.ts src/main/lib/ipc/registerTelemetryHandlers.test.ts src/types/ipc.ts src/renderer/src/types/ipc.ts src/renderer/src/lib/supportUrl.ts src/renderer/src/composables/useSendFeedback.ts src/renderer/src/panel/PanelApp.test.ts
  • pnpm exec vitest run src/main/lib/telemetry.test.ts src/main/lib/ipc/registerTelemetryHandlers.test.ts src/renderer/src/panel/PanelApp.test.ts

Note: the focused Desktop test run exits 0 but Happy DOM logs an external iframe fetch abort for the Typeform URL after the tests pass.

@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 3bcf1967-060e-40b1-8765-070a283b7af4

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/survey-identity-bridge
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch codex/survey-identity-bridge

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

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