From 2d769dda5794dc772b3c435cdfe2771d8e3a35a1 Mon Sep 17 00:00:00 2001 From: iris Date: Fri, 5 Jun 2026 11:19:53 +0200 Subject: [PATCH] =?UTF-8?q?feat(dashboard):=20add=20'journal=20logs=20?= =?UTF-8?q?=E2=86=92'=20link=20to=20agent=20overflow=20menu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds a navigation entry in the per-agent ⋮ overflow menu that opens the AGENT log tab pre-filtered to that container. The link uses the ?agent= URL param introduced by the accompanying logs.js change — the operator lands directly in the journal viewer without having to pick an agent from the dropdown. Placed between the rebuild action and the destructive destroy/purge block so it's reachable but clearly separated from dangerous actions. --- frontend/packages/dashboard/src/tabs.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/frontend/packages/dashboard/src/tabs.js b/frontend/packages/dashboard/src/tabs.js index 22ab322b..e0f7d2c2 100644 --- a/frontend/packages/dashboard/src/tabs.js +++ b/frontend/packages/dashboard/src/tabs.js @@ -426,6 +426,20 @@ window.marked = marked; return el('li', { class: 'agent-menu-sep', role: 'separator' }); } + // Navigation link item (opens in same tab by default). + function menuLink(label, href, title) { + const li = el('li', { role: 'presentation' }); + const a = el('a', { + class: 'agent-menu-item', + href, + role: 'menuitem', + title: title || '', + }, label); + a.addEventListener('click', () => closeAllAgentMenus()); + li.append(a); + return li; + } + // Show only actions that are applicable in the current state. if (c.running) { dropdown.append( @@ -439,6 +453,14 @@ window.marked = marked; } dropdown.append( menuItem('↻ R3BU1LD', { action: '/rebuild/', confirm: `rebuild ${c.name}? hot-reloads the container.` }), + menuSep(), + // Deep-link to the AGENT log tab pre-filtered to this container. + // The ?agent= param is read by logs.js on load; the stored localStorage + // selection is overridden so the operator lands directly in this + // agent's journal without extra clicks. + menuLink('journal logs →', + `/logs.html?agent=${encodeURIComponent(c.name)}#agent`, + `view ${c.name} journal logs`), ); {