You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2026-06-19] [$250] Android - Login - Enable high contrast button is shown when high contrast mode is enabled #92824
Version Number: 9.4.0-0 Reproducible in staging?: Yes Reproducible in production?: N/A - new feature, doesn't exist in prod If this was caught during regression testing, add the test name, ID and link from BrowserStack:#92117 Email or phone of affected tester (no customers):jsodinjosdjsoinjsiojs@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Samsung Galaxy S25 FE / Android 16 App Component: Other
Action Performed:
Launch Expensify app.
Log out if logged in.
Scroll to the bottom and tap Enable high contrast.
→ Button changes to Disable high contrast.
Enter new email and tap Continue.
Scroll to the bottom.
Expected Result:
Disable high contrast button will be shown because high contrast mode is still enabled.
Actual Result:
Enable high contrast button is shown when high contrast mode is still enabled.
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Identify the pull request that introduced this issue and revert it.
The sign-in page's theme and the button label read two different sources of truth, so they can disagree.
Page theme (SignInPage.tsx:365) is intent-aware: highContrastIntent ?? contrastThemes.includes(preferredTheme). It prefers SIGN_IN_HIGH_CONTRAST_INTENT.
Button label (HighContrastModeSwitcher.tsx:23-25) is intent-blind: it only looks at preferredTheme via isHighContrastTheme(currentTheme) and ignores SIGN_IN_HIGH_CONTRAST_INTENT entirely.
When you tap "Enable high contrast", both PREFERRED_THEME (→ system-contrast) and SIGN_IN_HIGH_CONTRAST_INTENT (→ true) are set, so the button correctly reads "Disable". After tapping Continue, the BeginSignIn response overwrites the locally-set PREFERRED_THEME with the account's server-stored base theme, but SIGN_IN_HIGH_CONTRAST_INTENT (a local-only sign-in key) stays true. Result:
Page stays high contrast (driven by intent) ✅ matches "high contrast mode is still enabled"
Button reverts to "Enable" (driven only by the now-overwritten preferredTheme) ❌ the reported bug
The two components computing high-contrast state differently is the whole bug. The page already handles the "intent set but preferredTheme not yet a contrast theme" case; the button does not, so it shows the wrong label the moment preferredTheme is reset out from under it (which happens on the BeginSignIn round-trip). Note the comment at SignInPage.tsx:359: the contrast preference is meant to be preserved across the logged-out sign-in flow via the intent key.
What changes do you think we should make in order to solve the problem?
Make HighContrastModeSwitcher use the same intent-aware logic as the page, so the button and theme always agree. In HighContrastModeSwitcher.tsx, also read SIGN_IN_HIGH_CONTRAST_INTENT and prefer it when present:
The toggleHighContrast handler already keeps both PREFERRED_THEME and the intent in sync via updateTheme + setHighContrastIntent, so the label will track correctly through the email → continue transition.
What alternative solutions did you explore? (Optional)
Have the BeginSignIn success path avoid overwriting the locally-chosen PREFERRED_THEME while logged out. This is heavier (and the overwrite likely originates in the backend response), whereas aligning the button with the already-correct page logic is a minimal, self-contained App fix.
Related: Original feature issue #92049 (the work delivered by PR #92117).
Next Steps for Contributor+ team: To accept:@MelvinBot implement [this](https://github.com/Expensify/App/issues/92824) to create a draft PR. To refine:@MelvinBot <your feedback> To reject: Explain why you are rejecting Melvin's proposal.
godzillaxbox19982014-lgtm commented on Jun 6, 2026
The local evidence matches this recurring failure shape: component state is keyed to every load instead of initial load. Here, src/components/SelectionList/components/TextInput.tsx:117 and src/components/SelectionList/components/TextInput.tsx:130 do not agree on the same FE value, so the user-visible path can show a missing or stale state even though nearby data already has the needed context.
What changes do you think we should make in order to solve the problem?
Update src/components/SelectionList/components/TextInput.tsx:117 to derive FE from the source of truth that owns this flow before the value is consumed.
Carry the same normalized value through src/components/SelectionList/components/TextInput.tsx:130; that follows the safer family move to add a local hasEverLoaded/hasInteracted guard, so the write/optimistic/read paths agree instead of only changing the visible component.
Keep the change inside the UI, Forms, Lists, Accessibility surface and avoid changing platform-specific variants, screen reader behaviour.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Add or update a regression in tests/components/**/*.ts for the exact issue flow: Android - Login - Enable high contrast button is shown when high contrast mode is enabled.
Cover the counter-case near src/components/SelectionList/components/TextInput.tsx:117 so valid existing FE behavior still works.
Manually repeat the issue steps after the patch and confirm the visible state/action is no longer stale.
What alternative solutions did you explore? (Optional)
I would not add a broad new condition outside these referenced paths; the safer fix is to keep FE consistent at the first read/write boundary shown above.
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.6-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@QichenZhu The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]
[Contributor] The offending PR and associated issue have been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: N/A.
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
⏱️ Ran out of time before I could finish. This usually means the task was too complex or I got stuck exploring. Please try again with a more specific request or post in #melvinbot-ai.
Activity
applause-bot commentedon Jun 5, 2026
While Applause doesn't embed attachments for this bug, here are the links for quick view:
https://platform.applause.com/services/links/v1/external/32e8d5bd7dd587d9a3feae15392e6196dc42af7b258e45f6c04a774ae15fcf23
melvin-bot commentedon Jun 5, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #92117
melvin-bot commentedon Jun 5, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Jun 5, 2026
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
MelvinBot commentedon Jun 5, 2026
Proposal
What is the root cause of that problem?
The sign-in page's theme and the button label read two different sources of truth, so they can disagree.
SignInPage.tsx:365) is intent-aware:highContrastIntent ?? contrastThemes.includes(preferredTheme). It prefersSIGN_IN_HIGH_CONTRAST_INTENT.HighContrastModeSwitcher.tsx:23-25) is intent-blind: it only looks atpreferredThemeviaisHighContrastTheme(currentTheme)and ignoresSIGN_IN_HIGH_CONTRAST_INTENTentirely.When you tap "Enable high contrast", both
PREFERRED_THEME(→system-contrast) andSIGN_IN_HIGH_CONTRAST_INTENT(→true) are set, so the button correctly reads "Disable". After tapping Continue, theBeginSignInresponse overwrites the locally-setPREFERRED_THEMEwith the account's server-stored base theme, butSIGN_IN_HIGH_CONTRAST_INTENT(a local-only sign-in key) staystrue. Result:preferredTheme) ❌ the reported bugThis is a regression introduced by PR #92117.
Why the button and page diverge — evidence
The two components computing high-contrast state differently is the whole bug. The page already handles the "intent set but
preferredThemenot yet a contrast theme" case; the button does not, so it shows the wrong label the momentpreferredThemeis reset out from under it (which happens on theBeginSignInround-trip). Note the comment atSignInPage.tsx:359: the contrast preference is meant to be preserved across the logged-out sign-in flow via the intent key.What changes do you think we should make in order to solve the problem?
Make
HighContrastModeSwitcheruse the same intent-aware logic as the page, so the button and theme always agree. InHighContrastModeSwitcher.tsx, also readSIGN_IN_HIGH_CONTRAST_INTENTand prefer it when present:isHighContrast = highContrastIntent ?? isHighContrastTheme(currentTheme)The
toggleHighContrasthandler already keeps bothPREFERRED_THEMEand the intent in sync viaupdateTheme+setHighContrastIntent, so the label will track correctly through the email → continue transition.What alternative solutions did you explore? (Optional)
Have the
BeginSignInsuccess path avoid overwriting the locally-chosenPREFERRED_THEMEwhile logged out. This is heavier (and the overwrite likely originates in the backend response), whereas aligning the button with the already-correct page logic is a minimal, self-contained App fix.Related: Original feature issue #92049 (the work delivered by PR #92117).
Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/92824)to create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
godzillaxbox19982014-lgtm commentedon Jun 6, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
Android - Login - Enable high contrast button is shown when high contrast mode is enabled
What is the root cause of that problem?
I traced this to the path that handles
FE:if):if (!shouldShowTextInput || disableAutoFocus || isScreenReaderEnabled || isInLandscapeMode) {matching code path):}, [shouldShowTextInput, disableAutoFocus, focusTextInput, isInLandscapeMode, isScreenReaderEnabled]),matching code path):{isDisabled = false, withoutOverlay = false, onModalHide, onInputChange, value, disabled, style, ref, ...otherProps}: EmojiPickerButtonDropdownProps,src/components/SelectionList/components/TextInput.tsx:117andsrc/components/SelectionList/components/TextInput.tsx:130do not agree on the sameFEvalue, so the user-visible path can show a missing or stale state even though nearby data already has the needed context.What changes do you think we should make in order to solve the problem?
src/components/SelectionList/components/TextInput.tsx:117to deriveFEfrom the source of truth that owns this flow before the value is consumed.src/components/SelectionList/components/TextInput.tsx:130; that follows the safer family move to add a local hasEverLoaded/hasInteracted guard, so the write/optimistic/read paths agree instead of only changing the visible component.What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
tests/components/**/*.tsfor the exact issue flow: Android - Login - Enable high contrast button is shown when high contrast mode is enabled.src/components/SelectionList/components/TextInput.tsx:117so valid existingFEbehavior still works.What alternative solutions did you explore? (Optional)
FEconsistent at the first read/write boundary shown above.luacmartins commentedon Jun 8, 2026
I don't think we need to block on this. @rushatgabhane @Eskalifer1 let's address this one
27 remaining items
melvin-bot commentedon Jun 12, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.6-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2026-06-19. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Jun 12, 2026
@QichenZhu The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]
melvin-bot commentedon Jun 16, 2026
@QichenZhu Huh... This is 4 days overdue. Who can take care of this?
melvin-bot commentedon Jun 18, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)melvin-bot commentedon Jun 18, 2026
Payment Summary
Upwork Job
BugZero Checklist (@mallenexpensify)
QichenZhu commentedon Jun 19, 2026
BugZero Checklist:
[Contributor] The offending PR and associated issue have been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to the comment on the PR: Add highcontrast btn in signin page and sync it with server values #92117 (comment)
Link to the comment on the Issue: [Due for payment 2026-06-16] Add high contrast option to sign up screen #92049 (comment)
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: N/A.
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue: https://github.com/Expensify/Expensify/issues/650702
Regression Test Proposal
Test:
Do we agree 👍 or 👎
Zapier Logs
Run ID: 00040eee-2df6-ac67-11be-51b9ff70b7e4mallenexpensify commentedon Jun 20, 2026
Payment Summary
Contributor+: @QichenZhu due $250 via NewDot
^ Test case created. Thx
trjExpensify commentedon Jun 25, 2026
approved $250 for @QichenZhu
MelvinBot commentedon Jul 3, 2026
⏱️ Ran out of time before I could finish. This usually means the task was too complex or I got stuck exploring. Please try again with a more specific request or post in #melvinbot-ai.
Run details