From 67e764d8b767690a25b72ee0ad9cb1f57ae51df0 Mon Sep 17 00:00:00 2001 From: lvbaiqing Date: Tue, 3 Nov 2026 00:00:23 +0800 Subject: [PATCH] fix(ui): keep overview dashboard fixed --- .../app/src/components/FloatingShell.tsx | 10 ++--- openless-all/app/src/pages/Overview.tsx | 44 +++++++++++++------ 2 files changed, 35 insertions(+), 19 deletions(-) diff --git a/openless-all/app/src/components/FloatingShell.tsx b/openless-all/app/src/components/FloatingShell.tsx index 57d6ac0bd..2d9a1451d 100644 --- a/openless-all/app/src/components/FloatingShell.tsx +++ b/openless-all/app/src/components/FloatingShell.tsx @@ -542,15 +542,13 @@ function FloatingShellBody({ // scrollbar appears only when it truly overflows. // - Other tabs use the thin scrollbar too. className="ol-thinscroll ol-scroll-fade" - // Overview is a fixed single-screen page (overflow hidden, never scrolls): - // no scrollbar gutter reserved. + // Overview is a fixed single-screen dashboard. Its cards own any internal + // scrolling; the page surface itself never becomes a scroll container. style={{ flex: 1, minHeight: 0, - // Overview is a fixed single-screen page: no scrolling; all dashboards - // fit one screen with heights distributed by Overview.tsx's internal - // flex; other pages keep the thin scrollbar. - overflow: 'auto', + overflow: displayTab === 'overview' ? 'hidden' : 'auto', + boxSizing: 'border-box', padding: mobile ? '16px 16px calc(16px + env(safe-area-inset-bottom, 0px) + 56px)' : displayTab === 'overview' diff --git a/openless-all/app/src/pages/Overview.tsx b/openless-all/app/src/pages/Overview.tsx index 9c4a0a3ec..c02d5f6b7 100644 --- a/openless-all/app/src/pages/Overview.tsx +++ b/openless-all/app/src/pages/Overview.tsx @@ -300,17 +300,18 @@ export function Overview({ onOpenHistory, onOpenSettings }: OverviewProps) { onOpenSettings?.(section, serviceView); return ( - // Single-screen fixed page: no scrolling, fills the height given by the shell, dashboards share - // one screen elastically; when the window is squeezed very short, the bottom row shrinks internally - // (the recent list scrolls internally) and the page itself shows no scrollbar. + // Single-screen fixed dashboard: the shell owns the viewport and cards own their + // internal scrolling. The page surface never grows a document scrollbar.
@@ -355,7 +356,7 @@ export function Overview({ onOpenHistory, onOpenSettings }: OverviewProps) {
{/* Usage records: title + four metric cards as one group. */} -
+

+