Skip to content

[Due for payment 2026-11-25] perf: stop Inbox rows re-rendering when a right-hand panel opens #106767

Open

Description

@mountiny

Problem

LHNTooltipContextProvider puts useIsFocused() and a root navigation flag in the same context value that every Inbox row reads. When an RHP such as Create expense opens, the Inbox loses focus, the context value changes, and every visible row re-renders with its whole subtree, even though the RHP hides the Inbox. On native the Inbox tab stays mounted under every RHP, so this cost grows with the number of reports.

Solution

Split the context in three. LHNTooltipContext keeps the onboarding data the rows show. LHNTooltipActionsContext holds hideConciergeTooltip and getIsScreenFocused, backed by refs so its value never changes. LHNTooltipVisibilityContext holds the focus, navigation and fullscreen flags, and only the row that renders the Concierge tooltip reads it. The provider also calls useLHNRowProductTrainingTooltip once instead of once per row. On a heavy account in an iOS DEV build, the median time to open Create expense drops from 318 ms to 240.5 ms, and p90 drops from 938 ms to 397 ms.

PR

#106735

Issue OwnerCurrent Issue Owner: @aimane-chnaif

Activity

  1. melvin-bot commented on Nov 18, 2026

    @melvin-bot

    @Julesssss @BartekObudzinski

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.5.41-2 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

  2. changed the title [-]perf: stop Inbox rows re-rendering when a right-hand panel opens[/-] [+][Due for payment 2026-11-25] perf: stop Inbox rows re-rendering when a right-hand panel opens[/+] on Nov 18, 2026
  3. aimane-chnaif commented on Nov 18, 2026

    @aimane-chnaif
    Contributor

    Perf issue. No need checklist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions