gitdataai/src
ZhenYi 5103d99a00 fix(frontend): rewrite MentionInput sync to prevent onChange overwriting mention draft
The root cause: handleMentionSelect set draft to mention HTML, but the
subsequent MentionInput.onInput event fired with plain text (after the
programmatic DOM insert) and overwrote the draft.

Solution: replace pendingSyncRef trick with a clean isUserInputRef flag.
- useEffect: if getPlainText(el) === value, DOM already correct (skip).
  Mark isUserInputRef = false so next useEffect skips caret restore.
- handleInput: always set isUserInputRef = true before calling onChange.

This eliminates the pendingSyncRef/__mentionSkipSync global flag mess
entirely.
2026-04-18 11:20:48 +08:00
..
app feat(seo): add useHead to all landing pages with Command as Service titles and descriptions 2026-04-16 19:12:06 +08:00
assets init 2026-04-15 09:08:09 +08:00
client fix(api): add clone url 2026-04-16 18:31:05 +08:00
components fix(frontend): rewrite MentionInput sync to prevent onChange overwriting mention draft 2026-04-18 11:20:48 +08:00
contexts fix(room): load model list inside fetchRoomAiConfigs so AI names are always resolved 2026-04-18 00:55:18 +08:00
hooks fix(room): add HTTP batch reactions endpoint and clean up dead code 2026-04-17 22:12:10 +08:00
lib refactor(frontend): rewrite mention system with clean state architecture 2026-04-18 01:26:35 +08:00
App.css init 2026-04-15 09:08:09 +08:00
App.tsx feat(frontend): landing pages with Command as Service concept 2026-04-15 21:45:30 +08:00
index.css feat(frontend): render mentions as styled buttons in input and messages 2026-04-18 01:06:39 +08:00
main.tsx init 2026-04-15 09:08:09 +08:00