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

推荐订阅源

月光博客
月光博客
Stack Overflow Blog
Stack Overflow Blog
L
LangChain Blog
Jina AI
Jina AI
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
雷峰网
雷峰网
T
Tailwind CSS Blog
MongoDB | Blog
MongoDB | Blog
博客园 - 【当耐特】
博客园 - 聂微东
V
Visual Studio Blog
博客园_首页
Engineering at Meta
Engineering at Meta
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
The Cloudflare Blog
人人都是产品经理
人人都是产品经理
Apple Machine Learning Research
Apple Machine Learning Research
阮一峰的网络日志
阮一峰的网络日志
Microsoft Security Blog
Microsoft Security Blog
GbyAI
GbyAI
F
Fortinet All Blogs
C
Check Point Blog
罗磊的独立博客
H
Hackread – Cybersecurity News, Data Breaches, AI and More

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(browser): default non-finite DOM text budgets · openc...
steipete · 2026-05-29 · via Recent Commits to openclaw:main

File tree

  • extensions/browser/src/browser

Original file line numberDiff line numberDiff line change

@@ -885,6 +885,30 @@ describe("cdp internal", () => {

885885

const obj = await getDomText({ wsUrl: server.wsUrl, format: "text" });

886886

expect(obj.text).toBe("");

887887

});

888+
889+

it("uses the default text budget for non-finite maxChars", async () => {

890+

const server = await startMockWsServer((msg, socket) => {

891+

if (msg.method === "Runtime.enable") {

892+

socket.send(JSON.stringify({ id: msg.id, result: {} }));

893+

return;

894+

}

895+

if (msg.method === "Runtime.evaluate") {

896+

const expression =

897+

typeof msg.params?.expression === "string" ? msg.params.expression : "";

898+

expect(expression).toContain("const max = 200000;");

899+

socket.send(JSON.stringify({ id: msg.id, result: { result: { value: "ok" } } }));

900+

}

901+

});

902+

wss = server.wss;

903+
904+

const res = await getDomText({

905+

wsUrl: server.wsUrl,

906+

format: "text",

907+

maxChars: Number.NaN,

908+

});

909+
910+

expect(res.text).toBe("ok");

911+

});

888912

});

889913
890914

describe("querySelector", () => {

Original file line numberDiff line numberDiff line change

@@ -1049,7 +1049,7 @@ export async function getDomText(opts: {

10491049

maxChars?: number;

10501050

selector?: string;

10511051

}): Promise<{ text: string }> {

1052-

const maxChars = Math.max(0, Math.min(5_000_000, Math.floor(opts.maxChars ?? 200_000)));

1052+

const maxChars = resolveIntegerOption(opts.maxChars, 200_000, { min: 0, max: 5_000_000 });

10531053

const selectorExpr = opts.selector ? JSON.stringify(opts.selector) : "null";

10541054

const expression = `(() => {

10551055

const fmt = ${JSON.stringify(opts.format)};