feat(onboarding): the learner says what to call them, and Profile greets by it (#245) - #297
Merged
Merged
Conversation
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.
Closes #245 — the last user story it left open. One of the two loose ends I flagged turned out not to exist; the honest finding is below.
The greeting (story 6)
Profile said
Hello there.because nothing in the app stored a name. Onboarding now has an optional third step that asks for one, and the header greetsHello, Maya.where it was given andHello, there.where it was skipped — the design's exact sentence and its exact fallback (prototype/screens.jsx:668).learnerNameis nullable, schema v9. Purely additive; existing devices arrive with "no name given", which is true for them and is what the greeting already handles. Column added by name, so the migration trap fixed in fix(storage): the v7 step drops two columns by name, not by rebuilding (#273) #287 stayed fixed — this is the first newuser_settingscolumn since, and it needed no edit to any older step.learnerNameProvider, so toggling haptics doesn't rebuild the header.The route-tier guard — I was wrong
I reported that the tier table wasn't checked for exhaustiveness. It already is, in
test/unit/app_routes_test.dart, which walks the realGoRouterconfiguration (nested routes and shell branches included) and asserts both directions — every registered route has a tier, and the table names no route the router has dropped. I had looked only inheader_tier_test.dartand drew the wrong conclusion.I first added an
AppRoutes.allcatalogue and a second exhaustiveness test, then reverted both: the existing guard is strictly stronger, and a hand-maintained list is exactly the thing that goes stale. The new route is simply filed in the table that already exists — and that guard is what caught it, failing withActual: Set:['onboardingName']before I did.A third thing, which the schema bump forced
#245 named the
testWithDataIntegritycases that hardcode the current version as "a smaller instance of the same shape". Bumping to v9 broke all four, exactly as predicted. Rather than retarget them to9, they now read the newest dumped schema (GeneratedHelper.versions.last) and build the target withdatabaseForVersion, so the next bump edits nothing here. A new first test assertsAppDatabase.schemaVersionand the newest file indrift_schemas/agree, which catches a bump without a dump — and says so in its failure.Tests
tabHeaderFor.NameController: trimming, skip-vs-empty, re-entry, typing ignored mid-flight.NameScreen: Skip↔Continue, a typed name reachingcomplete(), skipping carrying null, the optional copy.