🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
fix(web): Missing header spacing on narrow screens (#17709)
Ben Bachem9405bb56c56f
diff --git a/web/src/components/layouts/app-shell-chrome.clienttest.tsx b/web/src/components/layouts/app-shell-chrome.clienttest.tsxindex 87d5acd837..48d7b212cf 100644--- a/web/src/components/layouts/app-shell-chrome.clienttest.tsx+++ b/web/src/components/layouts/app-shell-chrome.clienttest.tsx@@ -115,6 +115,19 @@ describe("app shell chrome row", () => {expect(container.querySelector(".h-1.flex-1.border-b")).toBeNull();});+ it("sizes each page-header flex line as a full chrome row", () => {+ const { container } = render(<Shell />);++ const pageHeaderRow = container.querySelector(+ `#page-header [data-testid="${APP_SHELL_CHROME_ROW_TEST_ID}"]`,+ );+ const rowContent = pageHeaderRow?.firstElementChild;++ expect(rowContent?.className).toContain("gap-y-px");+ expect(rowContent?.firstElementChild?.className).toContain("min-h-[43px]");+ expect(rowContent?.lastElementChild?.className).toContain("min-h-[43px]");+ });+it("sizes the desktop sidebar toggle to the same 20px as the wordmark", () => {const { container } = render(<Shell />);diff --git a/web/src/components/layouts/page-header.tsx b/web/src/components/layouts/page-header.tsxindex e4cac0601c..e598d819ce 100644--- a/web/src/components/layouts/page-header.tsx+++ b/web/src/components/layouts/page-header.tsx@@ -108,19 +108,15 @@ const PageHeader = ({><divclassName={cn(- // No extra vertical padding: min-h-11 + border-b already is- // the 44px box. Extra py would grow the row past the sidebar- // strip (border-box counts padding inside min-height, then- // 32px controls no longer fit). justify-between (not ml-auto- // on the slot) so the controls sit right when the row fits on- // one line but fall back to the LEFT edge when they wrap to- // their own line on narrow viewports (a line with a single- // flex item renders as flex-start).- "flex h-full w-full flex-wrap items-center justify-between gap-3 px-3 leading-none",+ // Each flex line is 43px plus the shared 1px border. A single+ // line therefore stays aligned with the sidebar's 44px row,+ // while wrapped controls form a second full-height row instead+ // of looking squeezed between the header edges.+ "flex h-full w-full flex-wrap items-center justify-between gap-x-3 gap-y-px px-3 leading-none",container && containerLayoutClassName,)}>- <div className="flex min-h-5 min-w-0 flex-wrap items-center gap-3">+ <div className="flex min-h-[43px] min-w-0 flex-wrap items-center gap-3">{showSidebarChrome ? (<><SidebarTrigger />@@ -150,7 +146,7 @@ const PageHeader = ({{/* Slot for page-level controls (time range, auto-refresh)hoisted from a list table via PageHeaderControlsPortal.Empty on pages that don't use it. */}- <div className="flex flex-wrap items-center gap-2">+ <div className="flex min-h-[43px] flex-wrap items-center gap-2"><PageHeaderControlsSlotTarget />{isInAppAgentLauncherVisible && <InAppAiAgentButton />}</div>