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

推荐订阅源

宝玉的分享
宝玉的分享
B
Blog RSS Feed
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
MyScale Blog
MyScale Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
S
SegmentFault 最新的问题
Y
Y Combinator Blog
月光博客
月光博客
IT之家
IT之家
T
Tailwind CSS Blog
Last Week in AI
Last Week in AI
L
LangChain Blog
博客园_首页
MongoDB | Blog
MongoDB | Blog
P
Proofpoint News Feed
博客园 - Franky
WordPress大学
WordPress大学
云风的 BLOG
云风的 BLOG
M
MIT News - Artificial intelligence
V
Visual Studio Blog
小众软件
小众软件
博客园 - 叶小钗
博客园 - 三生石上(FineUI控件)
N
Netflix TechBlog - Medium

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
[codex] Defer status reaction cleanup (#75582) · openclaw...
steipete · 2026-05-01 · via Recent Commits to openclaw:main

@@ -56,16 +56,16 @@ describe("Slack status reaction lifecycle", () => {

5656

void ctrl.setThinking();

5757

await vi.advanceTimersByTimeAsync(10);

5858

expect(active.has(DEFAULT_EMOJIS.thinking)).toBe(true);

59-

expect(active.has("eyes")).toBe(false);

59+

expect(active.has("eyes")).toBe(true);

60606161

void ctrl.setTool("web_search");

6262

await vi.advanceTimersByTimeAsync(10);

6363

expect(active.has(DEFAULT_EMOJIS.web)).toBe(true);

64-

expect(active.has(DEFAULT_EMOJIS.thinking)).toBe(false);

64+

expect(active.has(DEFAULT_EMOJIS.thinking)).toBe(true);

65656666

await ctrl.setDone();

6767

expect(active.has(DEFAULT_EMOJIS.done)).toBe(true);

68-

expect(active.has(DEFAULT_EMOJIS.web)).toBe(false);

68+

expect(active.has(DEFAULT_EMOJIS.web)).toBe(true);

69697070

await ctrl.clear();

7171

expect(active.size).toBe(0);

@@ -87,7 +87,7 @@ describe("Slack status reaction lifecycle", () => {

87878888

await ctrl.setError();

8989

expect(active.has(DEFAULT_EMOJIS.error)).toBe(true);

90-

expect(active.has("eyes")).toBe(false);

90+

expect(active.has("eyes")).toBe(true);

91919292

await ctrl.restoreInitial();

9393

expect(active.has("eyes")).toBe(true);

@@ -117,6 +117,50 @@ describe("Slack status reaction lifecycle", () => {

117117

expect(active.has(DEFAULT_EMOJIS.stallHard)).toBe(false);

118118

});

119119120+

it("restoreInitial removes extra active reactions when current emoji is already initial", async () => {

121+

const { adapter, active } = createSlackMockAdapter();

122+

const ctrl = createStatusReactionController({

123+

enabled: true,

124+

adapter,

125+

initialEmoji: "eyes",

126+

timing: { debounceMs: 0, stallSoftMs: 99999, stallHardMs: 99999 },

127+

});

128+129+

void ctrl.setThinking();

130+

await vi.advanceTimersByTimeAsync(10);

131+

void ctrl.setQueued();

132+

await vi.advanceTimersByTimeAsync(10);

133+

expect(active.has(DEFAULT_EMOJIS.thinking)).toBe(true);

134+

expect(active.has("eyes")).toBe(true);

135+136+

await ctrl.restoreInitial();

137+138+

expect(active.has("eyes")).toBe(true);

139+

expect(active.has(DEFAULT_EMOJIS.thinking)).toBe(false);

140+

});

141+142+

it("restoreInitial removes only tracked active reactions", async () => {

143+

const { adapter, active } = createSlackMockAdapter();

144+

const ctrl = createStatusReactionController({

145+

enabled: true,

146+

adapter,

147+

initialEmoji: "eyes",

148+

timing: { debounceMs: 0, stallSoftMs: 99999, stallHardMs: 99999 },

149+

});

150+151+

void ctrl.setQueued();

152+

await vi.advanceTimersByTimeAsync(10);

153+

await ctrl.setDone();

154+155+

await ctrl.restoreInitial();

156+157+

expect(active.has("eyes")).toBe(true);

158+

expect(active.has(DEFAULT_EMOJIS.done)).toBe(false);

159+

expect(adapter.removeReaction).toHaveBeenCalledTimes(1);

160+

expect(adapter.removeReaction).toHaveBeenCalledWith(DEFAULT_EMOJIS.done);

161+

expect(adapter.removeReaction).not.toHaveBeenCalledWith(DEFAULT_EMOJIS.thinking);

162+

});

163+120164

it("restoreInitial still applies initial emoji when it is only debounced", async () => {

121165

const { adapter, active } = createSlackMockAdapter();

122166

const ctrl = createStatusReactionController({

@@ -134,14 +178,14 @@ describe("Slack status reaction lifecycle", () => {

134178

void ctrl.setTool("web_search");

135179

await vi.advanceTimersByTimeAsync(25);

136180

expect(active.has(DEFAULT_EMOJIS.web)).toBe(true);

137-

expect(active.has("eyes")).toBe(false);

181+

expect(active.has("eyes")).toBe(true);

138182139183

void ctrl.setThinking();

140184

await ctrl.restoreInitial();

141185142186

expect(active.has("eyes")).toBe(true);

143187

expect(active.has(DEFAULT_EMOJIS.web)).toBe(false);

144-

expect(adapter.setReaction).toHaveBeenCalledTimes(3);

188+

expect(adapter.setReaction).toHaveBeenCalledTimes(2);

145189

});

146190147191

it("restoreInitial re-applies initial emoji after an in-flight debounced transition", async () => {

@@ -212,6 +256,6 @@ describe("Slack status reaction lifecycle", () => {

212256

void ctrl.setTool("exec");

213257

await vi.advanceTimersByTimeAsync(10);

214258

expect(active.has(DEFAULT_EMOJIS.coding)).toBe(true);

215-

expect(active.has("eyes")).toBe(false);

259+

expect(active.has("eyes")).toBe(true);

216260

});

217261

});