From 59ee92bd876368ad4cdde8c0e4b506a894260e88 Mon Sep 17 00:00:00 2001 From: librelad Date: Wed, 27 May 2026 00:37:32 +0100 Subject: [PATCH] fix(tasks): treat app:'system' as a sentinel so the LibrePortal logo renders MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `libreportal config update` and `libreportal system update` tasks are submitted with `task.app === 'system'` (see task-actions.js' configUpdate + systemUpdate). renderTaskIcons hit its first branch on any truthy task.app and built an which 404s (there is no per-app icon called "system"). The onerror handler then hid the broken image, so those task rows showed only the 🛠️ type emoji and no LibrePortal logo — visually inconsistent with sibling system-level rows like "LibrePortal - Finalize Setup" (which happens to carry `app: 'libreportal'`, matching a real icon, and renders correctly via the same branch). Treat `app: 'system'` as a category sentinel rather than a real slug: skip the per-app icon path, fall through to the system-task branch that loads /icons/libreportal.svg directly. That icon is already shipped + the data shape stays intact ('system' is the meaningful category, not a lie about the app identity). Net: "LibrePortal - Apply Configuration" and "LibrePortal - System Update" now show the LibrePortal logo alongside their type emoji, matching the Setup / Update / Backup-All rows. Co-Authored-By: Claude Opus 4.7 Signed-off-by: librelad --- .../frontend/js/components/tasks/tasks-manager.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/containers/libreportal/frontend/js/components/tasks/tasks-manager.js b/containers/libreportal/frontend/js/components/tasks/tasks-manager.js index 86a6dd4..ee66658 100755 --- a/containers/libreportal/frontend/js/components/tasks/tasks-manager.js +++ b/containers/libreportal/frontend/js/components/tasks/tasks-manager.js @@ -1014,11 +1014,15 @@ class TasksManager { Keeps the layout consistent across every row regardless of source. */ renderTaskIcons(task) { const typeIcon = `${this.getTaskTypeIcon(task).icon}`; - if (task.app) { + // `app: 'system'` is a category sentinel (config_update, system_update, …), + // not a real app slug, so it has no /icons/apps/system.svg — fall through + // to the LibrePortal-system branch so those tasks still get a logo. + const isSystemSentinel = task.app === 'system'; + if (task.app && !isSystemSentinel) { const appIconPath = this.getAppIconPath(task); return `${typeIcon}${task.app}`; } - if (this.isLibrePortalSystemTask(task)) { + if (isSystemSentinel || this.isLibrePortalSystemTask(task)) { return `${typeIcon}LibrePortal`; } return typeIcon;