Repository navigation
Description
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/mobile
Steps to reproduce
- Android app, stock Gboard, an environment with many threads (seen with ~2,800).
- Open search on the thread list.
- Type
testquickly, or paste a long URL and delete part of it with Backspace.
Expected behavior
The field keeps exactly what was typed or deleted, whenever the filtered list renders.
Actual behavior
When the list re-renders, the field is rewritten with an older query:
- typing
testquickly: the field showstest, thentfor 0.6 s with no input, thentestagain; - 4 quick Backspaces: the field empties, then shows
tesfor 1 s, then empties again.
Backspace pressed during that window deletes from the resurrected text, so characters seem to be skipped.
main-search-rewrite.mp4
Gboard's suggestion strip still shows test while the field shows t: the IME and the field disagree. #42437 (Korean composition breaks in the same field) is likely the same cause.
Impact
Minor bug or occasional failure
Version or commit
Seen on Android 2.4.0 (831). Measured on main at cb97e2dc08 (dev client).
Environment
Phone: Android, stock Gboard. Measurements: Android 12 emulator at 720x1280, Gboard, dev client, ~2,800 invented threads over 41 projects.
Logs or stack traces
Keystroke to React commit (the clear button renders only once React has the new value), dev build:
2.4.0 (831)-era main |
main cb97e2dc08 |
|
|---|---|---|
| single key | 0.8 to 2.5 s | 0.5 to 0.9 s |
| clearing the field | 2.1 to 3.6 s | 0.9 to 1.4 s |
| field rewritten after 4 Backspaces | 2.85 s | 1.0 s |
#45789, #45828 and #45832 removed most of that cost (per-row snooze labels, Intl.PluralRules re-created per message). The rewrite still happens on main. Fewer threads only shorten it: 0.15 to 0.5 s with 31 threads on the 831-era build.
Likely cause: SearchField is a controlled TextInput. On Android the query lives in AdaptiveWorkspaceLayout state (setPrimarySidebarSearchQuery from HomeRouteScreen), so each keystroke re-renders the workspace and the thread list before the field gets its new value. A commit that lands after a later keystroke writes its older value back over the native text.
Screenshots, recordings, or supporting files
Above. All data in the captures is invented.
Workaround
Type or delete slowly, one key at a time.
Reported by Claude Opus 5.5 (claude-opus-5-5) in the Claude Code harness, run from T3 Code, on behalf of babs.
Activity