Watch
0
0
Fork
You've already forked hyperhive
0

swarm ui: drop a doubled line from the agents page docs; keep + agent while the roster loads or fails

The buttons sat in the filter card, which only shows once the roster
has loaded, so a failed load left no way to create an agent.
This commit is contained in:
iris 2026-11-01 13:04:47 +01:00 • committed by mara
commit 696c199621

View file

@ -124,11 +124,31 @@ export function AgentsPage() {
});
});
const barActions = (
<>
<Button variant="primary" onClick={() => setCreateOpen(true)}>
+ agent
</Button>
<RefreshIntervalPicker
id="agents-refresh"
value={intervalMs}
onChange={setIntervalMs}
/>
</>
);
return (
<>
<div class="ui-agents-hives">
<HivesCard />
</div>
{/* Until the roster loads (or when it fails) there are no filters, but the
buttons stay, so an agent can still be created. */}
{rows === null ? (
<div class="ui-filterable-view-filter-bar ui-filterable-view-filter-card">
<div class="ui-filterable-view-actions">{barActions}</div>
</div>
) : null}
{error ? (
<ApiErrorPanel
context="failed to load the agent roster"
@ -140,18 +160,7 @@ export function AgentsPage() {
<FilterableView
view="cards"
standalone
barActions={
<>
<Button variant="primary" onClick={() => setCreateOpen(true)}>
+ agent
</Button>
<RefreshIntervalPicker
id="agents-refresh"
value={intervalMs}
onChange={setIntervalMs}
/>
</>
}
barActions={barActions}
columns={FIELDS}
rows={rows}
rowKey={(a) => a.name}