Add the foundational constants, types, routes, and utility helpers that all three Gusto releases depend on.
Parent Issues: Expensify/App#85850, Expensify/Expensify#591910
Design Doc Section: Detailed — Add the shared policy, route, and connection
Files to update
src/CONST/index.ts — Add CONST.POLICY.CONNECTIONS.NAME.GUSTO, user-facing names, route keys, and Gusto-specific sync stage names. Add a grouping helper so accounting-only code can explicitly filter out HR integrations.
src/types/onyx/Policy.ts — Extend Connections with a gusto entry, add the Gusto config/data types, add isHREnabled, and extend PolicyConnectionSyncProgress with an optional result payload for the sync results modal.
src/libs/API/types.ts — Add the GustoSyncResult type to be used by the sync progress object and the results modal.
src/SCREENS.ts — Add screen IDs for the HR page and the two Gusto settings pages.
src/ROUTES.ts — Add WORKSPACE_HR, WORKSPACE_HR_GUSTO_APPROVAL_MODE, and WORKSPACE_HR_GUSTO_FINAL_APPROVER.
src/libs/Navigation/AppNavigator/Navigators/WorkspaceSplitNavigator.tsx — Register the new screens in the workspace settings navigator.
src/libs/Navigation/linkingConfig/config.ts — Add deep-link support for the new HR routes.
src/libs/Navigation/linkingConfig/RELATIONS/WORKSPACE_TO_RHP.ts — Add relations so the right-hand pane stack works like other workspace settings pages.
src/libs/API/parameters/EnablePolicyHRParams.ts — New API parameter type for toggling the HR feature.
src/libs/API/parameters/OpenPolicyHRPageParams.ts — New API parameter type for fetching the HR page payload on mount.
src/libs/API/parameters/ConnectPolicyToGustoParams.ts — New API parameter type for the OAuth connect command.
src/libs/API/parameters/SyncGustoParams.ts — New API parameter type for manual sync.
src/libs/API/parameters/UpdateGustoApprovalModeParams.ts — New API parameter type for the approval mode setting.
src/libs/API/parameters/UpdateGustoFinalApproverParams.ts — New API parameter type for the final approver setting.
src/libs/API/parameters/index.ts — Export the new parameter types.
src/libs/actions/Policy/Policy.ts — Add enablePolicyHR() with the usual optimistic Onyx updates.
src/libs/actions/PolicyConnections.ts — Add openPolicyHRPage() beside openPolicyAccountingPage() so the new HR page can fetch its initial payload through the same workspace-connections layer.
src/libs/PolicyUtils.ts — Add basic Gusto helpers like isGustoConnected() and split shared connection helpers into accounting vs HR buckets.
src/libs/ReportActionsUtils.ts — Route Gusto sync-failure recovery back to the HR page instead of the Accounting page.
src/libs/ReportUtils.ts — Add Gusto icon/name support anywhere shared integration helpers need it.
src/pages/workspace/accounting/PolicyAccountingPage.tsx — Explicitly filter to accounting-only connection names so Gusto never appears here.
src/pages/workspace/WorkspaceInitialPage.tsx — Add the new HR row and avoid showing accounting red-brick-road signals for Gusto sync failures.
src/languages/en.ts — Add HR page labels, Gusto-specific strings, and sync-stage copy.
Key implementation details
- Add a new policy feature flag
isHREnabled.
- Keep Gusto in
policy.connections — do not create a separate Onyx key.
- Show the
HR row in the workspace LHN when policy.isHREnabled || policy.connections.gusto. This makes already-connected workspaces visible even if the feature flag was never turned on manually.
- Keep the Accounting page unchanged from the user's point of view. Gusto should never get a slot there.
Issue Owner
Current Issue Owner: @ShridharGoel
Add the foundational constants, types, routes, and utility helpers that all three Gusto releases depend on.
Parent Issues: Expensify/App#85850, Expensify/Expensify#591910
Design Doc Section: Detailed — Add the shared policy, route, and connection
Files to update
src/CONST/index.ts— AddCONST.POLICY.CONNECTIONS.NAME.GUSTO, user-facing names, route keys, and Gusto-specific sync stage names. Add a grouping helper so accounting-only code can explicitly filter out HR integrations.src/types/onyx/Policy.ts— ExtendConnectionswith agustoentry, add the Gusto config/data types, addisHREnabled, and extendPolicyConnectionSyncProgresswith an optionalresultpayload for the sync results modal.src/libs/API/types.ts— Add theGustoSyncResulttype to be used by the sync progress object and the results modal.src/SCREENS.ts— Add screen IDs for the HR page and the two Gusto settings pages.src/ROUTES.ts— AddWORKSPACE_HR,WORKSPACE_HR_GUSTO_APPROVAL_MODE, andWORKSPACE_HR_GUSTO_FINAL_APPROVER.src/libs/Navigation/AppNavigator/Navigators/WorkspaceSplitNavigator.tsx— Register the new screens in the workspace settings navigator.src/libs/Navigation/linkingConfig/config.ts— Add deep-link support for the new HR routes.src/libs/Navigation/linkingConfig/RELATIONS/WORKSPACE_TO_RHP.ts— Add relations so the right-hand pane stack works like other workspace settings pages.src/libs/API/parameters/EnablePolicyHRParams.ts— New API parameter type for toggling the HR feature.src/libs/API/parameters/OpenPolicyHRPageParams.ts— New API parameter type for fetching the HR page payload on mount.src/libs/API/parameters/ConnectPolicyToGustoParams.ts— New API parameter type for the OAuth connect command.src/libs/API/parameters/SyncGustoParams.ts— New API parameter type for manual sync.src/libs/API/parameters/UpdateGustoApprovalModeParams.ts— New API parameter type for the approval mode setting.src/libs/API/parameters/UpdateGustoFinalApproverParams.ts— New API parameter type for the final approver setting.src/libs/API/parameters/index.ts— Export the new parameter types.src/libs/actions/Policy/Policy.ts— AddenablePolicyHR()with the usual optimistic Onyx updates.src/libs/actions/PolicyConnections.ts— AddopenPolicyHRPage()besideopenPolicyAccountingPage()so the new HR page can fetch its initial payload through the same workspace-connections layer.src/libs/PolicyUtils.ts— Add basic Gusto helpers likeisGustoConnected()and split shared connection helpers into accounting vs HR buckets.src/libs/ReportActionsUtils.ts— Route Gusto sync-failure recovery back to the HR page instead of the Accounting page.src/libs/ReportUtils.ts— Add Gusto icon/name support anywhere shared integration helpers need it.src/pages/workspace/accounting/PolicyAccountingPage.tsx— Explicitly filter to accounting-only connection names so Gusto never appears here.src/pages/workspace/WorkspaceInitialPage.tsx— Add the newHRrow and avoid showing accounting red-brick-road signals for Gusto sync failures.src/languages/en.ts— Add HR page labels, Gusto-specific strings, and sync-stage copy.Key implementation details
isHREnabled.policy.connections— do not create a separate Onyx key.HRrow in the workspace LHN whenpolicy.isHREnabled || policy.connections.gusto. This makes already-connected workspaces visible even if the feature flag was never turned on manually.Issue Owner
Current Issue Owner: @ShridharGoel