Pad/internal/ui
Greg Pomerantz cb8ebc003f IME: force a re-syncing snippet re-push when the IME desynchronizes
After the selection-replacement autocorrect on the phone, Gboard's
local text was out of sync with ours and it re-sent the same empty
fix-up commit in an endless loop (~one per 150 ms, each drift-snapped
to the caret and applied as a no-op). The file was never damaged, but
the IME never converged because it kept 'fixing' text that did not
exist in its own model.

The app cannot see the IME's model; the only recovery the IME
contract offers is a restartInput, which makes it re-fetch the
real text and selection around the caret. Arm that recovery
automatically: three consecutive anomalous commits (drift-snapped,
or empty text) set IMEForceResync, and the next frame ships the
snippet trimmed by one rune, which changes the pushed text and
forces the restart. The streak resets on any normal commit, so
isolated anomalies never trigger it, and the resync is one-shot.

TestRealFile_IMEForceResync pins the arm/reset/consume cycle.
2026-09-13 18:23:06 -04:00
..
icons Add in-file search (find bar) 2026-08-20 00:02:54 -04:00
caret_point_test.go Handle drags: 1:1 finger tracking with cross-flip; fix caret/taps on empty lines 2026-08-19 22:34:12 -04:00
element.go IME: force a re-syncing snippet re-push when the IME desynchronizes 2026-09-13 18:23:06 -04:00
layout.go Make the editor top and bottom bars ~30% taller for bigger tap targets 2026-09-03 12:34:18 -04:00
pinch_test.go Pinch-to-font-size (continuous, content-point pinned) + IME-open scroll fix 2026-08-23 09:00:51 -04:00
pinch_tracker.go Pinch-to-font-size (continuous, content-point pinned) + IME-open scroll fix 2026-08-23 09:00:51 -04:00
real_draw_probe_test.go Pinch-to-font-size (continuous, content-point pinned) + IME-open scroll fix 2026-08-23 09:00:51 -04:00
render.go IME: force a re-syncing snippet re-push when the IME desynchronizes 2026-09-13 18:23:06 -04:00
reveal_focus_drain_test.go Pinch-to-font-size (continuous, content-point pinned) + IME-open scroll fix 2026-08-23 09:00:51 -04:00
tag_identity_test.go Pinch-to-font-size (continuous, content-point pinned) + IME-open scroll fix 2026-08-23 09:00:51 -04:00
unit.go Pinch-to-font-size (continuous, content-point pinned) + IME-open scroll fix 2026-08-23 09:00:51 -04:00