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

推荐订阅源

奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Apple Machine Learning Research
Apple Machine Learning Research
aimingoo的专栏
aimingoo的专栏
H
Help Net Security
腾讯CDC
T
Tailwind CSS Blog
Hugging Face - Blog
Hugging Face - Blog
人人都是产品经理
人人都是产品经理
酷 壳 – CoolShell
酷 壳 – CoolShell
MongoDB | Blog
MongoDB | Blog
宝玉的分享
宝玉的分享
有赞技术团队
有赞技术团队
美团技术团队
雷峰网
雷峰网
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - 司徒正美
博客园_首页
Recent Announcements
Recent Announcements
云风的 BLOG
云风的 BLOG
B
Blog RSS Feed
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
D
Docker
博客园 - Franky
Jina AI
Jina AI

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: drop overlong slack command values · openclaw/opencl...
steipete · 2026-04-30 · via Recent Commits to openclaw:main

@@ -9,6 +9,7 @@ vi.mock("./slash-commands.runtime.js", () => {

99

const reportLongCommand = { key: "reportlong", nativeName: "reportlong" };

1010

const reportLongButtonCommand = { key: "reportlongbutton", nativeName: "reportlongbutton" };

1111

const reportHugeButtonCommand = { key: "reporthugebutton", nativeName: "reporthugebutton" };

12+

const reportHugeValueCommand = { key: "reporthugevalue", nativeName: "reporthugevalue" };

1213

const unsafeConfirmCommand = { key: "unsafeconfirm", nativeName: "unsafeconfirm" };

1314

const longConfirmCommand = { key: "longconfirm", nativeName: "longconfirm" };

1415

const statusAliasCommand = { key: "status", nativeName: "status" };

@@ -80,6 +81,9 @@ vi.mock("./slash-commands.runtime.js", () => {

8081

if (normalized === "reporthugebutton") {

8182

return reportHugeButtonCommand;

8283

}

84+

if (normalized === "reporthugevalue") {

85+

return reportHugeValueCommand;

86+

}

8387

if (normalized === "unsafeconfirm") {

8488

return unsafeConfirmCommand;

8589

}

@@ -134,6 +138,12 @@ vi.mock("./slash-commands.runtime.js", () => {

134138

acceptsArgs: true,

135139

args: [],

136140

},

141+

{

142+

name: "reporthugevalue",

143+

description: "ReportHugeValue",

144+

acceptsArgs: true,

145+

args: [],

146+

},

137147

{

138148

name: "unsafeconfirm",

139149

description: "UnsafeConfirm",

@@ -187,6 +197,12 @@ vi.mock("./slash-commands.runtime.js", () => {

187197

})),

188198

);

189199

}

200+

if (params.command?.key === "reporthugevalue") {

201+

return resolvePeriodMenu(params, [

202+

{ value: "valid", label: "Valid" },

203+

{ value: "x".repeat(2500), label: "Overlong" },

204+

]);

205+

}

190206

if (params.command?.key === "reportcompact") {

191207

return resolvePeriodMenu(params, baseReportPeriodChoices);

192208

}

@@ -466,6 +482,7 @@ describe("Slack native command argument menus", () => {

466482

let reportLongHandler: (args: unknown) => Promise<void>;

467483

let reportLongButtonHandler: (args: unknown) => Promise<void>;

468484

let reportHugeButtonHandler: (args: unknown) => Promise<void>;

485+

let reportHugeValueHandler: (args: unknown) => Promise<void>;

469486

let unsafeConfirmHandler: (args: unknown) => Promise<void>;

470487

let longConfirmHandler: (args: unknown) => Promise<void>;

471488

let agentStatusHandler: (args: unknown) => Promise<void>;

@@ -490,6 +507,11 @@ describe("Slack native command argument menus", () => {

490507

"/reporthugebutton",

491508

"/reporthugebutton",

492509

);

510+

reportHugeValueHandler = requireHandler(

511+

harness.commands,

512+

"/reporthugevalue",

513+

"/reporthugevalue",

514+

);

493515

unsafeConfirmHandler = requireHandler(harness.commands, "/unsafeconfirm", "/unsafeconfirm");

494516

longConfirmHandler = requireHandler(harness.commands, "/longconfirm", "/longconfirm");

495517

agentStatusHandler = requireHandler(harness.commands, "/agentstatus", "/agentstatus");

@@ -638,6 +660,24 @@ describe("Slack native command argument menus", () => {

638660

expect(actionBlocks.at(-1)?.elements).toHaveLength(5);

639661

});

640662663+

it("drops fallback buttons whose encoded values exceed Slack's button value limit", async () => {

664+

const { respond } = await runCommandHandler(reportHugeValueHandler);

665+

expect(respond).toHaveBeenCalledTimes(1);

666+

const payload = respond.mock.calls[0]?.[0] as {

667+

blocks?: Array<{

668+

type: string;

669+

elements?: Array<{ text?: { text?: string }; value?: string }>;

670+

}>;

671+

};

672+

const actionBlocks = (payload.blocks ?? []).filter((block) => block.type === "actions");

673+

expect(actionBlocks).toHaveLength(1);

674+

expect(actionBlocks[0]?.elements).toHaveLength(1);

675+

expect(actionBlocks[0]?.elements?.[0]).toMatchObject({

676+

text: { text: "Valid" },

677+

});

678+

expect(actionBlocks[0]?.elements?.[0]?.value?.length).toBeLessThanOrEqual(2000);

679+

});

680+641681

it("shows an overflow menu when choices fit compact range", async () => {

642682

const element = await getFirstActionElementFromCommand(reportCompactHandler);

643683

expect(element?.type).toBe("overflow");