Skip to content

portal: ReportRunList GENERATING_COPY carries a threat_detection_review key the GeneratableReportType union does not declare (TS2353) #6036

Description

@ToddHebebrand

apps/portal/src/components/portal/ReportRunList.tsx on main (since #6006, W02 of #5812):

  • GeneratableReportType (line ~30) is the narrow allowlist of portal-generatable types.
  • GENERATING_COPY: Record<GeneratableReportType, string> (line ~47) includes a threat_detection_review entry that is not a member of that union → tsc --noEmit in apps/portal fails with TS2353 (excess property).

It went unnoticed because CI's typecheck job does not cover apps/portal (portal only runs test-portal and build-portal, and Astro's build does not fail on this). Fix is one line: drop the extra key (managed-evidence types are list-only in the portal per OD-10 = A, never generatable), or widen the record type — dropping the key matches the surrounding design. Consider adding apps/portal to the typecheck matrix so the next one is caught.

Found while union-merging main into #6027 (W04); left untouched there because it predates that PR.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions