Skip to content

Fix typecheck: import getConnectedHRProvider from HRUtils#92242

Closed
MelvinBot wants to merge 1 commit into
mainfrom
claude-fixHrProviderImport
Closed

Fix typecheck: import getConnectedHRProvider from HRUtils#92242
MelvinBot wants to merge 1 commit into
mainfrom
claude-fixHrProviderImport

Conversation

@MelvinBot

@MelvinBot MelvinBot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Explanation of Change

The typecheck job started failing on main with:

Module '"@libs/PolicyUtils"' has no exported member 'getConnectedHRProvider'.

getConnectedHRProvider is defined and exported in @libs/HRUtils, not @libs/PolicyUtils. src/pages/home/TimeSensitiveSection/index.tsx was importing it from the wrong module (every other caller in the codebase imports it from @libs/HRUtils). This is a merge-time mismatch introduced when Expensify/App#91813 landed.

The fix changes the single import source from @libs/PolicyUtils to @libs/HRUtils. No other change is needed — PolicyUtils is not referenced anywhere else in that file, and the import remains correctly ordered.

Fixed Issues

$ #92237
PROPOSAL: #92237 (comment)

AI Tests

  • Static verification: confirmed getConnectedHRProvider is exported from src/libs/HRUtils.ts and absent from src/libs/PolicyUtils.ts (grep). Import ordering remains valid (actions/connections < HRUtils < UserUtils).
  • Could not run locally: npm run typecheck / lint / prettier — these commands are not permitted in MelvinBot's execution environment. CI typecheck / typecheck is the authoritative gate and will validate this fix.

Tests

// TODO: The human co-author must fill out the tests you ran before marking this PR as "ready for review"
// Please describe what tests you performed that validates your changed worked.

  • Verify that no errors appear in the JS console

Offline tests

QA Steps

// TODO: The human co-author must fill out the QA tests you ran before marking this PR as "ready for review".
// Please describe what QA needs to do to validate your changes and what areas do they need to test for regressions.

  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
  • I followed the guidelines as stated in the Review Guidelines
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari

getConnectedHRProvider is exported from @libs/HRUtils, not @libs/PolicyUtils.
TimeSensitiveSection was importing it from the wrong module, breaking the
typecheck job on main.

Co-authored-by: Georgia Monahan <grgia@users.noreply.github.com>
@MelvinBot MelvinBot requested a review from a team June 1, 2026 14:44
@grgia grgia marked this pull request as ready for review June 1, 2026 14:49
@grgia grgia requested a review from a team as a code owner June 1, 2026 14:49
@melvin-bot melvin-bot Bot requested review from JmillsExpensify and jayeshmangwani and removed request for a team June 1, 2026 14:49
@melvin-bot

melvin-bot Bot commented Jun 1, 2026

Copy link
Copy Markdown

@jayeshmangwani 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]

@melvin-bot melvin-bot Bot removed the request for review from a team June 1, 2026 14:49
@MelvinBot

Copy link
Copy Markdown
Contributor Author

I analyzed the checks on this PR. There's no code fix to push — the typecheck fix in this PR works, and all CI checks pass.

Status: 30 passing, 4 skipped, and 1 failing: PR Author Checklist / checklist.

That checklist check fails only because the PR Author Checklist boxes are unticked (0 out of N checklist items). It's not a code problem — it needs the human author/co-author to review and tick the boxes (and fill in the Tests/QA sections), which I can't do on your behalf.

Full check breakdown
  • typecheck — confirms the import fix (getConnectedHRProvider now imported from @libs/HRUtils instead of @libs/PolicyUtils) resolves the type error
  • ✅ All 8 test (job N) shards + Storybook tests
  • ESLint check, Prettier check, React Compiler Compliance, Check for unused styles, spellcheck
  • ✅ All build (...) jobs
  • baseline-perf-tests, branch-perf-tests, validate-perf-tests (no perf regression)
  • CLA, validate, verifySignedCommits, dryRun, security/snyk
  • PR Author Checklist / checklist — unticked boxes (author action required)

Once you complete the checklist, that last check will pass.

@MelvinBot

Copy link
Copy Markdown
Contributor Author

I analyzed the checks — there's no code fix to push, every CI check passes (including typecheck, which this PR fixes).

The only red check is PR Author Checklist / checklist, and it fails solely because the checklist boxes are unticked (0 out of 49 checklist items). That's not a code problem — it needs the human author/co-author to review and tick the boxes, which I won't do on your behalf. Once the checklist is completed, that check will pass.

Full check breakdown
  • typecheck, ESLint check, Prettier check, React Compiler Compliance, Check for unused styles, spellcheck
  • ✅ All 8 test (job N) shards
  • Storybook tests, all build (...) jobs, codecov
  • baseline-perf-tests, branch-perf-tests, validate-perf-tests
  • CLA, validate, verifySignedCommits, dryRun, review, security/snyk
  • PR Author Checklist / checklist — unticked boxes (author action required)

@jayeshmangwani

Copy link
Copy Markdown
Contributor

@grgia, I assume this doesn’t need a C+ review, it’s just a simple import issue, so there isn’t much to review here.

@grgia

grgia commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

@JS00001 assigning you to do secondary review 🙇

@MelvinBot

Copy link
Copy Markdown
Contributor Author

I analyzed the checks on this PR. There's no code fix to push — every code-related check passes (including typecheck, which is what this PR fixes).

The only two failing checks are:

  • PR Author Checklist / checklist — fails because the author checklist boxes are unticked.
  • PR Reviewer Checklist / checklist — fails because the reviewer checklist isn't completed.

Both are human-completed checklists, not code problems — I can't tick them on your or the reviewer's behalf. Once the author and reviewer complete their respective checklists, both checks will pass.

Full check breakdown
  • typecheck, ESLint check, Prettier check, React Compiler Compliance, Check for unused styles, spellcheck
  • ✅ All 8 test (job N) shards
  • Storybook tests, all build (...) jobs, codecov/patch, codecov/project
  • baseline-perf-tests, branch-perf-tests, validate-perf-tests
  • CLA, validate, review, verifySignedCommits, dryRun, security/snyk
  • PR Author Checklist / checklist — unticked boxes (author action required)
  • PR Reviewer Checklist / checklist — incomplete (reviewer action required)

@JS00001

JS00001 commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

We've already fixed this: #92245

@grgia grgia closed this Jun 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants