feat: unified admin management panel at /admin-panel/#79
Merged
Conversation
Introduces a dedicated admin_panel Django app with its own sidebar layout, completely separate from the standard user experience. - admin_panel/: new app with dashboard, user list, user detail, and beta views - /admin-panel/ → dashboard with stats (total, pending, active, suspended, beta) - /admin-panel/users/ → full user list with status tabs, search, and action dropdowns - /admin-panel/users/<id>/ → user detail with edit, approve, suspend, activate, delete - /admin-panel/beta/ → beta signup queue, pre-filtered to pending for approve/reject - admin_panel/base.html: two-column layout with sidebar linking Dashboard, Users, Beta, Plans - sidebar shows live pending-user badge fetched from /api/v1/users/?status=pending - /users/ and /users/<id>/: 301 redirects to new admin-panel URLs for backward compat - base.html: navbar staff link updated from /users/ to /admin-panel/ - user_management.ts: reads window._ADMIN_INITIAL_STATUS to pre-filter beta page to pending Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Introduces a new staff-only admin_panel Django app that consolidates user/beta administration under /admin-panel/, updates navigation to point to the new panel, and adds redirects to preserve legacy /users/* URLs.
Changes:
- Added
admin_panelapp with dashboard, users list/detail, and beta queue pages under/admin-panel/. - Updated staff navbar link to point to
/admin-panel/and added 301 redirects from/users/and/users/<id>/. - Updated
user_managementclient code to allow initial status prefiltering viawindow._ADMIN_INITIAL_STATUS(used by the beta queue page).
Reviewed changes
Copilot reviewed 13 out of 15 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| fileproxy/templates/base.html | Updates staff dropdown link from legacy users UI to /admin-panel/. |
| fileproxy/static/ts/accounts/user_management.ts | Initializes status filter from window._ADMIN_INITIAL_STATUS for beta prefilter. |
| fileproxy/static/js/accounts/user_management.js | Compiled JS reflecting the initial status prefilter behavior. |
| fileproxy/static/js/accounts/user_management.js.map | Updated sourcemap for compiled user_management.js. |
| fileproxy/config/urls.py | Mounts admin_panel URLs and adds permanent redirects from legacy /users/* routes. |
| fileproxy/config/settings.py | Registers the new admin_panel app. |
| fileproxy/admin_panel/apps.py | Defines AdminPanelConfig. |
| fileproxy/admin_panel/init.py | Initializes the admin_panel Python package. |
| fileproxy/admin_panel/urls.py | Defines /admin-panel/ routes for dashboard/users/beta pages. |
| fileproxy/admin_panel/views.py | Implements staff-gated views and dashboard stats queries. |
| fileproxy/admin_panel/templates/admin_panel/base.html | Adds admin layout/sidebar and pending badge fetch logic. |
| fileproxy/admin_panel/templates/admin_panel/dashboard.html | Adds dashboard stat cards and quick links. |
| fileproxy/admin_panel/templates/admin_panel/users.html | Adds users list UI shell (tabs/search/table/modals) using shared JS. |
| fileproxy/admin_panel/templates/admin_panel/user_detail.html | Adds user detail/edit UI with actions and modals using shared JS. |
| fileproxy/admin_panel/templates/admin_panel/beta.html | Adds beta queue UI shell and sets _ADMIN_INITIAL_STATUS='pending' before loading JS. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- preserve query string when redirecting /users/ → /admin-panel/users/ - add global Window type declaration for _ADMIN_INITIAL_STATUS (removes any cast) - pass pending_count from views as context; replace JS sidebar fetch with template var - add aria-labelledby and aria-label="Close" to modals in user_detail.html - add aria-label to search inputs in users.html and beta.html Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- wrap long render() calls to stay within 100-char line limit (Ruff E501) - break long redirect ternary expressions across lines in urls.py Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 13 out of 15 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- replace multiple COUNT queries in dashboard() with single aggregate() - add signup_source filter to UserViewSet.list() API - pass _ADMIN_SIGNUP_SOURCE from beta page to fetch so beta tab shows only beta users - fix dashboard CTA to link to /admin-panel/users/?status=pending instead of beta page Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
admin_panelDjango app — completely separate from the user-facing experience, staff-only throughout/admin-panel/— dashboard with stat cards (total users, pending, active, suspended, beta signups)/admin-panel/users/— full user list with status tabs, search, and per-row action dropdowns (approve, reject, suspend, activate, change plan, delete)/admin-panel/users/<id>/— user detail with inline edit, status management, and all actions/admin-panel/beta/— beta signup queue pre-filtered to pending for approve/reject workflow/admin-panel//users/and/users/<id>/301-redirect to new admin-panel URLs for backward compatibilityuser_management.ts: readswindow._ADMIN_INITIAL_STATUSto pre-filter the beta page to pending on loadTest plan
/admin-panel/shows stat cards with correct counts/admin-panel/users/shows user table with all status tabs and action dropdowns working/admin-panel/users/<id>/shows user detail; approve/suspend/activate buttons function/admin-panel/beta/loads pre-filtered to pending users/users/redirects →/admin-panel/users//admin-panel/receives 404🤖 Generated with Claude Code