From e6217f3094e9e6a72f66a5b5c4e7c7a03e74b7e1 Mon Sep 17 00:00:00 2001 From: VirtualMachinist Date: Wed, 23 Sep 2026 21:51:46 -0400 Subject: [PATCH] fix: G1e read vaultPath from injected settings Lathe Bar.qml injectProps assigns target.settings = moduleSettings only when the widget declares a settings property; it never assigns vaultPath. BarWidget now declares property var settings: ({}) and derives vaultPath from settings.vaultPath (the manifest schema key). onSettingsChanged calls rerun(), so a host-assigned settings object starts the run. Empty or missing settings.vaultPath keeps the empty-vault failed status. Kept: no onFailedToStart, onExited refresh(code, collector.text), running-still-false folds Model.statusFromRun(127, "", ""). --- BarWidget.qml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/BarWidget.qml b/BarWidget.qml index a30592e..055fc01 100644 --- a/BarWidget.qml +++ b/BarWidget.qml @@ -19,8 +19,16 @@ import "Model.js" as Model Item { id: root - // Widget setting (manifest barWidget.schema): absolute vault path. - property string vaultPath: "" + // Host settings. Lathe Bar.qml injectProps assigns `target.settings = + // moduleSettings` when the widget declares this property — it never + // assigns vaultPath directly. The manifest schema key is vaultPath. + property var settings: ({}) + + // Derived from settings.vaultPath (schema key). Empty/missing keeps + // the empty-vault failed status. + readonly property string vaultPath: + (settings && typeof settings.vaultPath === "string") + ? settings.vaultPath : "" // Status from Model.js. Starts as the empty-vault failed status; // a run only replaces it when a vault path is set. @@ -51,7 +59,7 @@ Item { } } - onVaultPathChanged: rerun() + onSettingsChanged: rerun() Component.onCompleted: rerun() Process {