From e1efbaf6a24e83daa96f392e550ca34ad82d878c Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 6 Aug 2026 00:02:51 +0000 Subject: [PATCH] fix(web): load the three widget scripts store plugins already declare MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit time-picker.js, file-upload-single.js and plugin-file-manager.js register widgets that installed store plugins reference in their config schemas (countdown uses x-widget: time-picker and file-upload-single; of-the-day uses plugin-file-manager), but base.html never included the scripts. plugin_config.html renders such fields as an empty container that polls LEDMatrixWidgets.get(...) on a 50ms loop forever, so those plugin config fields appeared permanently blank. The audit initially flagged these files as dead code; the monorepo cross-check proved the opposite — they were unreachable, not unused. example-color-picker.js (the documented custom-widget example) gains an explicit warning that including it in base.html would shadow the built-in color-picker widget. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01SXb4mKcAkVaxkeTb3YnAdr --- web_interface/static/v3/js/widgets/example-color-picker.js | 4 ++++ web_interface/templates/v3/base.html | 3 +++ 2 files changed, 7 insertions(+) diff --git a/web_interface/static/v3/js/widgets/example-color-picker.js b/web_interface/static/v3/js/widgets/example-color-picker.js index ea0a1d8b..4121bca5 100644 --- a/web_interface/static/v3/js/widgets/example-color-picker.js +++ b/web_interface/static/v3/js/widgets/example-color-picker.js @@ -8,6 +8,10 @@ * 1. Copy this file to your plugin's widgets directory * 2. Reference it in your config_schema.json with "x-widget": "color-picker" * 3. The widget will be automatically loaded when the plugin config form is rendered + * + * Do NOT add this file to base.html's widget script list: it registers + * under the name 'color-picker' and would shadow the built-in + * color-picker.js widget. * * @module ColorPickerWidget */ diff --git a/web_interface/templates/v3/base.html b/web_interface/templates/v3/base.html index 2223106c..3f3edcc1 100644 --- a/web_interface/templates/v3/base.html +++ b/web_interface/templates/v3/base.html @@ -989,6 +989,9 @@ + + +