A sale in the Plus gate sheet lands on the welcome, which returns to the lock - #598
Merged
Merged
Conversation
…ns to the lock The sheet every in-app lock raises sold directly and stayed open after a purchase, showing its outcome line, so a learner who bought from a lock never saw the celebration the intro's offer already lands on. A buy that reaches `owned` now closes the sheet and opens the welcome once; a restore closes it in place, with no celebration. The buy/restore split the paywall screen kept privately moves to `PurchaseExit`, which both surfaces share, so they cannot draw the line differently. The welcome's return destination is a parameter on its own URL: the gate passes the location the lock was raised on, the intro's offer passes nothing and keeps going to Learn. Only an in-app location is taken from the URL. Closes #576
`GoRouter.of` threw in eleven existing tests that pump one gated screen on its own — the dictionary entry, the flashcard deck, the vocab drill and Today's card all open the sheet without the app's router over them. The lookup is now `maybeOf`: a sheet raised outside the router still sells and closes, and has nowhere to celebrate, which is the only thing missing there. Also from review: `PurchaseExit` gets the unit tests it was missing, the three copies of the bounded pump loop become `pumpWithoutSettling` in the shared harness, and two doc comments drop the argument that belongs in #576.
45 tasks
23 tasks
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.
Why
A purchase made in the Plus gate sheet stayed on the sheet, so a learner who
bought from a lock never saw the celebration every paywall sale lands on.
Closes #576.
Watch for
raised on, per the issue's the gate passes the raising screen. Buying at a
locked Path row therefore returns to the Path with that row open — not into
the lesson.
?from=), not inextra, because go_router rebuilds a top-level route from its locationalone. Only a location starting with a single
/is taken; anything elsefalls back to Learn.
GoRouter.maybeOf, notof. Eleven existing tests pump one gatedscreen with no router over it. A sheet raised outside the router sells and
closes and has nowhere to celebrate, which is the only thing missing there.
rather than naming Learn explicitly as the issue's interface sketch does.
Same behaviour, one less redundant query parameter.
Not here
Nothing deferred.
Checks
Driven on the iPhone 16 Pro simulator against the real app and router: locked
Path row → gate sheet → buy → welcome → Back to learning → the Path row, open.
Screenshot reviewed and discarded.