Skip to content

refactor(admin): split UserManagement into the four things it was - #620

Merged
EVWorth merged 1 commit into
mainfrom
refactor/user-management-split
Sep 10, 2026
Merged

EVWorth merged 1 commit into
mainfrom
refactor/user-management-split

Conversation

@EVWorth

@EVWorth EVWorth commented Sep 10, 2026

Copy link
Copy Markdown
Owner

Closes #432. Stacked on #619 (the AdminPanel half).

1135 lines in one file: the user list, the detail pane, a 500-line privileges editor, and the reporting for a partly-applied grant change. Nothing shared but the file.

Before After
UserManagement.tsx 1135 309
UserDetail.tsx — 270
PrivilegesEditor.tsx — 519
grantReporting.ts — 42

grantReporting holds describePartialFailure and setsEqual — the part that explains a half-applied change, which is worth finding without scrolling past five hundred lines of checkbox grid.

PrivilegesEditor is still 519 lines, deliberately

It's one coherent thing — a grid of privileges with a diff and a preview — and splitting it further would need a reason beyond the line count. The file-per-concern boundary is where the seams actually were.

A pure move

No behaviour changed, and the 96 existing admin tests passing is what says so.

With #619, AdminPanel is 65 lines and no admin file is over 520.

Verification

Unit 2127, browser 297, 0 lint errors.

1135 lines in one file: the user list, the detail pane, a 500-line
privileges editor, and the reporting for a partly-applied grant change
(#432). Nothing shared but the file.

UserManagement is 309 lines and is now the list and its dialogs.
UserDetail carries the detail pane and its grant views. PrivilegesEditor is
its own file. grantReporting holds describePartialFailure and setsEqual —
the part that explains a half-applied change, which is worth finding
without scrolling past five hundred lines of checkbox grid.

PrivilegesEditor is still 519 lines, and that is deliberate rather than
overlooked. It is one coherent thing — a grid of privileges with a diff and
a preview — and splitting it further would need a reason beyond the line
count. The file-per-concern boundary is where the seams actually were.

A pure move: no behaviour changed, and the 96 existing admin tests passing
is what says so.

With #619, AdminPanel is 65 lines and no admin file is over 520.

Closes #432

Co-Authored-By: Claude Opus 5 <[email protected]>
@EVWorth
EVWorth force-pushed the refactor/user-management-split branch from ad5203a to 9f43107 Compare September 10, 2026 12:28
@EVWorth
EVWorth merged commit a91d3f1 into main Sep 10, 2026
12 checks passed
@EVWorth
EVWorth deleted the refactor/user-management-split branch September 10, 2026 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant