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-08-31] [$250] [Exploratory] 92180 - IOU - First split after create expense from FAB open not here page RHP #92466
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 contributorNot a priority
Please re-state the problem that we are trying to solve in this issue.
Creating an expense from the FAB with a brand-new user optimistically creates a 1:1 DM. Splitting an expense in that fresh chat and then opening the split shows the "Hmm... it's not here" NotFound page in the RHP. It only happens for the first split right after the chat is created, and it heals on refresh — the classic signature of an optimistic-reportID that got reconciled to a real one, leaving something orphaned under the old key.
What is the root cause of that problem?
When the server reconciles the optimistically-created DM, replaceOptimisticReportWithActualReport deletes the optimistic REPORT and copies its data to preexistingReportID — but for the DM branch (!parentReportActionID) it never re-keys REPORT_ACTIONS from the optimistic reportID to the real one.
The split's IOU report action was written under the optimistic chat's reportID (Split.ts:1502-1530). After reconciliation the active route becomes /r/{realReportID}/split/{splitReportActionID}, but that split action still lives under REPORT_ACTIONS${optimisticReportID}. withReportAndReportActionOrNotFound looks up the action under the real reportID, finds nothing, and renders NotFoundPage. On refresh, the SPLIT_BILL response repopulates the action under the real reportID, so it heals.
Evidence & data flow
Split action is keyed under the (optimistic) chat reportID — Split.ts:1502-1530: key: \${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${splitChatReport.reportID}``.
DM reconciliation copies REPORT but not REPORT_ACTIONS — replaceOptimisticReportWithActualReport.ts:103-111. The else (thread) branch updates childReportID on the parent action, but the DM branch has no equivalent for the report actions collection.
Flow: FAB → create expense w/ new user → optimistic DM created → split expense (action keyed under optimistic reportID) → server reconciles DM to real reportID, REPORT_ACTIONS left orphaned → tap split → route uses real reportID → action not found → NotFound.
What changes do you think we should make in order to solve the problem?
In the DM branch of replaceOptimisticReportWithActualReport, when clearing the optimistic report also migrate its report actions: merge allReportActions?.[optimisticReportID] into REPORT_ACTIONS${preexistingReportID} and set REPORT_ACTIONS${optimisticReportID} to null, so any actions created against the optimistic chat (like the split's IOU action) survive the re-key. This mirrors what already happens for in-flight requests in HandleUnusedOptimisticID, which rewrites queued request reportIDs but not local Onyx keys.
What alternative solutions did you explore?
Deferring/guarding the split-preview navigation until the split action resolves under the active reportID (e.g. fall back to the optimistic reportID if the action isn't found under the real one). This is more of a band-aid at the navigation layer; migrating the report actions during reconciliation fixes the underlying data inconsistency for all consumers, not just this screen.
These share the split → NotFound symptom but appear to have different triggers (self-DM / delete-after-submit) than this new-user-DM reconciliation race.
Next Steps for Contributor+ team: To accept:@MelvinBot implement [this](https://github.com/Expensify/App/issues/92466) to create a draft PR. To refine:@MelvinBot <your feedback> To reject: Explain why you are rejecting Melvin's proposal.
🚨 Edited by proposal-police: This proposal was edited at 2026-07-17 21:45:52 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
After creating an expense from the FAB with a brand-new user, then creating a Split expense in that same chat, opening the Split expense shows the "Not here" (Not Found) page in the RHP instead of the Split expense details.
What is the root cause of that problem?
The Split expense details screen looks up the split action inside the report you are currently viewing, rather than the report that actually owns the split action.
When you tap the split preview, navigation builds the split-details route from the currently active report route by appending the dynamic suffix split/:reportActionID:
Because createDynamicRoute appends the suffix to Navigation.getActiveRoute(), the resulting route is r/<viewedReportID>/split/<reportActionID>, so the route's reportID param is the currently-viewed report.
The Split details screen is wrapped by withReportAndReportActionOrNotFound, which reads the report actions of the route's reportID and looks the split action up there. If the action is not found under that report, it renders the Not Found page:
The problem only appears in this specific flow because of report-action merging. When a chat has a single expense (exactly the state produced by "create expense from FAB"), the transaction-thread actions are merged into the report you are viewing, so the report you are viewing is not the report that owns each displayed action. This is documented in useOriginalReportID, and ActionContentRouter already computes the correct owner as actionOwnerReportID = originalReportID ?? reportID:
* This hook is for finding the "original reportID" for a given reportActionID. The reportID usually is the report we are looking at,
* and in most cases it will be the same as the original reportID. However, in these cases the original reportID is different:
* - When viewing an expense report with a single transaction, the reportActions from the transaction thread and the expense report are merged, so in that case the
* reportAction's report may be different from the report we are viewing.
* - When viewing a thread report, the original reportID is the parent reportID, because the reportAction that created the thread belongs to the parent report.
*
* @param reportID The reportID of the report we are viewing
* @param reportAction The reportAction we want to find the original reportID for
Because the split route is built from the viewed report instead of the action owner, the split action lives in a different report than the one the route points at, so withReportAndReportActionOrNotFound cannot find it and shows "Not here". In a plain chat where the viewed report already owns the action (originalReportID === reportID) the two are identical, which is why the bug does not reproduce outside this "first split after creating an expense" flow.
What changes do you think we should make in order to solve the problem?
Look the split action up in the report that owns it, while keeping the currently-viewed report as the screen's context (so back-navigation and chatReportID stay correct).
ActionContentRouter already derives the owner as actionOwnerReportID = originalReportID ?? reportID. We thread that value down to ChatTransactionPreview and, only when it differs from the viewed reportID, pass it to the split route as an extra actionReportID param:
Add an optional actionReportID argument to ROUTES.SPLIT_BILL_DETAILS.getRoute(reportActionID, actionReportID?) (appended as a query param) and to the SPLIT_DETAILS.DYNAMIC_ROOT param type.
In ActionContentRouter, pass the already-computed actionOwnerReportID to ChatTransactionPreview.
In ChatTransactionPreview, when actionOwnerReportID differs from the viewed reportID, pass it as actionReportID when building the split route.
In withReportAndReportActionOrNotFound, read the split action's report actions from actionReportID ?? reportID (defaulting to the viewed report), while still using the viewed reportID as the screen's report.
With the action looked up in the report that actually contains it, withReportAndReportActionOrNotFound resolves the split action and the Split expense details render instead of the Not Found page. In the normal case actionReportID is absent, so actionReportID ?? reportID equals the viewed report and every other flow is byte-for-byte unchanged.
What alternative solutions did you explore? (Optional)
Alternatively, the split lookup could be made resilient inside withReportAndReportActionOrNotFound by recomputing the single-transaction thread and searching the action there when it is not found under the route's reportID. This duplicates the (relatively expensive) merge logic from useOriginalReportID inside a shared HOC, so passing the already-known owner report ID from the navigation source is the more targeted and lower-risk fix.
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 contributorNot a priority
Activity
applause-bot commentedon Jun 3, 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/e66ae6d1bd3414ffccae1bd170f523347eebd89013bf18ac23e54e85cdec4706
MelvinBot commentedon Jul 17, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
Creating an expense from the FAB with a brand-new user optimistically creates a 1:1 DM. Splitting an expense in that fresh chat and then opening the split shows the "Hmm... it's not here" NotFound page in the RHP. It only happens for the first split right after the chat is created, and it heals on refresh — the classic signature of an optimistic-reportID that got reconciled to a real one, leaving something orphaned under the old key.
What is the root cause of that problem?
When the server reconciles the optimistically-created DM,
replaceOptimisticReportWithActualReportdeletes the optimisticREPORTand copies its data topreexistingReportID— but for the DM branch (!parentReportActionID) it never re-keysREPORT_ACTIONSfrom the optimistic reportID to the real one.The split's IOU report action was written under the optimistic chat's reportID (
Split.ts:1502-1530). After reconciliation the active route becomes/r/{realReportID}/split/{splitReportActionID}, but that split action still lives underREPORT_ACTIONS${optimisticReportID}.withReportAndReportActionOrNotFoundlooks up the action under the real reportID, finds nothing, and rendersNotFoundPage. On refresh, theSPLIT_BILLresponse repopulates the action under the real reportID, so it heals.Evidence & data flow
Split.ts:1502-1530:key: \${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${splitChatReport.reportID}``.reportActionID, inheritingreportIDfrom the current chat route —ChatTransactionPreview.tsx:66-70and routeSPLIT_BILL_DETAILS(path: 'split/:reportActionID').REPORTbut notREPORT_ACTIONS—replaceOptimisticReportWithActualReport.ts:103-111. Theelse(thread) branch updateschildReportIDon the parent action, but the DM branch has no equivalent for the report actions collection.withReportAndReportActionOrNotFound.tsx:97-98:if (shouldHideReport || (parentReportAction !== undefined && isEmptyObject(linkedReportAction))). A secondary gate (DynamicSplitBillDetailsPage.tsx:131) also fires when the transaction is empty.Flow: FAB → create expense w/ new user → optimistic DM created → split expense (action keyed under optimistic reportID) → server reconciles DM to real reportID,
REPORT_ACTIONSleft orphaned → tap split → route uses real reportID → action not found → NotFound.What changes do you think we should make in order to solve the problem?
In the DM branch of
replaceOptimisticReportWithActualReport, when clearing the optimistic report also migrate its report actions: mergeallReportActions?.[optimisticReportID]intoREPORT_ACTIONS${preexistingReportID}and setREPORT_ACTIONS${optimisticReportID}tonull, so any actions created against the optimistic chat (like the split's IOU action) survive the re-key. This mirrors what already happens for in-flight requests inHandleUnusedOptimisticID, which rewrites queued request reportIDs but not local Onyx keys.What alternative solutions did you explore?
Deferring/guarding the split-preview navigation until the split action resolves under the active reportID (e.g. fall back to the optimistic reportID if the action isn't found under the real one). This is more of a band-aid at the navigation layer; migrating the report actions during reconciliation fixes the underlying data inconsistency for all consumers, not just this screen.
Possibly related open issues
These share the split → NotFound symptom but appear to have different triggers (self-DM / delete-after-submit) than this new-user-DM reconciliation race.
Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/92466)to create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
melvin-bot commentedon Jul 17, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @thesahindia (
External)wildan-m commentedon Jul 17, 2026
🚨 Edited by proposal-police: This proposal was edited at 2026-07-17 21:45:52 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
After creating an expense from the FAB with a brand-new user, then creating a Split expense in that same chat, opening the Split expense shows the "Not here" (Not Found) page in the RHP instead of the Split expense details.
What is the root cause of that problem?
The Split expense details screen looks up the split action inside the report you are currently viewing, rather than the report that actually owns the split action.
When you tap the split preview, navigation builds the split-details route from the currently active report route by appending the dynamic suffix
split/:reportActionID:App/src/pages/inbox/report/actionContents/ChatTransactionPreview.tsx
Lines 66 to 70 in 1b2fcd4
Because
createDynamicRouteappends the suffix toNavigation.getActiveRoute(), the resulting route isr/<viewedReportID>/split/<reportActionID>, so the route'sreportIDparam is the currently-viewed report.The Split details screen is wrapped by
withReportAndReportActionOrNotFound, which reads the report actions of the route'sreportIDand looks the split action up there. If the action is not found under that report, it renders the Not Found page:App/src/pages/inbox/report/withReportAndReportActionOrNotFound.tsx
Lines 56 to 60 in 1b2fcd4
App/src/pages/inbox/report/withReportAndReportActionOrNotFound.tsx
Lines 97 to 98 in 1b2fcd4
The problem only appears in this specific flow because of report-action merging. When a chat has a single expense (exactly the state produced by "create expense from FAB"), the transaction-thread actions are merged into the report you are viewing, so the report you are viewing is not the report that owns each displayed action. This is documented in
useOriginalReportID, andActionContentRouteralready computes the correct owner asactionOwnerReportID = originalReportID ?? reportID:App/src/hooks/useOriginalReportID.ts
Lines 11 to 22 in 1b2fcd4
App/src/pages/inbox/report/actionContents/ActionContentRouter.tsx
Line 165 in 1b2fcd4
Because the split route is built from the viewed report instead of the action owner, the split action lives in a different report than the one the route points at, so
withReportAndReportActionOrNotFoundcannot find it and shows "Not here". In a plain chat where the viewed report already owns the action (originalReportID === reportID) the two are identical, which is why the bug does not reproduce outside this "first split after creating an expense" flow.What changes do you think we should make in order to solve the problem?
Look the split action up in the report that owns it, while keeping the currently-viewed report as the screen's context (so back-navigation and
chatReportIDstay correct).ActionContentRouteralready derives the owner asactionOwnerReportID = originalReportID ?? reportID. We thread that value down toChatTransactionPreviewand, only when it differs from the viewedreportID, pass it to the split route as an extraactionReportIDparam:App/src/pages/inbox/report/actionContents/ActionContentRouter.tsx
Lines 181 to 189 in 1b2fcd4
Concretely:
actionReportIDargument toROUTES.SPLIT_BILL_DETAILS.getRoute(reportActionID, actionReportID?)(appended as a query param) and to theSPLIT_DETAILS.DYNAMIC_ROOTparam type.ActionContentRouter, pass the already-computedactionOwnerReportIDtoChatTransactionPreview.ChatTransactionPreview, whenactionOwnerReportIDdiffers from the viewedreportID, pass it asactionReportIDwhen building the split route.withReportAndReportActionOrNotFound, read the split action's report actions fromactionReportID ?? reportID(defaulting to the viewed report), while still using the viewedreportIDas the screen's report.With the action looked up in the report that actually contains it,
withReportAndReportActionOrNotFoundresolves the split action and the Split expense details render instead of the Not Found page. In the normal caseactionReportIDis absent, soactionReportID ?? reportIDequals the viewed report and every other flow is byte-for-byte unchanged.Compare branch: https://github.com/Expensify/App/compare/main...wildan-m:App:wildan/92466-split-details-owner-report?expand=1
What alternative solutions did you explore? (Optional)
Alternatively, the split lookup could be made resilient inside
withReportAndReportActionOrNotFoundby recomputing the single-transaction thread and searching the action there when it is not found under the route'sreportID. This duplicates the (relatively expensive) merge logic fromuseOriginalReportIDinside a shared HOC, so passing the already-known owner report ID from the navigation source is the more targeted and lower-risk fix.60 remaining items
melvin-bot commentedon Aug 30, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)melvin-bot commentedon Aug 30, 2026
Payment Summary
Resolving PRs:
Upwork Job
BugZero Checklist (@mallenexpensify)
mallenexpensify commentedon Sep 1, 2026
Payment Summary
Contributor: @mukhrr due $250 via NewDot
Contributor+: @dmkt9 paid $250 via Upwork.
@dmkt9 can you please accept the job below? Please reply here and tag me once you have.
https://www.upwork.com/jobs/~022094888804635479796
flaviadefaria commentedon Sep 2, 2026
Approved: @mukhrr due $250 via NewDot
dmkt9 commentedon Sep 2, 2026
@mallenexpensify Thanks. I've accepted the offer.
melvin-bot commentedon Sep 4, 2026
@mallenexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
melvin-bot commentedon Sep 5, 2026
@mallenexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
mallenexpensify commentedon Sep 7, 2026
@dmkt9 paid, summary updated above. Thx.