-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Description
Version Number: 9.3.42-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
Email or phone of affected tester (no customers): N/A
Issue reported by: Internal
Bug source: Follow-up from #86141
Action Performed:
- Go tonew.expensify.com
- Go to a workspace chat
- Create two expenses
- Open the expense report via Search
- Navigate away from the expense report (e.g., click on another page)
Expected Result:
The browser tab title transitions smoothly to the new page's title with no visible flash.
Actual Result:
The browser tab title briefly flickers (flashes blank or shows "New Expensify") before settling on the correct title when navigating away from the expense report.
Root Cause
In src/libs/UnreadIndicatorUpdater/updateUnread/index.ts, updateDocumentTitle() sets document.title = '' before setting the real title as a workaround for a Chrome bug where the title reverts during back navigation:
document.title = '';
document.title = hasUnread ? `(${count}) ${baseTitle}` : baseTitle;During navigation, multiple triggers fire updateDocumentTitle() (the popstate listener, the navigation state listener debounced at 300ms, and the new screen's setPageTitle() via useFocusEffect). Each schedules its own setTimeout(0) with the document.title = '' → real title sequence, and the browser can render a frame with the blank title between calls, causing the visible flicker.
Possible Solutions
- Only clear the title on
popstate(actual back navigation), not on every update - Debounce/deduplicate multiple
updateDocumentTitle()calls during a single navigation transition - Remove the
document.title = ''workaround entirely if the Chrome bug it addresses is no longer relevant in modern Chrome versions
Platforms:
- Android: App
- Android: mWeb Chrome
- iOS: App
- iOS: mWeb Safari
- iOS: mWeb Chrome
- Windows: Chrome
- MacOS: Chrome / Safari
Context
This was identified during review of #86141 (which added useDocumentTitle to SearchMoneyRequestReportPage). The flicker is a pre-existing issue in updateDocumentTitle() that affects all page transitions, not just the expense report page. Per mananjadhav's review, the overall flicker rate was reduced by #86141 but not fully eliminated.
Issue Owner
Current Issue Owner: @mananjadhavUpwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~022038675542395112595
- Upwork Job ID: 2038675542395112595
- Last Price Increase: 2026-03-30