Skip to content

[Due for payment 2026-06-19] [$250] Android - Login - Enable high contrast button is shown when high contrast mode is enabled #92824

Closed

Description

@applause-bot

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


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:

  1. Launch Expensify app.
  2. Log out if logged in.
  3. Scroll to the bottom and tap Enable high contrast.
    → Button changes to Disable high contrast.
  4. Enter new email and tap Continue.
  5. 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.

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome Safari

Screenshots/Videos

Bug7172898_1780684555011.Screen_Recording_20260606_023456_Expensify.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Mita Rachim
Bug ID: 7172898

Issue OwnerCurrent Issue Owner: @mallenexpensify
Upwork Automation - Do Not Edit

Activity

  1. applause-bot commented on Jun 5, 2026

    @applause-bot
    Author

    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

  2. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jun 5, 2026
  3. melvin-bot commented on Jun 5, 2026

    @melvin-bot

    You have been assigned to this deploy blocker because you recently merged this PR: #92117

  4. melvin-bot commented on Jun 5, 2026

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  5. github-actions commented on Jun 5, 2026

    @github-actions
    Contributor

    👋 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:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  6. MelvinBot commented on Jun 5, 2026

    @MelvinBot
    Contributor

    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.

    • 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

    This 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 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:

    • isHighContrast = highContrastIntent ?? isHighContrastTheme(currentTheme)

    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.

  7. godzillaxbox19982014-lgtm commented on Jun 6, 2026

    @godzillaxbox19982014-lgtm

    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:

    • src/components/SelectionList/components/TextInput.tsx:117 (if): if (!shouldShowTextInput || disableAutoFocus || isScreenReaderEnabled || isInLandscapeMode) {
    • src/components/SelectionList/components/TextInput.tsx:130 (matching code path): }, [shouldShowTextInput, disableAutoFocus, focusTextInput, isInLandscapeMode, isScreenReaderEnabled]),
    • src/components/EmojiPicker/EmojiPickerButtonDropdown.tsx:36 (matching code path): {isDisabled = false, withoutOverlay = false, onModalHide, onInputChange, value, disabled, style, ref, ...otherProps}: EmojiPickerButtonDropdownProps,
    • 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?

    1. 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.
    2. Cover the counter-case near src/components/SelectionList/components/TextInput.tsx:117 so valid existing FE behavior still works.
    3. 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.
  8. luacmartins commented on Jun 8, 2026

    @luacmartins
    Contributor

    I don't think we need to block on this. @rushatgabhane @Eskalifer1 let's address this one

  9. 27 remaining items

  10. melvin-bot commented on Jun 12, 2026

    @melvin-bot

    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:

  11. melvin-bot commented on Jun 12, 2026

    @melvin-bot

    @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]

  12. melvin-bot commented on Jun 16, 2026

    @melvin-bot

    @QichenZhu Huh... This is 4 days overdue. Who can take care of this?

  13. melvin-bot commented on Jun 18, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  14. melvin-bot commented on Jun 18, 2026

    @melvin-bot

    Payment Summary

    Upwork Job

    BugZero Checklist (@mallenexpensify)

    • I have verified the correct assignees and roles are listed above and updated the necessary manual offers
    • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants/2064859448979181249/hired)
    • I have verified the PR was not reverted
    • I have applied any discounts due to bugs/regressions introduced by this PR
    • I have paid out the Upwork contracts or cancelled the ones that are incorrect
    • I have verified the payment summary above is correct
  15. QichenZhu commented on Jun 19, 2026

    @QichenZhu
    Contributor

    BugZero Checklist:

    Regression Test Proposal

    Test:

    1. Launch Expensify
    2. Log out if logged in
    3. On the sign in page, scroll to the bottom
    4. Tap Enable high contrast
    5. Verify it changes to Disable high contrast and the app is in high contrast theme
    6. Enter an email and tap Continue
    7. Scroll to the bottom
    8. Verify that the button still shows Disable high contrast and the app is in high contrast theme

    Do we agree 👍 or 👎

    Zapier Logs Run ID: 00040eee-2df6-ac67-11be-51b9ff70b7e4
  16. mallenexpensify commented on Jun 20, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor+: @QichenZhu due $250 via NewDot

    ^ Test case created. Thx

  17. trjExpensify commented on Jun 25, 2026

    @trjExpensify
    Contributor

    approved $250 for @QichenZhu

  18. MelvinBot commented on Jul 3, 2026

    @MelvinBot
    Contributor

    ⏱️ 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2Engineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions