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-09-25] Public room - Public room loads infinitely after dismissing AI modal #97847
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorReviewingHas a PR in reviewWeeklyKSv2retest-weeklyApply this label if you want this issue tested on a Weekly basis by Applause
The AI Features promo modal (the "AI modal" in the repro) is being shown to logged-out / anonymous users, when it should only ever appear for signed-in users. It's a promo for authenticated AI features and has no business appearing on a public room for an anonymous visitor.
The eligibility check in useAIFeaturesPromoModal.ts:73-82 gates on !!session?.authToken — but anonymous users also carry an authToken (only authTokenType differs, ANONYMOUS), so the gate passes for them. There is no isAnonymousUser() guard, and useShouldSuppressPromotionalUI.ts:15-24 only suppresses supportal/copilot sessions — not anonymous ones.
Dismissing the modal (AIFeaturesPromoModal.tsx:73-80) then fires a persisted DISMISS_PRODUCT_TRAINING write, which an anonymous session isn't authorized to make — the resulting reauth pauses the network queue and starves the OPEN_REPORT the public room is waiting on, so the loading skeleton never resolves → infinite load.
Evidence & data flow
The modal + its trigger hook are mounted for anonymous public-room sessions (they run inside AuthScreens with an anon token).
Why it shows:isEligible requires !!session?.authToken — true for anonymous (isAnonymousUser checks authTokenType === ANONYMOUS, src/libs/actions/Session/index.ts). No anonymous exclusion anywhere in the gate or in useShouldSuppressPromotionalUI.
Why it hangs after dismiss (medium confidence): both exit paths do Navigation.goBack() + dismissProductTraining() → API.write(DISMISS_PRODUCT_TRAINING) (Welcome/index.ts). On an anonymous session this write is unauthorized → Reauthentication.ts pauses the SequentialQueue; anonymous reauth has no real credentials, so it stalls/loops. That starves OPEN_REPORT (Report/index.ts), whose optimistic isLoadingInitialReportActions:true never flips back, so ReportActions.tsx:71-95 keeps rendering the skeleton.
The "why the modal shows to anonymous users" part is high confidence (verified in code). The exact downstream queue-stall mechanism is medium confidence — it depends on how the backend handles a DISMISS_PRODUCT_TRAINING write from an anonymous session, which lives outside the App repo. Regardless of the precise stall path, the modal should not appear for anonymous users in the first place, which removes the trigger entirely.
What changes do you think we should make in order to solve the problem?
Add an anonymous-user guard to the promo modal's eligibility so it never shows to logged-out users. The cleanest spot is the isEligible check in useAIFeaturesPromoModal.ts: require the session to be non-anonymous (e.g. session?.authTokenType !== CONST.AUTH_TOKEN_TYPES.ANONYMOUS) in addition to !!session?.authToken. Alternatively (or additionally), extend useShouldSuppressPromotionalUI to also suppress anonymous sessions, which would cover all promo/training/onboarding UI in one place.
What alternative solutions did you explore? (Optional)
Blocking the DISMISS_PRODUCT_TRAINING write for anonymous sessions would stop the queue stall, but it treats the symptom — the modal still wrongly appears. Fixing eligibility is the correct root-cause fix.
Next Steps for Contributor+ team: To accept:@MelvinBot implement [this](https://github.com/Expensify/App/issues/97847) to create a draft PR. To refine:@MelvinBot <your feedback> To reject: Explain why you are rejecting Melvin's proposal.
⚠️ Looks like this issue was linked to a Deploy Blocker #101525
@eVoloshchak this issue mentions a deploy blocker or a regression. Before the payment date, post one of the three options in step 20 of the C+ doc: it was a regression, it was not, or you did not review the offending PR. If you don't post, the default is to reduce payment.
[Contributor] The offending PR and associated issue have been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to the comment on the PR:
Link to the comment on the Issue:
[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.
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorReviewingHas a PR in reviewWeeklyKSv2retest-weeklyApply this label if you want this issue tested on a Weekly basis by Applause
Activity
applause-bot commentedon Aug 5, 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/a0b188f041f68172126f4d44825f1dbd3f4be038025986c5b084de6d1042da97
MelvinBot commentedon Aug 5, 2026
Proposal
What is the root cause of that problem?
The AI Features promo modal (the "AI modal" in the repro) is being shown to logged-out / anonymous users, when it should only ever appear for signed-in users. It's a promo for authenticated AI features and has no business appearing on a public room for an anonymous visitor.
The eligibility check in
useAIFeaturesPromoModal.ts:73-82gates on!!session?.authToken— but anonymous users also carry anauthToken(onlyauthTokenTypediffers,ANONYMOUS), so the gate passes for them. There is noisAnonymousUser()guard, anduseShouldSuppressPromotionalUI.ts:15-24only suppresses supportal/copilot sessions — not anonymous ones.Dismissing the modal (
AIFeaturesPromoModal.tsx:73-80) then fires a persistedDISMISS_PRODUCT_TRAININGwrite, which an anonymous session isn't authorized to make — the resulting reauth pauses the network queue and starves theOPEN_REPORTthe public room is waiting on, so the loading skeleton never resolves → infinite load.Evidence & data flow
AuthScreenswith an anon token).isEligiblerequires!!session?.authToken— true for anonymous (isAnonymousUserchecksauthTokenType === ANONYMOUS,src/libs/actions/Session/index.ts). No anonymous exclusion anywhere in the gate or inuseShouldSuppressPromotionalUI.Navigation.goBack()+dismissProductTraining()→API.write(DISMISS_PRODUCT_TRAINING)(Welcome/index.ts). On an anonymous session this write is unauthorized →Reauthentication.tspauses theSequentialQueue; anonymous reauth has no real credentials, so it stalls/loops. That starvesOPEN_REPORT(Report/index.ts), whose optimisticisLoadingInitialReportActions:truenever flips back, soReportActions.tsx:71-95keeps rendering the skeleton.The "why the modal shows to anonymous users" part is high confidence (verified in code). The exact downstream queue-stall mechanism is medium confidence — it depends on how the backend handles a
DISMISS_PRODUCT_TRAININGwrite from an anonymous session, which lives outside the App repo. Regardless of the precise stall path, the modal should not appear for anonymous users in the first place, which removes the trigger entirely.What changes do you think we should make in order to solve the problem?
Add an anonymous-user guard to the promo modal's eligibility so it never shows to logged-out users. The cleanest spot is the
isEligiblecheck inuseAIFeaturesPromoModal.ts: require the session to be non-anonymous (e.g.session?.authTokenType !== CONST.AUTH_TOKEN_TYPES.ANONYMOUS) in addition to!!session?.authToken. Alternatively (or additionally), extenduseShouldSuppressPromotionalUIto also suppress anonymous sessions, which would cover all promo/training/onboarding UI in one place.What alternative solutions did you explore? (Optional)
Blocking the
DISMISS_PRODUCT_TRAININGwrite for anonymous sessions would stop the queue stall, but it treats the symptom — the modal still wrongly appears. Fixing eligibility is the correct root-cause fix.Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/97847)to create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
melvin-bot commentedon Aug 5, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @eVoloshchak (
External)melvin-bot commentedon Aug 5, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022084828669403690919
j3ffffff commentedon Aug 5, 2026
oqildev commentedon Aug 5, 2026
@marcaaron Can you pls assign me per #82013 (comment) ?! thanks
nkdengineer commentedon Aug 5, 2026
The issue can still be reproduced even though we don't show the AI feature for anonymous user
melvin-bot commentedon Aug 10, 2026
@eVoloshchak Eep! 4 days overdue now. Issues have feelings too...
melvin-bot commentedon Aug 12, 2026
@eVoloshchak Still overdue 6 days?! Let's take care of this!
50 remaining items
melvin-bot commentedon Sep 24, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)melvin-bot commentedon Sep 24, 2026
Payment Summary
Resolving PRs:
fix: Public room loads infinitely #101053
Reviewer: @eVoloshchak owed $175 via NewDot
Reviewer: @nkdengineer owed $175 via NewDot
BugZero Checklist (@mallenexpensify)
mallenexpensify commentedon Sep 26, 2026
@eVoloshchak this issue mentions a deploy blocker or a regression. Before the payment date, post one of the three options in step 20 of the C+ doc: it was a regression, it was not, or you did not review the offending PR. If you don't post, the default is to reduce payment.
eVoloshchak commentedon Sep 28, 2026
@mallenexpensify, it was caused by another PR, link to the comment: #101525 (comment)
eVoloshchak commentedon Sep 28, 2026
Contributor+ Checklist:
[Contributor] The offending PR and associated issue have been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to the comment on the PR:
Link to the comment on the Issue:
[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.
Regression Test Proposal
Test:
Do we agree 👍 or 👎
mallenexpensify commentedon Sep 28, 2026
Payment Summary
Contributor: @nkdengineer due $250 via NewDot
Contributor+: @eVoloshchak due $250 via NewDot
JmillsExpensify commentedon Sep 30, 2026
$250 approved for @eVoloshchak
twisterdotcom commentedon Oct 28, 2026
$250 approved for @nkdengineer in Report ID: R00Czp3CyOUj.
Zapier Logs
Run ID: 00040eee-3813-ae96-a133-b2081143f564SO: https://stackoverflowteams.com/c/expensify/questions/7582