Skip to content

Mobile telemetry 3: follow a notification to Host-confirmed request resolution #1937

Open

Description

@DoodleBears

Parent

Spec #1929. Native parent: #1934.

What to build

Opening an actionable phone notification can be followed through the intended Host and usable destination to the Host's actual decision result. A notification approval button is measured even when no approval page opens. The same request-result event covers native DM, Group and Activity entry paths, preserving their real accepted/already-decided/expired/failed outcomes.

Acceptance criteria

  • Reuse Mobile telemetry 1: opt in, pair a Host and observe first native chat activation #1935's owner and existing native notification/routing/Requests seams. Emit mobile_notification_opened, mobile_notification_target_result and mobile_request_result with the exact Spec: Expo mobile PostHog analytics — pairing, activation and notification outcomes #1929 enum contracts and source=mobile.
  • Deduplicate cold-start notification responses and live callbacks, including remount/restart replay. Generate a random analytics flow ID; use notification/Host/Channel/message IDs only locally for routing/deduplication, never in the analytics payload or hashed into one.
  • target_result=ready requires the intended Host and target data to be usable. Router navigation, socket open and cached screens alone are insufficient. Classify missing Host, refused device, unreachable Host, unavailable and expired target without collecting route URLs or error text.
  • Define a bounded target-observation deadline and emit a single unreachable/unavailable terminal result as appropriate; do not leave a permanent analytics listener or change product retry behavior. Background/process termination remains censored when no terminal outcome can be observed. Keep listeners scoped to the flow and ignore stale responses after a Host switch.
  • Approval and question results come from their existing owning Host methods. accepted means that the Host accepted the Human decision, including rejection; already_decided and expired are not success. An ambiguous transport failure is not silently converted into accepted.
  • Direct notification buttons approve/reject/always use the same result instrumentation as native cards and produce one result, including route fallback and stale request races. Their flow does not require a target-view-ready event before a decision, since no page may be opened.
  • Native request actions from DM, Group and Activity are included through the shared Requests owner, without duplicate events in each UI caller. For tap-to-card flows, carry the local random flow context through to the subsequent request result; unrelated later actions do not inherit it.
  • No tool name/input, question text, answer, permission rule, private input, notification text or any domain identifier leaves the App. Private-input notifications may record routing/fallback only; no secret-form submission/result analytics.
  • Extend existing push, notification action, Request and Inbox tests for cold/warm starts, wrong/missing Host, revocation, unreachable routes, already-handled/expired requests and repeated listeners. Assert complete ordered sequences and serialized privacy invariants, not merely mock calls at click handlers.
  • Separately prove physical iOS and Android tap-to-card and direct-button paths against a real isolated Host, using the shared device queue. Read back the tagged sequence and verify accepted versus stale/failed outcomes in PostHog. Never claim success from button rendering or HTTP send alone.
  • Provide two focused analysis definitions: actionable notification tap → ready target → accepted request; and direct notification action → request result. Filter source/platform/build/environment, report denominator and censored flows, and do not call either an OS delivery/open rate.
  • Preserve consent/opt-out and bounded telemetry behavior. Record automated, physical-device, PostHog and Human QA evidence independently.

Blocked by

#1936 is not a blocker: real push registration and notifications already exist. Its new registration analytics is useful context but is not necessary to instrument a notification response or Host decision. Shared-device QA is queued, not represented as a false code dependency.

Not included

P1 Full Client usage events, arbitrary screen navigation, private-input analytics, OS delivery receipts, production receiver changes, Beta/store publication or telemetry rollout.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: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