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`), ); {