From 07d8b4efa685a16115f9953ab01c4591a96b2d68 Mon Sep 17 00:00:00 2001 From: viettranx Date: Thu, 5 Mar 2026 12:13:59 +0700 Subject: [PATCH] refactor(ui): mobile 375px responsiveness for pages and config sections MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Config page: vertical tabs → horizontal on mobile via useIsMobile() - Agent/Channel/Team detail: scrollable tab overflow, responsive card padding - Config sections: grid-cols-2/3/4 → responsive sm: breakpoints (18 files) - Gateway/Quota sections: responsive grids, overflow-x-auto on data tables - Shares/Links/Skills: stack forms on mobile, responsive fixed widths Co-Authored-By: Claude Opus 4.6 --- .../agents/agent-detail/agent-detail-page.tsx | 4 +- .../agents/agent-detail/agent-shares-tab.tsx | 10 +- .../agents/agent-detail/agent-skills-tab.tsx | 2 +- .../config-sections/compaction-section.tsx | 4 +- .../config-sections/config-section.tsx | 2 +- .../context-pruning-section.tsx | 6 +- .../config-sections/memory-section.tsx | 4 +- .../config-sections/quality-gates-section.tsx | 6 +- .../config-sections/sandbox-section.tsx | 6 +- .../config-sections/subagents-section.tsx | 4 +- .../general-sections/identity-section.tsx | 2 +- .../general-sections/llm-config-section.tsx | 2 +- .../link-sections/link-create-form.tsx | 8 +- .../agent-detail/link-sections/link-list.tsx | 6 +- .../channel-detail/channel-detail-page.tsx | 4 +- ui/web/src/pages/config/config-page.tsx | 16 +- .../pages/config/sections/gateway-section.tsx | 6 +- .../pages/config/sections/quota-section.tsx | 180 +++++++++--------- ui/web/src/pages/teams/team-detail-page.tsx | 4 +- 19 files changed, 143 insertions(+), 133 deletions(-) diff --git a/ui/web/src/pages/agents/agent-detail/agent-detail-page.tsx b/ui/web/src/pages/agents/agent-detail/agent-detail-page.tsx index 1b8eec3e..10afa384 100644 --- a/ui/web/src/pages/agents/agent-detail/agent-detail-page.tsx +++ b/ui/web/src/pages/agents/agent-detail/agent-detail-page.tsx @@ -109,9 +109,9 @@ export function AgentDetailPage({ agentId, onBack }: AgentDetailPageProps) { {/* Tabs */} -
+
- + General Config Files diff --git a/ui/web/src/pages/agents/agent-detail/agent-shares-tab.tsx b/ui/web/src/pages/agents/agent-detail/agent-shares-tab.tsx index 49354065..b3256d27 100644 --- a/ui/web/src/pages/agents/agent-detail/agent-shares-tab.tsx +++ b/ui/web/src/pages/agents/agent-detail/agent-shares-tab.tsx @@ -53,7 +53,7 @@ export function AgentSharesTab({ agentId }: AgentSharesTabProps) { {/* Add share form */}

Grant Access

-
+
-
+
-
+
Min Messages
{enabled ? ( -
{children}
+
{children}
) : (

Using global defaults from config.json diff --git a/ui/web/src/pages/agents/agent-detail/config-sections/context-pruning-section.tsx b/ui/web/src/pages/agents/agent-detail/config-sections/context-pruning-section.tsx index a74be7f2..50332efb 100644 --- a/ui/web/src/pages/agents/agent-detail/config-sections/context-pruning-section.tsx +++ b/ui/web/src/pages/agents/agent-detail/config-sections/context-pruning-section.tsx @@ -25,7 +25,7 @@ export function ContextPruningSection({ enabled, value, onToggle, onChange }: Co enabled={enabled} onToggle={onToggle} > -

+
Mode

Soft Trim

-
+
Max Chars -
+
Max Results
-
+
Vector Weight
-
+
Type -
+
Mode
-
+
Memory (MB) -
+
Max Concurrent
-
+
Max Children Per Agent
-
+

Create Link

-
+
-
+
-
+
-
+
+
Target Direction Status @@ -55,7 +55,7 @@ export function LinkList({ {links.map((link) => (
diff --git a/ui/web/src/pages/channels/channel-detail/channel-detail-page.tsx b/ui/web/src/pages/channels/channel-detail/channel-detail-page.tsx index 4731f714..6d741e8f 100644 --- a/ui/web/src/pages/channels/channel-detail/channel-detail-page.tsx +++ b/ui/web/src/pages/channels/channel-detail/channel-detail-page.tsx @@ -93,9 +93,9 @@ export function ChannelDetailPage({ instanceId, onBack }: ChannelDetailPageProps
{/* Tabs */} -
+
- + General Credentials Config diff --git a/ui/web/src/pages/config/config-page.tsx b/ui/web/src/pages/config/config-page.tsx index a84cfef8..7480beaa 100644 --- a/ui/web/src/pages/config/config-page.tsx +++ b/ui/web/src/pages/config/config-page.tsx @@ -12,6 +12,7 @@ import { DetailSkeleton } from "@/components/shared/loading-skeleton"; import { useConfig } from "./hooks/use-config"; import { useMinLoading } from "@/hooks/use-min-loading"; import { useDeferredLoading } from "@/hooks/use-deferred-loading"; +import { useIsMobile } from "@/hooks/use-media-query"; import { ROUTES } from "@/lib/constants"; import { GatewaySection } from "./sections/gateway-section"; import { ProvidersSection } from "./sections/providers-section"; @@ -27,6 +28,7 @@ import { QuotaSection } from "./sections/quota-section"; export function ConfigPage() { const { config, hash, configPath, loading, saving, error, refresh, applyRaw, patch } = useConfig(); + const isMobile = useIsMobile(); const spinning = useMinLoading(loading); const showSkeleton = useDeferredLoading(loading && !config); const [rawText, setRawText] = useState(""); @@ -117,16 +119,22 @@ export function ConfigPage() {
- - + + General {isManaged && Quota} Agents Tools Connections Advanced -
- Raw Editor + {!isMobile &&
} + Raw diff --git a/ui/web/src/pages/config/sections/gateway-section.tsx b/ui/web/src/pages/config/sections/gateway-section.tsx index 81e978ea..33b46673 100644 --- a/ui/web/src/pages/config/sections/gateway-section.tsx +++ b/ui/web/src/pages/config/sections/gateway-section.tsx @@ -63,7 +63,7 @@ export function GatewaySection({ data, onSave, saving }: Props) { WebSocket & HTTP server settings, security -
+
Host
-
+
Owner IDs
-
+
Max Message Chars {label} {keys.map((key, i) => ( -
-
- {i === 0 && ( - Key - )} - {options ? ( - updateKey(key, v)} + > + + + + + {/* Current value always shown */} + {key && ( + + {options.find((o) => o.value === key)?.label ?? key} - ))} - - - ) : ( + )} + {availableOptions + ?.filter((o) => o.value !== key) + .map((o) => ( + + {o.label} + + ))} + + + ) : ( + updateKey(key, e.target.value)} + /> + )} +
+
+ {i === 0 && ( + Hour + )} updateKey(key, e.target.value)} + type="number" + min={0} + value={entries[key]?.hour ?? 0} + onChange={(e) => + updateWindow(key, { + ...entries[key], + hour: Number(e.target.value), + }) + } /> - )} +
+
+ {i === 0 && ( + Day + )} + + updateWindow(key, { + ...entries[key], + day: Number(e.target.value), + }) + } + /> +
+
+ {i === 0 && ( + Week + )} + + updateWindow(key, { + ...entries[key], + week: Number(e.target.value), + }) + } + /> +
+
-
- {i === 0 && ( - Hour - )} - - updateWindow(key, { - ...entries[key], - hour: Number(e.target.value), - }) - } - /> -
-
- {i === 0 && ( - Day - )} - - updateWindow(key, { - ...entries[key], - day: Number(e.target.value), - }) - } - /> -
-
- {i === 0 && ( - Week - )} - - updateWindow(key, { - ...entries[key], - week: Number(e.target.value), - }) - } - /> -
-
))} {options ? ( diff --git a/ui/web/src/pages/teams/team-detail-page.tsx b/ui/web/src/pages/teams/team-detail-page.tsx index cc163cda..9273cdfd 100644 --- a/ui/web/src/pages/teams/team-detail-page.tsx +++ b/ui/web/src/pages/teams/team-detail-page.tsx @@ -105,9 +105,9 @@ export function TeamDetailPage({ teamId, onBack }: TeamDetailPageProps) {
{/* Tabs */} -
+
- + Members Tasks Delegations