From 11e48f8d0507fb69d2c8644d44a2d3e9fca52f1e Mon Sep 17 00:00:00 2001 From: SandObserver <260779319+SandObserver@users.noreply.github.com> Date: Tue, 18 Aug 2026 19:26:20 -0400 Subject: [PATCH] Fix: open a widget's settings from its own config, not the last one edited The config form keeps values typed into it across a re-render, so a view switch does not discard them. That cache was matched on widget type alone and outlived the editor, so opening a second widget of the same type filled its form from the first: a tile reading one source showed another as its source, and saving would have written it. The cache now belongs to one opening of the editor. Switching type tiles inside an open editor still keeps what was typed, which clearing the cache outright would have discarded. --- CHANGELOG.md | 3 +++ ui/admin/index.html | 2 +- ui/js/admin-app-form.js | 8 ++++---- ui/js/admin-auth.js | 2 +- ui/js/admin-color-control.js | 2 +- ui/js/admin-logic.js | 9 +++++++++ ui/js/admin-settings.js | 4 ++-- ui/js/admin-shared.js | 2 +- ui/js/admin-state.js | 2 ++ ui/js/admin-widget-form.js | 25 +++++++++++++++++++------ ui/js/admin.js | 15 ++++++++------- ui/js/widget-config-form.js | 6 +++--- ui/test/admin-logic.test.mjs | 15 +++++++++++++++ 13 files changed, 69 insertions(+), 26 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 61b670c1..2cb610af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- A widget's settings no longer open filled in from the last widget of the same + type you edited. + - A tile with only a fixed label set now shows that badge. - Saving settings no longer warns about deleting the stored password when diff --git a/ui/admin/index.html b/ui/admin/index.html index 4eec2f65..a5b14afe 100644 --- a/ui/admin/index.html +++ b/ui/admin/index.html @@ -303,6 +303,6 @@