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
[$250] Thread - Hidden in LHN and loading header when thread reply on system message #77346
Version Number: v9.2.75-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:#76209 Email or phone of affected tester (no customers):applausetester+dp301n@applause.expensifail.com Issue reported by: Applause Internal Team Bug source: Pull Request QA execution Device used: Mac / Safari App Component: Left Hand Navigation (LHN)
Action Performed:
Go to workspace chat (WS chat).
Create an expense.
Open the expense.
Click “Report”.
Remove the expense from report.
Go to your self DM chat.
Open the “unreported expense” message.
Right-click on the system message that indicates the report was moved.
Submit a message in the thread.
Expected Result:
The reply message appears immediately with the correct header.
The thread is visible in the Left-Hand Navigation (LHN) as expected.
Actual Result:
After submitting the message, the header stays in “loading” mode.
The thread is hidden in the LHN.
changed the title [-]Thread - Hidden in LHN and loading header when thread reply on system message[/-][+][$250] Thread - Hidden in LHN and loading header when thread reply on system message[/+]on Dec 12, 2025
This seems to be a BE issue
When adding a comment to a child thread, the backend sends an Onyx merge that first sets the parent report action to null, then merges back only child-thread metadata fields.
This permanently removes required fields (actionName, message, originalMessage) from the parent action in Onyx, causing the report title to disappear until OpenReport rehydrates the action.
Please re-state the problem that we are trying to solve in this issue.
When replying in a thread on a system message (e.g. after unreporting an expense), the thread becomes hidden in the LHN and the thread header remains stuck in a loading state indefinitely. The reply is lost from the UI until a manual refresh or OpenReport call rehydrates the data.
What is the root cause of that problem?
As identified by @marufsharifi, the backend sends a two-step Onyx update sequence in response.onyxData when processing a thread reply on a system message:
{[parentReportActionID]: null} — nullifies the entire parent report action
{[parentReportActionID]: {childReportID: "...", childType: "chat"}} — merges back only child-thread metadata
In src/libs/actions/OnyxUpdates.ts (around line 41), response.onyxData is applied beforerequest.successData. Since Onyx's merge is shallow, step 1 deletes the full action object (including actionName, message, originalMessage), and step 2 creates a skeleton with only childReportID and childType.
This breaks two downstream consumers:
src/libs/SidebarUtils.ts (line ~831): The LHN thread visibility check lastAction?.actionName === CONST.REPORT.ACTIONS.TYPE.ADD_COMMENT fails because actionName is now undefined, so the thread disappears from the sidebar.
Thread header component: Depends on the parent action's actionName/message fields to render — without them, it shows an infinite loading state.
What changes do you think we should make in order to solve the problem?
Add a parent-action preservation step in the addActions function in src/libs/actions/Report/index.ts so that request.successData can restore the parent action after the backend response corrupts it.
Specific implementation:
In src/libs/actions/Report/index.ts — addActions() function (around lines 700-730 where successData is built):
When the reply is to a thread whose parent is on a different report, read the current parent report action from Onyx and include its full field set in successData. After response.onyxData applies (and potentially corrupts the action), request.successData applies next and restores all required fields alongside the new child-thread metadata.
Defense-in-depth in src/libs/SidebarUtils.ts (line ~831):
Make the thread visibility check resilient to temporarily missing actionName by also checking whether the report is a thread via report.parentReportActionID:
The primary fix restores the parent action from successData after backend corruption
The defensive check keeps the thread visible in the LHN even during the brief window between onyxData and successData application
What alternative solutions did you explore? (Optional)
Coalescing null+merge in OnyxUpdates.ts: Pre-processing response.onyxData to detect and merge sequential null-then-partial updates for the same key. Rejected because it changes infrastructure-level Onyx update behavior and risks side effects across the app.
Triggering OpenReport on missing fields: Adding a rehydration call when the parent action is corrupted. Rejected because it adds a network round-trip and doesn't prevent the UI flash.
How will you test this?
Manual (staging):
Go to workspace chat, create an expense, open it, click "Report", then remove from report
Go to self DM, open the "unreported expense" system message, reply in thread
Verify: thread appears in LHN immediately, header renders correctly, parent action retains all fields in Onyx
Regression:
Delete a comment/report action and confirm it still disappears from UI
Reply in a normal (non-system-message) thread and confirm behavior unchanged
Verify other thread reply flows (group chat, DM) are unaffected
Automated:
Unit test simulating the Onyx update sequence: existing parent action → null merge → partial metadata merge → assert actionName, message, originalMessage are preserved after successData applies
Activity
melvin-bot commentedon Dec 11, 2025
Triggered auto assignment to @isabelastisser (
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.[-]Thread - Hidden in LHN and loading header when thread reply on system message[/-][+][$250] Thread - Hidden in LHN and loading header when thread reply on system message[/+]melvin-bot commentedon Dec 12, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021999592012393993056
melvin-bot commentedon Dec 12, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @akinwale (
External)marufsharifi commentedon Dec 14, 2025
This seems to be a BE issue
When adding a comment to a child thread, the backend sends an Onyx merge that first sets the parent report action to
null, then merges back only child-thread metadata fields.This permanently removes required fields (
actionName,message,originalMessage) from the parent action in Onyx, causing the report title to disappear until OpenReport rehydrates the action.melvin-bot commentedon Dec 16, 2025
@akinwale Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
melvin-bot commentedon Dec 17, 2025
@akinwale Huh... This is 4 days overdue. Who can take care of this?
36 remaining items
Harmatta commentedon Feb 7, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
When replying in a thread on a system message (e.g. after unreporting an expense), the thread becomes hidden in the LHN and the thread header remains stuck in a loading state indefinitely. The reply is lost from the UI until a manual refresh or
OpenReportcall rehydrates the data.What is the root cause of that problem?
As identified by @marufsharifi, the backend sends a two-step Onyx update sequence in
response.onyxDatawhen processing a thread reply on a system message:{[parentReportActionID]: null}— nullifies the entire parent report action{[parentReportActionID]: {childReportID: "...", childType: "chat"}}— merges back only child-thread metadataIn
src/libs/actions/OnyxUpdates.ts(around line 41),response.onyxDatais applied beforerequest.successData. Since Onyx's merge is shallow, step 1 deletes the full action object (includingactionName,message,originalMessage), and step 2 creates a skeleton with onlychildReportIDandchildType.This breaks two downstream consumers:
src/libs/SidebarUtils.ts(line ~831): The LHN thread visibility checklastAction?.actionName === CONST.REPORT.ACTIONS.TYPE.ADD_COMMENTfails becauseactionNameis nowundefined, so the thread disappears from the sidebar.actionName/messagefields to render — without them, it shows an infinite loading state.What changes do you think we should make in order to solve the problem?
Add a parent-action preservation step in the
addActionsfunction insrc/libs/actions/Report/index.tsso thatrequest.successDatacan restore the parent action after the backend response corrupts it.Specific implementation:
In
src/libs/actions/Report/index.ts—addActions()function (around lines 700-730 where successData is built):When the reply is to a thread whose parent is on a different report, read the current parent report action from Onyx and include its full field set in
successData. Afterresponse.onyxDataapplies (and potentially corrupts the action),request.successDataapplies next and restores all required fields alongside the new child-thread metadata.Defense-in-depth in
src/libs/SidebarUtils.ts(line ~831):Make the thread visibility check resilient to temporarily missing
actionNameby also checking whether the report is a thread viareport.parentReportActionID:This two-layer approach ensures:
What alternative solutions did you explore? (Optional)
OnyxUpdates.ts: Pre-processingresponse.onyxDatato detect and merge sequential null-then-partial updates for the same key. Rejected because it changes infrastructure-level Onyx update behavior and risks side effects across the app.OpenReporton missing fields: Adding a rehydration call when the parent action is corrupted. Rejected because it adds a network round-trip and doesn't prevent the UI flash.How will you test this?
Manual (staging):
Regression:
Automated:
actionName,message,originalMessageare preserved after successData appliesContributor details:
Email: storefile996@gmail.com
Upwork: https://www.upwork.com/freelancers/~01184f546f3a74ab48
melvin-bot commentedon Feb 11, 2026
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
melvin-bot commentedon Feb 18, 2026
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
melvin-bot commentedon Feb 19, 2026
@akinwale 10 days overdue. I'm getting more depressed than Marvin.
mvtglobally commentedon Feb 28, 2026
Issue not reproducible during KI retests. (Fifth week)
melvin-bot commentedon Mar 2, 2026
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
sakluger commentedon Mar 4, 2026
Let's request a retest.
m-natarajan commentedon Mar 4, 2026
Passed, Chrome / v9.3.31-0
Screen.Recording.2026-03-04.at.22.52.06.mp4
sakluger commentedon Mar 5, 2026
Thanks! We can close this one since it's no longer reproducible.