feat(ui): compact Agent fleet Refresh on phones

Make the Agent fleet Refresh a quiet icon-only button and, on phones and
tablets, let lone compact top-bar actions share the group tabs row instead
of taking a full row of their own.
This commit is contained in:
Juan Denis committed 2026-11-08 18:27:28 -05:00
1 parent ad8b8b9afe
commit 7c176f7573
2 files changed
+24 -6

No files matched your search

+11 -6
View File
@@ -106,12 +106,17 @@ const AgentFleet = () => {
// Publish the view switcher + Refresh to the shared tab-group top bar;
// re-registers on the values the node reads so spinner/counts stay in sync.
useTopbarActions(() => (
<>
<Button size="sm" onClick={fetchData} disabled={loading}>
<RefreshCw size={18} className={loading ? 'fleet-refresh-spinner' : ''} />
{t('common.actions.refresh', 'Refresh')}
</Button>
</>
<Button
variant="ghost"
size="icon"
className="sk-topbar__action--compact"
onClick={fetchData}
disabled={loading}
aria-label={t('common.actions.refresh', 'Refresh')}
title={t('common.actions.refresh', 'Refresh')}
>
<RefreshCw size={18} className={loading ? 'fleet-refresh-spinner' : ''} />
</Button>
), [loading, activeTab, queuedCommands.length, pendingServers.length]);
@@ -1515,6 +1515,19 @@ $sk-tones: ('accent', 'green', 'cyan', 'amber', 'red', 'violet');
&::-webkit-scrollbar { display: none; }
}
&__tabs { order: 3; width: 100%; margin-left: 0; justify-content: flex-start; }
// Only compact icon actions (e.g. a lone Refresh): share the tabs' row,
// pinned right, instead of costing a full row of their own.
&__actions:has(> .sk-topbar__action--compact):not(:has(> :not(.sk-topbar__action--compact, .sk-topbar__chrome))) {
order: 2;
width: auto;
margin-left: auto;
}
&:has(.sk-topbar__actions > .sk-topbar__action--compact):not(:has(.sk-topbar__actions > :not(.sk-topbar__action--compact, .sk-topbar__chrome))) &__tabs {
order: 1;
width: auto;
flex: 1 1 0;
}
}
// Phones: the one page-header rule. The title takes the row beside its icon