[PC TV] Fix sign-in URL generation#4577
Open
SergioEstevao wants to merge 2 commits into
Open
Conversation
Collaborator
Generated by 🚫 Danger |
Contributor
There was a problem hiding this comment.
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
pairURLStringfallback fromPairingSessionto eliminate placeholder URL usage during loading. - Updated
SignInViewto gate QR/prompt/digits rendering onpairURLCompleteand refactoredenterCodePromptto accept the resolved URL. - Added an
easeInOutanimation 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 | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
SignInViewfell back to a placeholder URL (ServerConstants.Urls.tvPair) viapairURLStringwhile 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 onpairURLComplete:pairURLStringfallback helper fromPairingSession.SignInViewnow only renders the QR code, separator, prompt, and digits oncepairURLCompleteis available.easeInOutanimation when switching login modes so the content area transitions smoothly.enterCodePromptinto a function taking the resolved URL, removing a redundant double-unwrap at the call site.To test
Checklist
CHANGELOG.mdif necessary.