Skip to content

Refactor: clean up submit-to-destination-visible code to conform to coding standards #88583

@mountiny

Description

@mountiny

Tracking issue for PR #88581

Context

Cleanup pass across submit-to-destination-visible PRs to conform to coding standards.

Scope

  • Remove manual memoization (useMemo/useCallback/React.memo) from files that compile with React Compiler
  • Replace deprecated InteractionManager.runAfterInteractions with TransitionTracker.runAfterTransitions
  • Inline internal render helpers
  • Fix magic values
  • Align StaticSearchTypeMenu with the interactive version by passing accountID
  • Collapse duplicated deferral logic in deferOrExecuteWrite
  • Fix a flushedWatchKeys memory leak in deferredLayoutWrite

Tests

  1. Open the app on a narrow-layout device, navigate to the Search tab
  2. Switch between Reports, Expenses, and Submit tabs
  3. Verify that the correct tab is highlighted and results load properly - especially the Submit tab which depends on accountID for its query hash

  1. Create a new expense from the global FAB, fill in details, and submit
  2. After submission, verify the app navigates to the expected destination (report or search) without crashes or console errors
  3. Verify that draft transactions are cleaned up (no stale drafts in Onyx)

  1. Open Search, select multiple transactions using long-press, then use "Select All"
  2. Clear the selection by navigating away and back
  3. Verify that selection state resets correctly and no stale selections persist

Linked PR

Issue OwnerCurrent Issue Owner: @ShridharGoel

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