All notable changes to this project will be documented in this file.
-
Feature: Comprehensive Error Handling:
- Implemented robust error handling for the entire application, focusing on the "Create VM" tab.
- The application now provides clear, user-friendly feedback for both invalid user input and backend script failures.
-
Frontend: Input Validation:
- Added a new
validators.pymodule with functions to validate user input (e.g., checking for empty fields, valid integers, IP addresses, etc.). - The "Create VM" form in
CreateVMTab.pynow uses these validators to check all fields before attempting to run the creation script. - If validation fails, an informative error message is displayed to the user, preventing invalid data from being processed.
- Added a new
-
Backend: Script Error Handling:
- Created a new
exceptions.pymodule with a customScriptErrorexception. - Refactored the PowerShell script execution functions in
lib/functions.pyto be more robust. They now check the script's exit code and capturestderr. - If a PowerShell script fails, it now raises a
ScriptError, which is caught by the UI. - The user is now shown a detailed error message, including the error output from the script, which is critical for debugging issues like missing Hyper-V modules or incorrect permissions.
- Created a new
-
Code Quality:
- The changes make the application more reliable and user-friendly by preventing silent failures and providing clear guidance to the user when things go wrong.
- Fix: Automatic Window Resizing:
- The application window now automatically resizes at startup to be large enough to accommodate the largest tab (
Create VMtab). - This prevents UI elements from being cut off and removes the need for users to manually resize the window.
- The implementation calculates the required size by inspecting all tabs before the main window is drawn.
- The application window now automatically resizes at startup to be large enough to accommodate the largest tab (
-
Major Refactor: Replaced
ttkthemeswithcustomtkinter:- The entire UI theming engine has been migrated from the
ttkthemesand standardtkinter.ttklibraries to the more moderncustomtkinterlibrary. This provides a more consistent and visually appealing look and feel across all components, with better support for light and dark modes. - All UI components (
App.py,Statusbar.py,Notebook.py, and all its tabs) have been refactored to usecustomtkinterwidgets (e.g.,CTkButton,CTkFrame) instead of theirttkcounterparts.
- The entire UI theming engine has been migrated from the
-
Code Cleanup:
- Removed the now-obsolete
lib/ui_helpers.py,components/AdminButton.py, andstyle.pyfiles, as their functionality is now handled directly bycustomtkinter. - Updated
requirements.txtto removettkthemesand addcustomtkinter.
- Removed the now-obsolete
-
Bug Fixes:
- Resolved several bugs that arose during the refactoring process, including:
- A
ValueErroron startup caused by passing unsupported arguments (relief,border) toCTkFramewidgets. - An issue where the main window would close immediately after starting.
- A bug where the "Edition"
ComboBoxin the "Create VM" tab was clickable before being populated, which has been fixed by disabling the widget until it is ready.
- A
- Resolved several bugs that arose during the refactoring process, including:
-
Documentation:
- The
UI_STYLE_GUIDE.mdhas been completely rewritten to reflect the new design system based oncustomtkinter.
- The
- Fix: PyInstaller Theme Asset Bundling:
- Resolved a critical runtime error in the compiled executable where theme assets (
.pngfiles) were not found. - The
ttkthemeslibrary's data files are now correctly bundled with the application.
- Resolved a critical runtime error in the compiled executable where theme assets (
- Build: Introduced PyInstaller Hook for
ttkthemes:- The build process now uses a custom PyInstaller hook (
hooks/hook-ttkthemes.py) to correctly bundle thettkthemesdata files. - The hook uses
collect_data_filesto ensure all theme assets are found and included in the final executable, which is a more robust method than manually specifying paths in thebuild.specfile. - The
build.spechas been updated to use the new hook.
- The build process now uses a custom PyInstaller hook (
- Feature:
ttkthemesIntegration:- Integrated the
ttkthemeslibrary to allow for more advanced and modern UI theming. - The application now uses the "arc" theme as its default, providing a cleaner and more modern look and feel.
- Integrated the
- Refactor: Theming Engine:
- The main application window in
App.pywas updated to inherit fromttkthemes.ThemedTk. - The custom styling in
style.pywas adapted to layer on top of thettkthemestheme, preserving custom widget styles while leveraging the new base theme.
- The main application window in
- Refactor: Relocated Buttons for Better Organization:
- The buttons from the "General" tab have been reorganized into more contextually appropriate tabs to improve user experience and logical grouping.
- "Domain Management" buttons (
Join Domain,Install AD) have been moved to theAD Tab. - "System & Access" and "Machine Configuration" buttons have been moved to the
Advanced Tab. - The "General" tab now retains only the "PowerShell" buttons for launching consoles, serving as a more focused "Tools" or "Quick Actions" tab.
- The
ADTab.pyandAdvancedTab.pycomponents were updated from empty placeholders to fully functional tabs containing the relocated controls.
- Docs: Enhanced README.md: The project's
README.mdhas been completely overhauled to provide a comprehensive overview of the application. The new README includes a clear description of the project, a detailed list of key features, technology stack, and clear instructions for setup and usage. - Chore: Branch Cleanup: Attempted to clean up stale remote branches. This action was not completed due to repository permission issues.
This update focuses on a comprehensive refactoring of the codebase to ensure all components and elements align with the official style guide and documentation. The goal was to improve code quality, visual consistency, and maintainability.
-
Refactor: Full UI Component Styling:
- All UI components have been refactored to use the central styling system and helper functions from
lib/ui_helpers.py. - Manually styled
ttkwidgets inCreateVMTab.py,QuickShellTab.py, andStatusbar.pyhave been replaced with theirStyled*equivalents. - This ensures a consistent look and feel across the entire application, adhering to the
UI_STYLE_GUIDE.md.
- All UI components have been refactored to use the central styling system and helper functions from
-
Refactor: Architectural Styling Improvements:
- The
style.pymodule was refactored to remove duplicated color and font constants, and now imports them from the single source of truth atlib/material_constants.py. - The custom canvas-based
RoundedButtonwas removed fromlib/ui_helpers.pyto improve performance and maintainability. - The
StyledButtonhelper now creates a standardttk.Buttonwith the primary theme style, making it consistent with theAdminButtoncomponent. - The
AdminButtoncomponent is now styled with the standardTButtonstyle, making it visually consistent with other buttons.
- The
-
Documentation: Script Updates:
- The script documentation at
documentation/scripts.mdhas been updated to include previously undocumented scripts that are used by the UI (setComputerName.ps1,installBGInfo.ps1,setupAD.ps1).
- The script documentation at
-
Fix: Application Startup Error:
- Fixed a critical
ImportErrorcaused by the missingDARK_PALETTEconstant inlib/material_constants.py. - Fixed a
TypeErroron startup caused by component classes incorrectly inheriting from a UI helper function instead of attk.Frame. - Refactored all UI helper functions in
lib/ui_helpers.pyto correctly handle keyword arguments, fixing aTypeErrorwhen usingtextvariablewithStyledLabel.
- Fixed a critical
This update introduces a new "Azure" tab to the application for managing Azure resources, adds several new local administration scripts, and improves user feedback in existing scripts.
-
Feature: Azure Integration:
- A new "Azure" tab has been added to the notebook interface.
- New PowerShell scripts for Azure automation have been created in
scripts/Azure-Automation/, including:Connect-Azure.ps1Get-AzureResourceGroup.ps1Get-AzureStorageAccount.ps1New-AzureVM.ps1
- A new UI component,
components/Notebook/AzureTab.py, was created to house the buttons for the Azure scripts.
-
Feature: New Local Admin Scripts:
- Added three new scripts for common local administrative tasks:
Get-DiskSpace.ps1Get-RunningServices.ps1Create-LocalUser.ps1
- Added three new scripts for common local administrative tasks:
-
Enhancement: Script User Feedback:
- Added
Write-Hostmessages to several existing scripts in thescripts/directory to provide better user feedback on their execution status. - The
activateRDP.ps1script has been updated to function as a toggle, enabling or disabling RDP based on its current state.
- Added
-
Documentation:
- Updated
documentation/components.mdanddocumentation/scripts.mdto reflect the new Azure components and scripts.
- Updated
- Feature: Structured Layout in General Tab: The "General" tab has been significantly restructured for better organization and usability. The previous single-column list of buttons has been replaced with a two-column grid layout.
- Refactor: Grouped Controls: Buttons are now grouped into logical categories (
System & Access,PowerShell,Machine Configuration,Domain Management) usingStyledLabelframecomponents. This makes it easier for users to find related functions. - Refactor: Grid-based Layout: The layout now uses
tkinter'sgridmanager instead ofpack, following the best practices outlined in the UI Style Guide for structured content.
- Fix: Statusbar Layout: Fixed a bug where items in the status bar would get cut off and become invisible when the window was resized. The layout logic has been corrected to ensure the status bar container expands vertically to fit all content as it wraps to new lines.
- Refactor: Layout Management: The
Statusbarand its childFlowFramenow usetkinter'spackoptions (fill='both',expand=True) to manage their size, which is a more robust solution than manual height calculation. TheFlowFrame's repack logic was also simplified to prevent it from incorrectly hiding widgets.
This update introduces a comprehensive, Material Design-based UI style guide to ensure visual consistency and improve the application's overall look and feel.
- Feature: Material Design Theme: A new theme,
style_material.py, has been created to give the application a modern, professional appearance based on Google's Material Design principles. The application now uses this theme by default. - Feature: UI Style Guide: A new
UI_STYLE_GUIDE.mdhas been added to the project root. This document outlines the color palette, typography, spacing, and other design rules for all developers to follow. - Feature: UI Helper Functions: A new module,
lib/ui_helpers.py, has been created. It provides a set of helper functions (e.g.,StyledButton,StyledLabel) for easily creating widgets that conform to the new design system. - New Constants: A
lib/material_constants.pyfile was added to centralize the color and font definitions for the new theme. - Documentation: Updated
AGENTS.mdto instruct agents on using the new style guide and createddocumentation/technical_considerations.mdto document the decision.
This update introduces a complete overhaul of the Statusbar component to provide more valuable information in a clean, responsive, and user-friendly manner.
- Feature: Enhanced System Information: The status bar now displays a wider range of valuable information for administrators, including CPU Usage, Memory Usage,
Disk Usage, and whether the system is a Virtual Machine. - Feature: Responsive and Organized Layout: The status bar has been redesigned to be fully responsive. Information is logically grouped into
System,Hardware, andNetworkcategories. The layout automatically wraps to new lines when the window is resized, and hides less critical information to prevent clutter in very narrow windows. - Feature: Compact Network Information: To handle systems with many network interfaces, the NIC information is now presented in a clean, space-saving dropdown menu (
Combobox). - Refactor: Modular Architecture: The
Statusbarcode was completely refactored. Data-gathering logic has been moved into a dedicatedSystemInfoclass, separating it from the UI. The UI now updates periodically without recreating widgets, resulting in a smoother user experience.
- Feature: Admin Rights Indicator: Added a visual indicator (a shield icon) to buttons that execute scripts requiring administrator privileges. This provides immediate feedback to the user about the permission level of each action.
- New Component:
AdminButton: Created a new reusableAdminButtonclass incomponents/AdminButton.py. This custom button handles the logic for displaying the icon next to the text. - Refactor:
GeneralTabupdated: TheGeneralTabwas refactored to use the newAdminButtonfor all its actions, as analysis showed all its scripts require elevation. - Fix: Missing
PillowDependency: AddedPillowtorequirements.txt. This dependency was introduced to handle image manipulation for the icon and was missed in the initial commit, causing aModuleNotFoundError.
- Added an admin rights notification: A pop-up message is now displayed to the user on the first launch of the application, informing them that administrative privileges are required for most scripts. This message is only shown once and is managed through a
config.jsonfile. - Created a
Configclass: A newConfigclass was introduced inlib/Config.pyto handle loading and saving application settings. - Updated
App.py: The main application class now uses theConfigclass to check whether the admin rights message has been shown and displays it if necessary.
This release focuses on a significant refactoring of the Python codebase to improve its quality, readability, and maintainability. No new features have been added, and the existing functionality remains unchanged.
The main goal of this refactoring was to address several code quality issues, including large and complex functions, duplicated code, and poor organization. The following is a summary of the key changes:
- Change: The
construct_pathandresource_pathutility functions, which were originally methods of theAppclass, have been moved to a newlib/utils.pymodule. - Reasoning: These functions are a general-purpose utility and did not belong in the main
Appclass. Moving them to a separate module improves separation of concerns and makes them easier to reuse.
- Change: The monolithic
init_stylefunction instyle.pyhas been broken down into several smaller, private functions, each responsible for styling a specific type of widget (e.g.,_configure_button_styles,_configure_entry_styles). - Reasoning: The original
init_stylefunction was very long and difficult to navigate. This change makes the styling code more modular, readable, and easier to maintain.
The CreateVMTab.py component, being one of the most complex parts of the application, received a major overhaul:
__init__Method Decomposition: The large__init__method was broken down into smaller methods (_initialize_state,_create_widgets,_pack_widgets,_bind_events) for better organization.- Dictionary-based Mapping: The
get_validate_set_stringmethod, which used a long and cumbersomeif/elifchain to map Windows editions to version names, was refactored to use a dictionary lookup. This makes the code cleaner, more efficient, and easier to update. - Code Deduplication: A generic helper function,
_populate_combobox_from_ps, was created to eliminate the redundant code between theget_windows_image_editionsandload_switchesmethods. - Parameter Consolidation: The
create_vmmethod was refactored to gather all VM parameters into a single dictionary, making the code cleaner and the process of passing arguments to the PowerShell script more robust.
- Change: Unnecessary
printstatements, which were likely used for debugging, were removed from the_on_tab_changemethod incomponents/Notebook/Notebook.py. - Reasoning: Removing debug code makes the application cleaner and avoids unnecessary output to the console.