Skip to content

feat(admin-control): implement comprehensive server control panel - #254

Merged
MakD merged 11 commits into
masterfrom
admin-control
Oct 12, 2026
Merged

MakD merged 11 commits into
masterfrom
admin-control

Conversation

@MakD

@MakD MakD commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

This PR introduces a comprehensive server control panel, providing administrators with a rich interface to manage various aspects of their Jellyfin server directly within the application. This significantly enhances server management capabilities, allowing for detailed monitoring, configuration, and maintenance actions without needing to access the web dashboard for many common tasks.

The implementation involves a major refactoring to centralize server administration logic into a new ServerAdminRepository, separating it from the general JellyfinRepository improving modularity and maintainability. New UI screens and navigation routes have been developed to support the extensive administrative functionalities. Resolves #252

This commit introduces a comprehensive server control panel, providing administrators with a rich interface to manage various aspects of their Jellyfin server directly within the application. This significantly enhances server management capabilities, allowing for detailed monitoring, configuration, and maintenance actions without needing to access the web dashboard for many common tasks.

The implementation involves a major refactoring to centralize server administration logic into a new ServerAdminRepository, separating it from the general JellyfinRepository. This improves modularity and maintainability. New UI screens and navigation routes have been developed to support the extensive administrative functionalities.

Key changes:
*   Dedicated ServerAdminRepository: Extracted all server administration logic, including session management, task scheduling, system information, plugin management, user and device oversight, backups, and server configuration, into a new ServerAdminRepository for better organization and clarity.
*   Comprehensive Control Panel UI: Introduced ControlPanelScreen and ControlPanelOverviewScreen with dedicated sections for server status, active sessions, scheduled tasks, system information, plugins, users, devices, logs, API keys, backups, and various server settings (General, Metadata, NFO, Library Display, Playback, Trickplay, Transcoding, Networking).
*   Proactive Attention Cards: Implemented "Attention" cards on the overview, alerting administrators to critical issues such as pending server restarts, recent failed sign-in attempts, full storage disks, and problematic plugins.
*   Enhanced Navigation: Added new deep-linkable navigation routes for all administrative sections, enabling direct access to specific management areas.
*   Real-time Updates: Integrated WebSocket listeners to provide real-time updates for server activity, such as restart requirements and task progress.
*   Improved Security Logging: Expanded UrlRedaction and LogRedactor to redact a wider range of sensitive information, including API keys and various password fields, in URLs and application logs, bolstering security for administrative operations.
*   Adaptive Layouts: Utilized new adaptive Material 3 components to ensure the control panel provides an optimized user experience across different screen sizes and device orientations.
*   External Browser Integration: Added androidx.browser dependency and openCustomTab utility for safely opening external links (e.g., plugin changelogs) in custom browser tabs.
*   UI Consistency: Standardized TopAppBar and Scaffold container colors to MaterialTheme.colorScheme.surface in relevant settings screens.

This feature dramatically improves the administrative experience within the application, providing powerful tools for server oversight and maintenance.
@MakD MakD self-assigned this Oct 11, 2026
MakD added 10 commits October 12, 2026 05:37
This commit significantly overhauls the user management section within the admin control panel, introducing profile picture management, a redesigned user detail view with rich access summaries, and an improved user list interface.

Key changes:
* User Profile Picture Management: Implemented functionality to set and remove user profile pictures via the UserDetailScreen, including new API endpoints in ServerAdminRepository and JellyfinServerAdminRepository to handle image uploads and deletions. The SessionManager now tracks and updates the current user's image tag.
* Redesigned User Detail Screen: The UserDetailScreen now features a prominent user header displaying the avatar, name, status (e.g., "Playing now," "Disabled," "Last active"), and an editable profile picture. A new UserAccessTiles component provides a concise overview of key user permissions (libraries, rating limit, remote access, transcoding, downloads, sessions).
* Enhanced User List Screen: The UsersScreen has been redesigned to use a LazyVerticalGrid displaying UserCard components, offering a more modern and organized view of all users. Summary counts for total, admin, and disabled users are now prominently displayed. An ExtendedFloatingActionButton for adding new users has been introduced.
* Real-time User Status: Integrated real-time updates for user playing status, displaying a "Playing now" badge on user cards and the detail screen header.
* Improved Permissions and Parental Controls UI: Updated UserPermissionsScreen and UserParentalScreen to utilize AdminToggleChip and AdminToggleChipFlow for a more consistent and user-friendly experience when managing library access, unrated content, and parental schedules.
* Refined User Avatar Component: Introduced AdminUserAvatar and PlayingBadge components to visually indicate playing status and allow for profile picture editing directly from the user detail view.
* Auth Error Handling: Added a specific error message for HTTP 403 Forbidden responses during authentication, providing clearer feedback for account limitations.
* General UI Consistency: Applied minor styling and layout adjustments across various admin components for improved visual consistency, including AdminPill and SettingsBuildingBlocks.

These comprehensive updates to user management streamline administrative tasks and provide a more informative and interactive experience.
This commit significantly refactors and enhances the administrative interface for library management and generalizes the underlying configuration form system. The dedicated "Library Options" screen has been merged into the "Library Detail" screen for a more unified experience. The "Libraries" list now features a modern grid layout with rich library cards, inline scan status, and context-sensitive actions. The generic configuration form editor has been improved to support nested configuration documents and offers a more descriptive user experience across various server settings.

Key changes:
* Unified Library Detail and Options: The separate `LibraryOptionsScreen` has been removed, and its functionality is now integrated directly into `LibraryDetailScreen`, providing a single, comprehensive view for managing library settings and details.
* Redesigned Libraries Screen: The `LibrariesScreen` now uses a `LazyVerticalGrid` to display `AdminLibraryCard` components, offering a modern, visually rich overview of all libraries. Each card can display a library's cover image, type, and real-time scan status, including progress.
* Enhanced Library Actions: Contextual actions for individual libraries are now available via a dropdown menu on `AdminLibraryCard`s, allowing for inline scanning, image editing, renaming, and removal directly from the list. A new "Scan all" button and status indicators have been added to the `LibrariesScreen` header.
* Generalized Configuration Form Editor: The `ConfigFormEditor` has been refactored to support nested configuration sources, enabling a single form to modify multiple related server configuration files (e.g., `Library Display` now also manages `MetadataConfiguration`). This improves modularity and consistency.
* Improved Configuration Form UI/UX: All configuration forms (including library options, transcoding, networking, general, etc.) now feature enhanced descriptions, summaries, and help texts. Multi-choice fields have been updated to use `AdminToggleChipFlow` for a more user-friendly selection experience.
* New API for Library Operations: Introduced `scanLibrary` and `getLibraryImageTags` in `ServerAdminRepository` to support individual library scanning and fetching image tags for display.
* Refined User Permissions and Parental Controls: Updates to `UserPermissionsScreen` and `UserParentalScreen` utilize `AdminToggleChip` and `AdminToggleChipFlow` for a more consistent and user-friendly experience when managing permissions and parental settings, accompanied by clearer help texts.
* Image Management Navigation: Added navigation for a new `EditImagesScreen`, indicating upcoming functionality for managing library-specific images.
* Robust Command Handling: Enhanced command execution and error reporting across library and configuration view models.

This comprehensive update to administrative tools streamlines library management, improves the configurability of server settings, and refines the overall user experience within the admin control panel.
This commit significantly refactors and enhances the administrative interface for library management and generalizes the underlying configuration form system. The dedicated "Library Options" screen has been merged into the "Library Detail" screen for a more unified experience. The "Libraries" list now features a modern grid layout with rich library cards, inline scan status, and context-sensitive actions. The generic configuration form editor has been improved to support nested configuration documents and offers a more descriptive user experience across various server settings.

Key changes:
* Unified Library Detail and Options: The separate `LibraryOptionsScreen` has been removed, and its functionality is now integrated directly into `LibraryDetailScreen`, providing a single, comprehensive view for managing library settings and details.
* Redesigned Libraries Screen: The `LibrariesScreen` now uses a `LazyVerticalGrid` to display `AdminLibraryCard` components, offering a modern, visually rich overview of all libraries. Each card can display a library's cover image, type, and real-time scan status, including progress.
* Enhanced Library Actions: Contextual actions for individual libraries are now available via a dropdown menu on `AdminLibraryCard`s, allowing for inline scanning, image editing, renaming, and removal directly from the list. A new "Scan all" button and status indicators have been added to the `LibrariesScreen` header.
* Generalized Configuration Form Editor: The `ConfigFormEditor` has been refactored to support nested configuration sources, enabling a single form to modify multiple related server configuration files (e.g., `Library Display` now also manages `MetadataConfiguration`). This improves modularity and consistency.
* Improved Configuration Form UI/UX: All configuration forms (including library options, transcoding, networking, general, etc.) now feature enhanced descriptions, summaries, and help texts. Multi-choice fields have been updated to use `AdminToggleChipFlow` for a more user-friendly selection experience.
* New API for Library Operations: Introduced `scanLibrary` and `getLibraryImageTags` in `ServerAdminRepository` to support individual library scanning and fetching image tags for display.
* Refined User Permissions and Parental Controls: Updates to `UserPermissionsScreen` and `UserParentalScreen` utilize `AdminToggleChip` and `AdminToggleChipFlow` for a more consistent and user-friendly experience when managing permissions and parental settings, accompanied by clearer help texts.
* Image Management Navigation: Added navigation for a new `EditImagesScreen`, indicating upcoming functionality for managing library-specific images.
* Robust Command Handling: Enhanced command execution and error reporting across library and configuration view models.

This comprehensive update to administrative tools streamlines library management, improves the configurability of server settings, and refines the overall user experience within the admin control panel.
This commit significantly refactors and enhances the "Activity" screen within the admin control panel, introducing a new visual timeline, comprehensive activity categorization, and adaptive styling for a more informative and user-friendly experience.

Key changes:
* Redesigned Activity Timeline: Implemented a modern timeline layout with improved visual markers and connecting rails, enhancing readability and flow for activity entries.
* Granular Activity Categorization: Introduced `ActivityKind` and `ActivityTone` enums to classify events (e.g., Playback, Sign-in, User actions, Tasks) and assign them distinct visual tones (e.g., Alert, Change, Playback, Quiet).
* Adaptive and Tone-Based Styling: Activity entries, summary tiles, and markers now dynamically adjust their colors and styles based on their assigned `ActivityTone` and the current UI theme (light/dark surface), improving visual cues and consistency.
* Enhanced Activity Tiles: The summary tiles for Plays, People, Sign-ins, and Failed Sign-ins now feature tone-based coloring, providing immediate visual feedback on their status.
* Improved Entry Presentation: Each timeline entry now prominently displays its specific `ActivityKind` label, along with clearer title and detail text, making events easier to understand at a glance.
* Refined Layout and Spacing: Adjusted various layout constants and paddings across the screen for a cleaner, more organized, and visually appealing appearance.
* New String Resources: Added dedicated string resources for various activity kinds to support the new categorization and improve localization.
This commit significantly refactors and enhances the "Plugins" and "Server Logs" sections within the admin control panel, introducing a unified, card-based plugin management interface and an advanced, searchable log viewer with comprehensive filtering and grouping capabilities, for a more informative and user-friendly administrative experience.

Key changes:
* Unified Plugin Management: Replaced the separate "Installed Plugins" and "Plugin Catalog" screens with a single, card-based grid view that unifies installed and available plugins, supporting filtering by tabs (Installed/Available) and categories.
* Enhanced Plugin Detail View: Introduced a dedicated "Plugin Detail" screen, replacing the former catalog, to provide comprehensive information, version history, and actions for individual plugins.
* Integrated Plugin Search: Implemented search functionality directly within the main Plugins screen's top app bar for quick discovery of plugins.
* Advanced Server Log Viewer: Re-engineered log viewing to download entire log files, enabling advanced features such as filtering by log level and tags, full-text search, and grouping of repeated messages.
* Interactive Log View UI: Redesigned the Server Log Viewer with interactive filter chips, a meta-bar for summary information, and options to expand/collapse grouped entries and copy with context.
* Dynamic AdminScaffold: Updated the base AdminScaffold to support dynamic TopAppBar content, facilitating integrated search experiences across admin screens.
* Improved Plugin Categorization and Icons: Enhanced plugin categorization with new string resources for various plugin types and updated the plugin icon to 'ic_puzzle' for visual consistency across the admin panel.
* Log Security Enhancements: Integrated sensitive information scrubbing and context-aware copying for server logs.
This commit significantly refactors and enhances the "Devices" screen within the admin control panel, introducing a new grouped, filterable, and expandable interface for managing client devices, along with richer visual details like device icons and user avatars, for a more informative and user-friendly administrative experience.

Key changes:
* Grouped Device Management: Replaced the flat list of devices with a grouped view, categorizing devices by type and user, and allowing expansion to see individual device entries.
* Filterable Device List: Introduced filtering capabilities (All, This Week, Idle) to easily manage and review device activity using `AdminToggleChip` components.
* Enhanced Device Detail: Each device group now displays a relevant icon or logo, and expanded groups show individual device versions with their last activity.
* Integrated User Avatars: Displayed user avatars (`AdminUserAvatar`) next to device groups for quick identification of the last active user.
* Simplified Actions: Consolidated device actions (rename, sign out) within the grouped interface, with specific options for signing out individual devices or entire groups.
* Improved UI/UX: Updated styling, layout, and component usage (`AdminPill`, `AsyncImage`) for a modern and consistent look with the rest of the admin panel, including interactive expansion of device groups.
* Real-time Status & Counts: Implemented dynamic counts for total, weekly active, and idle devices, providing an immediate overview of connected clients.
* Robust Device Handling: Refactored the ViewModel to efficiently manage device data, including loading user images and handling device-specific operations, and improved device identification (`isThisDevice`).
This commit significantly refactors and enhances the "Scheduled Tasks" screen within the admin control panel, introducing a new grouped, detailed, and manageable interface for server tasks, along with richer visual details like task icons, status indicators, and improved scheduling options, for a more informative and user-friendly administrative experience.

Key changes:
* Grouped Task Management: Replaced the flat list of scheduled tasks with a grouped view, categorizing tasks by type and state (running/idle), and presenting them in a more organized list (`ScheduledTaskList`).
* Enhanced Task Detail Screen: Redesigned the "Task Detail" screen to provide comprehensive information about task execution, including detailed last run results (status, finish time, duration, error messages), and improved scheduling options.
* Detailed Last Run Status: Introduced a new `LastRunGroup` to display richer information about the last task execution, using `ResultPill` for visual status, and separate fields for "Finished" time and "Took" duration.
* Improved Task Scheduling: Renamed "triggers" to "schedules" and enhanced the `ScheduleGroup` to allow editing existing schedules and adding new ones via a dedicated `TaskScheduleDialog` (implied by usage).
* Refined Task List UI: Each task in the list now features a `TaskTile` with a relevant icon and tone, displays a schedule summary, last run information, and inline run/stop actions with progress indicators for active tasks.
* Centralized Task Logic: Moved the main scheduled tasks UI logic from `ControlPanelView.kt` to `ScheduledTasksScreen.kt` for better modularity and maintainability.
* Generalized Admin Components: Updated usage of common UI elements in `AccessScheduleDialog.kt` and `TaskDetailScreen.kt` to utilize generic admin components like `AdminDayToggles`, `AdminValueTile`, and `AdminTimeDialog` for consistency.
* Robust Time and Duration Formatting: Added new utility functions for precise formatting of task progress, finish times (e.g., "Today at...", "Yesterday at..."), run durations (e.g., "Less than a second", "1h 30m"), and time limits.
* Enhanced Task Actions: Consolidated run/stop actions within the task list and detail screens, with clear visual feedback for pending and active operations.
This commit significantly refactors and enhances the "API Keys" screen within the admin control panel, introducing a new "Key Created" dialog for secure display of new keys, streamlining row actions with dedicated buttons, and improving the overall user experience for managing API access.

Key changes:
* New "Key Created" Dialog: Introduced a dedicated `KeyCreatedDialog` to securely display newly generated API keys, allowing users to easily copy the full token and providing a clear confirmation.
* Streamlined Row Actions: Replaced the previous dropdown menu for key actions with distinct `IconButton`s for "Show/Hide," "Copy," and "Revoke" directly within each `ApiKeyRow`, improving discoverability and reducing clicks.
* Enhanced Security for New Keys: Extended `SecureWindowEffect` to also cover the `KeyCreatedDialog`, ensuring that newly created API keys are protected from screenshots and screen recordings while displayed.
* Improved Key Formatting: The full API key displayed in the `KeyCreatedDialog` is now chunked into groups of four characters for better readability.
* Refined UI Constants: Added new private constants (`ROW_ACTION_SIZE`, `ROW_ACTION_ICON_SIZE`, `KEY_GROUP_LENGTH`, `DISABLED_ALPHA`) for consistent sizing and styling of UI elements related to API key management.
* ViewModel Updates for Creation Flow: The `ApiKeysViewModel` now tracks `createdRowId` to manage the display and dismissal of the `KeyCreatedDialog`, ensuring a smooth post-creation experience.
* Updated String Resources: Added new string resources for the "Key Created" dialog title and message, as well as generic "Copy" and "Done" actions, improving localization and clarity.
… polish

This commit introduces a comprehensive pass to standardize and enhance the user interface across various admin control panel screens, focusing on visual consistency, improved readability, and a more polished look and feel.

Key changes:
* Standardized Spacing and Layouts: Adjusted verticalArrangement and padding across numerous screens (e.g., Devices, Plugins, Activity, Control Panel, Libraries, Backups, API Keys) to ensure consistent spacing and visual hierarchy.
* Unified Component Styling: Updated RoundedCornerShape to a consistent 24dp for various cards, notes, and interactive elements, and standardized surfaceContainerLow for background surfaces, improving visual cohesion.
* Harmonized Typography: Modified AlertDialog titles to use headlineSmall with bold font weight, and replaced SectionHeader with SettingsGroupTitle or Text components with specific styles for consistent text presentation.
* Enhanced Visual Readability with Icons: Added relevant icons to SettingsItem and RemovableRow components in screens like Add Library, Plugin Detail, Task Detail, and User Parental Control, making information easier to digest.
* Refactored Scheduled Task Components: Moved the ScheduledTaskRow and related logic from ControlPanelView to ScheduledTasksScreen.kt, creating dedicated TaskRow and TaskDivider components for better modularity and maintainability. The formatLastRun utility function was also removed as part of this refactoring.
* Improved Keyboard UX: Integrated WindowInsets.ime into AdminScaffold's bottom padding calculation to prevent keyboard obscuring content.
* Flexible Dividers: Enhanced SettingsDivider to accept a startPadding parameter, allowing for more granular control over divider placement.
* Minor Fixes and Adjustments: Included various minor UI adjustments and a logic fix in PluginDetailViewModel for pendingChange handling.
…ency

This commit introduces a series of refinements across various admin control panel screens, focusing on enhancing data loading, state management, and UI consistency. It centralizes control for server power actions and remote sessions, improves the precision of configuration fields, standardizes time formatting, and refactors data refresh mechanisms for better efficiency and reliability.

Key changes:
* Refined State Management: Centralized server power actions and remote session display logic in ControlPanelViewModel. Improved device loading to ensure user images are processed before group building in DevicesViewModel. Enhanced user permissions and parental control ViewModels for more robust data loading and fact checking. Streamlined API key creation flow to reliably identify new keys.
* Granular Data Refresh: Introduced refreshTasks() and refreshPlugins() in ServerAdminRepository and updated relevant ViewModels (ControlPanel, ScheduledTasks, Libraries, Plugins, PluginDetail, TaskDetail) to use these specific refresh methods for more efficient data updates.
* UI Component Standardization: Replaced generic Slider with AfinitySlider in SessionRemoteSheet for consistent UI and added height modifiers.
* Consistent Time and Date Formatting: Integrated rememberAdminTimeFormatter for localized time and date display across schedule pickers, task triggers, and access schedule dialogs, ensuring uniform presentation.
* Improved Data Models: Refactored getUserPolicy to return a structured UserPolicyDocument for better policy data representation.
* Enhanced Configuration Precision: Improved handling of decimal fields in ConfigFormEditor with BigDecimal and RoundingMode.HALF_UP for increased accuracy.
* Robust Task Schedule Dialog: Refactored TaskDetailScreen to use rememberSaveable with a TriggerSaver for managing schedule dialog state, improving robustness.
* Minor Fixes: Addressed a potential issue in TaskDetailViewModel if an old trigger isn't found during replacement.
@MakD
MakD marked this pull request as ready for review October 12, 2026 17:28
@MakD
MakD merged commit b267ca4 into master Oct 12, 2026
0 of 2 checks passed
@MakD
MakD deleted the admin-control branch October 12, 2026 17:28
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.

Enhance the Control Panel

1 participant