
























@@ -173,7 +173,7 @@ describe("control UI routing", () => {
173173expect(header.querySelector(".nav-collapse-toggle")).not.toBeNull();
174174});
175175176-it("preserves the active session when opening chat from sidebar navigation", async () => {
176+it("preserves session navigation and keeps focus mode scoped to chat", async () => {
177177const app = mountApp("/sessions?session=agent:main:subagent:task-123");
178178await app.updateComplete;
179179@@ -186,11 +186,6 @@ describe("control UI routing", () => {
186186expect(app.sessionKey).toBe("agent:main:subagent:task-123");
187187expect(window.location.pathname).toBe("/chat");
188188expect(window.location.search).toBe("?session=agent%3Amain%3Asubagent%3Atask-123");
189-});
190-191-it("keeps focus mode scoped to the chat tab", async () => {
192-const app = mountApp("/chat");
193-await app.updateComplete;
194189195190const shell = app.querySelector(".shell");
196191expect(shell).not.toBeNull();
@@ -203,9 +198,11 @@ describe("control UI routing", () => {
203198await app.updateComplete;
204199expect(shell?.classList.contains("shell--chat-focus")).toBe(true);
205200206-const link = app.querySelector<HTMLAnchorElement>('a.nav-item[href="/channels"]');
207-expect(link).not.toBeNull();
208-link?.dispatchEvent(new MouseEvent("click", { bubbles: true, cancelable: true, button: 0 }));
201+const channelsLink = app.querySelector<HTMLAnchorElement>('a.nav-item[href="/channels"]');
202+expect(channelsLink).not.toBeNull();
203+channelsLink?.dispatchEvent(
204+new MouseEvent("click", { bubbles: true, cancelable: true, button: 0 }),
205+);
209206210207await app.updateComplete;
211208expect(app.tab).toBe("channels");
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。