惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

美团技术团队
J
Java Code Geeks
有赞技术团队
有赞技术团队
GbyAI
GbyAI
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 叶小钗
阮一峰的网络日志
阮一峰的网络日志
Microsoft Security Blog
Microsoft Security Blog
IT之家
IT之家
G
Google Developers Blog
月光博客
月光博客
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
S
SegmentFault 最新的问题
博客园 - 三生石上(FineUI控件)
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - Franky
腾讯CDC
V
Visual Studio Blog
博客园 - 【当耐特】
D
Docker
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Engineering at Meta
Engineering at Meta
L
LangChain Blog

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(web-ui): skip hidden subagent picker pages · openclaw...
giodl73-repo · 2026-06-22 · via Recent Commits to openclaw:main
11

// Control UI tests cover chat picker pagination behavior.

2+

import { mkdir } from "node:fs/promises";

3+

import path from "node:path";

24

import { chromium, type Browser } from "playwright";

35

import { afterAll, beforeAll, describe, expect, it } from "vitest";

46

import {

@@ -19,7 +21,12 @@ const describeControlUiE2e = chromiumAvailable || !allowMissingChromium ? descri

1921

let browser: Browser;

2022

let server: ControlUiE2eServer;

212322-

function sessionRow(key: string, label: string, updatedAt: number) {

24+

function sessionRow(

25+

key: string,

26+

label: string,

27+

updatedAt: number,

28+

options: { spawnedBy?: string } = {},

29+

) {

2330

return {

2431

contextTokens: null,

2532

displayName: label,

@@ -32,6 +39,7 @@ function sessionRow(key: string, label: string, updatedAt: number) {

3239

status: "done",

3340

totalTokens: 0,

3441

updatedAt,

42+

...(options.spawnedBy ? { spawnedBy: options.spawnedBy } : {}),

3543

};

3644

}

3745

@@ -220,4 +228,115 @@ describeControlUiE2e("Control UI chat picker mocked Gateway E2E", () => {

220228

await context.close();

221229

}

222230

});

231+232+

it("skips hidden subagent-only pages when loading more chat sessions through the GUI", async () => {

233+

const baseTime = Date.parse("2026-06-04T12:00:00.000Z");

234+

const context = await browser.newContext({

235+

locale: "en-US",

236+

serviceWorkers: "block",

237+

viewport: { height: 900, width: 1280 },

238+

});

239+

const page = await context.newPage();

240+

const gateway = await installMockGateway(page, {

241+

methodResponses: {

242+

"sessions.list": {

243+

cases: [

244+

{

245+

match: { offset: 4 },

246+

response: sessionsListResponse(

247+

[sessionRow("agent:main:work", "Main work", baseTime - 240_000)],

248+

{ hasMore: false, nextOffset: null, offset: 4, totalCount: 177 },

249+

),

250+

},

251+

{

252+

match: { offset: 2 },

253+

response: sessionsListResponse(

254+

[

255+

sessionRow(

256+

"agent:main:spawn-child:second",

257+

"Subagent second",

258+

baseTime - 120_000,

259+

{ spawnedBy: "agent:main:main" },

260+

),

261+

sessionRow("agent:main:spawn-child:third", "Subagent third", baseTime - 180_000, {

262+

spawnedBy: "agent:main:main",

263+

}),

264+

],

265+

{ hasMore: true, nextOffset: 4, offset: 2, totalCount: 177 },

266+

),

267+

},

268+

{

269+

match: {},

270+

response: sessionsListResponse(

271+

[

272+

sessionRow("agent:main:main", "Main chat", baseTime - 60_000),

273+

sessionRow("agent:main:spawn-child:first", "Subagent first", baseTime - 90_000, {

274+

spawnedBy: "agent:main:main",

275+

}),

276+

],

277+

{ hasMore: true, nextOffset: 2, totalCount: 177 },

278+

),

279+

},

280+

],

281+

},

282+

},

283+

sessionKey: "agent:main:main",

284+

});

285+286+

try {

287+

await page.goto(`${server.baseUrl}chat`);

288+

await page.getByRole("button", { name: "Chat session" }).click();

289+290+

await page.getByRole("option", { name: /Main chat/u }).waitFor({ timeout: 10_000 });

291+

await page.getByText("1", { exact: true }).waitFor({ timeout: 10_000 });

292+

await expect

293+

.poll(() => page.getByRole("option", { name: /Subagent first/u }).count())

294+

.toBe(0);

295+296+

await page.getByRole("button", { name: "Load more sessions" }).click();

297+298+

const hiddenPageRequest = await waitForSessionsRequest(

299+

gateway,

300+

(params) => params.offset === 2,

301+

);

302+

expect(requestParams(hiddenPageRequest)).toMatchObject({

303+

configuredAgentsOnly: true,

304+

includeGlobal: true,

305+

includeUnknown: true,

306+

limit: 50,

307+

offset: 2,

308+

});

309+

const visiblePageRequest = await waitForSessionsRequest(

310+

gateway,

311+

(params) => params.offset === 4,

312+

);

313+

expect(requestParams(visiblePageRequest)).toMatchObject({

314+

configuredAgentsOnly: true,

315+

includeGlobal: true,

316+

includeUnknown: true,

317+

limit: 50,

318+

offset: 4,

319+

});

320+321+

await page.getByRole("option", { name: /Main work/u }).waitFor({ timeout: 10_000 });

322+

await page.getByText("2", { exact: true }).waitFor({ timeout: 10_000 });

323+

await expect

324+

.poll(() => page.getByRole("option", { name: /Subagent second/u }).count())

325+

.toBe(0);

326+

await expect

327+

.poll(() => page.getByRole("button", { name: "Load more sessions" }).count())

328+

.toBe(0);

329+330+

if (process.env.OPENCLAW_CAPTURE_UI_PROOF === "1") {

331+

const artifactDir = path.join(process.cwd(), ".artifacts", "pr-89323-control-ui-proof");

332+

await mkdir(artifactDir, { recursive: true });

333+

await page.screenshot({

334+

fullPage: true,

335+

path: path.join(artifactDir, "chat-picker-hidden-page-skip.png"),

336+

});

337+

}

338+

} finally {

339+

await context.close();

340+

}

341+

});

223342

});