Skip to content

[P0] [arch] UserManagement.tsx 958 LOC + AdminPanel.tsx 699 LOC — god-components at both layers #432

Closed

Description

@EVWorth

[P0] [arch] UserManagement.tsx is a 958-LOC monolith with 5 interwoven sub-components; process list, variables, status tabs all live in 4 sub-components inside AdminPanel.tsx

Context

Connection.md F3 already flagged the same pattern for ConnectionDialog.tsx. The admin feature has the same problem at both layers.

Problem

Per docs/audits/admin.md F4.

AdminPanel.tsx is 4 tabs in one file (3 inline + 1 imported); UserManagement.tsx is 5 sub-components in one file. The god-component pattern correlates with: (a) every test file is also a single flat file; (b) hard to add a 5th tab; (c) the 958 LOC means the entire file must be re-parsed on every change.

Files

  • src/components/admin/UserManagement.tsx:1-958
  • src/components/admin/AdminPanel.tsx:1-699

Repro (if applicable)

Static analysis only.

Expected

AdminPanel.tsx ≤ 100 LOC; UserManagement.tsx ≤ 250 LOC; each tab in its own file; tests split correspondingly.

Proposed fix

Scope M. Split AdminPanel.tsx into {AdminPanel,ProcessListTab,ServerVariablesTab,ServerStatusTab}.tsx; split UserManagement.tsx into {UserManagement,UserDetail,GrantsView,GrantSection,PrivilegesEditor}.tsx; lift helpers to utils.ts.

Acceptance

AdminPanel.tsx ≤ 100 LOC; UserManagement.tsx ≤ 250 LOC; all 86 existing tests pass.

Needs human verify

No (visual + tests)

Labels: audit, area/admin, severity/p0, kind/arch

Activity

  1. added
    audit
    severity/p0
    kind/arch
    area/admin
    on Jul 31, 2026
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

    area/adminauditkind/archseverity/p0

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions