From 91145fd923cf68882706c05c13518ca422691e07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=B7=E7=94=B5=E8=8A=BD=E8=A1=A3?= Date: Thu, 28 May 2026 19:32:40 -0400 Subject: [PATCH] Give split-layout pages independent scroll regions Chat and Settings escaped the content padding with a hardcoded calc(100vh - 44px) height and negative margins, while Files and Social let the whole page scroll, so secondary panes (channel list, settings nav, file tree) scrolled away. Add a .content.flush modifier the Shell applies to the chat, settings, files and social routes, plus a reusable .pane-scroll region, and rework those pages to fill the content area with each pane scrolling on its own. Removes the magic-number coupling to the topbar height. --- .../src/renderer/src/pages/ChatPage.tsx | 2 +- .../src/renderer/src/pages/FilesPage.tsx | 8 ++-- .../src/renderer/src/pages/SettingsPage.tsx | 14 ++++--- .../src/renderer/src/pages/SocialPage.tsx | 4 +- .../renderer/src/pages/chat/ChatSidebar.tsx | 40 ++++++++++--------- .../src/renderer/src/shared/Shell.tsx | 6 ++- AgentCompany-New/src/renderer/src/styles.css | 13 ++++++ 7 files changed, 56 insertions(+), 31 deletions(-) diff --git a/AgentCompany-New/src/renderer/src/pages/ChatPage.tsx b/AgentCompany-New/src/renderer/src/pages/ChatPage.tsx index 063d330e..ecfed990 100644 --- a/AgentCompany-New/src/renderer/src/pages/ChatPage.tsx +++ b/AgentCompany-New/src/renderer/src/pages/ChatPage.tsx @@ -196,7 +196,7 @@ export function ChatPage({ snapshot, actions }: PageProps) { })); return ( -
+
sum + file.sizeBytes, 0); return ( -
+
-
+
@@ -76,6 +76,7 @@ export function FilesPage({ snapshot, actions }: PageProps) { {visibleFiles.length} {visibleFiles.length === 1 ? "file" : "files"} · {formatBytes(totalBytes)}

+
{pinnedFiles.length > 0 && section.kind === "all" && ( <>
Pinned
@@ -115,6 +116,7 @@ export function FilesPage({ snapshot, actions }: PageProps) { onTogglePin={(file) => void actions.run(() => window.agentCompany.setFilePinned({ orgId, fileId: file.id, pinned: !file.pinned }))} /> )} +
); @@ -137,7 +139,7 @@ function FilesTree({ }) { const recent = files.filter((file) => isRecent(file.createdAt)); return ( -
-
+
{children}
diff --git a/AgentCompany-New/src/renderer/src/styles.css b/AgentCompany-New/src/renderer/src/styles.css index ed7a76ad..35756ef5 100644 --- a/AgentCompany-New/src/renderer/src/styles.css +++ b/AgentCompany-New/src/renderer/src/styles.css @@ -298,6 +298,19 @@ a { color: inherit; } overflow: auto; padding: 28px 32px 40px; } +/* Split-layout routes fill the content area and let their panes scroll + independently instead of scrolling the whole page. */ +.content.flush { + display: flex; + flex-direction: column; + overflow: hidden; + padding: 0; +} +.pane-scroll { + flex: 1; + min-height: 0; + overflow-y: auto; +} .page { max-width: 1100px; } .page-wide { width: 100%; } .page-h1 {