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

推荐订阅源

IT之家
IT之家
博客园_首页
S
SegmentFault 最新的问题
罗磊的独立博客
博客园 - 【当耐特】
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
阮一峰的网络日志
阮一峰的网络日志
D
Docker
雷峰网
雷峰网
Google DeepMind News
Google DeepMind News
博客园 - 司徒正美
V
V2EX
大猫的无限游戏
大猫的无限游戏
V
Visual Studio Blog
腾讯CDC
宝玉的分享
宝玉的分享
酷 壳 – CoolShell
酷 壳 – CoolShell
人人都是产品经理
人人都是产品经理
T
Tailwind CSS Blog
Vercel News
Vercel News
H
Help Net Security
博客园 - Franky
D
DataBreaches.Net
aimingoo的专栏
aimingoo的专栏

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(ui): scope agent identity to active session · opencla...
steipete · 2026-04-27 · via Recent Commits to openclaw:main

@@ -101,6 +101,98 @@ describe("loadControlUiBootstrapConfig", () => {

101101

vi.unstubAllGlobals();

102102

});

103103104+

it("does not apply default-agent bootstrap identity to an active non-default session", async () => {

105+

const fetchMock = vi.fn().mockResolvedValue({

106+

ok: true,

107+

json: async () => ({

108+

basePath: "",

109+

assistantName: "AI大管家",

110+

assistantAvatar: "M",

111+

assistantAgentId: "main",

112+

serverVersion: "2026.4.27",

113+

localMediaPreviewRoots: ["/tmp/openclaw"],

114+

embedSandbox: "trusted",

115+

allowExternalEmbedUrls: true,

116+

}),

117+

});

118+

vi.stubGlobal("fetch", fetchMock as unknown as typeof fetch);

119+120+

const state = {

121+

basePath: "",

122+

sessionKey: "agent:fs-daying:main",

123+

assistantName: "大颖",

124+

assistantAvatar: "D",

125+

assistantAvatarSource: null,

126+

assistantAvatarStatus: null,

127+

assistantAvatarReason: null,

128+

assistantAgentId: "fs-daying",

129+

localMediaPreviewRoots: [],

130+

embedSandboxMode: "scripts" as const,

131+

allowExternalEmbedUrls: false,

132+

serverVersion: null,

133+

};

134+135+

await loadControlUiBootstrapConfig(state);

136+137+

expect(state.assistantName).toBe("大颖");

138+

expect(state.assistantAvatar).toBe("D");

139+

expect(state.assistantAgentId).toBe("fs-daying");

140+

expect(state.serverVersion).toBe("2026.4.27");

141+

expect(state.localMediaPreviewRoots).toEqual(["/tmp/openclaw"]);

142+

expect(state.embedSandboxMode).toBe("trusted");

143+

expect(state.allowExternalEmbedUrls).toBe(true);

144+145+

vi.unstubAllGlobals();

146+

});

147+148+

it("keeps local assistant avatar override when default-agent bootstrap identity is skipped", async () => {

149+

const fetchMock = vi.fn().mockResolvedValue({

150+

ok: true,

151+

json: async () => ({

152+

basePath: "",

153+

assistantName: "Main",

154+

assistantAvatar: "M",

155+

assistantAgentId: "main",

156+

serverVersion: "2026.4.27",

157+

localMediaPreviewRoots: [],

158+

embedSandbox: "scripts",

159+

allowExternalEmbedUrls: false,

160+

}),

161+

});

162+

vi.stubGlobal("fetch", fetchMock as unknown as typeof fetch);

163+

vi.stubGlobal("localStorage", {

164+

getItem: vi.fn(() => JSON.stringify({ avatar: "data:image/png;base64,local" })),

165+

setItem: vi.fn(),

166+

removeItem: vi.fn(),

167+

} as unknown as Storage);

168+169+

const state = {

170+

basePath: "",

171+

sessionKey: "agent:worker:main",

172+

assistantName: "Worker",

173+

assistantAvatar: "W",

174+

assistantAvatarSource: null,

175+

assistantAvatarStatus: null,

176+

assistantAvatarReason: null,

177+

assistantAgentId: "worker",

178+

localMediaPreviewRoots: [],

179+

embedSandboxMode: "scripts" as const,

180+

allowExternalEmbedUrls: false,

181+

serverVersion: null,

182+

};

183+184+

await loadControlUiBootstrapConfig(state);

185+186+

expect(state.assistantName).toBe("Worker");

187+

expect(state.assistantAvatar).toBe("data:image/png;base64,local");

188+

expect(state.assistantAvatarSource).toBe("data:image/png;base64,local");

189+

expect(state.assistantAvatarStatus).toBe("data");

190+

expect(state.assistantAvatarReason).toBeNull();

191+

expect(state.assistantAgentId).toBe("worker");

192+193+

vi.unstubAllGlobals();

194+

});

195+104196

it("ignores failures", async () => {

105197

const fetchMock = vi.fn().mockResolvedValue({ ok: false });

106198

vi.stubGlobal("fetch", fetchMock as unknown as typeof fetch);