Skip to content

Mobile telemetry 1: opt in, pair a Host and observe first native chat activation #1935

Open

Description

@DoodleBears

Parent

Spec #1929. Native parent: #1934.

What to build

A Human can enable or disable this phone's anonymous statistics before pairing or while offline. With statistics enabled, pairing a Host, loading its live Roster and completing the first native chat produces a small, sanitized PostHog sequence. Maintainers can see pairing and connection failures without receiving links, credentials or chat content.

Deliver one complete native product path, including the minimal telemetry owner, sender, privacy controls, named events and QA analysis. No standalone SDK installation or plumbing-only completion.

Acceptance criteria

  • First-use and Settings surfaces offer the supported-language notice and explicit opt-in. Ignoring/declining remains fully usable and makes zero vendor requests, including SDK bootstrap. No pre-consent backfill. The phone setting is clearly separate from existing Host telemetry settings.
  • One application-defined typed telemetry owner wraps the SDK or minimal batch adapter. Qualify the adapter against the actual Expo SDK and first-party proxy; review all serialized SDK-added properties. Keep automatic screen/touch/lifecycle/exception/replay/flag/survey collection off. No credential-bearing HostCarrier requests are reused for analytics.
  • Random Mobile Install ID, event ID, foreground-session ID and operation attempt IDs satisfy Spec: Expo mobile PostHog analytics — pairing, activation and notification outcomes #1929. No Host/site identity stitching, domain IDs or hashes of domain IDs. Opt-out clears queued data and identity, persists locally and prevents future sends; opt-in starts a fresh identity. App reinstall/restore behavior is tested and documented.
  • Emit mobile_app_opened, mobile_pairing_started, mobile_pairing_result, mobile_connection_result and the three mobile_activation_step values exactly at their specified semantic boundaries. Common source/platform/build/environment/schema properties are present. Preserve the original event ID on transport retry.
  • Pairing success requires both offer redemption and local saved-Host persistence. Cover QR/paste/deep-link, invalid/expired link and offer, unavailable route, storage failure and explicit retry. Repeated scanner callbacks and route fallback do not multiply attempts.
  • Connection ready requires authenticated usable live Roster data; cached data/socket open does not suffice. Include open/resume/switch/recovery/manual-retry triggers, deadline/refusal/cancellation, bounded retry counts, background cancellation and later recovery without changing product reconnection behavior. Multi-Host switching never creates another installation or first-use activation.
  • First send activation uses Host acceptance or reconciliation of that same outgoing message after an ambiguous failure. No optimistic-bubble success, old-history activation, per-message event stream or token events. First committed Bot-message observation follows a successful mobile send in that foreground conversation, and is explicitly described as observation, not causal reply latency or task success.
  • Implement Spec: Expo mobile PostHog analytics — pairing, activation and notification outcomes #1929's sanitized bounded queue: 100 events / 256 KiB / 24-hour TTL, oldest-first eviction, bounded backoff, 8-second send timeout, no waits in product operations. Test offline retry, overflow/expiry and opt-out while a batch is pending. Telemetry failure cannot fail or delay chat, pairing or approval behavior.
  • Unconfigured development/test/Simulator and web-preview builds send nothing. Deliberate QA mode is tagged and excluded from production analysis. A new native dependency/configuration requires new development builds; do not claim Metro-only verification.
  • Record the mobile extension to Host-only telemetry in an ADR and integrate glossary/living architecture, first-use notice and public privacy descriptions in supported languages. Coordinate with the existing website owner for a required privacy-page update. Verify the effective project IP-discard setting before production enablement; do not claim the proxy carries no IP.
  • Reuse Host-client and Conversation test seams with injected time, identity store and sender. Assert ordered sequences for failures, retries, remounts and stream replay. Sentinel secrets in route, QR, credential, message, filename and raw error inputs never reach serialized payloads, persisted queue or diagnostics.
  • Through the shared-device QA process, prove this path separately on physical iOS and Android with an isolated real Host. Read back tagged events in the existing PostHog project; record expected/observed sequence, delay, loss and deduplication limits. Inspect opt-out behavior on device. Record missing gates as unrun.
  • Deliver a focused activation/connection analysis definition and tagged QA readback. Use source=mobile, correct platform/build/environment and project timezone. Count opted-in anonymous installations; distinguish new pairing from returning paired installs. No union of Host and mobile message totals, no estimates for non-consenting Humans.
  • Record Human QA acceptance of the first working slice before releasing dependent work. Keep automated, native-device, PostHog and Human evidence separate; green CI/merge alone does not satisfy this gate.

Blocked by

None — can start immediately after the ticket is approved/published and an implementation agent follows the normal claim protocol. Broad mobile specs and the Beta rollout hub are references, not closure prerequisites.

Not included

Push-specific and permission-result events belong to slices 2/3. P1 chat summaries, page/feature events, raw exceptions, release automation and public rollout are excluded. Existing camera permissions continue to function; their telemetry is added in #1936.

Activity

  1. added this to the v2.0 milestone on Oct 15, 2026
  2. DoodleBears commented on Oct 15, 2026

    @DoodleBears
    ContributorAuthor

    Agent work claim

  3. added
    agent:activeOne or more coding-agent tasks currently claim this issue; see claim comments for task IDs
    on Oct 15, 2026
  4. DoodleBears commented on Oct 15, 2026

    @DoodleBears
    ContributorAuthor

    Agent work continuation

    • Agent: Codex
    • Task: codex/local/01a14132-1883-78f2-8887-c2dabf6d8c38 (not a DSH Session)
    • Supersedes the active work claim from codex/local/01a14109-8490-7dc2-a32e-2fbb0a39d4c8 at the Human's explicit request to continue that interrupted chat. The prior chat failed on an unsupported-capability error; its committed work is preserved.
    • Issue scope: Mobile telemetry 1: opt in, pair a Host and observe first native chat activation #1935 only; finish review, checks, PR and shared-device QA handoff. No dependent slice, merge, production enablement or release.
    • Branch: codex/1935-mobile-telemetry
    • Preserved starting head: e2da4aaf3b31606740ac452f96459697f0a5169f
    • State: active
  5. DoodleBears commented on Oct 15, 2026

    @DoodleBears
    ContributorAuthor

    Agent work outcome

    • Task: codex/local/01a14132-1883-78f2-8887-c2dabf6d8c38; supersedes the interrupted prior task claim.
    • State: paused for shared-device/Human QA. Implementation of the Human's three UI changes and Web-reference clarification is complete; no missing terms input remains.
    • Draft PR: feat(mobile): add default-on anonymous statistics with optional controls #1944; branch codex/1935-mobile-telemetry; exact head e3a9798a0d8c3e5ac5b72d9fa63216ae6142b8a9.
    • New installs default on; saved opt-outs remain off; details collapse; sole switch is at the bottom of Settings. First enabled use shows the Web-style informational notice with Privacy/source/Open Settings/Got it, with persisted dismissal. Collection does not wait for acknowledgement. Pairing has no statistics switch. Unreadable preferences and failed saves fail closed.
    • Local evidence: 420 mobile tests passed / 8 skipped; typecheck, lint, format, release-ledger checks and iOS/Android/Web JS exports passed. Both reviews rechecked fixes. Local full-suite run became stale during revisions and was stopped; local docs-surface check timed out twice. Current-head CI remains running, separate from local checks. No native-runtime/ingestion pass claimed.
    • Reviewer explanation; all 30 PR images verified GitHub-rendered. Pair/settings Web preview lacks native storage and shows fail-closed state; notice images render the actual component in a forced-visible fixture. These prove layout only.
    • Next native-build batch queue updated to this exact head. Expo Device/Application require a new client build. Verify native first-use/restart, sheet dismissal → Settings, opt-out, physical iOS/Android and tagged PostHog readback. Website mobile privacy copy publication remains with Site named events (install copy, GitHub/Discord, video, market…) #950's existing owner: Site named events (install copy, GitHub/Discord, video, market…) #950 (comment).
    • No merge, deployment, production configuration or dependent Mobile telemetry 2: measure permission and push-registration outcomes #1936/Mobile telemetry 3: follow a notification to Host-confirmed request resolution #1937 work. Worktree clean and committed source preserved. The prior claim is superseded; this task releases active implementation ownership for QA.
  6. removed
    agent:activeOne or more coding-agent tasks currently claim this issue; see claim comments for task IDs
    on Oct 15, 2026
  7. DoodleBears commented on Oct 15, 2026

    @DoodleBears
    ContributorAuthor

    Agent work resumed

    Task codex/local/01a14132-1883-78f2-8887-c2dabf6d8c38 resumes #1935 on the Human's instruction to reference the Web client. Verified Web behavior is default-on telemetry with a once-per-client informational notice, privacy/source/settings links and a “Got it” dismissal; it is not a pre-collection terms acceptance gate. Implement the corresponding mobile notice and correct the earlier assumption in review documents. Preserve the bottom Settings switch and collapsed details. Branch codex/1935-mobile-telemetry, starting head bd6cc7c66fff03a50888ee9bb45f30270d534e35. No production enablement, merge, release or dependent slice work.

  8. added
    agent:activeOne or more coding-agent tasks currently claim this issue; see claim comments for task IDs
    on Oct 15, 2026
  9. removed
    agent:activeOne or more coding-agent tasks currently claim this issue; see claim comments for task IDs
    on Oct 15, 2026
  10. DoodleBears commented on Oct 16, 2026

    @DoodleBears
    ContributorAuthor

    Agent work resumed — native statistics switch follow-up

  11. added
    agent:activeOne or more coding-agent tasks currently claim this issue; see claim comments for task IDs
    on Oct 16, 2026
  12. DoodleBears commented on Oct 16, 2026

    @DoodleBears
    ContributorAuthor

    Batch 9 native results — English acceptance passed, no merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent:activeOne or more coding-agent tasks currently claim this issue; see claim comments for task IDsarea:frontendClient-side implementationfeature:telemetryContent-free event measurement and verified ingestionready-for-agentFully specified, ready for an AFK agentscope:tracerHuman-testable implementation slice

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions