[TV] Actively poll API in create account flow - #5784
Conversation
|
Claude finished @sztomek's task in 5m 49s —— View job Review: TV create account via device auth
The change itself is well-shaped: reusing Five things worth acting on, posted as inline comments:
1. Orphaned translations → possible lint failureYou removed 2. The follow modal is the riskier attribution surfaceThe PR description frames the screen-attribution imprecision as create-screen-only, but 3.
|
|
Claude finished @sztomek's task in 7m 53s —— View job Review: TV create account via device auth
Re-reviewed on ready for review, against First, a correction. In my earlier pass I claimed dropping the two strings from the default locale could newly fail New this round
The one I'd actually act on is #1. Flipping Two smaller new observations, neither blocking:
Still open from the earlier passUnchanged in
One thing worth noting since it isn't obvious: Verification caveatGradle is not runnable in this environment — |
9c743d2 to
1fb257a
Compare
2d7084b to
578a1ab
Compare
|
Claude finished @sztomek's task in 1m 40s —— View job Review: TV create account via device auth (incremental)Reviewed only One consequence worth noting rather than fixing: Non-blocking (still open, unchanged)
Nits
I did not run Gradle — |
Description
Brings the Android TV Create Account screen to iOS tvOS parity. Previously it was a degraded two-step flow: a static
/createweb QR, a "come back and sign in" message, and a Sign in button that dumped you into the separate device-auth screen. Now it runs the device-auth pairing flow directly (the same one the Sign In screen uses) and auto-advances to Syncing on success — one shot, no manual hand-off.It also lands the deferred
user_account_createdanalytics event (the last of the three events split out of #5773).How it works
deviceAuthFlow(syncManager, isNewAccount = true)and renders Loading / Ready (QR + steps + code digits) / Error / Complete, mirroringTvSignInScreen, with create-framed copy ("Create your free account" + "Create your account or log in"). OnCompleteit navigates to SYNCING.loginWithDeviceAuthgained an explicitisNewAccount: Boolean(no default), plumbed intoAuthResultModel(was hardcodedfalse;DeviceTokenResponsehas noisNewfield). The create screen passestrue, so the existingtrackSignInfiresuser_account_created (source = qr_code)instead ofuser_signed_in. This is screen-attributed, exactly like iOS (both tvOS screens use the same pairing session and attribute the event by which screen you're on).create_account_shownstill fires.TvPodcastDetailsViewModel) passesisNewAccount = false. It's a mixed create/login surface — its own copy says "Create your account or log in", and existing users following a podcast are a normal path — so attributing every follow as a creation would inflateuser_account_created. It emitsuser_signed_ininstead, deliberately undercounting creations rather than inflating them.flowon the created event:user_account_createdis emitted throughtrackSignIn, which hardcodesflow = unknown(platform-wide — password signup viatrackRegisterdoes the same). So althoughcreate_account_showncarriesflow = initial_onboarding, the paireduser_account_createdlands withflow = unknown, and the two can't be joined onflow. Left as-is here to avoid changing shared mobile sign-in behavior.QR parity note
The create QR is the device-auth pairing URL (
pocketcasts.net/pairon debug/staging,.comon release) — the same QR the Sign In screen shows. Verified against iOS: bothCreateAccountViewandSignInViewencodepairing.pairURLComplete(the server'sverificationUriComplete); the screens differ only in copy. The old distinct static/createQR was the non-parity bit removed here.Caveat (iOS-parity imprecision)
Because the server's device-token response carries no is-new-account signal,
user_account_createdis attributed by screen — a user who signs into an existing account from the dedicated create screen is still counted as a creation (iOS has the identical behavior). The follow-podcast modal, being a mixed create/login surface, deliberately attributes as sign-in instead. The paired Sync-onboarding-notification write is benign: that notification only schedules for signed-out users, so it's suppressed post-sign-in regardless.Stacking
#5773 (
feat/tv-onboarding-analytics), which providedcreate_account_shownand theqr_codeLoginIdentity, has now merged. This branch is rebased ontomainand contains only the device-auth create-account commits.Testing Instructions
pocketcasts.net/pairand enter the code) on your phone; create a new account (or log in) and confirm the code.create_account_shownon appear; on successuser_account_created (qr_code)(vsuser_signed_in (qr_code)from the Sign In screen).Screenshots or Screencast
Checklist
./gradlew spotlessApply)modules/services/localization/src/main/res/values/strings.xmluser_account_created/create_account_shownalready exist in the schema; no new events added.)I have tested any UI changes...