Skip to content

[PC TV] Fix sign-in URL generation#4577

Open
SergioEstevao wants to merge 2 commits into
trunkfrom
sergio/pc-tv/fix_sign_in_url_generation
Open

[PC TV] Fix sign-in URL generation#4577
SergioEstevao wants to merge 2 commits into
trunkfrom
sergio/pc-tv/fix_sign_in_url_generation

Conversation

@SergioEstevao

Copy link
Copy Markdown
Contributor

Fixes the Pocket Casts TV sign-in QR/URL generation so the on-screen prompt and QR code only appear once the final pairing URL has been resolved.

Previously SignInView fell back to a placeholder URL (ServerConstants.Urls.tvPair) via pairURLString while the real pairing URL was still being fetched, which could show the user a code/URL that wasn't yet valid. This PR removes that fallback and gates rendering on pairURLComplete:

  • Removed the pairURLString fallback helper from PairingSession.
  • SignInView now only renders the QR code, separator, prompt, and digits once pairURLComplete is available.
  • Added an easeInOut animation when switching login modes so the content area transitions smoothly.
  • Simplified enterCodePrompt into a function taking the resolved URL, removing a redundant double-unwrap at the call site.

To test

  1. Launch the Pocket Casts TV app.
  2. Go to the sign-in screen with the QR option selected.
  3. Confirm the QR code, URL prompt, and pairing digits only appear once the final pairing URL is ready (no flash of a placeholder URL/code).
  4. Switch between QR and manual login modes and confirm the transition animates smoothly without the logo/title/picker shifting.

Checklist

  • I have considered if this change warrants user-facing release notes and have added them to CHANGELOG.md if necessary.
  • I have considered adding unit tests for my changes.
  • I have updated (or requested that someone edit) the Event Horizon schema to reflect any new or changed analytics.

@dangermattic

dangermattic commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator
1 Warning
⚠️ View files have been modified, but no screenshot or video is included in the pull request. Consider adding some for clarity.

Generated by 🚫 Danger

@SergioEstevao SergioEstevao added this to the Future milestone Jun 19, 2026
@SergioEstevao SergioEstevao marked this pull request as ready for review June 19, 2026 15:16
@SergioEstevao SergioEstevao requested a review from a team as a code owner June 19, 2026 15:16
@SergioEstevao SergioEstevao requested review from Copilot and kean and removed request for a team June 19, 2026 15:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes Pocket Casts TV sign-in pairing UX by preventing the QR code / URL prompt from rendering until the final, resolved pairing URL is available, avoiding any brief display of a placeholder pairing URL.

Changes:

  • Removed the pairURLString fallback from PairingSession to eliminate placeholder URL usage during loading.
  • Updated SignInView to gate QR/prompt/digits rendering on pairURLComplete and refactored enterCodePrompt to accept the resolved URL.
  • Added an easeInOut animation when switching between QR and manual login modes.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
Pocket Casts TV App/UI/Auth/SignInView.swift Gates QR/prompt/digits on resolved pairing URL; refactors prompt generation; animates login-mode switching.
Pocket Casts TV App/UI/Auth/PairingSession.swift Removes placeholder URL fallback helper to prevent invalid/early URL display.

Comment on lines +73 to +80
if let urlComplete = model.pairing.pairURLComplete {
QRCodeView(url: urlComplete)
separator
Text(enterCodePrompt(url: urlComplete))
.font(.headline)
.foregroundStyle(Color.pcTextSecondary)
qrCodeDigits
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants