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

推荐订阅源

C
Check Point Blog
J
Java Code Geeks
H
Hackread – Cybersecurity News, Data Breaches, AI and More
D
Docker
腾讯CDC
The GitHub Blog
The GitHub Blog
大猫的无限游戏
大猫的无限游戏
Microsoft Security Blog
Microsoft Security Blog
GbyAI
GbyAI
Stack Overflow Blog
Stack Overflow Blog
博客园 - 司徒正美
T
The Blog of Author Tim Ferriss
Vercel News
Vercel News
P
Proofpoint News Feed
雷峰网
雷峰网
博客园_首页
B
Blog RSS Feed
Microsoft Azure Blog
Microsoft Azure Blog
爱范儿
爱范儿
V
V2EX
F
Fortinet All Blogs
酷 壳 – CoolShell
酷 壳 – CoolShell
MyScale Blog
MyScale Blog
S
SegmentFault 最新的问题

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): preserve CJK IME composition (#93498) · openclaw...
Zhaoqj2016 · 2026-06-16 · via Recent Commits to openclaw:main

@@ -1633,6 +1633,109 @@ describe("chat voice controls", () => {

16331633

});

16341634

});

163516351636+

describe("chat composer IME composition", () => {

1637+

it("defers draft sync while IME composition is active", () => {

1638+

const onDraftChange = vi.fn();

1639+

const onRequestUpdate = vi.fn();

1640+

const container = renderChatView({ onDraftChange, onRequestUpdate });

1641+

const textarea = requireElement(

1642+

container,

1643+

".agent-chat__composer-combobox > textarea",

1644+

"composer textarea",

1645+

) as HTMLTextAreaElement;

1646+1647+

textarea.dispatchEvent(new CompositionEvent("compositionstart", { bubbles: true }));

1648+

textarea.value = "dangqian";

1649+

textarea.dispatchEvent(new InputEvent("input", { bubbles: true, isComposing: true }));

1650+1651+

expect(onDraftChange).not.toHaveBeenCalled();

1652+

expect(onRequestUpdate).not.toHaveBeenCalled();

1653+1654+

textarea.value = "当前";

1655+

textarea.dispatchEvent(new CompositionEvent("compositionend", { bubbles: true }));

1656+1657+

expect(onDraftChange).toHaveBeenCalledTimes(1);

1658+

expect(onDraftChange).toHaveBeenLastCalledWith("当前");

1659+

});

1660+1661+

it("preserves composing text across host rerenders with stale draft props", () => {

1662+

const onDraftChange = vi.fn();

1663+

const onRequestUpdate = vi.fn();

1664+

const container = document.createElement("div");

1665+

const props = createChatProps({ draft: "", onDraftChange, onRequestUpdate });

1666+1667+

render(renderChat(props), container);

1668+

const textarea = requireElement(

1669+

container,

1670+

".agent-chat__composer-combobox > textarea",

1671+

"composer textarea",

1672+

) as HTMLTextAreaElement;

1673+1674+

textarea.dispatchEvent(new CompositionEvent("compositionstart", { bubbles: true }));

1675+

textarea.value = "dangqian";

1676+

textarea.dispatchEvent(new InputEvent("input", { bubbles: true, isComposing: true }));

1677+1678+

expect(onDraftChange).not.toHaveBeenCalled();

1679+

expect(onRequestUpdate).not.toHaveBeenCalled();

1680+1681+

render(renderChat({ ...props, draft: "" }), container);

1682+1683+

expect(container.querySelector<HTMLTextAreaElement>("textarea")?.value).toBe("dangqian");

1684+1685+

const rerenderedTextarea = requireElement(

1686+

container,

1687+

".agent-chat__composer-combobox > textarea",

1688+

"composer textarea",

1689+

) as HTMLTextAreaElement;

1690+

rerenderedTextarea.value = "当前";

1691+

rerenderedTextarea.dispatchEvent(new CompositionEvent("compositionend", { bubbles: true }));

1692+1693+

expect(onDraftChange).toHaveBeenCalledTimes(1);

1694+

expect(onDraftChange).toHaveBeenLastCalledWith("当前");

1695+

});

1696+1697+

it("leaves keyboard events to the browser while IME composition is active", () => {

1698+

const onHistoryKeydown = vi.fn(() => ({

1699+

handled: true,

1700+

preventDefault: true,

1701+

restoreCaret: null,

1702+

decision: "handled:history-up" as const,

1703+

historyNavigationActiveBefore: false,

1704+

historyNavigationActiveAfter: false,

1705+

selectionStart: 0,

1706+

selectionEnd: 0,

1707+

valueLength: 0,

1708+

}));

1709+

const onSend = vi.fn();

1710+

const container = renderChatView({ onHistoryKeydown, onSend });

1711+

const textarea = requireElement(

1712+

container,

1713+

".agent-chat__composer-combobox > textarea",

1714+

"composer textarea",

1715+

) as HTMLTextAreaElement;

1716+1717+

textarea.dispatchEvent(new CompositionEvent("compositionstart", { bubbles: true }));

1718+

textarea.value = "dangqian";

1719+

const enterEvent = new KeyboardEvent("keydown", {

1720+

key: "Enter",

1721+

bubbles: true,

1722+

cancelable: true,

1723+

});

1724+

const arrowEvent = new KeyboardEvent("keydown", {

1725+

key: "ArrowUp",

1726+

bubbles: true,

1727+

cancelable: true,

1728+

});

1729+

textarea.dispatchEvent(enterEvent);

1730+

textarea.dispatchEvent(arrowEvent);

1731+1732+

expect(enterEvent.defaultPrevented).toBe(false);

1733+

expect(arrowEvent.defaultPrevented).toBe(false);

1734+

expect(onSend).not.toHaveBeenCalled();

1735+

expect(onHistoryKeydown).not.toHaveBeenCalled();

1736+

});

1737+

});

1738+16361739

describe("chat slash menu accessibility", () => {

16371740

function inputDraft(container: HTMLElement, value: string) {

16381741

const textarea = container.querySelector<HTMLTextAreaElement>("textarea");