Skip to content

[$250] [Metrics] ManualSubmitToDestinationVisible — SubmitExpenseOrchestrator + centralized telemetry (part 1) #88016

@mountiny

Description

@mountiny

Context

This issue tracks part 1 of the ManualSubmitToDestinationVisible work (submit → destination visible telemetry and performance). It corresponds to the refactor delivered in PR #87963.

Goal

Prepare and instrument the submit-to-destination flow without changing intended product behavior: consolidate orchestration and telemetry so follow-up changes (dismiss-first fast paths) can land safely.

What shipped in #87963

  • SubmitExpenseOrchestrator — Extracts the submit decision tree (including GPS permission handling and telemetry lifecycle) from IOURequestStepConfirmation into a dedicated render-prop component. Only the default slow path is active in this PR.
  • Centralized telemetry in submitFollowUpAction.ts — Single place for tracking session management (startTracking, setFastPath, addOptimization, cancelTracking), follow-up action state, and structured __DEV__ logging (e.g. [SubmitExpense] request_money_manual -> navigate_to_search (none) 105ms [slow path]).
  • isTracking() — Replaces scattered getSpan() checks in navigation helpers and IOU actions where appropriate.
  • useEndSubmitNavigationSpans — Shared hook for span-ending logic previously duplicated in SearchPageNarrow and SearchPageWide.
  • Bugfix — Clear trackingState when cancelSubmitFollowUpActionSpan runs so telemetry state stays consistent.

Out of scope (follow-up)

Acceptance criteria

  • All expense submit flows behave as before (including distance + GPS permission).
  • Telemetry lifecycle is centralized; in dev, console shows structured [SubmitExpense] lines after submit.
  • No regressions in navigation after expense creation (Search, Inbox report, RHP, modal dismiss paths).

Links

Issue OwnerCurrent Issue Owner: @JakubKorytko
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~022044561206615367758
  • Upwork Job ID: 2044561206615367758
  • Last Price Increase: 2026-04-15

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorReviewingHas a PR in review

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