feat: onLogin hook, saved-locale application and five form components - #167
Conversation
…rm components MagicStarterManager.onLogin runs after a fresh sign-in (AuthLogin: password, two-factor, social, guest, OTP), unawaited and logged on failure; it does not run on a restore. The signed-in user's saved locale is applied on sign-in and on restore through MagicStarter.manager.applyLocale, one scheduling point with a pending and an in-flight target, so a profile save and the restore listener switch once and a target that changes mid-load wins. Gated by magic_starter.localization.apply_user_locale (default true). New components: MSFormActions, MSSwitchRow, MSHeaderAction, MSKeyValueEditor (with MSKeyValueRow) and MSStringValueList. Every visible string is a parameter. Uses only magic API available on master. No version bump.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
Note Kodizm (AI-generated). May contain mistakes; verify before acting. Looks correct and ready to merge. I found one narrow gap in the locale scheduler that can leave a stale pending target behind. Minor
The stuck TestsThere are tests for:
Not covered: the in-flight sequence where the target is reverted and then restored. CI
Other notes:
|
|
@kodizm review. Minor fixed: a pending target equal to the code just applied is now cleared after the switch settles, so a tr, en, tr sequence during a load leaves nothing stale behind (new test, red first). |
|
Note Kodizm (AI-generated). May contain mistakes; verify before acting. The fix is correct and the PR still looks ready to merge. The earlier Minor finding is resolved, and I found nothing new. Since the last review: there is one new commit ( What the change does, at
I checked the failure path too. If TestsThe new test is
CI
I read only the new commit this round. The rest of the PR is as covered in my earlier review. |
feat: add an onLogin hook, apply the user's saved locale, and five form components
MagicStarterManager.onLogin runs after a fresh sign-in (AuthLogin: password,
two-factor, social, guest, OTP), unawaited and logged on failure; it does not
run on a restore. The signed-in user's saved locale is applied on sign-in and
on restore through MagicStarter.manager.applyLocale, one scheduling point with
a pending and an in-flight target, so a profile save and the restore listener
switch once and a target that changes mid-load wins. Gated by
magic_starter.localization.apply_user_locale (default true).
New components: MSFormActions, MSSwitchRow, MSHeaderAction, MSKeyValueEditor
(with MSKeyValueRow) and MSStringValueList. Every visible string is a
parameter. Uses only magic API available on master.
No version bump.
Part of the "framework-level support" round (plan 2 of 3): code that uptizm carried because a plugin lacked a seam moves into the owning package. Companion PRs: fluttersdk/magic, fluttersdk/magic_starter, fluttersdk/magic_notifications, fluttersdk/magic_deeplink, fluttersdk/wind, fluttersdk/magic_sentry, and the uptizm adoption.
This PR compiles and tests against its siblings' current default branches; nothing here depends on another PR in the round being merged first. No version bump and no publish.