Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fc415a72a5 | ||
|
|
0a9f9a4fa6 |
4 changed files with 25 additions and 6 deletions
|
|
@ -406,7 +406,7 @@ the relevant handler (`agent_server.rs`, `mcp.rs`, or `dashboard.rs`).
|
|||
## Async forms
|
||||
|
||||
Dashboard + per-agent mutating forms carry `data-async`; a delegated
|
||||
`submit` listener in `assets/tabs.js` intercepts, shows a spinner,
|
||||
`submit` listener in `assets/tabs.js` (+ `assets/app.js` for the per-agent UI) intercepts, shows a spinner,
|
||||
POSTs `application/x-www-form-urlencoded` (axum's `Form` extractor
|
||||
rejects multipart), calls `refreshState()` on success. New mutating
|
||||
forms should add `data-async` and optionally `data-confirm` (for a
|
||||
|
|
|
|||
|
|
@ -536,7 +536,7 @@ nix config (an attrset keyed by peer domain), serialises each
|
|||
entry as `{ name, url }` into `state.peer_hives: Vec<PeerHiveView>`,
|
||||
and includes the field in the `/api/state` snapshot. `tabs.js`
|
||||
reads `state.peer_hives` on every `refreshState` call and calls
|
||||
`renderPeerHives(peers)`, which rebuilds the `#peers-section`
|
||||
`swarm.js::renderPeerHives(peers)`, which rebuilds the `#peers-section`
|
||||
div from scratch.
|
||||
|
||||
The `name` field is the peer's DNS domain (the attrset key); `url`
|
||||
|
|
@ -707,7 +707,7 @@ the tooltip says "select … for bulk actions" or "deselect … (or press
|
|||
Esc to clear all)". The `<img>` points at `<url>/icon`; load failure
|
||||
falls back to the dimmed hyperhive mark (`/favicon.svg`). The card
|
||||
body sits to the right with three stacked lines
|
||||
(`assets/tabs.js::renderContainers`).
|
||||
(`assets/swarm.js::renderContainers`).
|
||||
|
||||
**Icon layout + load strategy:** the `<img>` is absolutely
|
||||
positioned (`inset: 0`) inside the `.container-icon` wrapper —
|
||||
|
|
@ -885,7 +885,7 @@ the dashboard and CLI paths behave identically.)
|
|||
### Topology tree
|
||||
|
||||
Container rows render as a forest, not a flat list — each agent
|
||||
sits indented under its declared parent. `tabs.js::buildAgentTree`
|
||||
sits indented under its declared parent. `swarm.js::buildAgentTree`
|
||||
walks `ContainerView.parent` for every container in the snapshot
|
||||
and produces a render order with per-row depth + sibling-position
|
||||
info:
|
||||
|
|
@ -979,7 +979,7 @@ every render before the bar appears.
|
|||
|
||||
## Approval card
|
||||
|
||||
Each pending approval renders as a card (`assets/tabs.js::
|
||||
Each pending approval renders as a card (`assets/call.js::
|
||||
renderApprovals`) with three stacked sections:
|
||||
|
||||
- **identity header** — glyph, `#id`, agent, kind chip, and a
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@ listener: read `data-confirm`, swap the button to a spinner, POST
|
|||
re-render), call `refreshState()`. State shapes live in
|
||||
`dashboard.rs::StateSnapshot` and `web_ui.rs::StateSnapshot` — when
|
||||
adding state fields, plumb through the snapshot struct and the
|
||||
relevant `assets/tabs.js` render function.
|
||||
relevant domain module (`assets/swarm.js`, `assets/call.js`, etc.) render function.
|
||||
|
||||
**Focus preservation:** `refreshState` checks whether
|
||||
`document.activeElement` sits inside one of the managed sections
|
||||
|
|
|
|||
|
|
@ -1514,6 +1514,7 @@ window.marked = marked;
|
|||
'mcp__hyperhive__set_status': '🏷️',
|
||||
'mcp__hyperhive__get_loose_ends': '🪢',
|
||||
'mcp__hyperhive__cancel_loose_end': '✂️',
|
||||
'mcp__hyperhive__ack_until': '✅',
|
||||
'mcp__hyperhive__get_agent_meta': 'ℹ️',
|
||||
'mcp__hyperhive__request_next_turn': '⏩',
|
||||
'mcp__hyperhive__restart': '↻',
|
||||
|
|
@ -1521,6 +1522,8 @@ window.marked = marked;
|
|||
'mcp__hyperhive__start': '▶️',
|
||||
'mcp__hyperhive__update': '🔄',
|
||||
'mcp__hyperhive__list_containers': '📋',
|
||||
'mcp__hyperhive__get_logs': '📜',
|
||||
'mcp__hyperhive__get_host_journal': '📜',
|
||||
Read: '📖', Write: '💾', Edit: '✏️', Glob: '🔍', Grep: '🔍',
|
||||
};
|
||||
function toolIcon(name) {
|
||||
|
|
@ -1565,6 +1568,22 @@ window.marked = marked;
|
|||
return short + (parts.length ? ' ' + parts.join(' · ') : '()');
|
||||
}
|
||||
case 'mcp__hyperhive__kill': return short + ' ' + (input.name || '');
|
||||
case 'mcp__hyperhive__restart': return short + ' ' + (input.name || '');
|
||||
case 'mcp__hyperhive__start': return short + ' ' + (input.name || '');
|
||||
case 'mcp__hyperhive__update': return short + ' ' + (input.name || '');
|
||||
case 'mcp__hyperhive__ack_until':
|
||||
return short + ' ≤' + (input.up_to != null ? input.up_to : '?');
|
||||
case 'mcp__hyperhive__get_logs':
|
||||
return short + ' ' + (input.agent || '?')
|
||||
+ (input.lines != null ? ' · ' + input.lines + 'L' : '');
|
||||
case 'mcp__hyperhive__get_host_journal': {
|
||||
const parts = [];
|
||||
if (input.container) parts.push(input.container);
|
||||
else if (input.unit) parts.push(input.unit);
|
||||
if (input.grep) parts.push('/' + input.grep + '/');
|
||||
if (input.lines != null) parts.push(input.lines + 'L');
|
||||
return short + (parts.length ? ' ' + parts.join(' · ') : '()');
|
||||
}
|
||||
case 'mcp__hyperhive__request_apply_commit':
|
||||
return short + ' ' + (input.agent || '') + ' @ ' + (input.commit_ref || '').slice(0, 12);
|
||||
case 'mcp__bash__run': {
|
||||
|
|
|
|||
Loading…
Reference in a new issue