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

推荐订阅源

罗磊的独立博客
爱范儿
爱范儿
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园_首页
博客园 - 叶小钗
酷 壳 – CoolShell
酷 壳 – CoolShell
Apple Machine Learning Research
Apple Machine Learning Research
云风的 BLOG
云风的 BLOG
量子位
博客园 - 三生石上(FineUI控件)
Stack Overflow Blog
Stack Overflow Blog
小众软件
小众软件
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
V
V2EX
人人都是产品经理
人人都是产品经理
V
Visual Studio Blog
Jina AI
Jina AI
L
LangChain Blog
M
MIT News - Artificial intelligence
MongoDB | Blog
MongoDB | Blog
Last Week in AI
Last Week in AI
Martin Fowler
Martin Fowler
WordPress大学
WordPress大学

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
test: sketch dreaming scene rows · openclaw/openclaw@10f166a
shakkernerd · 2026-05-13 · via Recent Commits to openclaw:main

@@ -210,25 +210,49 @@ function compactText(node: Element | null): string | undefined {

210210

return node?.textContent?.trim().replace(/\s+/g, " ");

211211

}

212212213+

function textItems(container: Element, selector: string): Array<string | undefined> {

214+

return [...container.querySelectorAll(selector)].map((node) => node.textContent?.trim());

215+

}

216+213217

describe("dreaming view", () => {

214218

it("renders the active dream scene chrome and status", () => {

215219

const container = renderInto(buildProps({ dreamingOf: "reindexing old chats\u2026" }));

216220217221

expectElement(container, ".dreams__lobster svg");

218222219-

const zs = container.querySelectorAll(".dreams__z");

220-

expect(zs.length).toBe(3);

221-222-

const stars = container.querySelectorAll(".dreams__star");

223-

expect(stars.length).toBe(12);

223+

expect(textItems(container, ".dreams__z")).toEqual(["z", "z", "Z"]);

224+225+

const stars = [...container.querySelectorAll<HTMLElement>(".dreams__star")].map((star) => ({

226+

top: star.style.top,

227+

left: star.style.left,

228+

size: star.style.width,

229+

}));

230+

expect(stars).toEqual([

231+

{ top: "8%", left: "15%", size: "3px" },

232+

{ top: "12%", left: "72%", size: "2px" },

233+

{ top: "22%", left: "35%", size: "3px" },

234+

{ top: "18%", left: "88%", size: "2px" },

235+

{ top: "35%", left: "8%", size: "2px" },

236+

{ top: "45%", left: "92%", size: "2px" },

237+

{ top: "55%", left: "25%", size: "3px" },

238+

{ top: "65%", left: "78%", size: "2px" },

239+

{ top: "75%", left: "45%", size: "2px" },

240+

{ top: "82%", left: "60%", size: "3px" },

241+

{ top: "30%", left: "55%", size: "2px" },

242+

{ top: "88%", left: "18%", size: "2px" },

243+

]);

224244225245

expectElement(container, ".dreams__moon");

226246227-

const phases = [...container.querySelectorAll(".dreams__phase-name")].map((node) =>

228-

node.textContent?.trim(),

229-

);

230-

expect(phases).toEqual(["Light", "Deep", "Rem"]);

231-

expect(container.querySelectorAll(".dreams__phase").length).toBe(3);

247+

const phases = [...container.querySelectorAll(".dreams__phase")].map((phase) => ({

248+

name: phase.querySelector(".dreams__phase-name")?.textContent?.trim(),

249+

off: phase.classList.contains("dreams__phase--off"),

250+

}));

251+

expect(phases).toEqual([

252+

{ name: "Light", off: false },

253+

{ name: "Deep", off: false },

254+

{ name: "Rem", off: true },

255+

]);

232256

expect(container.querySelector(".dreams__phase--off .dreams__phase-next")?.textContent).toBe(

233257

"off",

234258

);

@@ -257,11 +281,15 @@ describe("dreaming view", () => {

257281

expectElement(idleContainer, ".dreams--idle");

258282259283

const unknownPhaseContainer = renderInto(buildProps({ phases: undefined }));

260-

const statuses = [...unknownPhaseContainer.querySelectorAll(".dreams__phase-next")].map(

261-

(node) => node.textContent?.trim(),

262-

);

263-

expect(statuses).toEqual(["—", "—", "—"]);

264-

expect(unknownPhaseContainer.querySelectorAll(".dreams__phase--off").length).toBe(0);

284+

const statuses = [...unknownPhaseContainer.querySelectorAll(".dreams__phase")].map((phase) => ({

285+

status: phase.querySelector(".dreams__phase-next")?.textContent?.trim(),

286+

off: phase.classList.contains("dreams__phase--off"),

287+

}));

288+

expect(statuses).toEqual([

289+

{ status: "—", off: false },

290+

{ status: "—", off: false },

291+

{ status: "—", off: false },

292+

]);

265293266294

const errorContainer = renderInto(buildProps({ statusError: "patch failed" }));

267295

expect(errorContainer.querySelector(".dreams__controls-error")?.textContent?.trim()).toBe(

@@ -273,7 +301,15 @@ describe("dreaming view", () => {

273301

setDreamSubTab("diary");

274302

setDreamDiarySubTab("insights");

275303

const container = renderInto(buildProps());

276-

expect(container.querySelectorAll(".dreams-diary__subtab").length).toBe(3);

304+

const subtabs = [...container.querySelectorAll(".dreams-diary__subtab")].map((tab) => ({

305+

label: tab.textContent?.trim(),

306+

active: tab.classList.contains("dreams-diary__subtab--active"),

307+

}));

308+

expect(subtabs).toEqual([

309+

{ label: "Dreams", active: false },

310+

{ label: "Imported Insights", active: true },

311+

{ label: "Memory Palace", active: false },

312+

]);

277313

expect(compactText(container.querySelector(".dreams-diary__date"))).toBe(

278314

"Travel · 1 chats · 1 signals",

279315

);

@@ -524,17 +560,16 @@ describe("dreaming view", () => {

524560

].join("\n"),

525561

}),

526562

);

527-

expect(container.querySelectorAll(".dreams-diary__day-chip").length).toBe(2);

563+

const dayChips = [...container.querySelectorAll(".dreams-diary__day-chip")].map((node) => ({

564+

label: node.textContent?.replace(/\s+/g, "").trim(),

565+

active: node.classList.contains("dreams-diary__day-chip--active"),

566+

}));

567+

expect(dayChips).toEqual([

568+

{ label: "1/2", active: true },

569+

{ label: "1/1", active: false },

570+

]);

528571

expect(container.querySelector(".dreams-diary__heatmap-cell")).toBeNull();

529572

expect(container.querySelector(".dreams-diary__timeline-month")).toBeNull();

530-

const labels = [...container.querySelectorAll(".dreams-diary__day-chip")].map((node) =>

531-

node.textContent?.replace(/\s+/g, "").trim(),

532-

);

533-

expect(

534-

labels

535-

.filter((label): label is string => Boolean(label))

536-

.some((label) => /^\d+\/\d+$/.test(label)),

537-

).toBe(true);

538573

setDreamSubTab("scene");

539574

});

540575