mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-11 05:13:01 +00:00
fix(dev-preview): address code review issues
- Use get_logger() from src.logging_config instead of logging.getLogger() in visual_display_manager.py to match project logging conventions - Eliminate duplicate public/private weather draw methods — public draw_sun/ draw_cloud/draw_rain/draw_snow now delegate to the private _draw_* variants so plugins get consistent pixel output in tests vs production - Default install_deps=False in dev_server.py and render_plugin.py — dev scripts don't need to run pip install; developers are expected to have plugin deps installed in their venv already - Guard plugins_dir fixture against PermissionError during directory iteration - Fix PluginInstallManager.updateAll() to fall back to window.installedPlugins when PluginStateManager.installedPlugins is empty (plugins_manager.js populates window.installedPlugins independently of PluginStateManager) - Remove 5 debug console.log statements from plugins_manager.js button setup and initialization code Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -85,11 +85,16 @@ const PluginInstallManager = {
|
||||
* @returns {Promise<Array>} Update results
|
||||
*/
|
||||
async updateAll(onProgress) {
|
||||
if (!window.PluginStateManager || !window.PluginStateManager.installedPlugins) {
|
||||
throw new Error('Installed plugins not loaded');
|
||||
}
|
||||
// Prefer PluginStateManager if populated, fall back to window.installedPlugins
|
||||
// (plugins_manager.js populates window.installedPlugins independently)
|
||||
const stateManagerPlugins = window.PluginStateManager && window.PluginStateManager.installedPlugins;
|
||||
const plugins = (stateManagerPlugins && stateManagerPlugins.length > 0)
|
||||
? stateManagerPlugins
|
||||
: (window.installedPlugins || []);
|
||||
|
||||
const plugins = window.PluginStateManager.installedPlugins;
|
||||
if (!plugins.length) {
|
||||
return [];
|
||||
}
|
||||
const results = [];
|
||||
|
||||
for (let i = 0; i < plugins.length; i++) {
|
||||
|
||||
Reference in New Issue
Block a user