You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[P0] [arch] UserManagement.tsx 958 LOC + AdminPanel.tsx 699 LOC — god-components at both layers #432
[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.
Activity
refactor(admin): one file per tab, instead of three tabs in one (#619)
refactor(admin): split UserManagement into the four things it was