mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-09-03 17:52:00 +03:00
fix(webui): center project session labels
This commit is contained in:
@@ -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}
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user