fix(ui): let the list empty states centre themselves like the primitive intends

Empty declares `flex-1 … justify-center` (empty.tsx:9), but the list pages wrapped
it in a plain `flex flex-col`, so it collapsed to its natural height and hugged the
header while api-tokens — same primitive, same "nothing yet + CTA" shape — centred
in its `flex-1` wrapper. At 1920 the CTA jumped ~350px between the two pages.

The five wrappers on knowledges, templates and flows (loading + empty states) now
carry flex-1 like the eight that already did. SidebarInset is `min-h-svh flex-1
flex-col`, so the height is there to fill. Measured at 1920: knowledges and
templates now report the same 564 centre / 24px offset as api-tokens.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Sergey Kozyrenko
2026-07-17 12:56:46 +07:00
co-authored by Claude Opus 4.8
parent d2489fd2c7
commit 29300b4df9
3 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -589,7 +589,7 @@ function Flows() {
return (
<>
{pageHeader}
<div className="flex flex-col gap-4 p-4">
<div className="flex flex-1 flex-col gap-4 p-4">
<Empty>
<EmptyHeader>
<EmptyMedia>
@@ -611,7 +611,7 @@ function Flows() {
return (
<>
{pageHeader}
<div className="flex flex-col gap-4 p-4">
<div className="flex flex-1 flex-col gap-4 p-4">
<Empty>
<EmptyHeader>
<EmptyMedia variant="icon">
+2 -2
View File
@@ -404,7 +404,7 @@ function Knowledges() {
return (
<>
{pageHeader}
<div className="flex flex-col gap-4 p-4">
<div className="flex flex-1 flex-col gap-4 p-4">
<Empty>
<EmptyHeader>
<EmptyMedia>
@@ -426,7 +426,7 @@ function Knowledges() {
return (
<>
{pageHeader}
<div className="flex flex-col gap-4 p-4">
<div className="flex flex-1 flex-col gap-4 p-4">
<Empty>
<EmptyHeader>
<EmptyMedia variant="icon">
+1 -1
View File
@@ -268,7 +268,7 @@ function Templates() {
return (
<>
{pageHeader}
<div className="flex flex-col gap-4 p-4">
<div className="flex flex-1 flex-col gap-4 p-4">
<Empty>
<EmptyHeader>
<EmptyMedia variant="icon">