Skip to content

[Due for payment 2026-09-09] [$250] [] Migrate HRSyncResultsModal to @react-navigation modal screen #96755

Description

@mountiny

Context

This is a sub-issue of #53493 (Replace modal screens with modals from @react-navigation).

For full background and migration approach, see the triage analysis comment, the sub-issue breakdown comment, and the updated status comment.

Problem

HRSyncResultsModal uses react-native-modal internally (via @components/Modal) with RIGHT_DOCKED animation. It is shown imperatively via useModal().showModal() when an HR sync completes, which causes animation inconsistencies compared to standard @react-navigation screens on native.

Migration approach (Group 1/2 — Navigate instead of imperative modal)

  • File: src/components/HRSyncResultsModal.tsx
  • Hook: src/hooks/useHRSyncResultsModal.ts
  • Used by: WorkspaceHRPage.tsx, WorkspaceMembersPage.tsx
  • Current behavior: Imperative useModal().showModal() when HR sync transitions to JOB_DONE with a result payload; defers via TransitionTracker.runAfterTransitions and waits if another modal is active
  • Modal type: RIGHT_DOCKED
  • Data source: PolicyConnectionSyncProgress.result is already on Onyx — route params only need policyID + connectionName. Do not pass HrSyncResult through route params.

Steps

  1. Add route/screen (e.g. WORKSPACE_HR_SYNC_RESULTS) under the workspace HR navigator.
  2. Page receives policyID + connectionName via route params; reads connectionSyncProgress.result and provider display name from Onyx.
  3. Replace modal.showModal({ component: HRSyncResultsModal }) with Navigation.navigate(...).
  4. Preserve existing deferral logic (TransitionTracker, isAnyModalActive guard, pendingSyncResultRef).
  5. Delete HRSyncResultsModal.tsx and remove ModalContext dependency from the hook.
  6. QA: trigger HR sync completion on both Workspace HR and Members pages; verify no double-open, correct counts/skipped employees, and back navigation.

Reference

Issue OwnerCurrent Issue Owner: @mallenexpensify
Upwork Automation - Do Not Edit

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionDailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions