From 7938427407ee2e4aaffac9b0809c046a57b83622 Mon Sep 17 00:00:00 2001 From: lyon Date: Wed, 17 Jun 2026 01:06:21 +0800 Subject: [PATCH] fix: keep session tabs content-sized --- web/hwlab-cloud-web/scripts/check.ts | 1 + web/hwlab-cloud-web/src/styles/workbench.css | 3 +++ 2 files changed, 4 insertions(+) diff --git a/web/hwlab-cloud-web/scripts/check.ts b/web/hwlab-cloud-web/scripts/check.ts index 3756cd5c..e2bfdcc6 100644 --- a/web/hwlab-cloud-web/scripts/check.ts +++ b/web/hwlab-cloud-web/scripts/check.ts @@ -118,6 +118,7 @@ assertIncludes(appSource, "primaryAction.value === \"steer\"", "Composer primary assertIncludes(appSource, ":data-action=\"primaryAction\"", "Composer primary button must expose the active turn/steer/cancel action"); assert.doesNotMatch(appSource, /取消运行中 Trace/u, "Workbench must not render a separate stale cancel-running-trace button"); assertIncludes(appSource, "session_required", "explicit session policy must be represented"); +assertIncludes(appSource, "grid-auto-rows: max-content;", "Session list rows must keep content height instead of stretching a single tab"); assertIncludes(appSource, "CodeWorkbenchView", "Code Workbench must be a route view, not the app shell"); assert.doesNotMatch(appSource, /from ["']react["']|React\.StrictMode|createRoot|\.tsx/u, "React runtime references must not remain"); diff --git a/web/hwlab-cloud-web/src/styles/workbench.css b/web/hwlab-cloud-web/src/styles/workbench.css index 7b689176..c0612a12 100644 --- a/web/hwlab-cloud-web/src/styles/workbench.css +++ b/web/hwlab-cloud-web/src/styles/workbench.css @@ -590,7 +590,9 @@ .session-list { display: grid; min-height: 0; + align-content: start; gap: 6px; + grid-auto-rows: max-content; overflow: auto; } @@ -618,6 +620,7 @@ .session-tab { position: relative; display: flex; + align-self: start; align-items: center; min-width: 0; min-height: 34px;