feat(admin): optimize batch operations and enhance admin panel UX#41
Merged
KerwinTsaiii merged 4 commits intodevelopfrom Mar 10, 2026
Merged
feat(admin): optimize batch operations and enhance admin panel UX#41KerwinTsaiii merged 4 commits intodevelopfrom
KerwinTsaiii merged 4 commits intodevelopfrom
Conversation
…user UX - Replace sequential per-user API calls with batch endpoints for user creation, password setting, and quota operations - Add batch set-password API endpoint with parallel bcrypt hashing via ThreadPoolExecutor for significant speedup - Optimize backend batch_set_quota to use single DB transaction instead of N separate sessions - Support unlimited quota in batch quota API - Add batch delete for selected users with confirmation modal - Add quick username generator (prefix + start number + count) - Add initial quota setting in create user modal with default from config - Add CSV export for created user credentials - Expose default_quota in quota rates API
… feedback - Track per-user status (created/existed/failed) through the pipeline - Handle JupyterHub 409 (all users exist) gracefully instead of failing - Detect silently skipped existing users by comparing request vs response - Each step (create/password/quota) has independent error handling - Result page shows detailed status badges and warnings per user - CSV export includes status column - Clipboard copy only includes users with successful passwords
…d DB savepoints - Add BatchPasswordModal for batch password reset of selected users with random/shared password options and CSV export - Protect admin users and current user from accidental deletion (UI filtering + execution-time safety checks) - Skip existing users during batch create (no password/quota changes) - Add per-user SQLAlchemy savepoints (begin_nested) in batch_set_passwords and batch_set_quota for partial-success error isolation - Show proper status badges (New/Skipped) and detailed feedback
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
Optimize batch user/quota operations and enhance admin panel UX with better error handling, safety guards, and new batch capabilities.
Batch Operation Performance
ThreadPoolExecutorfor bcrypt hashing inbatch_set_passwords(bcrypt releases GIL)session.begin_nested()) in bothbatch_set_passwordsandbatch_set_quotafor partial-success error isolationCreate User Improvements
Admin Protection
deletableSelected) + execution-time safety checksBatch Password Reset
BatchPasswordModalcomponent for resetting passwords of selected usersUX Enhancements
isNativeUser()utilityTest plan