feat: redesign User Management page (avatars, search, skeleton, confirm dialog)#583
Merged
Merged
Conversation
pancacake
added a commit
that referenced
this pull request
Jun 23, 2026
refactor: move Back link to its own row in the profile page header Stacks the Back link above the title on /profile, matching the header layout the admin Users page also adopts in #583. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
vaskoyudha
added a commit
to vaskoyudha/deeptutor-for-programmer-fork
that referenced
this pull request
Jul 25, 2026
refactor: move Back link to its own row in the profile page header Stacks the Back link above the title on /profile, matching the header layout the admin Users page also adopts in HKUDS#583. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
vaskoyudha
added a commit
to vaskoyudha/deeptutor-for-programmer-fork
that referenced
this pull request
Jul 25, 2026
feat: redesign admin User Management page (avatars, search, skeleton, confirm dialog) Part 2 of HKUDS#553. Adds per-row UserAvatar, live username search backed by a pure filterUsersByQuery helper (unit-tested), skeleton loading, richer empty/no-match states, and a focus-managed ConfirmDialog replacing the window.confirm() prompts for delete/promote/demote. Frontend-only; no auth/permission paths touched. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Redesigns the User Management page (
/admin/users) for clarity and scale.Part 2 of issue #553 (part 1 — profile page + avatar picker — merged in #573).
Changes:
Avatars — each row now shows a
UserAvatar(32 px) with an amber ringand shield badge for admins, reusing the component from feat: user profile page with avatar (account info, icon/image avatar, sign out) #573.
Live search — a full-width search bar filters by username
(case-insensitive, substring, trims whitespace). The counter shows
N of M userswhile filtering and a ✕ Clear button resets it.Skeleton loading — replaces the plain "Loading…" text with 3 pulsing
placeholder rows while the user list fetches.
Empty state — when there are no users, shows a
Usersicon, a heading,and an Add user shortcut instead of a bare "No users found." message.
No-match state — when search yields nothing, shows a friendly message
with a Clear search link (no list renders at all).
ConfirmDialog— new focus-trapped modal (web/components/ui/ConfirmDialog.tsx)replaces all three
window.confirm()calls (delete, promote, demote).Cancel button takes initial focus so a stray Enter never fires a destructive
action. Supports
tone="danger"(red button) and abusyLabelwhilethe request is in flight. Closes on Escape and overlay click.
Header fix — Back link moved to its own row above the title
New files:
web/components/ui/ConfirmDialog.tsxweb/lib/admin-users.ts— purefilterUsersByQuery<T>functionweb/tests/admin-users-filter.test.ts— 5 node:test unit testsRelated Issues
Module(s) Affected
agentsapiconfigcoreknowledgeloggingservicestoolsutilsweb(Frontend)docs(Documentation)scriptstests...Checklist
pre-commit run --all-filesand fixed any issues.Additional Notes
Tests:
filterUsersByQueryis covered by 5 unit tests inweb/tests/admin-users-filter.test.ts(empty query, case-insensitive,trim, non-latin/Cyrillic, no-match).
npm run test:node→ 147 passed.ConfirmDialogand the page component are React — not testable in thenode:test harness; no Playwright e2e precedent exists in this repo for
admin pages.
Screenshots: