Skip to content

[Due for payment 2026-04-14] [$250] Profile - The default emoji doesn't appear at the profile "Status" settings #80427

Closed

Description

@jponikarchuk

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: v9.3.8-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from BrowserStack: https://test-management.browserstack.com/projects/2219752/test-runs/TR-3391/folder/13177019/41237786/1146029524?sort=%2Bstatus_id
Email or phone of affected tester (no customers): forexmater+66666@gmail.com
Issue reported by: Applause Internal Team
Bug source: Regression TC Execution
Device used: Android 11/Chrome
App Component: Other

Action Performed:

Preconditions: Create new account;

  1. Open Expensify app
  2. Tap "Account" tab
  3. Tap "Profile"
  4. Tap "Status"

Expected Result:

The default emoji should appear in the status drop-down.

Actual Result:

When open "Status" page, observe that the default emoji is missing in the emoji drop-down.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

1.mp4

Image

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~022015915883288501817
  • Upwork Job ID: 2015915883288501817
  • Last Price Increase: 2026-03-31
  • Automatic offers:
    • situchan | Contributor | 110954706
Issue OwnerCurrent Issue Owner: @mallenexpensify

Activity

  1. added
    ExternalAdded to denote the issue can be worked on by a contributor
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jan 24, 2026
  2. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Jan 24, 2026
  3. melvin-bot commented on Jan 24, 2026

    @melvin-bot

    Triggered auto assignment to @greg-schroeder (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  4. melvin-bot commented on Jan 24, 2026

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @Ollyws (External)

  5. github-actions commented on Jan 24, 2026

    @github-actions
    Contributor

    ⚠️ @daledah Your proposal is a duplicate of an already existing proposal and has been automatically withdrawn to prevent spam. Please review the existing proposals before submitting a new one.

  6. yatin-italy commented on Jan 25, 2026

    @yatin-italy

    Proposal

    Restate the problem this issue is trying to solve.

    For new accounts, the default status emoji 💬 does not appear in the Profile Status emoji dropdown. The user cannot see or select the default emoji because the picker starts with no emoji set.

    What is the root cause of that problem?

    The code assumes that either a draft emoji or a current user emoji always exists. When both values are empty for a new account, the computed default emoji becomes an empty string. This empty value is then passed to the emoji picker, so the picker has no active emoji and does not show the default.

    What changes do you think we should make in order to solve the problem?

    • Update the default emoji calculation to always fall back to the initial emoji.
    • Modify the assignment in src/pages/settings/Profile/CustomStatus/StatusPage.tsx.

    File: src/pages/settings/Profile/CustomStatus/StatusPage.tsx

    // Before
    const defaultEmoji = draftEmojiCode || currentUserEmojiCode;
    
    // After
    const defaultEmoji = draftEmojiCode || currentUserEmojiCode || initialEmoji;

    What alternative solutions did you explore? (Optional)

    • Handling the fallback inside the emoji picker components was considered, but it moves responsibility to the wrong layer and increases surface area.
  7. github-actions commented on Jan 25, 2026

    @github-actions
    Contributor

    ⚠️ @yatin-italy Your proposal is a duplicate of an already existing proposal and has been automatically withdrawn to prevent spam. Please review the existing proposals before submitting a new one.

  8. abbasifaizan70 commented on Jan 26, 2026

    @abbasifaizan70
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    When a new account opens the Status page, the default emoji (💬) is missing from the emoji dropdown, even though it should appear as the default selection.

    What is the root cause of that problem?

    The root cause is in the StatusPage.tsx component where the defaultEmoji calculation does not include a fallback to the initialEmoji when both the draft emoji and current user emoji are empty:

    const draftEmojiCode = draftStatus?.emojiCode;
    const draftText = draftStatus?.text;
    const draftClearAfter = draftStatus?.clearAfter;
    // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
    const defaultEmoji = draftEmojiCode || currentUserEmojiCode;

    The issue is that for new accounts:

    1. draftEmojiCode is undefined (no draft status exists)
    2. currentUserEmojiCode is an empty string '' (no status has been set)
    3. The expression draftEmojiCode || currentUserEmojiCode evaluates to an empty string ''
    4. This empty string is passed as defaultValue to the EmojiPickerButtonDropdown component
    5. The emoji picker displays an empty/placeholder state instead of showing the default emoji

    The initialEmoji constant exists and is used in the save logic (line 132), but it's not included in the defaultEmoji calculation for display purposes.

    What changes do you think we should make in order to solve the problem?

    1. Add initialEmoji as a fallback in the defaultEmoji calculation

    Update the defaultEmoji calculation to include initialEmoji as the final fallback, ensuring the default emoji appears in the dropdown for new accounts:

    const draftEmojiCode = draftStatus?.emojiCode;
    const draftText = draftStatus?.text;
    const draftClearAfter = draftStatus?.clearAfter;
    // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
    const defaultEmoji = draftEmojiCode || currentUserEmojiCode;

    After:

    const draftEmojiCode = draftStatus?.emojiCode;
    const draftText = draftStatus?.text;
    const draftClearAfter = draftStatus?.clearAfter;
    // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
    const defaultEmoji = draftEmojiCode || currentUserEmojiCode || initialEmoji;

    Why this fix works:

    The updated fallback logic now follows this priority:

    1. First: Uses draftEmojiCode if a draft status exists (preserves user's in-progress selection)
    2. Second: Falls back to currentUserEmojiCode if the user has an existing saved emoji (preserves user's saved status)
    3. Third: Falls back to initialEmoji (💬) for new accounts with no status (shows the default emoji)

    How it integrates with existing save logic:

    The save logic at line 132 already uses initialEmoji as a fallback:

    emojiCode: !emojiCode && statusText ? initialEmoji : emojiCode,

    By including initialEmoji in the defaultEmoji calculation, the displayed default emoji now matches what would be saved if the user doesn't explicitly select an emoji, creating a consistent user experience.

    What alternative solutions did you explore? (Optional)

    Alternative 1: Only show default emoji when there's truly no status

    Only show the default emoji when both emoji and text are empty:

    const hasNoStatus = !draftEmojiCode && !currentUserEmojiCode && !draftText && !currentUserStatusText;
    const defaultEmoji = draftEmojiCode || currentUserEmojiCode || (hasNoStatus ? initialEmoji : '');

    Alternative 2: Initialize draft status with default emoji

    Set the draft status to include the default emoji when no status exists:

    useEffect(() => {
        if (!currentUserEmojiCode && !currentUserStatusText && !draftEmojiCode) {
            updateDraftCustomStatus({emojiCode: initialEmoji, clearAfter: DateUtils.getEndOfToday()});
        }
        // ...
    }, []);

    Alternative 3: Handle default emoji in the EmojiPickerButtonDropdown component

    Add logic in the EmojiPickerButtonDropdown component to show a default emoji when the value is empty.

    The chosen solution is the simplest and most direct: add initialEmoji as a fallback in the defaultEmoji calculation. This ensures the default emoji appears in the dropdown for new accounts while preserving all existing behavior for accounts with saved or draft statuses.

  9. removed
    ExternalAdded to denote the issue can be worked on by a contributor
    on Jan 26, 2026
  10. 82 remaining items

  11. melvin-bot commented on Apr 7, 2026

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  12. melvin-bot commented on Apr 7, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.53-7 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-04-14. 🎊

    For reference, here are some details about the assignees on this issue:

  13. melvin-bot commented on Apr 7, 2026

    @melvin-bot

    @situchan / @truph01 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]

  14. melvin-bot commented on Apr 7, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  15. removed their assignment
    on Apr 15, 2026
  16. mallenexpensify commented on Apr 16, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor: @truph01 due $250 via NewDot
    Contributor+: @situchan due $250 via NewDot

    @situchan plz complete the BZ checklist and tag me in a post once you have. Thx

  17. situchan commented on Apr 16, 2026

    @situchan
    Contributor

    @MelvinBot find offending PR which caused this regression based on #80427 (comment)

    Especially put Icon inside Text

    <Text
    style={styles.emojiPickerButtonDropdownIcon}
    numberOfLines={1}
    >
    {
    // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
    value || (
    <Icon
    src={icons.Emoji}
    fill={StyleUtils.getIconFillColor(CONST.BUTTON_STATES.DISABLED)}
    />
    )
    }
    </Text>

  18. MelvinBot commented on Apr 16, 2026

    @MelvinBot
    Contributor

    The offending PR is #34780 — "fix logic clear status and save status" (by dukenv0307, merged 2024-01-29).

    What it changed: In EmojiPickerButtonDropdown.tsx, it replaced {props.value} with {props.value || <Icon ...>} inside a <Text> component. This put a View-based <Icon> as a child of <Text>, which Android's React Native doesn't support — <Text> can only contain strings or other <Text> nodes on Android.

    Evidence

    Before PR #34780 (commit c9663a58):

    <Text style={styles.emojiPickerButtonDropdownIcon} numberOfLines={1}>
        {props.value}
    </Text>

    After PR #34780 (commit 05a4c19a):

    <Text style={styles.emojiPickerButtonDropdownIcon} numberOfLines={1}>
        {props.value || (
            <Icon
                src={Expensicons.Emoji}
                fill={StyleUtils.getIconFillColor(CONST.BUTTON_STATES.DISABLED)}
            />
        )}
    </Text>

    Next Steps: Reply with @MelvinBot implement this to create a draft PR, or @MelvinBot <your feedback> to refine this analysis.

  19. situchan commented on Apr 16, 2026

    @situchan
    Contributor

    BugZero Checklist:

    • [Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

      Link to comment: https://github.com/Expensify/App/pull/34780/changes#r3094471057

    • [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:

    • [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/625225

    Regression Test Proposal

    Test:

    1. Create new account
    2. Tap "Account" tab
    3. Tap "Profile"
    4. Tap "Status"
    5. Verify: The default emoji should appear in the status drop-down.

    Do we agree 👍 or 👎

    Zapier Logs Run ID: 00040eee-3e38-aaa3-5180-25ad611c9cc4
  20. laurenreidexpensify commented on Apr 27, 2026

    @laurenreidexpensify
    Contributor

    $250 approved for @situchan

  21. garrettmknight commented on May 22, 2026

    @garrettmknight
    Contributor

    $250 approved for @truph01

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.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions