Skip to content

refactor: OptionRowFreeTrialBadge owns onboarding lookup#5

Closed
BartekObudzinski wants to merge 1 commit into
simulated-baseline-89274-89592from
pr5-freetrial-onboarding
Closed

refactor: OptionRowFreeTrialBadge owns onboarding lookup#5
BartekObudzinski wants to merge 1 commit into
simulated-baseline-89274-89592from
pr5-freetrial-onboarding

Conversation

@BartekObudzinski

Copy link
Copy Markdown
Owner

Part 5 of 5 in the further-decomposition split of OptionRowLHN, layered on top of Expensify#89274 and Expensify#89592.

What

  • New OptionRowFreeTrialBadge leaf self-subscribes to useOnyx(CONCIERGE_REPORT_ID) + useLHNTooltipContext to derive its own isChatUsedForOnboarding gate.
  • OptionRowTitleWithStatus no longer takes isChatUsedForOnboarding as a prop, it just renders <OptionRowFreeTrialBadge report={report} />.
  • OptionRowLHNCore drops the useOnyx(CONCIERGE_REPORT_ID) subscription, the isChatUsedForOnboardingReportUtils call, and the onboarding + onboardingPurpose reads from useLHNTooltipContext (only isScreenFocused remains).

Why

isChatUsedForOnboarding was being computed in two places (Core and OptionRowTooltipLayer from Expensify#89274) — same Onyx subscription, same util call, per row. This collapses it to one consumer at the only place it's actually rendered.

Risk

This adds one scalar useOnyx(CONCIERGE_REPORT_ID) per row that mounts the FreeTrialBadge slot — same per-row scalar pattern OptionRowTooltipLayer already uses. Recommend smoke-testing ManualNavigateToInboxTab before merging.

@BartekObudzinski BartekObudzinski deleted the pr5-freetrial-onboarding branch May 6, 2026 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant