Skip to content

Let state machine handle password changes from web channel#7379

Merged
skhamis merged 4 commits into
mozilla:mainfrom
skhamis:fix-fenix-pw-notif
May 28, 2026
Merged

Let state machine handle password changes from web channel#7379
skhamis merged 4 commits into
mozilla:mainfrom
skhamis:fix-fenix-pw-notif

Conversation

@skhamis
Copy link
Copy Markdown
Contributor

@skhamis skhamis commented May 19, 2026

When I was adding password change notification in Fenix via: https://phabricator.services.mozilla.com/D301414

I noticed in app-services we were potentially dropping push events on transient errors. The old version used ? on the introspect call, so I think any network/server issues propagated as Err out of handle_push_message. The Kotlin side's handleFxaExceptions would log it and ignore. So no event reached the FSM, no UI change leading to -> https://bugzilla.mozilla.org/show_bug.cgi?id=1915765

So we should lean into the state machine and let it be the source of truth imo. The state machine can decide whether the token is valid/retry/etc instead of push.

Pull Request checklist

  • Breaking changes: This PR follows our breaking change policy
    • This PR follows the breaking change policy:
      • This PR has no breaking API changes, or
      • There are corresponding PRs for our consumer applications that resolve the breaking changes and have been approved
  • Quality: This PR builds and tests run cleanly
    • Note:
      • For changes that need extra cross-platform testing, consider adding [ci full] to the PR title.
      • If this pull request includes a breaking change, consider cutting a new release after merging.
  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Changelog: This PR includes a changelog entry in CHANGELOG.md or an explanation of why it does not need one
    • Any breaking changes to Swift or Kotlin binding APIs are noted explicitly
  • Dependencies: This PR follows our dependency management guidelines
    • Any new dependencies are accompanied by a summary of the due diligence applied in selecting them.

@skhamis skhamis requested review from bendk and mhammond May 19, 2026 21:55
Comment thread components/fxa-client/src/state_machine/transitions.rs Outdated
Copy link
Copy Markdown
Member

@mhammond mhammond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this lgtm, thanks - am a little concerned about iOS now re-registering twice though?

Comment thread components/fxa-client/src/state_machine/transitions.rs Outdated
Comment thread components/fxa-client/src/state_machine/transitions.rs Outdated
Comment thread components/fxa-client/src/state_machine/transitions.rs Outdated
Comment thread components/fxa-client/src/auth.rs Outdated
@mhammond
Copy link
Copy Markdown
Member

forgot to say: shouldn't "handle login" also be an event in this world?

@skhamis skhamis added this pull request to the merge queue May 28, 2026
Merged via the queue into mozilla:main with commit 577c1e0 May 28, 2026
14 checks passed
@skhamis skhamis deleted the fix-fenix-pw-notif branch May 28, 2026 00:51
@skhamis skhamis changed the title Let state machine handle CheckAuthorizationStatus Let state machine handle password changes frmo web channel May 28, 2026
@skhamis skhamis changed the title Let state machine handle password changes frmo web channel Let state machine handle password changes from web channel May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants