Skip to content

Fix infinite loading page after unlinking secondary login from email - #97803

Merged
pecanoro merged 8 commits into
Expensify:mainfrom
ahmdshrif:sherif/issue-96073-proposal-71631c
Aug 17, 2026
Merged

Fix infinite loading page after unlinking secondary login from email#97803
pecanoro merged 8 commits into
Expensify:mainfrom
ahmdshrif:sherif/issue-96073-proposal-71631c

Conversation

@ahmdshrif

@ahmdshrif ahmdshrif commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Explanation of Change

Fixes the infinite loading spinner reported when clicking the unlink validation link from a secondary-login email in a fresh browser tab. Two independent gaps caused this:

  1. UnlinkLoginPage exits via a bare Navigation.goBack(). A tab opened from the unlink email has UNLINK_LOGIN as the only route in the public stack, so canGoBack() is false and goBack() no-ops forever, leaving the spinner stuck. Fixed by resetting the stack to TAB_NAVIGATOR when there's nothing to pop back to — the same pattern ValidateLoginPage already uses for this exact situation, including its stale-callback cleanup guard.
  2. BaseLoginForm's mount effect unconditionally calls clearAccountMessages(), which wiped the "Secondary login successfully unlinked!" message before it could render. Fixed by scoping the skip to that one specific message value, leaving every other mount's cleanup unchanged.

The failure path needs no client-side change: credentials.login is left untouched, so isUnvalidatedSecondaryLogin stays true and the user lands on UnlinkLoginForm, which already renders the backend's account.errors (delivered via response onyxData) and has no mount-time clear.

Fixed Issues

$ #96073
PROPOSAL: #96073 (comment)

Tests

  1. Go to Settings → Profile, add a secondary email (don't verify it)
  2. Log in with the secondary email and click Unlink
  3. Failure case first: copy the Unlink Validation link from the email, tamper with the validate code (e.g. change the last few digits), and open that link in a new tab of the same browser you signed in with
  4. Verify the tab lands on the sign-in page (not an infinite spinner) and shows the unlink error on UnlinkLoginForm, with the resend/unlink affordance intact
  5. Then the success case: open the real (untampered) Unlink Validation link in a new tab of the same browser
  6. Verify the tab lands on the sign-in page (not an infinite spinner) showing "Secondary login successfully unlinked!"
  7. Verify a native/pushed-stack deep link (canGoBack() true) still exits via the original goBack() path, unchanged

Note

Two constraints, both because the failure case needs credentials.login still cached in order to render its error:

  • Test the failure case before the success case. A successful unlink clears credentials.login via successData, which makes shouldShowLoginForm true — so a later failed attempt lands on BaseLoginForm instead of UnlinkLoginForm, and the backend error has no surface to render on.
  • Use a new tab of the same browser, not incognito or a different browser. A new tab shares Onyx (so credentials.login is present) while still starting with an empty navigation stack — the empty stack is what reproduces the original spinner. Incognito gives the empty stack but loses the credential.
  • Verify that no errors appear in the JS console

Offline tests

This flow requires a live network round-trip to the unlink API to reach either terminal state (success or failure). I put an Android emulator into airplane mode and opened the unlink deep link: unlinkLogin's optimistic write sets isLoading: true and the request queues (standard Onyx offline-first behavior), so neither Navigation.goBack() nor the new stack-reset fires until the request actually settles — isLoading never flips to false while offline. That's unchanged from before this PR; nothing in this fix is offline-specific.

(Note: with the dev-debug build fully offline, Metro itself becomes unreachable and the JS bundle can't load at all — an artifact of the local dev harness, not the app or this fix, since a release build ships its bundle embedded.)

QA Steps

  1. Go to Settings → Profile, add a secondary email (don't verify it)
  2. Log in with the secondary email and click Unlink
  3. Failure case first: copy the Unlink Validation link from the email, tamper with the validate code (e.g. change the last few digits), and open that link in a new tab of the same browser you signed in with
  4. Verify the tab lands on the sign-in page instead of an infinite spinner, and shows an unlink error (not a blank/hung page)
  5. Then the success case: open the real (untampered) Unlink Validation link in a new tab of the same browser
  6. Verify the tab lands on the sign-in page instead of an infinite spinner, and shows "Secondary login successfully unlinked!"

Note

Two ordering/setup constraints, both for the same reason — the failure case needs the cached secondary-login credential in order to render its error:

  • Test the failure case before the success case. A successful unlink clears the cached secondary login, so a failed attempt afterwards no longer has the unlink form to render its error on.
  • Use a new tab of the same browser, not incognito or a different browser. A new tab shares the session's stored credentials while still starting with an empty navigation stack (which is what reproduces the original spinner); incognito loses the credential.
  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.

(No new CSS styles or assets were added or modified in this PR.)

  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

(This PR does not modify any UI — no new buttons, components, spacing/padding changes, or form-input styles; it only wires an existing message-rendering path to a new trigger.)

Screenshots/Videos

Android: Native

unLink is not open on native

Android: mWeb Chrome Screenshot 2026-08-04 at 6 02 40 PM
iOS: Native

unLink is not open on native

iOS: mWeb Safari Simulator Screenshot - iPhone 16 Pro - 2026-08-04 at 15 26 27
MacOS: Chrome / Safari Screenshot 2026-08-04 at 3 24 33 PM

UNLINK_LOGIN is a standalone public screen with no route beneath it, so
a tab opened directly from the unlink email has an empty nav stack and
UnlinkLoginPage's bare Navigation.goBack() no-ops forever, leaving the
spinner stuck. Reset the stack to TAB_NAVIGATOR when there's nothing to
pop, matching the pattern ValidateLoginPage already uses for this.

Two more gaps kept the result invisible even once navigation worked:
BaseLoginForm's mount effect cleared account.message before the success
text could render, and unlinkLogin's failureData never wrote an error at
all, so a failed unlink showed nothing on UnlinkLoginForm either.
Covers UnlinkLoginPage's stack reset on a fresh tab (and the stale-
callback guard), BaseLoginForm's scoped clearAccountMessages skip for
the unlink success message (with a control case for ordinary stale
messages), and unlinkLogin's failureData now setting account.errors
without touching credentials.login.
…translated text

Without it translateLocal falls back to the raw key, since this action
test doesn't render a LocaleContextProvider to load translations.
@melvin-bot

melvin-bot Bot commented Aug 4, 2026

Copy link
Copy Markdown

Hey, I noticed you changed src/languages/en.ts in a PR from a fork. For security reasons, translations are not generated automatically for PRs from forks.

If you want to automatically generate translations for other locales, an Expensify employee will have to:

  1. Look at the code and make sure there are no malicious changes.
  2. Run the Generate static translations GitHub workflow. If you have write access and the K2 extension, you can simply click: [this button]

Alternatively, if you are an external contributor, you can run the translation script locally with your own OpenAI API key. To learn more, try running:

npx ts-node ./scripts/generateTranslations.ts --help

Typically, you'd want to translate only what you changed by running npx ts-node ./scripts/generateTranslations.ts --compare-ref main

…oposal-71631c

# Conflicts:
#	tests/actions/SessionTest.ts
@ahmdshrif

Copy link
Copy Markdown
Contributor Author

Translations were added manually in this PR — unlinkLoginForm.unlinkError is already present in all 10 locale files (en, es, de, nl, it, fr, ja, pl, zh-hans, pt-BR), so no automated generation is needed here.

- Reposition the naming-convention eslint-disable in BaseLoginForm.tsx:
  the merge's formatter reflowed the object literal and left the
  directive covering the wrong line, making it both unused and
  ineffective at once.
- Replace an unsafe HttpUtils.xhr cast in the new unlinkLogin test with
  jest.mocked(), which pushed the file's grandfathered
  no-unsafe-type-assertion count from 12 to 13.
- Drop an unused navigationRef import in UnlinkLoginPageTest.tsx.
- Add unlinkLoginForm.unlinkError to el.ts, a new locale file main added
  after this branch's translations were written.
- Simplify the canGoBack mock to a zero-arg call — spreading unknown[]
  into a function TypeScript infers as zero-arg doesn't type-check.
@ahmdshrif
ahmdshrif marked this pull request as ready for review August 4, 2026 16:53
@ahmdshrif
ahmdshrif requested review from a team as code owners August 4, 2026 16:53
@melvin-bot
melvin-bot Bot requested review from Pujan92 and trjExpensify August 4, 2026 16:54
@melvin-bot

melvin-bot Bot commented Aug 4, 2026

Copy link
Copy Markdown

@Pujan92 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6268342b1e

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/pages/signin/LoginForm/BaseLoginForm.tsx
Comment thread src/pages/signin/LoginForm/BaseLoginForm.tsx
…ge check

When an expired/invalid unlink link is opened in a browser that never
cached credentials.login for the flow (e.g. a different browser or
profile than the one that requested the unlink), shouldShowLoginForm
selects BaseLoginForm instead of UnlinkLoginForm. Its mount effect only
exempted the success message from clearAccountMessages(), so the
freshly-written unlink error was wiped before it could render, leaving
a blank sign-in form.

Extend the guard to also preserve that specific error by value, the
same way the success message is matched — not by testing account.errors
generally, which would strand unrelated stale errors on the page.

Also extract the repeated 'unlinkLoginForm.successfullyUnlinkedLogin'
literal (BaseLoginForm's accountMessage memo, its mount guard, and
UnlinkLoginForm's message check) into a single isUnlinkLoginSuccessMessage
predicate in SessionUtils so a future rename of the key can't silently
break one of the sites.
@codecov

codecov Bot commented Aug 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ Changes either increased or maintained existing code coverage, great job!

Files with missing lines Coverage Δ
src/pages/UnlinkLoginPage.tsx 100.00% <100.00%> (+100.00%) ⬆️
src/pages/signin/LoginForm/BaseLoginForm.tsx 79.04% <100.00%> (+1.16%) ⬆️
... and 183 files with indirect coverage changes

Literal numeric object keys ({1: ...}) trip @typescript-eslint/naming-
convention. Switch to a computed key (Date.now()), matching how
production's ErrorUtils actually builds these error objects.
Comment thread src/libs/actions/Session/index.ts Outdated
key: ONYXKEYS.ACCOUNT,
value: {
isLoading: false,
errors: ErrorUtils.getMicroSecondOnyxErrorWithTranslationKey('unlinkLoginForm.unlinkError'),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't think we need this error as we do get it from the BE. Lets' remove this change

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done — reverted, pushed in e6a738e. failureData is back to only flipping isLoading, since the BE's onyxData already supplies the error.

@Pujan92

Pujan92 commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

@ahmdshrif don't this change enough to fix the issue?

Screenshot 2026-08-05 at 19 14 20

@ahmdshrif

Copy link
Copy Markdown
Contributor Author

@Pujan92 Yes — that 3-line change (nav reset + the success-message guard + the failureData error write) is the complete fix for the reported issue, and matches the approved proposal exactly.

The extra bit in BaseLoginForm.tsx beyond that came from an automated Codex review on this PR, not from scope creep on my part: it flagged that a failed/expired unlink can also land on BaseLoginForm rather than UnlinkLoginForm — specifically when the link is opened in a browser/session that never cached credentials.login for that flow (e.g. a different browser or profile than the one that added the secondary email and requested the unlink). In that case the original guard only exempted the success message, so the freshly-written error got wiped by the same mount-clear effect, leaving a blank sign-in form instead of the error. I verified that repro live before fixing it, and it's a real (if narrower) instance of the same root cause.

The SessionUtils.isUnlinkLoginSuccessMessage extraction is a separate, small DRY cleanup — a second automated review flagged the raw translation-key literal being compared in three places (this guard, the accountMessage memo above it, and UnlinkLoginForm.tsx), which risks silently breaking one of them on a future key rename.

Happy to drop either or both if you'd rather keep this PR scoped strictly to the approved proposal — just say the word.

@Pujan92

Pujan92 commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Yes, let's drop both changes at the moment as I think setting the error this way looks like a workaround to me.

Per @Pujan92's review: the backend already returns onyxData with a
proper error message on unlink failure, so a client-side generic
fallback (unlinkLoginForm.unlinkError) was redundant and looked like a
workaround rather than a fix. Reverting to the approved proposal's
scope:

- unlinkLogin's failureData goes back to only flipping isLoading.
- BaseLoginForm's mount-clear guard goes back to exempting only the
  success message, not a specific unlink error value.
- UnlinkLoginForm and the accountMessage memo go back to their inline
  literal comparisons (drops the isUnlinkLoginSuccessMessage extraction
  along with it, since it existed only to serve the guard above).
- Removes the now-unused unlinkLoginForm.unlinkError translation key
  from all locale files, and the tests that covered the reverted
  behavior.
@ahmdshrif

ahmdshrif commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

@Pujan92 Pushed the revert (e6a738e) — back to the exact approved-proposal diff: nav reset + success-message guard only. Both extras (error-preservation guard + the DRY extraction that only existed to serve it) are gone, along with their tests and the now-unused unlinkLoginForm.unlinkError translation key.

@ahmdshrif
ahmdshrif requested a review from Pujan92 August 5, 2026 20:19
@Pujan92

Pujan92 commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Reviewer Checklist

  • I have verified the author checklist is complete (all boxes are checked off).
  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the steps for local testing are in the Tests section
    • I verified the steps for Staging and/or Production testing are in the QA steps section
    • I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
  • I checked that screenshots or videos are included for tests on all platforms
  • I included screenshots or videos for tests on all platforms
  • I verified that the composer does not automatically focus or open the keyboard on mobile unless explicitly intended. This includes checking that returning the app from the background does not unexpectedly open the keyboard.
  • I verified tests pass on all platforms & I tested again on:
    • Android: HybridApp
    • Android: mWeb Chrome
    • iOS: HybridApp
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
  • I verified proper code patterns were followed (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I verified that this PR follows the guidelines as stated in the Review Guidelines
  • I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately and each prop has a /** comment above it */
    • The file is named correctly
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
    • Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
    • All JSX used for rendering exists in the render method
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • For any bug fix or new feature in this PR, I verified that sufficient unit tests are included to prevent regressions in this flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Android: HybridApp
Android: mWeb Chrome
iOS: HybridApp
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2026-08-06.at.18.42.35.mov

@Pujan92

Pujan92 commented Aug 6, 2026

Copy link
Copy Markdown
Contributor
  1. Verify the tab lands on the sign-in page instead of an infinite spinner, and shows "Secondary login successfully unlinked!"
  2. Repeat with an expired/already-used link and verify an error message renders instead of a blank/hung page

@ahmdshrif I think we need to update the step here, bcoz once the unlinked successfull -> opening the link again won't show the error, as credentials will be cleaned in the earlier success and we are no longer showing the unlink page. So we can swap the steps to check with the incorrect code first to see the error and then try with the correct code to see the success message.

@ahmdshrif

Copy link
Copy Markdown
Contributor Author

Good catch — you're right, and I've swapped the order in both the Tests and QA Steps sections.

Confirmed the mechanism: successData clears credentials.login, so on a retry hasLogin is false → shouldShowLoginForm is true → the user lands on BaseLoginForm rather than UnlinkLoginForm, and there's no surface rendering account.errors there.

Worth flagging one extra wrinkle I hit while checking this: optimisticData merges DEFAULT_ACCOUNT_DATA, which is only {errors, success, isLoading} — no message key. So the stale successfullyUnlinkedLogin message actually survives into the retry, which means the mount-clear guard gets skipped and the BE error sometimes does render, alongside a stale success message. That made the old step 5 flaky rather than cleanly wrong, which is arguably worse for QA. The new order avoids the situation entirely.

Also updated the "Explanation of Change" section, which still described the reverted failureData change.

@Pujan92

Pujan92 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor
  1. Failure case first: copy the Unlink Validation link from the email, tamper with the validate code (e.g. change the last few digits), and open that link in a fresh browser tab (or a fresh mobile browser/incognito session)

or a fresh mobile browser/incognito session -- @ahmdshrif will this work? Doesn't the not-available credentials issue come here? I think we need to use the same browser to test

@ahmdshrif

Copy link
Copy Markdown
Contributor Author

Good catch, dropped that parenthetical.

Incognito/a separate browser starts with a fresh IndexedDB, so credentials.login isn't there → isUnvalidatedSecondaryLogin is false → you land on BaseLoginForm with nothing to render the error. Same failure the reorder was meant to avoid.

A fresh tab in the same browser is the right repro: shared Onyx keeps the credential, empty nav stack still triggers the spinner. Updated both Tests and QA Steps to say same browser, not incognito.

@Pujan92 Pujan92 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@melvin-bot
melvin-bot Bot requested a review from pecanoro August 10, 2026 12:55
@pecanoro
pecanoro merged commit f6e2a33 into Expensify:main Aug 17, 2026
38 of 41 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

🚧 pecanoro has triggered a test Expensify/App build. You can view the workflow run here.

@OSBotify

Copy link
Copy Markdown
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/pecanoro in version: 9.4.55-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@MelvinBot

Copy link
Copy Markdown
Contributor

No help site changes required

I reviewed this PR against the help site articles under docs/articles and no documentation updates are needed.

Why: This is a bug fix, not a feature or behavior change. It fixes an infinite loading spinner that appeared when clicking the unlink validation link from a secondary-login email in a fresh browser tab, via two internal fixes:

  • UnlinkLoginPage resets the navigation stack to the tab navigator when there's nothing to pop back to (so the loader unmounts).
  • BaseLoginForm no longer clears the freshly-set "Secondary login successfully unlinked!" message on mount.

There is no new UI, no new steps, no renamed feature/tab/button, and no changed user-facing flow — the fix simply makes the existing, already-documented unlink flow work as it's supposed to.

The closest articles (Contact Methods and Update Email Address) already describe the expected behavior ("Follow the steps in the verification Email to complete the unlinking process"). They don't document the buggy spinner, so there's nothing to add, remove, or correct.

No draft PR was created since no changes are warranted.


@ahmdshrif, please review the linked help site PR and confirm it reflects the current behavior. Then mark the linked help site PR Ready for review

(Note: no help site PR was created because this bug fix doesn't change any documented behavior. If you believe a specific article should be updated, let me know which one and what to add.)

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/Beamanator in version: 9.4.55-4 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 failure ❌

Bundle Size Analysis (Sentry):

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.

5 participants