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-04-16] [$250] Default share sheet option to Submit vs Share for all members #81503
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
We're currently defaulting the mobile share sheet to Share vs Submit for some reason – even though our mainline case is Submit. As a result, let's fix that and make sure that the initial option is always Submit, especially since you can submit to yourself if you aren't a member of a paid workspace.
changed the title [-]Default share sheet option to `Submit` vs `Share` for all members[/-][+][$250] Default share sheet option to `Submit` vs `Share` for all members[/+]on Feb 5, 2026
🚨 Edited by proposal-police: This proposal was edited at 2026-02-09 20:23:08 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Actual Result:
We're currently defaulting the mobile share sheet to Share vs Submit for some reason – even though our mainline case is Submit. As a result, let's fix that and make sure that the initial option is always Submit, especially since you can submit to yourself if you aren't a member of a paid workspace.
What is the root cause of that problem?
In ShareRootPage.tsx, the ShareTab is defined before the SubmitTab inside the OnyxTabNavigator:
Since the OnyxTabNavigator uses the first tab as the default when no defaultSelectedTab is specified, the Share tab becomes the default instead of Submit.
What changes do you think we should make in order to solve the problem?
Swap the order of the tabs in ShareRootPage.tsx so that SubmitTab comes first when the file is scannable:
🚨 Edited by proposal-police: This proposal was edited at 2026-02-05 11:30:45 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
When opening the mobile share sheet with a scannable attachment, the initial tab selected on mount is Share instead of Submit. For scannable attachments, the initial tab on mount must be Submit.
What is the root cause of that problem?
In this flow, ShareRootPage assumes that the default tab passed to the navigator or the tab order is enough to control the initial tab on mount, but this is wrong because OnyxTabNavigator restores a previously persisted selected tab from Onyx if it exists. This behavior is implemented in OnyxTabNavigator.tsx inside the logic that resolves validInitialTab, which allows a persisted value to override the desired initial tab, causing the wrong tab to be selected when the navigator mounts.
What changes do you think we should make in order to solve the problem?
The share flow must enforce the correct initial tab before the tab navigator mounts. This is done by writing the desired tab selection to persisted state as soon as a scannable file is detected, and by also passing a defensive defaultSelectedTab to the navigator.
Update the logic where the temporary file is processed. The persisted tab is set synchronously before allowing the navigator to mount.
// src/pages/Share/ShareRootPage.tsxif(tempFile){if(tempFile.mimeType){if(receiptFileFormats.includes(tempFile.mimeType)&&fileExtension){setIsFileScannable(true);// Enforce initial tab selection on mount for scannable attachments.// Minimal, deterministic write so persisted state won't override the initial selection.Tab.setSelectedTab(CONST.TAB.SHARE.NAVIGATOR_ID,CONST.TAB.SHARE.SUBMIT);}else{setIsFileScannable(false);}validateFileIfNecessary(tempFile);// Now allow the navigator to mount (after the deterministic write above).setIsFileReady(true);}addTempShareFile(tempFile);}
Define a defensive default tab and pass it into the navigator.
What alternative solutions did you explore? (Optional)
Relying only on defaultSelectedTab was considered but rejected because it does not work when a conflicting persisted tab already exists. Changing global navigator persistence behavior or reconciling state after mount was also considered but rejected due to higher risk and unnecessary complexity for this owner-level invariant.
Please re-state the problem that we are trying to solve in this issue.
Default share sheet option to Submit vs Share for all members
What is the root cause of that problem?
The mobile share sheet is defaulting to the Share tab instead of Submit because the OnyxTabNavigator component in ShareRootPage.tsx has no explicit defaultSelectedTab prop. When none is specified, the navigator defaults to the first declared tab, which is the Share tab.
What changes do you think we should make in order to solve the problem?
We should ensures that Submit is the initial tab shown to users by explicitly setting defaultSelectedTab={CONST.TAB.SHARE.SUBMIT} in the OnyxTabNavigator. This aligns the UI with the primary use case of the share flow—allowing users to submit expenses to themselves or others.
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
2. We should swap submitTabInputRef and shareTabInputRef usage here so the correct input is focused when transitioning between tabs. Since now the first tab is Submit Tab we should focus submit tab's input when first tab is pressed and we should focus Share Tab when the second tab is pressed. Note: if we don't apply this change the right input fields won't be focused and it will cause a regression.
We can pass CONST.TAB.SHARE.SUBMIT as defaultSelectedTab of OnyxTabNavigator to use SubmitTab as the default when selectedTab is not available in Onyx:
When we first navigate to submit tab, we update the selected tab to SubmitTab below. IMO it is not necessary to pass CONST.TAB.SHARE.SUBMIT to defaultSelectedTab if we change the order of the tabs here
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
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
Activity
[-]Default share sheet option to `Submit` vs `Share` for all members[/-][+][$250] Default share sheet option to `Submit` vs `Share` for all members[/+]melvin-bot commentedon Feb 5, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022019352367484056211
melvin-bot commentedon Feb 5, 2026
Current assignee @JmillsExpensify is eligible for the Bug assigner, not assigning anyone new.
melvin-bot commentedon Feb 5, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @eVoloshchak (
External)daledah commentedon Feb 5, 2026
🚨 Edited by proposal-police: This proposal was edited at 2026-02-09 20:23:08 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Actual Result:
We're currently defaulting the mobile share sheet to Share vs Submit for some reason – even though our mainline case is Submit. As a result, let's fix that and make sure that the initial option is always Submit, especially since you can submit to yourself if you aren't a member of a paid workspace.
What is the root cause of that problem?
In
ShareRootPage.tsx, theShareTabis defined before theSubmitTabinside theOnyxTabNavigator:App/src/pages/Share/ShareRootPage.tsx
Lines 192 to 193 in 8ed5bc1
Since the
OnyxTabNavigatoruses the first tab as the default when nodefaultSelectedTabis specified, the Share tab becomes the default instead of Submit.What changes do you think we should make in order to solve the problem?
Swap the order of the tabs in
ShareRootPage.tsxso thatSubmitTabcomes first when the file is scannable:What alternative solutions did you explore? (Optional)
We could pass
defaultSelectedTab={CONST.TAB.SHARE.SUBMIT}to theOnyxTabNavigator(or only pass defaultSelectedTab when isFileScannable is true)twinkle-react commentedon Feb 5, 2026
🚨 Edited by proposal-police: This proposal was edited at 2026-02-05 11:30:45 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
When opening the mobile share sheet with a scannable attachment, the initial tab selected on mount is Share instead of Submit. For scannable attachments, the initial tab on mount must be Submit.
What is the root cause of that problem?
In this flow,
ShareRootPageassumes that the default tab passed to the navigator or the tab order is enough to control the initial tab on mount, but this is wrong becauseOnyxTabNavigatorrestores a previously persisted selected tab from Onyx if it exists. This behavior is implemented inOnyxTabNavigator.tsxinside the logic that resolvesvalidInitialTab, which allows a persisted value to override the desired initial tab, causing the wrong tab to be selected when the navigator mounts.What changes do you think we should make in order to solve the problem?
The share flow must enforce the correct initial tab before the tab navigator mounts. This is done by writing the desired tab selection to persisted state as soon as a scannable file is detected, and by also passing a defensive
defaultSelectedTabto the navigator.Add the import near the top of the file.
Update the logic where the temporary file is processed. The persisted tab is set synchronously before allowing the navigator to mount.
Define a defensive default tab and pass it into the navigator.
What alternative solutions did you explore? (Optional)
Relying only on
defaultSelectedTabwas considered but rejected because it does not work when a conflicting persisted tab already exists. Changing global navigator persistence behavior or reconciling state after mount was also considered but rejected due to higher risk and unnecessary complexity for this owner-level invariant.samranahm commentedon Feb 5, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
Default share sheet option to Submit vs Share for all members
What is the root cause of that problem?
The mobile share sheet is defaulting to the Share tab instead of Submit because the
OnyxTabNavigatorcomponent inShareRootPage.tsxhas no explicitdefaultSelectedTabprop. When none is specified, the navigator defaults to the first declared tab, which is the Share tab.What changes do you think we should make in order to solve the problem?
We should ensures that Submit is the initial tab shown to users by explicitly setting
defaultSelectedTab={CONST.TAB.SHARE.SUBMIT}in theOnyxTabNavigator. This aligns the UI with the primary use case of the share flow—allowing users to submit expenses to themselves or others.here
App/src/pages/Share/ShareRootPage.tsx
Lines 185 to 191 in 181547f
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
etCoderDysto commentedon Feb 5, 2026
🚨 Edited by proposal-police: This proposal was edited at 2026-02-05 12:08:17 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Default share sheet option to Submit vs Share for all members
What is the root cause of that problem?
ShareTabcomes beforeSubmitTabhereApp/src/pages/Share/ShareRootPage.tsx
Lines 192 to 193 in e663634
When we select the first tab, we apply focus on the Share Tab input field, and when the second tab is selected we focus Submit Tab input field
App/src/pages/Share/ShareRootPage.tsx
Lines 164 to 168 in e663634
What changes do you think we should make in order to solve the problem?
ShareTabandSubmitTaborder here:App/src/pages/Share/ShareRootPage.tsx
Lines 192 to 193 in e663634
2. We should swap
submitTabInputRefandshareTabInputRefusage here so the correct input is focused when transitioning between tabs. Since now the first tab is Submit Tab we should focus submit tab's input when first tab is pressed and we should focus Share Tab when the second tab is pressed. Note: if we don't apply this change the right input fields won't be focused and it will cause a regression.App/src/pages/Share/ShareRootPage.tsx
Lines 164 to 168 in e663634
App/src/libs/Navigation/OnyxTabNavigator.tsx
Lines 109 to 114 in e663634
SubmitTabbelow. IMO it is not necessary to passCONST.TAB.SHARE.SUBMITtodefaultSelectedTabif we change the order of the tabs hereApp/src/libs/Navigation/OnyxTabNavigator.tsx
Lines 184 to 185 in e663634
POC
Screen.Recording.2026-02-05.at.2.49.21.in.the.afternoon.mp4
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
54 remaining items
JmillsExpensify commentedon Apr 9, 2026
Just tested this, works like a dream. Nice work!
JmillsExpensify commentedon Apr 16, 2026
Payment summary:
JmillsExpensify commentedon Apr 16, 2026
Regression test created and contributors paid via ND
eVoloshchak commentedon Apr 16, 2026
@JmillsExpensify, this has caused a regression (#87365), which was fixed by a follow-up PR (#87407), the payment should be reduced
JmillsExpensify commentedon Apr 16, 2026
Thanks updated
JmillsExpensify commentedon May 5, 2026
$125 approved for @eVoloshchak
quinthar commentedon May 12, 2026
Approved $125 for @daledah