fix(ui): replace hardcoded height calc with flex-1 to eliminate bottom blank area

All content panels used h-[calc(100vh-8rem)] which didn't match the
actual available space (CONTENT_TOP_OFFSET is 92px on Mac, 64px on
Win/Linux, not 128px), causing a visible gap at the bottom.

Replace with flex-1 min-h-0 to let panels fill the remaining space
after <main> and any sibling elements (e.g. OpenClaw health banner).
This commit is contained in:
Jason
2026-03-16 00:19:29 +08:00
parent 333c9f277b
commit fc08a5d364
7 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -752,7 +752,7 @@ function App() {
return <AgentsDefaultsPanel />;
default:
return (
<div className="px-6 flex flex-col h-[calc(100vh-8rem)] overflow-hidden">
<div className="px-6 flex flex-col flex-1 min-h-0 overflow-hidden">
<div className="flex-1 overflow-y-auto overflow-x-hidden pb-12 px-1">
<AnimatePresence mode="wait">
<motion.div
+1 -1
View File
@@ -6,7 +6,7 @@ interface AgentsPanelProps {
export function AgentsPanel({}: AgentsPanelProps) {
return (
<div className="px-6 flex flex-col h-[calc(100vh-8rem)]">
<div className="px-6 flex flex-col flex-1 min-h-0">
<div className="flex-1 glass-card rounded-xl p-8 flex flex-col items-center justify-center text-center space-y-4">
<div className="w-20 h-20 rounded-full bg-white/5 flex items-center justify-center mb-4 animate-pulse-slow">
<Bot className="w-10 h-10 text-muted-foreground" />
+1 -1
View File
@@ -132,7 +132,7 @@ const UnifiedMcpPanel = React.forwardRef<
};
return (
<div className="px-6 flex flex-col h-[calc(100vh-8rem)] overflow-hidden">
<div className="px-6 flex flex-col flex-1 min-h-0 overflow-hidden">
<AppCountBar
totalLabel={t("mcp.serverCount", { count: serverEntries.length })}
counts={enabledCounts}
+1 -1
View File
@@ -96,7 +96,7 @@ const PromptPanel = React.forwardRef<PromptPanelHandle, PromptPanelProps>(
const enabledPrompt = promptEntries.find(([_, p]) => p.enabled);
return (
<div className="flex flex-col h-[calc(100vh-8rem)] px-6">
<div className="flex flex-col flex-1 min-h-0 px-6">
<div className="flex-shrink-0 py-4 glass rounded-xl border border-white/10 mb-4 px-6">
<div className="text-sm text-muted-foreground">
{t("prompts.count", { count: promptEntries.length })} ·{" "}
@@ -208,7 +208,7 @@ export function SessionManagerPage({ appId }: { appId: string }) {
return (
<TooltipProvider>
<div className="mx-auto px-4 sm:px-6 flex flex-col h-[calc(100vh-8rem)]">
<div className="mx-auto px-4 sm:px-6 flex flex-col flex-1 min-h-0">
<div className="flex-1 overflow-hidden flex flex-col gap-4">
{/* 主内容区域 - 左右分栏 */}
<div className="flex-1 overflow-hidden grid gap-4 md:grid-cols-[320px_1fr]">
+1 -1
View File
@@ -233,7 +233,7 @@ export const SkillsPage = forwardRef<SkillsPageHandle, SkillsPageProps>(
}, [skills, searchQuery, filterRepo, filterStatus]);
return (
<div className="px-6 flex flex-col h-[calc(100vh-8rem)] overflow-hidden bg-background/50">
<div className="px-6 flex flex-col flex-1 min-h-0 overflow-hidden bg-background/50">
{/* 技能网格(可滚动详情区域) */}
<div className="flex-1 overflow-y-auto overflow-x-hidden animate-fade-in">
<div className="py-4">
+1 -1
View File
@@ -250,7 +250,7 @@ const UnifiedSkillsPanel = React.forwardRef<
}));
return (
<div className="px-6 flex flex-col h-[calc(100vh-8rem)] overflow-hidden">
<div className="px-6 flex flex-col flex-1 min-h-0 overflow-hidden">
<AppCountBar
totalLabel={t("skills.installed", { count: skills?.length || 0 })}
counts={enabledCounts}