You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] Comment textarea flickers while typing Chinese (CJK IME) in review annotations #1949
When typing Chinese (or other CJK input) into the annotation/comment textarea in the review UI, the textarea visibly flickers/jumps during IME composition (i.e. while the candidate window is updating). English input is smooth — the flickering only happens with IME composition.
The likely trigger: IME composition fires an input event on every candidate update, and per #659 the review UI currently re-renders the entire AllFilesDiffView tree (including every unmemoized LazyFileDiff / Pierre <FileDiff>) plus forced reflows from the capture-phase scroll listeners in AnnotationToolbar / CommentPopover. IME updates this at a much higher frequency than keystrokes, which turns the typing-lag problem described in #659 into visible flickering of the textarea.
Steps to reproduce
Open a code review (plannotator-review) with a moderately large diff (enough files to be noticeable).
Select some text / open the annotation composer.
Switch to a Chinese IME (e.g. 搜狗输入法 / Sogou Pinyin).
Type several characters without committing (e.g. type zhongwen and let candidates update).
Observe the textarea flickering/jumping while the IME candidate window updates.
Expected behavior
The textarea and the page around it stay visually stable during IME composition, same as typing English.
Actual behavior
The textarea flickers on each IME composition update. This does not happen when typing English characters.
Environment
OS: macOS Sonoma 14.3.1 (Apple M3 Pro)
Browser: Chrome 155
IME: 搜狗输入法 (Sogou Pinyin)
Plannotator version: 0.28.20
Agent: Claude Code 2.1.295
Where did it happen: Code review (/plannotator-review) — annotation/comment composer
Related (historical): CJK input method enter make comment complete trigger #191 — a CJK IME handling bug in the comment composer (Enter triggering submit during composition), fixed. Suggests this composer has had IME edge cases before.
A minimal mitigation that usually helps: keep textarea state local to the composer component (don't bubble per-change state to the diff view parent), and guard composition with isComposing / compositionstart/compositionend if any side effects fire on input.
Activity