From 832cf2429d85c3ccaf4cda0e4a0ab1f5f396608c Mon Sep 17 00:00:00 2001 From: Stan Grams Date: Fri, 3 Apr 2026 22:51:38 +0200 Subject: [PATCH] [fix](trx-frontend-http): rebuild decoder checkboxes when bookmark form opens Dynamic plugin scripts can execute before deferred app.js, causing bookmarks.js to miss the onDecoderRegistryReady callback and never build decoder checkboxes. Rebuild from the registry each time the form opens so checkboxes always reflect the current registry state. Co-Authored-By: Claude Opus 4.6 Signed-off-by: Stan Grams --- .../trx-frontend-http/assets/web/plugins/bookmarks.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/trx-client/trx-frontend/trx-frontend-http/assets/web/plugins/bookmarks.js b/src/trx-client/trx-frontend/trx-frontend-http/assets/web/plugins/bookmarks.js index 397006e..12d9662 100644 --- a/src/trx-client/trx-frontend/trx-frontend-http/assets/web/plugins/bookmarks.js +++ b/src/trx-client/trx-frontend/trx-frontend-http/assets/web/plugins/bookmarks.js @@ -266,6 +266,10 @@ function bmOpenForm(bm) { bmEditId = bm ? bm.id : null; bmEditScope = bm ? (bm.scope || bmScope) : null; + // Rebuild decoder checkboxes from registry (handles race where registry + // loaded after initial build). + bmBuildDecoderCheckboxes(); + document.getElementById("bm-id").value = bm ? bm.id : ""; document.getElementById("bm-name").value = bm ? bm.name : ""; document.getElementById("bm-freq").value = bm ? bm.freq_hz : "";