From 65b609b6dba637839ac8bf87576f9cc40e128868 Mon Sep 17 00:00:00 2001 From: Aamer Akhter Date: Thu, 18 Jun 2026 12:28:14 -0400 Subject: [PATCH] COD-121 unified session list: persistent Session Manager modal (slice A, unit 3) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds a header-reachable Session Manager so the complete session list is available mid-session, not only on the welcome screen. - index.html: always-on header button (.btn-session-manager) + #sessionManagerModal (mirrors the Away Digest modal) with a search box + results list. - panels-ui.js: openSessionManager()/closeSessionManager()/_loadSessionManagerList() — loads GET /api/sessions/unified (limit 200), renders via the unit-2 _buildHistoryItem (rich items, mode/LIVE badges, open->select / closed->resume), debounced search wired to the endpoint's q= param, empty/error states. A modal-scoped Escape listener closes it even when focus is in the search input; backdrop click and item click also close it. - app.js: closeSessionManager() added to the global Escape chain. - styles.css: modal + list styling (items reuse .history-item). Verified on an isolated beta instance (Playwright): the header button opens the modal, it lists 200 sessions from /api/sessions/unified, a no-match query issues ?q= to the server and yields 0 items, clearing restores the list, clicking an item closes the modal and routes resume/select, and Escape closes it. Gates: tsc 0, lint 0, frontend-syntax + public-asset format clean, 17 tests pass. --- src/web/public/app.js | 1 + src/web/public/index.html | 17 ++++++- src/web/public/panels-ui.js | 94 +++++++++++++++++++++++++++++++++++++ src/web/public/styles.css | 28 +++++++++++ 4 files changed, 139 insertions(+), 1 deletion(-) diff --git a/src/web/public/app.js b/src/web/public/app.js index b23e29ff..37e8f411 100644 --- a/src/web/public/app.js +++ b/src/web/public/app.js @@ -827,6 +827,7 @@ class CodemanApp { this.closeAllPanels(); this.closeHelp(); if (this.attachmentHistoryDrawerOpen) this.closeAttachmentHistory(); + this.closeSessionManager(); } // Option/Alt session navigation uses physical key CODES, not e.key, so macOS diff --git a/src/web/public/index.html b/src/web/public/index.html index 8de0fb3f..e55f6074 100644 --- a/src/web/public/index.html +++ b/src/web/public/index.html @@ -118,7 +118,7 @@ - + + + + + +