From 34c86488ddd56bf82efdabc2073af78c991b64ed Mon Sep 17 00:00:00 2001 From: arkon Date: Mon, 19 Jan 2026 04:02:46 +0100 Subject: [PATCH] fix: hide Background Tasks section in Monitor panel when empty Instead of showing "No background tasks" message, the section is now completely hidden when there are no tasks, making the UI cleaner. Co-Authored-By: Claude Opus 4.5 --- CLAUDE.md | 13 ++----------- src/web/public/app.js | 8 +++++++- src/web/public/index.html | 3 +-- 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 126b2fb7..c9ad122b 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -447,15 +447,6 @@ The web UI (`src/web/public/`) uses vanilla JavaScript with: ## Pending Tasks -**Note to Claude: Do NOT remove or modify this section during /init. These tasks are actively being worked on by other sessions.** +**Note to Claude: Do NOT remove or modify this section during /init. These tasks may be actively worked on by other sessions.** -- [x] Remove the "New Session" tab and add a gear icon in the top right corner for app settings -- [x] Add confirmation dialog when clicking "x" on a session tab - warn user that the screen session behind will be closed -- [x] In settings: add option to configure a default CLAUDE.md file path that will be used for new sessions/cases -- [x] Wrap each session in a GNU screen session - track in ~/.claudeman/screens.json with Process Monitor panel showing memory, CPU, children -- [x] UI cleanup: Move respawn controls to session options, remove mode label, fix directory display width -- [x] Fix terminal focus escape sequences: filter out ^[[I and ^[[O (focus in/out) ANSI codes -- [x] Merge Process Monitor and Background Tasks into single Monitor panel -- [x] Move font size controls (A+/A-) to header -- [x] Restore screen sessions automatically on server restart -- [x] Add multi-tab feature: number input (1-10) next to Run Claude to open multiple sessions at once +- [x] Test: Monitor panel should hide "Background Tasks" section when there are no tasks (instead of showing "No background tasks" message) diff --git a/src/web/public/app.js b/src/web/public/app.js index 84f421a3..a8e381ab 100644 --- a/src/web/public/app.js +++ b/src/web/public/app.js @@ -1383,13 +1383,19 @@ class ClaudemanApp { const session = this.sessions.get(this.activeSessionId); const body = document.getElementById('backgroundTasksBody'); const stats = document.getElementById('taskPanelStats'); + const section = document.getElementById('backgroundTasksSection'); if (!session || !session.taskTree || session.taskTree.length === 0) { - body.innerHTML = '
No background tasks
'; + // Hide the entire section when there are no background tasks + if (section) section.style.display = 'none'; + body.innerHTML = ''; stats.textContent = '0 tasks'; return; } + // Show the section when there are tasks + if (section) section.style.display = ''; + const taskStats = session.taskStats || { running: 0, completed: 0, failed: 0, total: 0 }; stats.textContent = `${taskStats.running} running, ${taskStats.completed} done`; diff --git a/src/web/public/index.html b/src/web/public/index.html index c59476ac..d041d904 100644 --- a/src/web/public/index.html +++ b/src/web/public/index.html @@ -148,13 +148,12 @@
No screen sessions
-
+