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

推荐订阅源

让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
V
V2EX
WordPress大学
WordPress大学
U
Unit 42
I
InfoQ
A
About on SuperTechFans
宝玉的分享
宝玉的分享
J
Java Code Geeks
博客园 - 司徒正美
爱范儿
爱范儿
Engineering at Meta
Engineering at Meta
G
Google Developers Blog
人人都是产品经理
人人都是产品经理
小众软件
小众软件
Microsoft Security Blog
Microsoft Security Blog
L
LangChain Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Hugging Face - Blog
Hugging Face - Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
aimingoo的专栏
aimingoo的专栏
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Last Week in AI
Last Week in AI
腾讯CDC
Recent Announcements
Recent Announcements

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: keep slack status reactions in tool-only rooms · ope...
steipete · 2026-05-02 · via Recent Commits to openclaw:main

@@ -32,6 +32,16 @@ class TestSlackStreamNotDeliveredError extends Error {

3232

let mockedNativeStreaming = false;

3333

let mockedBlockStreamingEnabled: boolean | undefined = false;

3434

let capturedReplyOptions: { disableBlockStreaming?: boolean } | undefined;

35+

let capturedStatusReactionOptions: { enabled?: boolean; initialEmoji?: string } | undefined;

36+

const statusReactionControllerMock = {

37+

setQueued: vi.fn(async () => {}),

38+

setThinking: vi.fn(async () => {}),

39+

setTool: vi.fn(async () => {}),

40+

setError: vi.fn(async () => {}),

41+

setDone: vi.fn(async () => {}),

42+

clear: vi.fn(async () => {}),

43+

restoreInitial: vi.fn(async () => {}),

44+

};

3545

let mockedReplyThreadTs: string | undefined = THREAD_TS;

3646

let mockedReplyThreadTsSequence: Array<string | undefined> | undefined;

3747

let capturedTyping:

@@ -87,6 +97,8 @@ function createPreparedSlackMessage(params?: {

8797

status: string;

8898

}) => Promise<void>;

8999

typingReaction?: string;

100+

ackReactionMessageTs?: string;

101+

ackReactionPromise?: Promise<boolean> | null;

90102

}) {

91103

return {

92104

ctx: {

@@ -136,7 +148,8 @@ function createPreparedSlackMessage(params?: {

136148

historyKey: "history-key",

137149

preview: "",

138150

ackReactionValue: "eyes",

139-

ackReactionPromise: null,

151+

ackReactionMessageTs: params?.ackReactionMessageTs,

152+

ackReactionPromise: params?.ackReactionPromise ?? null,

140153

} as never;

141154

}

142155

@@ -149,15 +162,10 @@ vi.mock("openclaw/plugin-sdk/channel-feedback", () => ({

149162

doneHoldMs: 0,

150163

errorHoldMs: 0,

151164

},

152-

createStatusReactionController: () => ({

153-

setQueued: async () => {},

154-

setThinking: async () => {},

155-

setTool: async () => {},

156-

setError: async () => {},

157-

setDone: async () => {},

158-

clear: async () => {},

159-

restoreInitial: async () => {},

160-

}),

165+

createStatusReactionController: (params: { enabled?: boolean; initialEmoji?: string }) => {

166+

capturedStatusReactionOptions = params;

167+

return statusReactionControllerMock;

168+

},

161169

logAckFailure: () => {},

162170

logTypingFailure: () => {},

163171

removeAckReactionAfterReply: () => {},

@@ -408,9 +416,13 @@ describe("dispatchPreparedSlackMessage preview fallback", () => {

408416

stopSlackStreamMock.mockReset();

409417

reactSlackMessageMock.mockReset();

410418

removeSlackReactionMock.mockReset();

419+

for (const value of Object.values(statusReactionControllerMock)) {

420+

value.mockClear();

421+

}

411422

mockedNativeStreaming = false;

412423

mockedBlockStreamingEnabled = false;

413424

capturedReplyOptions = undefined;

425+

capturedStatusReactionOptions = undefined;

414426

capturedTyping = undefined;

415427

mockedReplyThreadTs = THREAD_TS;

416428

mockedReplyThreadTsSequence = undefined;

@@ -520,6 +532,32 @@ describe("dispatchPreparedSlackMessage preview fallback", () => {

520532

);

521533

});

522534535+

it("keeps Slack status reactions when channel replies are message-tool-only", async () => {

536+

await dispatchPreparedSlackMessage(

537+

createPreparedSlackMessage({

538+

cfg: {

539+

messages: {

540+

groupChat: { visibleReplies: "message_tool" },

541+

statusReactions: { enabled: true },

542+

},

543+

},

544+

ctxPayload: { ChatType: "channel" },

545+

ackReactionMessageTs: "171234.111",

546+

ackReactionPromise: Promise.resolve(true),

547+

}),

548+

);

549+550+

expect(capturedReplyOptions?.disableBlockStreaming).toBe(true);

551+

expect(capturedStatusReactionOptions).toEqual(

552+

expect.objectContaining({

553+

enabled: true,

554+

initialEmoji: "eyes",

555+

}),

556+

);

557+

expect(statusReactionControllerMock.setQueued).toHaveBeenCalledTimes(1);

558+

expect(statusReactionControllerMock.setDone).toHaveBeenCalledTimes(1);

559+

});

560+523561

it("escapes Slack mrkdwn in tool progress preview labels", async () => {

524562

const draftStream = createDraftStreamStub();

525563

createSlackDraftStreamMock.mockReturnValueOnce(draftStream);