Skip to content

Camera jank caused by unnecessary Onyx re-renders on the scan screen #85583

@marcaaron

Description

@marcaaron

Problem

When using the scan screen, ~15 Onyx keys are subscribed to on every mount regardless of which scan flow is active. Global Onyx events like new chat messages or report updates trigger re-renders while the camera is active, causing camera jank for the most common scan paths (from report, edit receipt, global create).

Solution

Decompose the monolithic scan screen into 4 focused components (ScanEditReceipt, ScanFromReport, ScanGlobalCreate, ScanSkipConfirmation), each subscribing only to the Onyx data it actually needs.

  • The three most common paths drop from ~15 subscriptions to 3-4
  • Global Onyx events no longer trigger re-renders in the camera for those flows
  • The skip-confirmation path keeps its subscriptions but no longer penalizes everyone else
Issue OwnerCurrent Issue Owner: @bernhardoj

Metadata

Metadata

Type

No type
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