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] Onboarding - Hmm it's not here page displayed when tap on report header for any task #90898
During onboarding, task reports are created optimistically with NOTIFICATION_PREFERENCE.HIDDEN. When ReportFetchHandler calls openReport for this task, the server can set errorFields.notFound on the report (e.g., because the CompleteGuidedSetup API hasn't finished creating it server-side, or because the HIDDEN notification preference affects server-side access checks).
The result:
The task report remains in Onyx (optimistic data with a valid reportID), so ReportScreen renders it normally.
The user clicks the header → navigateToDetailsPage navigates to r/{reportID}/details.
withReportOrNotFound on ReportDetailsPage checks canAccessReport → returns false due to errorFields.notFound → shows "Hmm... it's not here".
What changes do you think we should make in order to solve the problem?
Align withReportOrNotFound's guard logic with ReportNotFoundGuard so they handle errorFields.notFound consistently. Specifically, in withReportOrNotFound.tsx: if the report exists in Onyx and the user was already able to view it in ReportScreen, the details page should not block access based on errorFields.notFound alone.
One approach: skip the canAccessReport check in withReportOrNotFound when the report is loaded and is a task report (since ReportNotFoundGuard already allowed viewing it). Alternatively, ensure the openReport response for onboarding task reports does not set errorFields.notFound.
What alternative solutions did you explore? (Optional)
Server-side fix to prevent notFound from being set on onboarding task reports — this would be ideal but requires backend changes.
Clearing errorFields.notFound after CompleteGuidedSetup succeeds — partial fix, wouldn't cover the race condition where openReport runs before the setup completes.
Investigation details
Navigation flow:
HeaderView.tsx:314 → calls navigateToDetailsPage(report) with the task's own reportID
On CompleteGuidedSetup failure, task reports are set to null in Onyx
Key asymmetry:
ReportNotFoundGuard (line 51-53): reportExists = !!reportID — no errorFields.notFound check
withReportOrNotFound (line 103): checks canAccessReport which rejects reports with errorFields.notFound
Possibly related:#89724 — same "Hmm... it's not here" symptom when clicking "View Details" on reports.
Confidence: Medium — the errorFields.notFound mechanism is the most likely cause given the code asymmetry, but production logs would be needed to confirm the server actually sets this flag on onboarding task reports.
Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.
🚨 Edited by proposal-police: This proposal was edited at 2026-05-16 21:53:30 UTC.
Replaces my earlier proposal. The prior body correctly identified that admins-room task reports inherit chatType: policyAdmins, but it missed the details-page access guard that actually renders the missing page. This version splits the fix into the access guard and the room-helper classification pieces.
Proposal
Please re-state the problem that we are trying to solve in this issue.
For onboarding accounts where guided setup posts tasks in the #admins room, opening any task and tapping the task report header navigates to the generic "Hmm, it's not here" page instead of opening that task's details page.
The details page should open for the task report, and it should render task details rather than room-only UI such as the Room description field.
What is the root cause of that problem?
Two client-side assumptions combine here.
Defect 1 - The details-page guard rejects a loaded task report
The main report screen only treats a report as missing when the report does not exist in Onyx after loading:
So a task report can be visible in ReportScreen, then the header tap navigates to r/:reportID/details, and the details wrapper renders NotFound for the same loaded report because it applies the stricter errorFields.notFound access check.
Defect 2 - Admins-room task reports are classified as rooms
Admins-room onboarding tasks are task reports, but buildOptimisticTaskReport() copies chatType: policyAdmins from the parent #admins room:
Once the details page is allowed to render, those false room classifications make ReportDetailsPage show room-oriented UI, including the Room description path, for a task report:
Defect 1 causes the "Hmm, it's not here" page. Defect 2 is why the expected task details page would still be wrong unless task reports are excluded from room helpers.
What changes do you think we should make in order to solve the problem?
Fix both sides while keeping the backend-compatible chatType: policyAdmins value on admins-room task reports.
Make the details access guard consistent for loaded task reports. The narrow fix is to allow a loaded type: task report with parent access to pass the details-page guard even if a stale errorFields.notFound value is present. This can be done either in withReportOrNotFound() before calling canAccessReport(), or by teaching canAccessReport() that task reports with valid parent access should not be rejected solely by errorFields.notFound.
Update the room/default-room helpers in src/libs/ReportUtils.ts so task reports return false before helper logic inspects chatType. At minimum this covers isAdminRoom(), isAnnounceRoom(), isDefaultRoom(), isDomainRoom(), and isUserCreatedPolicyRoom(), or equivalently makes isChatRoom() and the direct helpers require an actual chat/room report type.
Add unit coverage for a report with type: CONST.REPORT.TYPE.TASK, chatType: CONST.REPORT.CHAT_TYPE.POLICY_ADMINS, and a stale errorFields.notFound. Assert that the details guard allows the loaded task report, isTaskReport(report) is true, room helpers return false, and shouldDisableDetailPage(report) remains false.
Scope boundaries: src/pages/inbox/report/withReportOrNotFound.tsx or src/libs/ReportUtils.ts for the loaded-task access guard; src/libs/ReportUtils.ts for the room-helper task guards; optional test-only changes under tests/unit/ReportUtilsTest or the existing report details guard tests. This affects all clients through shared JS. It should not change buildOptimisticTaskReport(), OpenReport API parameters, backend task creation, or header navigation.
What alternative solutions did you explore? (Optional)
MelvinBot correctly identified the ReportScreen vs withReportOrNotFound guard asymmetry, but only changing that guard would still leave admins-room task reports classified as rooms and would still expose room UI on the task details page.
My earlier proposal covered the inherited chatType room-classification problem, but that alone would not explain or fix the NotFound gate because withReportOrNotFound() still rejects reports with errorFields.notFound.
I also considered removing chatType from admins-room task reports, but that would reintroduce the FE/BE mismatch fixed by #84258. Keeping the field and making task identity override room helpers is narrower.
changed the title [-]Onboarding - Hmm it's not here page displayed when tap on report header for any task[/-][+][$250] Onboarding - Hmm it's not here page displayed when tap on report header for any task[/+]on May 16, 2026
Please re-state the problem that we are trying to solve in this issue.
When a new user finishes onboarding as "Manage my team's expenses" and opens any task in the #admins room, tapping the report header navigates to the task's details page but shows "Hmm... it's not here" instead of the task details.
What is the root cause of that problem?
ReportFetchHandler.fetchReport has a guard that skips calling openReport for optimistic reports that don't exist server-side yet:
This guard was written for optimistic chat reports, but it only checks type === CHAT. Onboarding task reports created by prepareOnboardingOnyxData in ReportUtils.ts:11944-11947 are explicitly marked isOptimisticReport: true in their metadata, but their type is TASK, not CHAT. So the guard misses them.
When the user opens a task from the #admins room, fetchReport fires (via the useEffect at ReportFetchHandler.tsx:246-251 that runs on route changes). Since the guard doesn't match, openReport is called for the task. At this point CompleteGuidedSetup may not have finished creating the tasks server-side yet, so the server returns "not found". That response sets report.errorFields.notFound on the task in Onyx.
Then when the user taps the task header, HeaderView.tsx:314 calls navigateToDetailsPage(report), which routes to r/{taskReportID}/details. On that page, withReportOrNotFound.tsx:103 evaluates canAccessReport(report, betas, isReportArchived). In ReportUtils.ts:9062-9064, canAccessReport returns false because report.errorFields.notFound is set. withReportOrNotFound then renders NotFoundPage instead of the details content.
ReportNotFoundGuard on the task's report screen doesn't trip because it only checks !!reportID, never errorFields.notFound — so the user can view the task itself just fine. The asymmetry only surfaces when navigating to the details sub-page.
What changes do you think we should make in order to solve the problem?
The fix is one line in src/pages/inbox/ReportFetchHandler.tsx. isTaskReport is already imported there, so extend the existing guard to also cover optimistic task reports:
This prevents openReport from firing while a task is still pending server-side creation, so errorFields.notFound is never written to Onyx. Once CompleteGuidedSetup succeeds, the success data at ReportUtils.ts:12030-12035 sets isOptimisticReport: false on the task's metadata. On the user's next navigation to that report, fetchReport runs again, the guard no longer applies, openReport succeeds (task is now server-side), and everything is consistent.
What alternative solutions did you explore? (Optional)
MelvinBot's proposal targets withReportOrNotFound — either skipping canAccessReport for task reports or treating the guards asymmetrically. That would hide real "not found" errors for future task-related pages. The human proposal targets isAdminRoom/isDefaultRoom to stop tasks from being classified as admin rooms. That analysis is off: for tasks with chatType: POLICY_ADMINS, canSeeDefaultRoom already returns true via its own isAdminRoom check, so that path in canAccessReport never blocks them. The issue is purely errorFields.notFound, and the only safe fix is stopping the premature openReport call at source.
Tapping the report header of any onboarding task in the #admins room opens the "Hmm… it's not here" NotFoundPage instead of the task details page.
Root cause
This is a regression with three layered contributing factors.
1 - Onboarding #admins task reports inherit a room chatType:
buildOptimisticTaskReport stamps the POLICY_ADMINS chat type onto every onboarding task created in the #admins room:
// src/libs/ReportUtils.ts:8652-8666 (buildOptimisticTaskReport)return{reportID: generateReportID(),
...
type: CONST.REPORT.TYPE.TASK,// Only #admins tasks inherit chatType for Concierge routing.// Task reports are not expense chats, so we do not inherit policyExpenseChat (or other chat types).
...(parentChatType===CONST.REPORT.CHAT_TYPE.POLICY_ADMINS&&{chatType: CONST.REPORT.CHAT_TYPE.POLICY_ADMINS}),
parentReportID,
...
};
The chat type is deliberately kept for backend Concierge routing, but it makes the report simultaneously type: TASKand a room as far as every client predicate is concerned, because all of them key off chatType only:
So the task opens and renders fine in the report view. ReportDetailsPage is instead wrapped by withReportOrNotFound(), which routes through canAccessReport:
The default-room branch does not fire (canSeeDefaultRoom returns true via the isAdminRoom short-circuit at src/libs/ReportUtils.ts:9047, since the task carries the POLICY_ADMINS chat type). The 404 therefore comes from the second branch: the server transiently attaches errorFields.notFound to these reports while CompleteGuidedSetup reconciles the optimistic task — the backend applies its POLICY_ADMINS room access check (the report carries that chat type) to a brand-new account whose policy-admin status is not yet established. The frontend never sets notFound truthy itself — it only ever clears it to null (src/libs/actions/Report/index.ts:1526,1940), so this value is purely server-driven. Net result: ReportScreen shows the task, but tapping the header → navigateToDetailsPage (src/libs/ReportUtils.ts:6120-6133) → ReportDetailsPage → canAccessReport returns false → NotFoundPage.
3 - The same misclassification would wrongly render a Room description field:
Once the page opens, the inherited chat type makes the task look like a room here:
isChatRoom is true (chat type), onboarding tasks always carry a description, and onboarding tasks are modifiable, so the Room description row renders — exactly what the Expected Result calls out ("there is no Room description field").
Proposed fix
Two targeted, type-guarded changes. A type: TASK report must never be 404'd by the report-level errorFields.notFound, nor be treated as a room in the details UI. A task's genuine deletion is surfaced through its parent report action / isCanceledTaskReport (src/pages/ReportDetailsPage.tsx:217,301-308), not this server field, and withReportOrNotFound still 404s a truly missing task via its !isReportLoaded check.
// src/libs/ReportUtils.ts — canAccessReport (replace lines 9055-9066)functioncanAccessReport(report: OnyxEntry<Report>,betas: OnyxEntry<Beta[]>,isReportArchived=false): boolean{// We hide default rooms (it's basically just domain rooms now) from people who aren't on the defaultRooms beta.if(isDefaultRoom(report)&&!canSeeDefaultRoom(report,betas,isReportArchived)){returnfalse;}// Onboarding tasks posted to #admins inherit the POLICY_ADMINS chatType purely for backend// Concierge routing (see buildOptimisticTaskReport). They are still `type: TASK`; the server// transiently flags them with errorFields.notFound for brand-new accounts before// CompleteGuidedSetup reconciles. ReportScreen still renders them (ReportNotFoundGuard only// checks existence), so the details page must not diverge. A genuinely deleted task is// surfaced via its parent report action (isCanceledTaskReport), not report-level notFound.if(report?.errorFields?.notFound&&!isTaskReport(report)){returnfalse;}returntrue;}
// src/pages/ReportDetailsPage.tsx:222 — never show the Room description row for a taskconstshouldShowReportDescription=isChatRoom&&!isTaskReport&&(canEditReportDescription||report.description!=='');
isTaskReport is defined in src/libs/ReportUtils.ts:1519-1521 (in scope for canAccessReport) and the memoized isTaskReport already exists in ReportDetailsPage.tsx:214, so no new imports are required.
Why this approach
The 404 is fixed at the single shared chokepoint: canAccessReport is also consumed by withReportAndReportActionOrNotFound.tsx:78 and canCurrentUserOpenReport (src/libs/ReportUtils.ts:10738), so a task-aware guard keeps every report-detail entry point consistent with ReportScreen — the existing precedent that "a report that exists should not 404". The notFound behaviour is preserved verbatim for every non-task report, so there is zero blast radius for rooms and chats. The ReportDetailsPage change mirrors the team's existing intent on the very same line (the isTaskReport ? … : … special-case already acknowledges a task can carry a chat type) and satisfies the Expected Result. Removing the chatType in buildOptimisticTaskReport was considered and rejected: the comment there documents it as required for backend Concierge routing, so the correct fix is to stop the client treating a task as a room, not to strip the routing hint.
Please re-state the problem that we are trying to solve in this issue.
For a fresh "Manage my team's expenses" onboarding account (size 11–50 + SAP integration, on iOS), opening any onboarding task posted to the #admins room and tapping the task report header navigates to the generic "Hmm… it's not here" page instead of the task's Details page.
The Expected Result has two parts: the Details page should actually open for the task report, and it should not render a "Room description" field (Room description is a room concept; tasks have their own title/description flow). Right now the user is blocked on the NotFoundPage, so the Room-description part of the expectation never even gets a chance to render correctly.
What is the root cause of that problem?
The bug is the combination of two assumptions in the client that overlap badly on onboarding admins-room task reports. Both have to be fixed; otherwise even if we get past the NotFoundPage the Details page would still render a Room description row for a task.
Defect 1 — ReportScreen and ReportDetailsPage disagree about what "not found" means
The main report screen is gated by ReportNotFoundGuard. It only considers a report missing when it does not exist in Onyx after loading, and it never inspects report.errorFields.notFound:
The Details page is wrapped by withReportOrNotFound() instead, and that wrapper feeds the loaded report through the stricter canAccessReport predicate:
How errorFields.notFound ends up on an onboarding task: prepareOnboardingOnyxData creates each onboarding task optimistically and tags the report metadata with isOptimisticReport: true:
ReportFetchHandler then runs fetchReport() on every route change, and its early-return guard for optimistic reports only matches type === CHAT, so tasks (which are type: TASK) fall through and openReport fires for them while CompleteGuidedSetup is still reconciling them server-side:
The frontend only ever clears notFound (the success branch sets it to null on success); it never sets it truthy. So the truthy value is purely server-driven, written by the OpenReport response, and it lives on the Onyx report until the next successful openReport:
End-to-end: ReportScreen still renders the task fine (its guard only checks existence). Tapping the header calls navigateToDetailsPage(report) on the task and routes to r/{taskID}/details:
At that point withReportOrNotFound calls canAccessReport, the errorFields.notFound branch fires, and NotFoundPage is rendered. The first branch of canAccessReport (default-room beta) does not fire here even though the task carries chatType: POLICY_ADMINS, because canSeeDefaultRoom short-circuits to true for admin rooms — the 404 strictly comes from the errorFields.notFound branch.
Defect 2 — Admins-room task reports inherit a room chatType, so room helpers misclassify them
buildOptimisticTaskReport deliberately copies chatType: POLICY_ADMINS onto the task when the parent is the #admins room. This is required so the backend routes Concierge messaging correctly (PR #84258), but it makes the report simultaneously type: TASK and a room as far as every client predicate is concerned:
Once the Details page is allowed to render, that misclassification produces the unwanted Room description row. isChatRoom is true (the inherited chatType), the onboarding task always carries a non-empty description, and the user can modify their own onboarding tasks, so the condition resolves truthy:
Defect 1 by itself causes the "Hmm… it's not here" page. Defect 2 by itself would still show a wrong Room description field on the task's Details page. Both need to be fixed for the Expected Result to hold.
What changes do you think we should make in order to solve the problem?
Two type-guarded changes. The first one is in a shared chokepoint (canAccessReport) so every report-detail entry point — withReportOrNotFound, withReportAndReportActionOrNotFound, canCurrentUserOpenReport, shouldReportBeInOptionList — gets the same treatment and lines up with ReportScreen. The second is the existing precedent on the same line in ReportDetailsPage, tightened from "task-modifiable" to plainly "not a task".
A task's genuine deletion is already surfaced separately, via its parent report action (isCanceledTaskReport), and a truly missing report is still 404'd by withReportOrNotFound's !isReportLoaded check, so skipping the errorFields.notFound branch for task reports specifically is safe — it only changes behavior for the bug we want to fix.
In src/libs/ReportUtils.ts, replacing the errorFields.notFound branch of canAccessReport:
In src/pages/ReportDetailsPage.tsx, replacing the shouldShowReportDescription expression so a task report never renders the Room description row regardless of inherited chatType:
isTaskReport is defined at src/libs/ReportUtils.ts:1516-1518 so it is in scope where canAccessReport lives, and the memoized isTaskReport already exists at src/pages/ReportDetailsPage.tsx:214, so neither change introduces new imports.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Add a unit test for a synthetic report with type: CONST.REPORT.TYPE.TASK, chatType: CONST.REPORT.CHAT_TYPE.POLICY_ADMINS, and errorFields.notFound: 'reportNotFound' set, asserting:
canAccessReport({...report, type: CONST.REPORT.TYPE.CHAT}, betas, false) still returns false (existing behaviour for non-task reports is preserved).
The shouldShowReportDescription expression derived from ReportDetailsPage (isChatRoom && !isTaskReport && (canEditReportDescription || report.description !== '')) resolves to false for that task fixture.
@thesahindia this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
Activity
MelvinBot commentedon May 16, 2026
Proposal
What is the root cause of that problem?
There is an asymmetry between how
ReportScreenandReportDetailsPageguard against "not found" reports.ReportScreenusesReportNotFoundGuard, which only checks whether the report exists in Onyx (!!reportID). It does not checkerrorFields.notFound.ReportDetailsPageuseswithReportOrNotFound, which additionally callscanAccessReport— and that returnsfalsewhenreport.errorFields.notFoundis set.During onboarding, task reports are created optimistically with
NOTIFICATION_PREFERENCE.HIDDEN. WhenReportFetchHandlercallsopenReportfor this task, the server can seterrorFields.notFoundon the report (e.g., because theCompleteGuidedSetupAPI hasn't finished creating it server-side, or because the HIDDEN notification preference affects server-side access checks).The result:
reportID), soReportScreenrenders it normally.navigateToDetailsPagenavigates tor/{reportID}/details.withReportOrNotFoundonReportDetailsPagecheckscanAccessReport→ returnsfalsedue toerrorFields.notFound→ shows "Hmm... it's not here".What changes do you think we should make in order to solve the problem?
Align
withReportOrNotFound's guard logic withReportNotFoundGuardso they handleerrorFields.notFoundconsistently. Specifically, inwithReportOrNotFound.tsx: if the report exists in Onyx and the user was already able to view it inReportScreen, the details page should not block access based onerrorFields.notFoundalone.One approach: skip the
canAccessReportcheck inwithReportOrNotFoundwhen the report is loaded and is a task report (sinceReportNotFoundGuardalready allowed viewing it). Alternatively, ensure theopenReportresponse for onboarding task reports does not seterrorFields.notFound.What alternative solutions did you explore? (Optional)
notFoundfrom being set on onboarding task reports — this would be ideal but requires backend changes.errorFields.notFoundafterCompleteGuidedSetupsucceeds — partial fix, wouldn't cover the race condition whereopenReportruns before the setup completes.Investigation details
Navigation flow:
HeaderView.tsx:314→ callsnavigateToDetailsPage(report)with the task's own reportIDReportUtils.ts:6119-6121→ navigates tor/{reportID}/detailswithReportOrNotFound.tsx:103→shouldShowNotFoundPage = !isReportLoaded || !canAccessReport(report, betas, isReportArchived)ReportUtils.ts:9050→canAccessReportreturns false whenreport.errorFields.notFoundis setOnboarding task creation:
ReportUtils.ts:11831-11838withNOTIFICATION_PREFERENCE.HIDDENCompleteGuidedSetupfailure, task reports are set to null in OnyxKey asymmetry:
ReportNotFoundGuard(line 51-53):reportExists = !!reportID— noerrorFields.notFoundcheckwithReportOrNotFound(line 103): checkscanAccessReportwhich rejects reports witherrorFields.notFoundPossibly related: #89724 — same "Hmm... it's not here" symptom when clicking "View Details" on reports.
Confidence: Medium — the
errorFields.notFoundmechanism is the most likely cause given the code asymmetry, but production logs would be needed to confirm the server actually sets this flag on onboarding task reports.Next Steps for Contributor+ team: Reply with
@MelvinBot implement thisto create a draft PR,@MelvinBot <your feedback>to refine this analysis, or explain why you are rejecting Melvin's proposal.KJ21-ENG commentedon May 16, 2026
🚨 Edited by proposal-police: This proposal was edited at 2026-05-16 21:53:30 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
For onboarding accounts where guided setup posts tasks in the #admins room, opening any task and tapping the task report header navigates to the generic "Hmm, it's not here" page instead of opening that task's details page.
The details page should open for the task report, and it should render task details rather than room-only UI such as the Room description field.
What is the root cause of that problem?
Two client-side assumptions combine here.
Defect 1 - The details-page guard rejects a loaded task report
The main report screen only treats a report as missing when the report does not exist in Onyx after loading:
App/src/pages/inbox/ReportNotFoundGuard.tsx
Lines 51 to 53 in 45f992d
But the details page is wrapped by
withReportOrNotFound(), which rejects any loaded report whencanAccessReport()returns false:App/src/pages/inbox/report/withReportOrNotFound.tsx
Lines 101 to 103 in 45f992d
canAccessReport()returns false wheneverreport.errorFields.notFoundis present:App/src/libs/ReportUtils.ts
Lines 9044 to 9051 in 45f992d
So a task report can be visible in
ReportScreen, then the header tap navigates tor/:reportID/details, and the details wrapper renders NotFound for the same loaded report because it applies the strictererrorFields.notFoundaccess check.Defect 2 - Admins-room task reports are classified as rooms
Admins-room onboarding tasks are task reports, but
buildOptimisticTaskReport()copieschatType: policyAdminsfrom the parent #admins room:App/src/libs/ReportUtils.ts
Lines 8621 to 8652 in 45f992d
The room helpers then classify that task as an admin/default/chat room because they only inspect
chatType, nottype:App/src/libs/ReportUtils.ts
Lines 1642 to 1664 in 45f992d
App/src/libs/ReportUtils.ts
Lines 1770 to 1771 in 45f992d
Once the details page is allowed to render, those false room classifications make
ReportDetailsPageshow room-oriented UI, including the Room description path, for a task report:App/src/pages/ReportDetailsPage.tsx
Lines 221 to 222 in 45f992d
App/src/pages/ReportDetailsPage.tsx
Line 749 in 45f992d
Defect 1 causes the "Hmm, it's not here" page. Defect 2 is why the expected task details page would still be wrong unless task reports are excluded from room helpers.
What changes do you think we should make in order to solve the problem?
Fix both sides while keeping the backend-compatible
chatType: policyAdminsvalue on admins-room task reports.type: taskreport with parent access to pass the details-page guard even if a staleerrorFields.notFoundvalue is present. This can be done either inwithReportOrNotFound()before callingcanAccessReport(), or by teachingcanAccessReport()that task reports with valid parent access should not be rejected solely byerrorFields.notFound.src/libs/ReportUtils.tsso task reports return false before helper logic inspectschatType. At minimum this coversisAdminRoom(),isAnnounceRoom(),isDefaultRoom(),isDomainRoom(), andisUserCreatedPolicyRoom(), or equivalently makesisChatRoom()and the direct helpers require an actual chat/room report type.buildOptimisticTaskReport()inheritingchatType: policyAdmins; that preserves the FE/BE alignment from [Due for payment 2026-04-14] Align optimistic task chatType with Auth for admins-room tasks #84258 while makingtype: taskauthoritative for details-page routing and UI.type: CONST.REPORT.TYPE.TASK,chatType: CONST.REPORT.CHAT_TYPE.POLICY_ADMINS, and a staleerrorFields.notFound. Assert that the details guard allows the loaded task report,isTaskReport(report)is true, room helpers return false, andshouldDisableDetailPage(report)remains false.Scope boundaries:
src/pages/inbox/report/withReportOrNotFound.tsxorsrc/libs/ReportUtils.tsfor the loaded-task access guard;src/libs/ReportUtils.tsfor the room-helper task guards; optional test-only changes undertests/unit/ReportUtilsTestor the existing report details guard tests. This affects all clients through shared JS. It should not changebuildOptimisticTaskReport(), OpenReport API parameters, backend task creation, or header navigation.What alternative solutions did you explore? (Optional)
MelvinBot correctly identified the
ReportScreenvswithReportOrNotFoundguard asymmetry, but only changing that guard would still leave admins-room task reports classified as rooms and would still expose room UI on the task details page.My earlier proposal covered the inherited
chatTyperoom-classification problem, but that alone would not explain or fix the NotFound gate becausewithReportOrNotFound()still rejects reports witherrorFields.notFound.I also considered removing
chatTypefrom admins-room task reports, but that would reintroduce the FE/BE mismatch fixed by #84258. Keeping the field and making task identity override room helpers is narrower.melvin-bot commentedon May 16, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @thesahindia (
External)[-]Onboarding - Hmm it's not here page displayed when tap on report header for any task[/-][+][$250] Onboarding - Hmm it's not here page displayed when tap on report header for any task[/+]melvin-bot commentedon May 16, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022055766445038884482
KJ21-ENG commentedon May 16, 2026
Updated my proposal - split the fix into the task-details access guard and inherited #admins chatType room classification.
yuvrajangadsingh commentedon May 16, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a new user finishes onboarding as "Manage my team's expenses" and opens any task in the #admins room, tapping the report header navigates to the task's details page but shows "Hmm... it's not here" instead of the task details.
What is the root cause of that problem?
ReportFetchHandler.fetchReporthas a guard that skips callingopenReportfor optimistic reports that don't exist server-side yet:This guard was written for optimistic chat reports, but it only checks
type === CHAT. Onboarding task reports created byprepareOnboardingOnyxDatainReportUtils.ts:11944-11947are explicitly markedisOptimisticReport: truein their metadata, but theirtypeisTASK, notCHAT. So the guard misses them.When the user opens a task from the #admins room,
fetchReportfires (via theuseEffectatReportFetchHandler.tsx:246-251that runs on route changes). Since the guard doesn't match,openReportis called for the task. At this pointCompleteGuidedSetupmay not have finished creating the tasks server-side yet, so the server returns "not found". That response setsreport.errorFields.notFoundon the task in Onyx.Then when the user taps the task header,
HeaderView.tsx:314callsnavigateToDetailsPage(report), which routes tor/{taskReportID}/details. On that page,withReportOrNotFound.tsx:103evaluatescanAccessReport(report, betas, isReportArchived). InReportUtils.ts:9062-9064,canAccessReportreturnsfalsebecausereport.errorFields.notFoundis set.withReportOrNotFoundthen rendersNotFoundPageinstead of the details content.ReportNotFoundGuardon the task's report screen doesn't trip because it only checks!!reportID, nevererrorFields.notFound— so the user can view the task itself just fine. The asymmetry only surfaces when navigating to the details sub-page.What changes do you think we should make in order to solve the problem?
The fix is one line in
src/pages/inbox/ReportFetchHandler.tsx.isTaskReportis already imported there, so extend the existing guard to also cover optimistic task reports:This prevents
openReportfrom firing while a task is still pending server-side creation, soerrorFields.notFoundis never written to Onyx. OnceCompleteGuidedSetupsucceeds, the success data atReportUtils.ts:12030-12035setsisOptimisticReport: falseon the task's metadata. On the user's next navigation to that report,fetchReportruns again, the guard no longer applies,openReportsucceeds (task is now server-side), and everything is consistent.What alternative solutions did you explore? (Optional)
MelvinBot's proposal targets
withReportOrNotFound— either skippingcanAccessReportfor task reports or treating the guards asymmetrically. That would hide real "not found" errors for future task-related pages. The human proposal targetsisAdminRoom/isDefaultRoomto stop tasks from being classified as admin rooms. That analysis is off: for tasks withchatType: POLICY_ADMINS,canSeeDefaultRoomalready returnstruevia its ownisAdminRoomcheck, so that path incanAccessReportnever blocks them. The issue is purelyerrorFields.notFound, and the only safe fix is stopping the prematureopenReportcall at source.working branch with the fix applied: diff
trasnake87 commentedon May 16, 2026
Proposal
Tapping the report header of any onboarding task in the #admins room opens the "Hmm… it's not here" NotFoundPage instead of the task details page.
Root cause
This is a regression with three layered contributing factors.
1 - Onboarding #admins task reports inherit a room
chatType:buildOptimisticTaskReportstamps thePOLICY_ADMINSchat type onto every onboarding task created in the #admins room:The chat type is deliberately kept for backend Concierge routing, but it makes the report simultaneously
type: TASKand a room as far as every client predicate is concerned, because all of them key offchatTypeonly:(
DEFAULT_POLICY_ROOM_CHAT_TYPESincludesPOLICY_ADMINS—src/CONST/index.ts:208.)2 -
ReportDetailsPageandReportScreendisagree on "not found":ReportScreenguards withReportNotFoundGuard, which only checks that the report exists in Onyx — it never consultserrorFields.notFound:So the task opens and renders fine in the report view.
ReportDetailsPageis instead wrapped bywithReportOrNotFound(), which routes throughcanAccessReport:The default-room branch does not fire (
canSeeDefaultRoomreturnstruevia theisAdminRoomshort-circuit atsrc/libs/ReportUtils.ts:9047, since the task carries thePOLICY_ADMINSchat type). The 404 therefore comes from the second branch: the server transiently attacheserrorFields.notFoundto these reports whileCompleteGuidedSetupreconciles the optimistic task — the backend applies itsPOLICY_ADMINSroom access check (the report carries that chat type) to a brand-new account whose policy-admin status is not yet established. The frontend never setsnotFoundtruthy itself — it only ever clears it tonull(src/libs/actions/Report/index.ts:1526,1940), so this value is purely server-driven. Net result:ReportScreenshows the task, but tapping the header →navigateToDetailsPage(src/libs/ReportUtils.ts:6120-6133) →ReportDetailsPage→canAccessReportreturnsfalse→ NotFoundPage.3 - The same misclassification would wrongly render a Room description field:
Once the page opens, the inherited chat type makes the task look like a room here:
isChatRoomistrue(chat type), onboarding tasks always carry adescription, and onboarding tasks are modifiable, so the Room description row renders — exactly what the Expected Result calls out ("there is no Room description field").Proposed fix
Two targeted, type-guarded changes. A
type: TASKreport must never be 404'd by the report-levelerrorFields.notFound, nor be treated as a room in the details UI. A task's genuine deletion is surfaced through its parent report action /isCanceledTaskReport(src/pages/ReportDetailsPage.tsx:217,301-308), not this server field, andwithReportOrNotFoundstill 404s a truly missing task via its!isReportLoadedcheck.isTaskReportis defined insrc/libs/ReportUtils.ts:1519-1521(in scope forcanAccessReport) and the memoizedisTaskReportalready exists inReportDetailsPage.tsx:214, so no new imports are required.Why this approach
The 404 is fixed at the single shared chokepoint:
canAccessReportis also consumed bywithReportAndReportActionOrNotFound.tsx:78andcanCurrentUserOpenReport(src/libs/ReportUtils.ts:10738), so a task-aware guard keeps every report-detail entry point consistent withReportScreen— the existing precedent that "a report that exists should not 404". ThenotFoundbehaviour is preserved verbatim for every non-task report, so there is zero blast radius for rooms and chats. TheReportDetailsPagechange mirrors the team's existing intent on the very same line (theisTaskReport ? … : …special-case already acknowledges a task can carry a chat type) and satisfies the Expected Result. Removing thechatTypeinbuildOptimisticTaskReportwas considered and rejected: the comment there documents it as required for backend Concierge routing, so the correct fix is to stop the client treating a task as a room, not to strip the routing hint.abbasifaizan70 commentedon May 16, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
For a fresh "Manage my team's expenses" onboarding account (size 11–50 + SAP integration, on iOS), opening any onboarding task posted to the
#adminsroom and tapping the task report header navigates to the generic "Hmm… it's not here" page instead of the task's Details page.The Expected Result has two parts: the Details page should actually open for the task report, and it should not render a "Room description" field (Room description is a room concept; tasks have their own title/description flow). Right now the user is blocked on the NotFoundPage, so the Room-description part of the expectation never even gets a chance to render correctly.
What is the root cause of that problem?
The bug is the combination of two assumptions in the client that overlap badly on onboarding admins-room task reports. Both have to be fixed; otherwise even if we get past the NotFoundPage the Details page would still render a Room description row for a task.
Defect 1 —
ReportScreenandReportDetailsPagedisagree about what "not found" meansThe main report screen is gated by
ReportNotFoundGuard. It only considers a report missing when it does not exist in Onyx after loading, and it never inspectsreport.errorFields.notFound:App/src/pages/inbox/ReportNotFoundGuard.tsx
Lines 51 to 53 in 45f992d
The Details page is wrapped by
withReportOrNotFound()instead, and that wrapper feeds the loaded report through the strictercanAccessReportpredicate:App/src/pages/inbox/report/withReportOrNotFound.tsx
Lines 101 to 103 in 45f992d
canAccessReportrejects any report whose Onyx record carries a truthyerrorFields.notFound, which is exactly the divergence fromReportNotFoundGuard:App/src/libs/ReportUtils.ts
Lines 9044 to 9055 in 45f992d
How
errorFields.notFoundends up on an onboarding task:prepareOnboardingOnyxDatacreates each onboarding task optimistically and tags the report metadata withisOptimisticReport: true:App/src/libs/ReportUtils.ts
Lines 11947 to 11952 in 45f992d
ReportFetchHandlerthen runsfetchReport()on every route change, and its early-return guard for optimistic reports only matchestype === CHAT, so tasks (which aretype: TASK) fall through andopenReportfires for them whileCompleteGuidedSetupis still reconciling them server-side:App/src/pages/inbox/ReportFetchHandler.tsx
Lines 118 to 142 in 45f992d
The frontend only ever clears
notFound(the success branch sets it tonullon success); it never sets it truthy. So the truthy value is purely server-driven, written by theOpenReportresponse, and it lives on the Onyx report until the next successfulopenReport:App/src/libs/actions/Report/index.ts
Lines 1521 to 1529 in 45f992d
End-to-end:
ReportScreenstill renders the task fine (its guard only checks existence). Tapping the header callsnavigateToDetailsPage(report)on the task and routes tor/{taskID}/details:App/src/pages/inbox/HeaderView.tsx
Lines 312 to 320 in 45f992d
App/src/libs/ReportUtils.ts
Lines 6109 to 6122 in 45f992d
At that point
withReportOrNotFoundcallscanAccessReport, theerrorFields.notFoundbranch fires, andNotFoundPageis rendered. The first branch ofcanAccessReport(default-room beta) does not fire here even though the task carrieschatType: POLICY_ADMINS, becausecanSeeDefaultRoomshort-circuits totruefor admin rooms — the 404 strictly comes from theerrorFields.notFoundbranch.Defect 2 — Admins-room task reports inherit a room
chatType, so room helpers misclassify thembuildOptimisticTaskReportdeliberately copieschatType: POLICY_ADMINSonto the task when the parent is the#adminsroom. This is required so the backend routes Concierge messaging correctly (PR #84258), but it makes the report simultaneouslytype: TASKand a room as far as every client predicate is concerned:App/src/libs/ReportUtils.ts
Lines 8641 to 8659 in 45f992d
Every room helper keys off
chatTypeonly, soisAdminRoom,isDefaultRoom, and thereforeisChatRoomall returntruefor an admins-room task:App/src/libs/ReportUtils.ts
Lines 1642 to 1664 in 45f992d
App/src/libs/ReportUtils.ts
Lines 1770 to 1772 in 45f992d
Once the Details page is allowed to render, that misclassification produces the unwanted Room description row.
isChatRoomistrue(the inheritedchatType), the onboarding task always carries a non-emptydescription, and the user can modify their own onboarding tasks, so the condition resolves truthy:App/src/pages/ReportDetailsPage.tsx
Lines 221 to 222 in 45f992d
Defect 1 by itself causes the "Hmm… it's not here" page. Defect 2 by itself would still show a wrong Room description field on the task's Details page. Both need to be fixed for the Expected Result to hold.
What changes do you think we should make in order to solve the problem?
Two type-guarded changes. The first one is in a shared chokepoint (
canAccessReport) so every report-detail entry point —withReportOrNotFound,withReportAndReportActionOrNotFound,canCurrentUserOpenReport,shouldReportBeInOptionList— gets the same treatment and lines up withReportScreen. The second is the existing precedent on the same line inReportDetailsPage, tightened from "task-modifiable" to plainly "not a task".A task's genuine deletion is already surfaced separately, via its parent report action (
isCanceledTaskReport), and a truly missing report is still 404'd bywithReportOrNotFound's!isReportLoadedcheck, so skipping theerrorFields.notFoundbranch for task reports specifically is safe — it only changes behavior for the bug we want to fix.In
src/libs/ReportUtils.ts, replacing theerrorFields.notFoundbranch ofcanAccessReport:App/src/libs/ReportUtils.ts
Lines 9044 to 9055 in 45f992d
In
src/pages/ReportDetailsPage.tsx, replacing theshouldShowReportDescriptionexpression so a task report never renders the Room description row regardless of inheritedchatType:App/src/pages/ReportDetailsPage.tsx
Lines 221 to 222 in 45f992d
isTaskReportis defined atsrc/libs/ReportUtils.ts:1516-1518so it is in scope wherecanAccessReportlives, and the memoizedisTaskReportalready exists atsrc/pages/ReportDetailsPage.tsx:214, so neither change introduces new imports.What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Add a unit test for a synthetic report with
type: CONST.REPORT.TYPE.TASK,chatType: CONST.REPORT.CHAT_TYPE.POLICY_ADMINS, anderrorFields.notFound: 'reportNotFound'set, asserting:canAccessReport(report, betas, false)returnstrue.canAccessReport({...report, type: CONST.REPORT.TYPE.CHAT}, betas, false)still returnsfalse(existing behaviour for non-task reports is preserved).shouldShowReportDescriptionexpression derived fromReportDetailsPage(isChatRoom && !isTaskReport && (canEditReportDescription || report.description !== '')) resolves tofalsefor that task fixture.25 remaining items
melvin-bot commentedon May 29, 2026
@thesahindia 12 days overdue. Walking. Toward. The. Light...
melvin-bot commentedon May 30, 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 May 30, 2026
@thesahindia this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
melvin-bot commentedon Jun 1, 2026
This issue has not been updated in over 14 days. @thesahindia eroding to Weekly issue.
mvtglobally commentedon Jun 5, 2026
Issue not reproducible during KI retests. (First week)
melvin-bot commentedon Jun 6, 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 Jun 13, 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 Jun 13, 2026
@thesahindia this issue is now 4 weeks old, please consider:
Thanks!