fix: start workspace files collapsed · openclaw/openclaw@dbf24fe
shakkernerd
·
2026-06-14
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -701,7 +701,7 @@ function getChatWorkspaceFilesState(state: AppViewState, agentId: string): ChatW
|
701 | 701 | const next = { |
702 | 702 | activeName: null, |
703 | 703 | agentId, |
704 | | -collapsed: false, |
| 704 | +collapsed: true, |
705 | 705 | error: null, |
706 | 706 | list: null, |
707 | 707 | loading: false, |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -221,7 +221,7 @@ describeControlUiE2e("Control UI mocked Gateway E2E", () => {
|
221 | 221 | } |
222 | 222 | }); |
223 | 223 | |
224 | | -it("collapses the workspace files panel from its header control", async () => { |
| 224 | +it("starts the workspace files panel collapsed and toggles it open", async () => { |
225 | 225 | const context = await browser.newContext({ |
226 | 226 | locale: "en-US", |
227 | 227 | serviceWorkers: "block", |
@@ -240,6 +240,14 @@ describeControlUiE2e("Control UI mocked Gateway E2E", () => {
|
240 | 240 | |
241 | 241 | try { |
242 | 242 | await page.goto(`${server.baseUrl}chat`); |
| 243 | +await page.getByRole("button", { name: "Expand workspace files" }).waitFor({ |
| 244 | +timeout: 10_000, |
| 245 | +}); |
| 246 | +expect(await gateway.getRequests("agents.files.list")).toHaveLength(0); |
| 247 | +expect(await page.locator(".chat-workspace-rail__file").count()).toBe(0); |
| 248 | +expect(await page.locator(".chat-workspace-rail__collapsed-icon svg").count()).toBe(1); |
| 249 | + |
| 250 | +await page.getByRole("button", { name: "Expand workspace files" }).click(); |
243 | 251 | await page.getByRole("button", { name: "Collapse workspace files" }).waitFor({ |
244 | 252 | timeout: 10_000, |
245 | 253 | }); |
@@ -258,6 +266,7 @@ describeControlUiE2e("Control UI mocked Gateway E2E", () => {
|
258 | 266 | timeout: 10_000, |
259 | 267 | }); |
260 | 268 | await page.getByText("AGENTS.md").waitFor({ timeout: 10_000 }); |
| 269 | +expect(await gateway.getRequests("agents.files.list")).toHaveLength(1); |
261 | 270 | |
262 | 271 | await page.setViewportSize({ height: 900, width: 1000 }); |
263 | 272 | expect(await page.locator(".chat-workspace-rail").isHidden()).toBe(true); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。