Skip to content

Add device-pairing lifecycle events (started / completed / failed) - #7

Open
yewreeka wants to merge 1 commit into
mainfrom
jarod/device-pairing-metrics
Open

Add device-pairing lifecycle events (started / completed / failed)#7
yewreeka wants to merge 1 commit into
mainfrom
jarod/device-pairing-metrics

Conversation

@yewreeka

@yewreeka yewreeka commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Summary

(Replaces #6 — same change, rebased onto 8b5f741, the revision convos-ios currently pins, so the companion iOS PR can consume this branch before the iOS side absorbs the RevealMediaInfo removal from latest main. Branch recreation closed the old PR.)

The device pairing flow (QR + PIN + emoji handshake between an existing device and a new one) currently emits no product analytics on either side of the handshake. This adds the metric descriptors for it:

Event Fires Properties
device_pairing_started pairing attempt begins on a device role (initiator | joiner)
device_pairing_completed terminal success role, duration_secs
device_pairing_failed terminal failure role, reason (error | expired | cancelled), step (phase it died in), duration_secs

Design follows the outcome-event style of the join funnels (one started + one terminal event per attempt per role) rather than per-step events; the failed event's step property (qr_displayed → join_requested → data_deletion → pin_shown → pin_entry → emoji_confirmation → syncing) still gives the drop-off funnel for unsuccessful attempts.

Swift package + README catalog regenerated with ./gradlew build. Also adds SwiftPM's .build scratch dir to .gitignore.

Companion PR

convos-ios PR (call sites in the pairing view models) pins this branch until this merges to main.

🤖 Generated with Claude Code

Note

Add device-pairing lifecycle events to CoreActions

  • Adds devicePairingStarted, devicePairingCompleted, and devicePairingFailed methods to the CoreActions protocol in both Swift (CoreActions.swift) and Kotlin (CoreActions.kt).
  • Introduces three new enums — DevicePairingRole (initiator/joiner), DevicePairingFailureReason (error/expired/cancelled), and DevicePairingStep (qr_displayed through syncing) — used as parameters for these events.
  • MetricsCoreActions emits analytics events named device_pairing_started, device_pairing_completed, and device_pairing_failed with role, reason, step, and duration properties.

Macroscope summarized ef75ce1.

The device pairing flow (QR + PIN + emoji handshake) currently emits no
product analytics. Adds one started and one terminal event per role
(initiator / joiner), with the failure step and reason as properties on
device_pairing_failed rather than per-step events, matching the
outcome-event style of the join funnels. Also ignores SwiftPM's .build
scratch directory.

Based on 8b5f741 (the revision convos-ios currently pins) rather than
latest main so the companion convos-ios PR can consume this branch
before the RevealMediaInfo removal is absorbed on the iOS side.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@yewreeka
yewreeka marked this pull request as ready for review July 14, 2026 16:48
@yewreeka
yewreeka requested a review from mproberts July 14, 2026 16:48
@macroscopeapp

macroscopeapp Bot commented Jul 14, 2026

Copy link
Copy Markdown

Approvability

Verdict: Approved

Purely additive analytics events for device-pairing lifecycle. New enums and methods that fire telemetry via existing delegate pattern - no runtime behavior changes.

You can customize Macroscope's approvability policy. Learn more.

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