Registry Mirror
Skip to content

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Dec 1, 2026 •

Copy link
Copy Markdown
Member

On Android, the thread search field could jump back to an older query while you typed or deleted. The search bar received the query a commit or more after each keystroke, and the text input wrote that stale value over the newer text. SearchField now shows the text you typed and ignores late copies of values it sent itself, while still applying real outside changes such as clearing or restoring a query.

Fixes #46660

Reproduction on main

Commit: origin/main b21923b. Isolated server (T3CODE_DEV_SEED=0, own --base-dir) with 41 projects added through t3 project add and 2,800 synthetic threads written into orchestration_v2_projection_threads (valid OrchestrationV2AppThread payloads, invented titles). Android dev client installed with vp run mobile:install android on a pooled Pixel 9 emulator (API 36, stock Gboard, no test IME), Metro from the worktree, paired with pair-client.sh. Steps: on the Chats tab, tap Search threads; with Gboard up, type test (agent-device type, 60 ms between keys) while recording the screen. Then, with test in the field, tap Gboard's Delete key 4 times (80 ms apart) while recording. Seen at 10 fps: (1) typing: the field showed test with the clear button, then t for 2 frames (~0.2 s) with no input, then test again (frames 30-34). (2) Backspace: the field went test→tes→te→t→empty, then tes came back for ~0.5 s (5 frames), then empty again. This matches the report exactly. Evidence: typing strip https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/1fcaeefa9133d833/typing-revert.png , backspace strip https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/b973631bb168f2ad/backspace-revert.png , recordings https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/5a67a9d0d94fa161/type1.mp4 and https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/813b5a3cbc355b81/bs1.mp4 . No failing test was written: the defect is a timing race between native text and a late React commit on a device. Open PR #43716 (fix(mobile): preserve composing text in thread search, for #42437) changes this same SearchField and adds a simulated-reconciliation test; it is not merged.

Evidence

Same Pixel 9 emulator (Android API 36), stock Gboard, light theme, portrait 1080×2424; fresh isolated servers and app data, 41 projects and 2,800 synthetic threads per side. Each commit ran from its own worktree and Metro bundle.

Steps: Chats → Search threads; type test at 60 ms/key and wait eight seconds; tap Gboard Delete four times at 80 ms intervals and wait eight seconds. The identical driver recorded both actions.

Before After
a5a39fa840 8c8a51ba21
After reaching empty, stale tes returns at 3.5–4.8s, then clears again. Reaches empty and stays empty; no stale query returns.
Before: Backspace restores stale tes, 10 fps video strip After: Backspace keeps the field empty, 10 fps video strip
Backspace recording · Typing recording Backspace recording · Typing recording

The strips are consecutive 10 fps crops from 2.2–5.2s of each Backspace recording. Typing stayed at test in both final matched runs; the Backspace recordings establish the base/head difference.

Scripts: project seed, thread fixture, interaction driver, strip extraction.

Not shown:

  • The typing-only test→t→test transient did not recur in the final matched recordings; typing stayed at test on both commits. The Backspace stale-query rewrite reproduced on base and was absent on head.

Tests

  • vp test run src/components/ui/SearchField.test.tsx (apps/mobile): fails on main (a stale query overwrote typed text), passes with the fix
  • vp test run src/components/ui/AppBar.android.test.tsx src/components/ui/SearchField.test.tsx: 3 passed
  • vp run check:changed: format, lint, knip, typecheck (2 packages), test and react compiler all pass

Not in this change

Who did the work

  • Written by Claude Opus 5.5, in Claude Code
  • Reviewed by GPT-6.1 Sol, in Codex, and by Claude Opus 5.5, each on its own
  • Proof captured by GPT-6.1 Sol and checked by Claude Opus 5.5

Run by the t3code factory in T3 Code.

…uery

The workspace bar receives the search query a commit or more after each
keystroke, so TextInput wrote the stale value over newer native text.
SearchField now shows its own text and ignores values it sent itself.

Fixes #46660

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Dec 1, 2026
@macroscopeapp

macroscopeapp Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 8c8a51b

Macroscope's review found this PR approvable — The change keeps Android search text from reverting when older query updates arrive. Its effects are confined to transient input synchronization and test registration, with no product-default or persistent-data changes.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

SearchField now keeps displayed text in local state and tracks values sent to its change handler. It ignores delayed matching query props, applies external query changes, and routes clearing through the same handler. A regression test covers these cases.

Changes: Search field query synchronization

Layer / File(s) Summary
Local text and query synchronization
apps/mobile/src/components/ui/SearchField.tsx, apps/mobile/src/components/ui/SearchField.test.tsx, apps/mobile/vite.config.ts
SearchField displays local text and tracks sent values to avoid replacing newer text with matching delayed props. External values update the field, and clearing uses the shared text-change handler. The regression test checks delayed commits, external updates, and clearing. Vite includes the test in the React test project.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Low

Merge Risk: Minimal · up to 8c8a5

This change keeps Android thread search showing exactly what the user typed while the list re-renders, and it still applies genuine external changes such as clearing. No actionable merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the Android thread search fix in mobile, which is the main change: SearchField now keeps typed text and ignores stale echoed query values. It is concise, specific, and follows a conven…
Linked Issues check Passed [#46660] requires that the Android thread search field keep the text typed or deleted, even when the filtered list re-renders. In apps/mobile/src/components/ui/SearchField.tsx, the field now holds its…
Out of Scope Changes check Passed The changed files are apps/mobile/src/components/ui/SearchField.tsx, its new test file SearchField.test.tsx, and apps/mobile/vite.config.ts. The vite config change only adds the new test file to the R…
Description check Passed The description covers the problem (Android thread search reverting to a stale query while typing or deleting), the change (SearchField keeps local text and ignores late echoes of values it sent), a r…
Full details: Title check

Explanation

The title names the Android thread search fix in mobile, which is the main change: SearchField now keeps typed text and ignores stale echoed query values. It is concise, specific, and follows a conventional commit format.

Full details: Linked Issues check

Explanation

[#46660] requires that the Android thread search field keep the text typed or deleted, even when the filtered list re-renders. In apps/mobile/src/components/ui/SearchField.tsx, the field now holds its displayed text in local state (field.text) and records each value it sends to onChangeText in field.sent. When the value prop changes, an incoming value that matches an earlier sent entry is treated as a late echo. The field keeps field.text and drops the consumed entries. Only a value that matches no sent entry replaces the text. Tracing the reported sequence: after t, te, tes, test are sent, a late t echo leaves the text at test. Outside changes such as clearing or restoring a query still apply, because they do not match a sent entry. The summary reports a regression test in apps/mobile/src/components/ui/SearchField.test.tsx that simulates late commits. That test is registered in apps/mobile/vite.config.ts reactTests. I did not run the test or the device reproduction. The code path above is the basis for this verdict. The Korean IME work (#42437) is not a requirement of this issue, so it is not assessed.

Full details: Out of Scope Changes check

Explanation

The changed files are apps/mobile/src/components/ui/SearchField.tsx, its new test file SearchField.test.tsx, and apps/mobile/vite.config.ts. The vite config change only adds the new test file to the React test list. All of these support the #46660 fix. The SearchField change does not alter the exported props or the public API. The PR description states that the per-keystroke re-render cost is not changed here. That matches the diff, which does not touch the workspace or thread-list code. No unrelated change was found in the reviewed diffs.

Full details: Description check

Explanation

The description covers the problem (Android thread search reverting to a stale query while typing or deleting), the change (SearchField keeps local text and ignores late echoes of values it sent), a reproduction on a specific commit with steps and recordings, and a test list with results. It also notes the open related PR #43716 and what is out of scope. The Scope section does not explicitly link an issue, but it cites fixes #46660, so the link requirement is met in substance. The template's Verification section asks for focused tests and observed results, which are provided. The description is complete enough to pass, with minor gaps noted below.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 36983d6 and 8c8a51b.

Files selected for processing: 3

  • apps/mobile/src/components/ui/SearchField.test.tsx
  • apps/mobile/src/components/ui/SearchField.tsx
  • apps/mobile/vite.config.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.

@juliusmarminge
juliusmarminge merged commit 75d3e79 into main Dec 1, 2026
39 checks passed
@juliusmarminge
juliusmarminge deleted the factory/issue-46660 branch December 1, 2026 09:49
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Dec 1, 2026
**v0.1.14-nightly.20261201.5550** · 102 changes from 16 contributors

- **Connect more MCP servers.** Connect servers such as Gmail, Drive, and Calendar using your own registered client credentials.
- **Faster thread search.** Jump directly to old Find in Thread matches without loading the intervening history.
- **Resizable workflow runs.** Open workflow runs in the resizable right panel and use more of wide windows.
- **Resumable voice model downloads.** Large voice model downloads resume after connection drops instead of starting over.
- **Bitbucket reviewers.** Request reviewers from across your Bitbucket workspace, including members beyond the first 50.
- **Organization pull request labels.** View and edit organization labels on Forgejo and Gitea pull requests.
- **Unlink pull requests.** Unlink a branch’s pull request from a thread without it automatically reappearing.

### Plus 92 more bug fixes and performance improvements.

<details>
<summary>Full changelog</summary>

## What's Changed
* fix(web): reload workflow definitions after undoing all edits by @StiensWout in pingdotgg/t3code#46471
* fix(web): right-panel launcher keys no longer fire while a context menu is open by @only21mil in pingdotgg/t3code#46481
* fix(web): pressing Escape to dismiss Cite no longer closes Find in Thread by @only21mil in pingdotgg/t3code#46482
* fix(bitbucket): reviewer lookup finds members past the first page of 50 by @shivamhwp in pingdotgg/t3code#46223
* fix(web): stashing a prompt with a failed file upload reports the failure instead of asking to wait by @saphid in pingdotgg/t3code#43991
* fix(web): Enter restores the highlighted stashed prompt by @StiensWout in pingdotgg/t3code#46489
* fix(web): Escape closes an open context menu before the layer beneath it by @only21mil in pingdotgg/t3code#46490
* fix(claude): keep sleep timers with multiple durations awaited across restart by @saphid in pingdotgg/t3code#46488
* fix(gitlab): preserve mode changes in reconstructed merge request patches by @saphid in pingdotgg/t3code#46495
* fix(web): workflows page uses the width of a wide window by @juliusmarminge in pingdotgg/t3code#46487
* fix(server): stalled preview viewers no longer wedge snapshots by @aravhawk in pingdotgg/t3code#46472
* fix(web): keep joined emoji whole in screen-reader announcements by @StiensWout in pingdotgg/t3code#46485
* fix(opencode): count filename globs as file searches by @StiensWout in pingdotgg/t3code#46492
* fix(web): holding the stash shortcut keeps the prompt saved by @StiensWout in pingdotgg/t3code#46493
* fix(shared): first threads stay local in POSIX project paths with backslashes by @saphid in pingdotgg/t3code#46496
* fix(web): keep Workflows open when a pane link has a blank ID by @tiliakoos in pingdotgg/t3code#46494
* fix(web): Mod+S moves an edited queued reply to the prompt stash by @only21mil in pingdotgg/t3code#46499
* feat(server): MCP servers can use an OAuth client you registered by @juliusmarminge in pingdotgg/t3code#46510
* fix(forgejo): pull request label picker and label edits include organization labels by @omaribrahim6 in pingdotgg/t3code#46497
* fix(shared): single-slash http preview URLs no longer open a host named http by @saphid in pingdotgg/t3code#46502
* fix(shared): reject a comma as the only JSON array or object entry by @saphid in pingdotgg/t3code#46501
* fix(source-control): fetched inline comments keep filenames with leading or trailing spaces by @saphid in pingdotgg/t3code#46500
* fix(web): Python traceback links open at the frame's line by @Michel-Liao in pingdotgg/t3code#46505
* fix(web): skip JPEG fill bytes and standalone markers when detecting Display P3 by @saphid in pingdotgg/t3code#46507
* fix(web): holding the stash delete shortcut removes one prompt by @StiensWout in pingdotgg/t3code#46506
* fix(web): bare web URLs stay bare when copied and pasted into the composer by @only21mil in pingdotgg/t3code#46513
* fix(server): reload keybindings when the file is a symlink and its target is edited by @iamshadmantaqi in pingdotgg/t3code#46521
* fix(server): storage cleanup removes task-folder checkouts whose branch changed by @juliusmarminge in pingdotgg/t3code#46527
* fix(contracts): keep trailing spaces in listed file names by @iamshadmantaqi in pingdotgg/t3code#46524
* fix(shared): wildcard preview addresses stay on http after URL canonicalization by @saphid in pingdotgg/t3code#46529
* fix(web): pressing Escape to close Find in Thread keeps the citation highlight by @only21mil in pingdotgg/t3code#46522
* fix(cli): t3 thread start titles keep flag and joined emoji whole by @saphid in pingdotgg/t3code#46532
* fix(server): keep pruned issue workflow runs from repeating by @StiensWout in pingdotgg/t3code#46474
* fix(client-runtime): the PR Author menu can replace a typed author qualifier by @saphid in pingdotgg/t3code#43968
* fix(web): fold the PR diff whose header was clicked by @saphid in pingdotgg/t3code#44079
* fix(server): long browser dialog messages no longer end in a broken character by @tiliakoos in pingdotgg/t3code#46538
* fix(web): screen readers hear pace, reset time and error reason on usage rows by @juliusmarminge in pingdotgg/t3code#46544
* fix(web): open absolute localhost names from the Browser address bar by @saphid in pingdotgg/t3code#46540
* fix(ssh): disconnect no longer waits on a stopped server left as a zombie by @iamshadmantaqi in pingdotgg/t3code#46533
* fix(contracts): let VCS ref search find long valid branch names by @saphid in pingdotgg/t3code#46550
* fix(web): imported VS Code themes color code with their own syntax colors by @Bil0000 in pingdotgg/t3code#46111
* fix(usage): skip non-regular transcript files during usage scans by @saphid in pingdotgg/t3code#46543
* fix(projects): keep the clone folder for a file URL at the filesystem root by @saphid in pingdotgg/t3code#46552
* fix(client-runtime): highlight inline scripts after bundled env unset options by @saphid in pingdotgg/t3code#46556
* fix(server): shortened commit text keeps a joined emoji whole by @iamshadmantaqi in pingdotgg/t3code#46545
* fix(shared): preview .cts files that Linux labels application/typescript by @iamshadmantaqi in pingdotgg/t3code#46563
* fix(web): second Mod+T keeps right-panel Add menu shortcuts working by @only21mil in pingdotgg/t3code#46562
* fix(web): issue rows show the hand cursor on hover, like pull request rows by @flamboh in pingdotgg/t3code#46553
* fix(server): imported thread titles no longer end in half a flag or joined emoji by @iamshadmantaqi in pingdotgg/t3code#46558
* fix(server): parse webhook JSON by media type rather than a parameter substring by @saphid in pingdotgg/t3code#46567
* fix(source-control): route nested GitLab merge requests before GitHub prefix matches by @saphid in pingdotgg/t3code#46560
* fix: jump directly to old thread search matches by @Yash-Singh1 in pingdotgg/t3code#46285
* fix(client-runtime): do not label heredoc body text as a command after a continued line by @saphid in pingdotgg/t3code#46555
* fix(server): do not schedule a fixed-time task twice during fall-back by @saphid in pingdotgg/t3code#46564
* fix(client-runtime): keep literal backslashes in double-quoted heredoc delimiters by @saphid in pingdotgg/t3code#46570
* test(web): wait for the dialog's own focus before opening the context menu over it by @juliusmarminge in pingdotgg/t3code#46592
* fix(contracts): accept webhook dedupe placeholders for query keys containing spaces by @saphid in pingdotgg/t3code#46569
* fix(web): open schemeless local addresses with spaces in their paths by @juliusmarminge in pingdotgg/t3code#46586
* perf(web): resting on an issue row loads its detail, so the panel opens filled in by @flamboh in pingdotgg/t3code#46579
* fix(web): keep explicit links when bare URLs end in autolink-trimmed punctuation by @only21mil in pingdotgg/t3code#46577
* fix(mobile): SVG images open full screen on Android instead of spinning forever by @Jacksondr5 in pingdotgg/t3code#39530
* fix(client-runtime): highlight Python inline code after the hash-based pyc option by @saphid in pingdotgg/t3code#46580
* fix(web): slash-command description tooltip closes when a modal opens over the menu by @juliusmarminge in pingdotgg/t3code#46593
* fix(usage): reparse a grown transcript after atomic file replacement by @saphid in pingdotgg/t3code#46581
* fix(web): end terminal links at CJK punctuation that follows ASCII by @iamshadmantaqi in pingdotgg/t3code#46585
* chore(cursor): upgrade SDK to 1.5.3 by @Yash-Singh1 in pingdotgg/t3code#46595
* fix(client-runtime): highlight inline scripts after bundled sudo user options by @iamshadmantaqi in pingdotgg/t3code#46587
* fix(server): keep pull request watches from waking moved threads by @StiensWout in pingdotgg/t3code#46571
* fix(web): keep the selected tab in Workflows links by @StiensWout in pingdotgg/t3code#46603
* fix(preview): size a desktop-hosted tab for the client watching it by @juliusmarminge in pingdotgg/t3code#45961
* fix(web): / and Mod+F in Settings no longer jump to search over an open context menu by @only21mil in pingdotgg/t3code#46597
* fix(server): preserve the pending run when saving a legacy one-minute interval by @saphid in pingdotgg/t3code#46583
* fix(web): holding the settle or pin shortcut no longer toggles it back by @Mnigos in pingdotgg/t3code#46602
* fix(server): large voice model downloads resume after connection drops by @juliusmarminge in pingdotgg/t3code#46611
* fix(server): distinguish literal brackets from webhook filter wildcards by @saphid in pingdotgg/t3code#46606
* fix(server): long select options in the streamed browser no longer end in a broken character by @saphid in pingdotgg/t3code#46610
* fix(server): preserve a leading question mark in webhook parameter names by @saphid in pingdotgg/t3code#46598
* fix(shared): preview Perl, awk and csh scripts labelled by Linux MIME types by @iamshadmantaqi in pingdotgg/t3code#46619
* fix(web): Mod+S no longer stashes or restores while a dialog or context menu is open by @only21mil in pingdotgg/t3code#46623
* fix(source-control): preserve mixed line endings when removing merge credits by @saphid in pingdotgg/t3code#46620
* fix(gitlab): keep multiline issue titles in rename activity by @saphid in pingdotgg/t3code#46622
* fix(web): keep both items when copying a list at the nine-digit marker limit by @saphid in pingdotgg/t3code#46625
* fix(contracts): keep preview annotations from pages with long URLs by @saphid in pingdotgg/t3code#46612
* fix(client-runtime): typed absolute project paths with dot segments are collapsed by @iamshadmantaqi in pingdotgg/t3code#46618
* fix(web): ODT previews keep bold, italic, underline and strikethrough by @iamshadmantaqi in pingdotgg/t3code#46626
* fix(web): text generation settings skip providers turned off for the project by @saphid in pingdotgg/t3code#46632
* fix(web): clear unsaved workflow status after undo by @StiensWout in pingdotgg/t3code#46636
* fix(web): effort shortcut closes the nested Permissions menu in the model picker by @only21mil in pingdotgg/t3code#46640
* fix(server): large OpenCode events no longer stall the server by @juliusmarminge in pingdotgg/t3code#46643
* fix(web): inline thread details card grows with the interface font size by @juliusmarminge in pingdotgg/t3code#46641
* fix(web): workflow runs open in the resizable right panel by @juliusmarminge in pingdotgg/t3code#46644
* fix(web): copied chat links keep literal character references in their destination by @saphid in pingdotgg/t3code#46657
* fix(source-control): preserve merge-message code fences with Unicode line separators in their info strings by @saphid in pingdotgg/t3code#46649
* fix(server): delegated worktrees in multi-repo folders keep the parent's repositories and branch by @juliusmarminge in pingdotgg/t3code#46654
* fix(mobile): render inline base64 SVGs with URL fragments by @saphid in pingdotgg/t3code#46658
* fix(acp): disconnect sessions opened by an in-flight MCP initialize by @saphid in pingdotgg/t3code#46652
* fix(mobile): Android thread search no longer jumps back to an older query by @juliusmarminge in pingdotgg/t3code#46671
* fix: the branch's pull request stays unlinked once you unlink it by @kr4chinin in pingdotgg/t3code#46662
* fix(dev): restart the server when a populated source directory is moved into place by @saphid in pingdotgg/t3code#46670
* fix(acp): omit skipped optional text that cannot be empty by @saphid in pingdotgg/t3code#46667
* fix(client-runtime): highlight inline scripts after sudo prompt, host, role and type options by @saphid in pingdotgg/t3code#46674
* fix(opencode): republish models when a catalog change only affects legacy flags by @juliusmarminge in pingdotgg/t3code#46677


**Full Changelog**: pingdotgg/t3code@v0.1.14-nightly.20261201.5530...v0.1.14-nightly.20261201.5550

</details>


Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.1.14-nightly.20261201.5550
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Android thread search rewrites the field with an older query while typing or deleting

1 participant