From 09bbbd16480cff2b977b0e0fd68293f01d7a18a9 Mon Sep 17 00:00:00 2001 From: ash-iir <254348575+ash-iir@users.noreply.github.com> Date: Thu, 19 Nov 2026 12:47:35 +0000 Subject: [PATCH] webroot: request the app list first on boot The manager bridge runs one exec at a time, so call order is load order. Boot queued sanitize, dests-list, remote-list, pass-status, overview and list-ops ahead of list-apps, so the first screen waited behind calls only other tabs need. loadUsers/loadApps now return their promise; the other boot calls are queued once the app list request has settled. Signed-off-by: ash-iir <254348575+ash-iir@users.noreply.github.com> --- module/webroot/scripts.js | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/module/webroot/scripts.js b/module/webroot/scripts.js index 9532a0a..c4cd181 100644 --- a/module/webroot/scripts.js +++ b/module/webroot/scripts.js @@ -226,8 +226,8 @@ function setupBackNav() { // --- users -------------------------------------------------------------- var USERS = []; var activeUser = 0; -function loadUsers() { - helper("list-users").then(function (r) { +function loadUsers() { // returns a promise that settles once the app list request has + return helper("list-users").then(function (r) { USERS = (r && r.users) ? r.users : []; var sel = $("#user-sel"), field = $("#user-field"); if (sel) { @@ -242,7 +242,7 @@ function loadUsers() { sel.value = activeUser; if (field) field.hidden = USERS.length <= 1; } - loadApps(); + return loadApps(); }); } @@ -369,7 +369,7 @@ function setSelectMode(on) { } function loadApps() { $("#applist").innerHTML = "