Skip to content

[Auto-QA] Oversized source files detected #23247

Description

@clubanderson

Auto-QA [Performance]: Large Source Files

Detected: 2026-09-07T13:33:52.807Z | Focus: Performance | Commit: c888992 | Run: View

Findings

### Source files over 500 lines (20 found)
Large files are harder to maintain and may impact compile performance:
  - `src/contexts/AlertsContext.lifecycle.test.tsx` (847 lines)
  - `src/lib/__tests__/kubectlProxy.core.connection.test.ts` (839 lines)
  - `src/hooks/mcp/__tests__/clusters.health.test.ts` (839 lines)
  - `src/hooks/mcp/__tests__/rbac.test.ts` (837 lines)
  - `src/components/cards/CardWrapper.tsx` (837 lines)
  - `src/lib/__tests__/analytics-emit-extended.test.ts` (835 lines)
  - `src/hooks/mcp/__tests__/events.test.ts` (834 lines)
  - `src/contexts/AlertsContext.deepcover.test.tsx` (834 lines)
  - `src/hooks/mcp/__tests__/workloads.extended.test.ts` (833 lines)
  - `src/components/cards/EnterpriseComplianceCards.tsx` (833 lines)
  - `src/hooks/__tests__/useResolutions.utils.resolution.test.ts` (829 lines)
  - `src/components/cards/console-missions/ConsoleOfflineDetectionCard.tsx` (829 lines)
  - `src/lib/unified/__tests__/registerHooks-hooks.test.ts` (824 lines)
  - `src/hooks/mcp/helm.ts` (824 lines)
  - `src/components/cards/__tests__/UserManagement.test.tsx` (820 lines)
  - `src/hooks/__tests__/useLocalClusterTools.crud.test.ts` (816 lines)
  - `src/lib/__tests__/sseClient-expand.test.ts` (811 lines)
  - `src/hooks/mcp/storage.ts` (811 lines)
  - `src/components/cards/TrestleScan.test.tsx` (808 lines)
  - `src/hooks/__tests__/useStackDiscovery.advanced.test.ts` (801 lines)

Suggested Improvements

  • Split files over 500 lines into multiple focused modules
  • Extract reusable hooks into hooks/ directory
  • Move co-located sub-components into their own files under a component directory
  • Large files slow TypeScript type-checking and IDE responsiveness

PR Guidance: Keep changes under 50 lines (size S) for best acceptance rate. Split larger fixes into multiple PRs.


This issue was automatically created by the Auto-QA workflow during Performance focus day.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions