Skip to content

Desloppify: split 22 large/complex files (complexity score or LOC over threshold) #403

@elfensky

Description

@elfensky

Surfaced by desloppify scan. The structural detector flagged 22 files as large or high-complexity.

Per CLAUDE.md § File & Function Size: "Files over 1000 LOC must be split before major changes. Functions over 200 lines must be refactored before modification." Several of these are approaching that threshold via complexity rather than raw LOC.

src/ files (sorted by complexity)

File Complexity / LOC
src/features/dashboard/DashboardClient.jsx 586
src/shared/components/ProgressExplainer/ProgressExplainer.jsx 549
src/features/ministry/MinistryProvider.jsx 430
src/app/opengraph-image.jsx 381
src/features/archives/GlitchText.jsx 359
src/shared/components/Footer/Footer.jsx 300
src/shared/utils/game/computeMapState.mjs 199
src/update/status.mjs 158
src/features/archives/ArchivesClient.jsx 153
src/app/api/h1/rebroadcast/route.js 145
src/features/galaxy/EventCard.jsx 145
src/features/galaxy/Map.jsx 135
src/features/stats/StatGrid.jsx 131
src/features/notifications/LiveToasts.jsx 128
src/features/ministry/Hijackable.jsx 120
src/update/season.mjs 113
src/features/archives/ArchiveStats.jsx 109
src/app/api/h1/update/route.js 75

Test files (large LOC)

File LOC
src/__tests__/unit/update/pushNotifier.test.mjs 673
src/__tests__/unit/features/archives/ArchiveComponentsIntegration.test.jsx 669
src/__tests__/unit/shared/hooks/useLiveData.test.mjs 651
src/__tests__/unit/features/dashboard/DashboardClient.test.jsx 505

Triage note

  • Highest priority: DashboardClient.jsx, ProgressExplainer.jsx, MinistryProvider.jsx — all production hot paths.
  • opengraph-image.jsx and GlitchText.jsx are visual one-shots; high complexity may be inherent.
  • Test files are flagged on LOC alone; arguably fine if they cover broad surfaces. Could split by sub-feature.
  • Each file should be evaluated for whether to split or accept as wontfix with rationale.

Detector: structural · Tier T3

🤖 Filed by /desloppify

Metadata

Metadata

Assignees

No one assigned

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions