Skip to content

[$250] Decompose MoneyRequestConfirmationListFooter into field groups and hooks #89193

Description

@pecanoro

MoneyRequestConfirmationListFooter has grown to ~850 lines, mixing the orchestration of 13 fields, derived-flag computation, receipt-source resolution, and compact-mode layout into a single component. This makes the file difficult to maintain, test in isolation, and reason about.

We should extract the logic into focused field groups and hooks:

  • ConfirmationFieldList — slim orchestrator owning the "Show more" button + Sparkles header
  • fieldGroups/TransactionDetailsFields — Amount, Description, Distance, Rate, Merchant, Time
  • fieldGroups/ClassificationFields — Category, Date, Tags, Tax, Attendees
  • fieldGroups/SettingsFields — Toggles + ReportField; gates ReportField's 5 Onyx subscriptions behind isPolicyExpenseChat
  • hooks/useFooterDerivedFlags — derived flag chain pulled out of the footer body
  • hooks/useReceiptThumbnailSource — receipt-source resolution + first-render capture (Compiler-compliant useState pattern)
  • hooks/useFooterTagVisibility, hooks/useCompactReceiptDimensions — small isolated derivations
  • ConfirmationReceiptThumbnail — receipt area as a dedicated subtree

This is a pure refactor with no behavioral changes. The confirmation screen should render all fields identically before and after.

Related: Part of the broader performance effort in #81849

Issue OwnerCurrent Issue Owner: @mallenexpensify
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~022049860478868205937
  • Upwork Job ID: 2049860478868205937
  • Last Price Increase: 2026-04-30

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions