fix(webui): center project session labels

This commit is contained in:
Xubin Ren
2026-09-03 15:45:57 +08:00
parent 30509b6d99
commit 0573cefa3b
2 changed files with 8 additions and 1 deletions
+1 -1
View File
@@ -993,7 +993,7 @@ export const ChatList = memo(function ChatList({
) : null}
<span className="min-w-0 flex-1 overflow-hidden">
{projectMode ? (
<span className="relative flex w-full min-w-0 items-baseline gap-2">
<span className="relative flex w-full min-w-0 items-center gap-2">
<SidebarSessionHandle handle={s.handle} />
<span className="min-w-0 flex-1 truncate font-medium leading-5">
{title}
+7
View File
@@ -983,6 +983,7 @@ describe("ChatList", () => {
session({
chatId: "alpha",
title: "Alpha task",
handle: { id: "handle_alpha", name: "mira" },
updatedAt: "2026-05-20T11:00:00Z",
workspaceScope: {
project_path: "/Users/me/nanobot",
@@ -1030,6 +1031,12 @@ describe("ChatList", () => {
"border-sidebar-foreground/10",
);
expect(within(nanobotSection).getByText("Alpha task")).toBeInTheDocument();
expect(
within(nanobotSection)
.getByText("@mira")
.closest("[data-sidebar-session-handle]")
?.parentElement,
).toHaveClass("items-center");
expect(within(nanobotSection).getByText("Zeta task")).toBeInTheDocument();
expect(nanobotText.indexOf("Alpha task")).toBeLessThan(nanobotText.indexOf("Zeta task"));
expect(within(nanobotSection).getByLabelText("Agent running")).toBeInTheDocument();