From 2bd871e820922fcd7edeec15583ba21bd6e8bedf Mon Sep 17 00:00:00 2001 From: Juan Denis Date: Tue, 3 Nov 2026 15:24:20 -0500 Subject: [PATCH] Keep in-page view switches in the page body on tab-group pages Fleet, Config templates, Cloud provision, FTP and Status pages put their SegControl in the top bar, which crowded the group tabs. Move it to the top of the body (same pattern as Jobs) and keep only real actions in the bar. --- frontend/src/pages/AgentFleet.jsx | 28 ++++++++++--------- frontend/src/pages/CloudProvision.jsx | 22 ++++++++------- frontend/src/pages/FTPServer.jsx | 26 ++++++++--------- frontend/src/pages/ServerTemplates.jsx | 20 +++++++------ frontend/src/pages/StatusPages.jsx | 24 ++++++++-------- .../src/styles/components/_design-system.scss | 16 +++++++++++ 6 files changed, 79 insertions(+), 57 deletions(-) diff --git a/frontend/src/pages/AgentFleet.jsx b/frontend/src/pages/AgentFleet.jsx index ac8a0869..57394581 100644 --- a/frontend/src/pages/AgentFleet.jsx +++ b/frontend/src/pages/AgentFleet.jsx @@ -107,19 +107,6 @@ const AgentFleet = () => { // re-registers on the values the node reads so spinner/counts stay in sync. useTopbarActions(() => ( <> - , label: t('app.agentFleet.dashboard', 'Dashboard') }, - { value: 'versions', icon: , label: t('app.agentFleet.versions', 'Versions') }, - { value: 'rollouts', icon: , label: t('app.agentFleet.rollouts', 'Rollouts') }, - { value: 'queue', icon: , label: t('app.agentFleet.commandQueue', 'Command queue'), count: queuedCommands.length || undefined }, - { value: 'discovery', icon: , label: t('app.agentFleet.discovery', 'Discovery') }, - { value: 'approvals', icon: , label: t('app.agentFleet.approvals', 'Approvals'), count: pendingServers.length || undefined }, - ]} - /> @@ -125,6 +115,18 @@ const CloudProvision = () => { return (
+
+ +
diff --git a/frontend/src/pages/FTPServer.jsx b/frontend/src/pages/FTPServer.jsx index 2d90c271..5a2d8b0c 100644 --- a/frontend/src/pages/FTPServer.jsx +++ b/frontend/src/pages/FTPServer.jsx @@ -506,19 +506,6 @@ function FTPServer() { useTopbarActions(() => <> - {isInstalled && ( - - )} {!isInstalled ? ( )} @@ -566,6 +557,17 @@ const ServerTemplates = () => { return (
+
+ +
{topbarChrome} diff --git a/frontend/src/pages/StatusPages.jsx b/frontend/src/pages/StatusPages.jsx index b18c4f01..81159b51 100644 --- a/frontend/src/pages/StatusPages.jsx +++ b/frontend/src/pages/StatusPages.jsx @@ -332,18 +332,6 @@ const StatusPages = () => { useTopbarActions(() => ( <> - {selectedPage && ( - - )}
+
+ +
diff --git a/frontend/src/styles/components/_design-system.scss b/frontend/src/styles/components/_design-system.scss index 24431b3d..2a836513 100644 --- a/frontend/src/styles/components/_design-system.scss +++ b/frontend/src/styles/components/_design-system.scss @@ -2037,3 +2037,19 @@ $sk-tones: ('accent', 'green', 'cyan', 'amber', 'red', 'violet'); } } } + +// In-page view switch for a tab-group child ("Dashboard / Versions / …" on one +// page): the group's bar owns the tab row, so the page's own sub-views are a +// SegControl at the top of the body — the same pattern Jobs uses. Scrolls +// sideways rather than wrapping when the views don't fit a phone. +.sk-viewswitch { + display: flex; + margin-bottom: $space-4; + max-width: 100%; + overflow-x: auto; + scrollbar-width: none; + + &::-webkit-scrollbar { display: none; } + + .sk-seg { flex-shrink: 0; } +}