Repository navigation
fix(shell): count the read when the iOS app sends it to the browser - #7541
Merged
Merged
Conversation
With "Open links in: In your browser" on, the iOS wrapper hands every outside link to the system browser, including a feed card's Read link (api.daily.dev/r/<id>). Safari does not share the app's session, so the redirect could not tell who was reading and the read never reached the member's history or streak. The in-app path counts it on the post page. When the link going out is a post redirect, send viewPost from the app first. The API dedupes views per post, so a redirect that does know the reader counts once.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
Changes
api.daily.dev/r/<id>) goes straight to Safari. Safari doesn't have the app's session, so the redirect couldn't tell who was reading, and the read never reached the member's history or reading streak. Reported in #user-feedback: "Read More no longer counts toward reading streak on iOS".useInAppLinks: when the link it hands to the system browser is a post redirect, it sendsviewPostfrom the app first, throughuseViewPost, so the streak refetch and the optimistic bump work as usual. Only for logged-in users.readingStore:getRedirectPostIdreads the post id from a link on the API host with a/r/<id>path.Events
No new events.
Experiment
No experiment.
Manual Testing
useInAppLinks.spec.tsx: two new cases (logged in counts the read, logged out doesn't). The logged-in case fails without the fix.pnpm --filter webapp typecheck, the strict check on changed files, oxlint and oxfmt are clean.Preview domain
https://fix-ios-browser-read-streak.preview.app.daily.dev