diff --git a/frontend/packages/dashboard/src/dashboard.css b/frontend/packages/dashboard/src/dashboard.css index 02b56598..2a8f09af 100644 --- a/frontend/packages/dashboard/src/dashboard.css +++ b/frontend/packages/dashboard/src/dashboard.css @@ -415,6 +415,8 @@ body.dashboard-shell { text-align: left; padding: 0.4em 0.9em; cursor: pointer; + text-decoration: none; + box-sizing: border-box; } .agent-menu-item:hover { background: var(--border); diff --git a/frontend/packages/dashboard/src/tabs.js b/frontend/packages/dashboard/src/tabs.js index ecbf9f29..ec552fe8 100644 --- a/frontend/packages/dashboard/src/tabs.js +++ b/frontend/packages/dashboard/src/tabs.js @@ -381,7 +381,7 @@ window.marked = marked; } } - function buildAgentMenu(c) { + function buildAgentMenu(c, forgeBase) { const wrap = el('div', { class: 'agent-menu' }); const btn = el('button', { type: 'button', @@ -444,6 +444,20 @@ window.marked = marked; ); } + if (c.deployed_sha && forgeBase) { + const li = el('li', { role: 'presentation' }); + const a = el('a', { + class: 'agent-menu-item', + href: `${forgeBase}/agent-configs/${encodeURIComponent(c.name)}/commit/${c.deployed_sha}`, + target: '_blank', + rel: 'noopener', + role: 'menuitem', + title: 'deployed config commit on forge', + }, `deployed:${c.deployed_sha} ↗`); + li.append(a); + dropdown.append(menuSep(), li); + } + btn.addEventListener('click', (e) => { e.stopPropagation(); const wasHidden = dropdown.hidden; @@ -779,11 +793,8 @@ window.marked = marked; {}, { noRefresh: true }, )); } - if (c.deployed_sha) { - head.append(el('span', - { class: 'meta', title: 'sha currently locked in /meta/flake.lock' }, - `deployed:${c.deployed_sha}`)); - } + + if (c.pending_reminders && c.pending_reminders > 0) { head.append(el('span', { @@ -838,7 +849,7 @@ window.marked = marked; // chip in the head row stays — it's a state-hint, not an // action button. - li.append(icon, body, buildAgentMenu(c)); + li.append(icon, body, buildAgentMenu(c, forgeBase)); ul.append(li); } root.append(ul);