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

推荐订阅源

U
Unit 42
T
The Blog of Author Tim Ferriss
H
Help Net Security
博客园 - 叶小钗
云风的 BLOG
云风的 BLOG
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
D
DataBreaches.Net
博客园 - 聂微东
A
About on SuperTechFans
大猫的无限游戏
大猫的无限游戏
P
Proofpoint News Feed
Martin Fowler
Martin Fowler
博客园 - 【当耐特】
S
SegmentFault 最新的问题
Blog — PlanetScale
Blog — PlanetScale
酷 壳 – CoolShell
酷 壳 – CoolShell
G
Google Developers Blog
I
InfoQ
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
GbyAI
GbyAI
B
Blog
Engineering at Meta
Engineering at Meta
V
V2EX
Hugging Face - Blog
Hugging Face - 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: cap slack edit fallback text · openclaw/openclaw@c4f...
steipete · 2026-04-30 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -78,6 +78,7 @@ Docs: https://docs.openclaw.ai

7878

- Slack/commands: drop fallback command argument buttons whose encoded values exceed Slack's button-value limit, so one oversized plugin choice no longer makes Slack reject the whole menu. Thanks @slackapi.

7979

- Slack/messages: merge message-tool presentation and interactive blocks on Slack sends, so buttons and selects are no longer dropped when a structured message body is also present. Thanks @slackapi.

8080

- Slack/messages: cap Block Kit fallback text to Slack's send limit while preserving the rendered blocks, so long context fallbacks no longer make rich Slack messages fail with `msg_too_long`. Thanks @slackapi.

81+

- Slack/messages: cap Block Kit fallback text on message edits while preserving the rendered blocks, so long context fallbacks no longer make Slack reject `chat.update` calls with `msg_too_long`. Thanks @slackapi.

8182

- Channels/WhatsApp: require Baileys outbound message ids before marking auto-replies delivered, so transcript text and ack reactions no longer make failed group replies look sent. Fixes #49225. Thanks @TinyTb.

8283

- CLI/update: scope packaged Node compile caches by OpenClaw version and install metadata, so global installs no longer reuse stale compiled chunks after package updates. Thanks @pashpashpash.

8384

- Channels/Voice call: keep pre-auth webhook in-flight limiting active when socket remote address metadata is missing, so slow-body requests from stripped-IP proxy paths still share the fallback bucket. (#74453) Thanks @davidangularme.

Original file line numberDiff line numberDiff line change

@@ -3,6 +3,7 @@ import { createSlackEditTestClient, installSlackBlockTestMocks } from "./blocks.

33
44

installSlackBlockTestMocks();

55

const { editSlackMessage } = await import("./actions.js");

6+

const SLACK_TEXT_LIMIT = 8000;

67
78

describe("editSlackMessage blocks", () => {

89

it("updates with valid blocks", async () => {

@@ -80,6 +81,35 @@ describe("editSlackMessage blocks", () => {

8081

);

8182

});

8283
84+

it("caps long block fallback text while preserving edit blocks", async () => {

85+

const client = createSlackEditTestClient();

86+

const longContextText = "a".repeat(3000);

87+

const blocks = [

88+

{

89+

type: "context",

90+

elements: [

91+

{ type: "mrkdwn", text: longContextText },

92+

{ type: "mrkdwn", text: longContextText },

93+

{ type: "mrkdwn", text: longContextText },

94+

],

95+

},

96+

];

97+
98+

await editSlackMessage("C123", "171234.567", "", {

99+

token: "xoxb-test",

100+

client,

101+

blocks,

102+

});

103+
104+

expect(client.chat.update).toHaveBeenCalledWith(

105+

expect.objectContaining({

106+

text: expect.stringMatching(/$/),

107+

blocks,

108+

}),

109+

);

110+

expect(client.chat.update.mock.calls[0]?.[0].text).toHaveLength(SLACK_TEXT_LIMIT);

111+

});

112+
83113

it("rejects empty blocks arrays", async () => {

84114

const client = createSlackEditTestClient();

85115
Original file line numberDiff line numberDiff line change

@@ -6,10 +6,12 @@ import { resolveSlackAccount } from "./accounts.js";

66

import { buildSlackBlocksFallbackText } from "./blocks-fallback.js";

77

import { validateSlackBlocksArray } from "./blocks-input.js";

88

import { createSlackWebClient, getSlackWriteClient } from "./client.js";

9+

import { SLACK_TEXT_LIMIT } from "./limits.js";

910

import { resolveSlackMedia } from "./monitor/media.js";

1011

import type { SlackMediaResult } from "./monitor/media.js";

1112

import { sendMessageSlack } from "./send.js";

1213

import { resolveSlackBotToken } from "./token.js";

14+

import { truncateSlackText } from "./truncate.js";

1315
1416

export type SlackActionClientOpts = {

1517

cfg?: OpenClawConfig;

@@ -234,7 +236,9 @@ export async function editSlackMessage(

234236

await client.chat.update({

235237

channel: channelId,

236238

ts: messageId,

237-

text: trimmedContent || (blocks ? buildSlackBlocksFallbackText(blocks) : " "),

239+

text:

240+

trimmedContent ||

241+

(blocks ? truncateSlackText(buildSlackBlocksFallbackText(blocks), SLACK_TEXT_LIMIT) : " "),

238242

...(blocks ? { blocks } : {}),

239243

});

240244

}