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 Owner
Current Issue Owner: @bernhardoj
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.
Issue Owner
Current Issue Owner: @bernhardoj