[No QA][HR Import] Render per provider cards on hr page#91017
Conversation
|
Hey, I noticed you changed If you want to automatically generate translations for other locales, an Expensify employee will have to:
Alternatively, if you are an external contributor, you can run the translation script locally with your own OpenAI API key. To learn more, try running: npx ts-node ./scripts/generateTranslations.ts --helpTypically, you'd want to translate only what you changed by running |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7120a4a819
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@codex review |
|
Pipeline fail: |
There was a problem hiding this comment.
💡 Codex Review
Lines 7107 to 7111 in 36833ee
This locale switch still handles only Gusto/TriNet stages, so Merge HR stages (mergeHRSyncTitle, mergeHRSyncLoadData, mergeHRSyncProvisioning) fall through to the default "translation missing" message. During Merge HR sync, users in German (and the other non-English locales updated similarly) will see fallback text instead of localized progress labels.
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| icon: string | IconAsset; | ||
| iconType: typeof CONST.ICON_TYPE_AVATAR; | ||
| isConnected: boolean; | ||
| isSyncInProgress: boolean; |
There was a problem hiding this comment.
can't we derive it from syncStageInProgress?
There was a problem hiding this comment.
this is what we're doing to calculate this
|
@ChavdaSachin Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: af9fa57d86
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| }); | ||
| }, | ||
| shouldCallAfterModalHide: true, | ||
| disabled: isOffline, |
There was a problem hiding this comment.
Allow disconnect action while offline
Removing a connection is currently blocked whenever isOffline is true, but removePolicyConnection() is an optimistic write that can be queued and this flow previously allowed disconnecting even without network. In offline/spotty conditions, admins can no longer disconnect a broken HR integration until they reconnect, which is a regression in the app’s offline-first behavior and inconsistent with other integration settings pages that still allow disconnect.
Useful? React with 👍 / 👎.
| policyID={policyID} | ||
| featureName={CONST.POLICY.MORE_FEATURES.IS_HR_ENABLED} | ||
| shouldBeBlocked={!isBetaEnabled(CONST.BETAS.GUSTO)} | ||
| shouldBeBlocked={shouldBeBlocked} |
There was a problem hiding this comment.
❌ CONSISTENCY-5 (docs)
The eslint-disable-next-line react-hooks/purity comment lacks a justification explaining why the rule is being suppressed. Every eslint-disable needs an accompanying comment so reviewers and future maintainers understand the reasoning.
Add a comment explaining why react-hooks/purity does not apply here, for example:
// eslint-disable-next-line react-hooks/purity -- Math.random() is intentionally used to generate a unique key that forces ConnectToGustoFlow to remount
setActiveGustoFlowKey(Math.random());Alternatively, if this is a temporary suppression, consider using SEATBELT_INCREASE instead per the project's LINTING.md guidance.
Reviewed at: af9fa57 | Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.
There was a problem hiding this comment.
This has just been moved from another file
|
Am I supposed to review this? |
Reviewer Checklist
Screenshots/VideosAndroid: mWeb Chromeandroid.mweb.2.mp4MacOS: Chrome / Safariweb.mp4 |
| const successfulDate = getIntegrationLastSuccessfulDate(getLocalDateFromDatetime, connection, syncProgress); | ||
|
|
||
| const hasError = hasSynchronizationErrorMessage(policy, connectionName, !!isSyncInProgress); | ||
| const lastSyncErrorMessage = hasError ? (connection?.lastSync?.errorMessage ?? undefined) : undefined; |
There was a problem hiding this comment.
No need to fallback to undefined (?? undefined) here
|
|
||
| const hasError = hasSynchronizationErrorMessage(policy, connectionName, !!isSyncInProgress); | ||
| const lastSyncErrorMessage = hasError ? (connection?.lastSync?.errorMessage ?? undefined) : undefined; | ||
| const syncStageInProgress = isSyncInProgress && syncProgress?.stageInProgress ? syncProgress.stageInProgress : undefined; |
There was a problem hiding this comment.
Can be simplified to
const syncStageInProgress = isSyncInProgress ? syncProgress?.stageInProgress : undefined;|
Left a couple of non-blocking reviews |
| key: 'zenefits', | ||
| beta: CONST.BETAS.ZENEFITS, | ||
| connectionName: CONST.POLICY.CONNECTIONS.NAME.ZENEFITS, | ||
| titleKey: 'workspace.hr.zenefits.title', | ||
| iconParam: 'zenefitsIcon', | ||
| approvalModeRoute: ROUTES.WORKSPACE_HR_ZENEFITS_APPROVAL_MODE, | ||
| finalApproverRoute: ROUTES.WORKSPACE_HR_ZENEFITS_FINAL_APPROVER, |
There was a problem hiding this comment.
Should Zenefits be added to this yet?
There was a problem hiding this comment.
On staging I was only seeing Gusto
There was a problem hiding this comment.
yeah, I think on main there is no Zenefits card rendered in the HR tab yet and this would add it. we can remove it and leave it to the other project to add it or have the support for it already, it's under its own beta, so maybe it's okay?
There was a problem hiding this comment.
yeah let's double gate it on it's own beta?
There was a problem hiding this comment.
it should be hidden under the zenefitsNewDot beta right now
| default: | ||
| return translate('workspace.hr.gusto.notSet'); | ||
| const handleConnect = (connectionName: string) => { | ||
| if (connectionName !== CONST.POLICY.CONNECTIONS.NAME.GUSTO) { |
There was a problem hiding this comment.
this line looks like it could block a zenefits flow it it works? but tbh i have no clue where it's at with implementation
There was a problem hiding this comment.
it does block the connection flow, which I think is implemented, but not tied to the page yet on main
grgia
left a comment
There was a problem hiding this comment.
NAB technically given the beta, wdyt @mhawryluk @jmusial ? Should we address or good to merge
|
It would be great to unblock the foundational app PRs for tomorrow |
|
@grgia I think we can merge this. we can address the non-blocking comments in the following PRs and merging this would allow making the connection flow PR ready for review |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 @grgia has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|



Explanation of Change
This PR adds generic Provider cards logic to the
Workspace->HRpage. Actions for existing providers shold work as before. Actions for new providers are mocked.Fixed Issues
$ #90599
PROPOSAL:
Tests
mergeHRConnectionsbetaOnyx.mergeOffline tests
N/A
QA Steps
N/A
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
MacOS: Chrome / Safari
Screen.Recording.2026-05-20.at.11.35.45.mov