Your lightweight open-source personal agent.
Python agent-frameworkai-agentai-agentschatbotchatopsdiscord-botllm-agentsllmslocal-llmmcpmodel-context-protocolmulti-agentopenai-compatibleopenclawpersonal-ai-assistantpythonself-hostedtelegram-bot-ai-assistantwebuiworkflow-automation
fix(webui): include grouped tabs in range selection
Xubin Ren86d228b38e63
diff --git a/webui/src/components/ChatList.tsx b/webui/src/components/ChatList.tsxindex e45f53e94..9cbee63e6 100644--- a/webui/src/components/ChatList.tsx+++ b/webui/src/components/ChatList.tsx@@ -563,6 +563,7 @@ export const ChatList = memo(function ChatList({const next = new Set(current);if (range) {for (const key of range) next.add(key);+ for (const key of validKeys) next.add(key);return next;}const remove = validKeys.length > 0 && validKeys.every((key) => next.has(key));diff --git a/webui/src/tests/chat-list.test.tsx b/webui/src/tests/chat-list.test.tsxindex 4cff8b295..d8ef7333e 100644--- a/webui/src/tests/chat-list.test.tsx+++ b/webui/src/tests/chat-list.test.tsx@@ -698,6 +698,50 @@ describe("ChatList", () => {}});+ it("includes every pane when a Shift-click range ends on a grouped tab", async () => {+ render(+ <ChatList+ sessions={[+ session({ chatId: "first", title: "First topic" }),+ session({ chatId: "root", title: "Root topic" }),+ ]}+ activeKey="websocket:first"+ paneGroups={{+ "websocket:root": {+ tabKey: "websocket:root",+ title: "Root topic",+ activePaneKey: "websocket:root",+ panes: [+ { key: "websocket:root", chatId: "root", title: "Root topic" },+ { key: "websocket:child", chatId: "child", title: "Research pane" },+ ],+ },+ }}+ onSelect={vi.fn()}+ onRequestDelete={vi.fn()}+ onTogglePin={vi.fn()}+ onRequestRename={vi.fn()}+ onToggleArchive={vi.fn()}+ />,+ );++ fireEvent.pointerDown(screen.getByRole("button", {+ name: "Topic actions for First topic",+ }), { button: 0, ctrlKey: false });+ fireEvent.click(await screen.findByRole("menuitem", { name: "Select" }));+ fireEvent.click(screen.getByRole("button", { name: "Group: Root topic" }), {+ shiftKey: true,+ });++ expect(screen.getByText("3 selected")).toBeInTheDocument();+ expect(screen.getByRole("button", { name: "Group: Root topic" }))+ .toHaveAttribute("aria-pressed", "true");+ expect(screen.getByRole("button", { name: "Root topic" }))+ .toHaveAttribute("aria-pressed", "true");+ expect(screen.getByRole("button", { name: "Research pane" }))+ .toHaveAttribute("aria-pressed", "true");+ });+it("shows temporary chats separately and lets the user reopen or close them", async () => {const temporarySession = session({key: "temporary:temporary-one",