Skip to content

[Due for payment 2026-06-11] [Due for payment 2026-06-10] App main CI is red — typecheck/ESLint fail with 'Cannot find name allPolicies' #92444

Description

@blimpich

Problem

Every PR that pulls in the latest main fails CI on two checks — typecheck and ESLint check — so nothing can merge and the backend deploy is blocked. The failures are identical across unrelated PRs (e.g. #84791, #92429), confirming the breakage is on main itself rather than in any one PR.

The shared error:

src/components/Search/SearchFiltersParticipantsSelector.tsx(72,81):
error TS2304: Cannot find name 'allPolicies'.

with the matching @typescript-eslint/no-unsafe-argument ESLint error at the same 72:81 location.

Reproduction Steps

These apply to CI on main (and any branch with main merged in).

  1. Branch from latest main.
  2. Run npm run typecheck (or npm run lint).

Expected Behavior: typecheck and ESLint pass.

Actual Behavior: both fail with Cannot find name 'allPolicies' / no-unsafe-argument at src/components/Search/SearchFiltersParticipantsSelector.tsx:72:81.

Solution

PR #92045 ("Stop scroll jump on search filter participant selection") removed the Onyx binding const [allPolicies] = useOnyx(ONYXKEYS.COLLECTION.POLICY); from SearchFiltersParticipantsSelector.tsx, but left the usage of allPolicies at line 72:

const expensifyTeamExclusions = getExpensifyTeamExclusions(personalDetails, allPolicies, currentUserEmail);

Re-add the allPolicies useOnyx binding alongside the component's other hooks. useOnyx and ONYXKEYS are already imported, so no other changes are needed.

Extra context

The sibling component src/components/Search/FilterComponents/UserSelector.tsx still has the correct pattern (const [policies] = useOnyx(ONYXKEYS.COLLECTION.POLICY); passed into the same getExpensifyTeamExclusions util), confirming the intended shape.

The ESLint no-unsafe-argument error is a downstream symptom: with allPolicies unresolved, TypeScript types it as any/error, which makes it an "unsafe argument". Restoring the binding fixes both errors at once.

– written by Claude on Ben's behalf

Metadata

Metadata

Assignees

Labels

DailyKSv2DeployBlockerIndicates it should block deploying the API

Type

No type

Fields

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