Repository navigation
fix(mobile): guard hardware sends during composition and focus changes - #2840
Conversation
Exercise HardwareSendView with a real EditText/InputConnection and observe only the Expo event bridge. Keep production input code unchanged for the authorized red run. Issue: #2820 Agent-Task: codex/local/01a173f0-3f45-7f02-87a0-b1afa3b17ae0
Record the focused field and composition state before the IME receives Enter; clear stale echoes at focus, cancellation, release and send boundaries. Issue: #2820 Agent-Task: codex/local/01a173f0-3f45-7f02-87a0-b1afa3b17ae0
Keep XCTest sources out of the normal pod. Gate the test specification behind an explicit CNG plugin opt-in; config boundary tests pass, while native compilation and behavior remain pending the assigned Mac QA window. Issue: #2820 Agent-Task: codex/local/01a173f0-3f45-7f02-87a0-b1afa3b17ae0
Use explicit fixture setup and deferred cleanup instead of actor-isolated overrides of synchronous XCTest lifecycle methods. Issue: #2820 Agent-Task: codex/local/01a173f0-3f45-7f02-87a0-b1afa3b17ae0
Drive pre-IME key release and cancellation through the native View, then deliver a late newline and verify the next fresh hardware key. Issue: #2820 Agent-Task: codex/local/01a173f0-3f45-7f02-87a0-b1afa3b17ae0
An IME can consume physical key-up before ordinary dispatch. Clear the pending echo at that boundary so a later newline cannot submit the draft. Issue: #2820 Agent-Task: codex/local/01a173f0-3f45-7f02-87a0-b1afa3b17ae0
Keep the standard Mac job disabled by default. Build only the CocoaPods test host, prove ordinary command delivery first, and retain scoped synthetic test evidence without credentials or signing. Issue: #2820 Agent-Task: codex/local/01a173f0-3f45-7f02-87a0-b1afa3b17ae0
Xcode 27 imports UIKeyCommand.action as optional. Assert that the cached and next commands expose real selectors before sending their actions through UIKit. Issue: #2820 Agent-Task: codex/local/01a173f0-3f45-7f02-87a0-b1afa3b17ae0
The isolated CocoaPods test bundle links ReactCodegen without an app target providing libc++; declare the standard library only on the HardwareSend test specification. Issue: #2820 Agent-Task: codex/local/01a173f0-3f45-7f02-87a0-b1afa3b17ae0
Preserve both Expo Widgets and the opt-in HardwareSend test plugin. Issue: #2820 Agent-Task: codex/local/01a173f0-3f45-7f02-87a0-b1afa3b17ae0
Use the public CocoaPods app specification only for the opt-in HardwareSend tests; bind fixture windows to the connected scene. Issue: #2820 Agent-Task: codex/local/01a173f0-3f45-7f02-87a0-b1afa3b17ae0
…anges Use one native eligibility check for advertised and cached shortcuts, and require exact UIKit method results in the manual verification job. Issue: #2820 Agent-Task: codex/local/01a173f0-3f45-7f02-87a0-b1afa3b17ae0
|
Caution Review failedThe pull request is closed. Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
已完成以下中文、日文输入功能场景:产品
每次流式运行只新增 fixture 触发和固定回复,没有组合确认或取消导致的额外消息。长草稿两轮的确认与新组合发生在 producer 区间内;中文 Delete 取消跨越 producer 结束,日文 Delete 发生在结束后、界面仍播放至约第 41 段。不能概括为所有取消动作都发生在上游输出期间。 完整验收矩阵与原始截图。原 5 张截图未改; 这些是 Simulator 功能结果,不是实机或 Human QA,也不构成触摸时延、FPS、A/B 性能或完整视觉播放结论。长草稿流式场景复用了预留会话,不能当作等价历史的性能样本。 滚动跟随的补充工作单独归属 #2477:来源已确认的新 Task: |
Physical iPhone outcome — real composition and draft correctnessSigned frozen8b Release on XS Max/iOS18.1.1: actual WeChat Pinyin and existing system Japanese Kana candidate confirmation/cancellation passed the bounded short-draft cases. Confirmation during fixed streaming was verified; cancellation completed after or crossed the producer end, so active-production cancellation is not fully qualified. A 10k Chinese case preserved the entire draft except the intended single character at codepoint 65. A/B full-draft switching, expanded-editor return and exactly one normal send passed. This is not full hardware-keyboard, long-draft Japanese, caret/background or latency acceptance. First 10k setup timed out; full readback qualified only after one controlled driver recovery. Physical profiling failed to attach by PID and name, so performance remains UNMEASURED. The exact tested scope and original failures are retained. Full physical acceptance matrix, timing limits and cleanup: verified result. Task |
#2820 | Agent claim
Agent-Task:
codex/local/01a173f0-3f45-7f02-87a0-b1afa3b17ae0Why the change
Prevent hardware-keyboard shortcuts from sending a mobile draft while confirming composed text or after input focus changes.
Special things to note
BOTHARNESS_HARDWARE_SEND_IOS_TESTS=1. The manual CI input is also off by default, uses a standard read-only Mac runner and needs no account/signing credentials. Normal app builds exclude test and test-host sources.Change outline
The Android regression uses a real
HardwareSendView, focusedEditText,InputConnection, pre-IME/key dispatch andTextWatcher; only Expo's outbound event bridge is observed. The iOS regression uses a real scene/window,UITextView,UIKeyCommand, responder-chain dispatch and final ExpoonSendevents. Neither substitutes a private policy helper.b7c6c855559baf515c7ce6557266a2ebf2efd32dafc36fa2c58c29The three earlier UIKit attempts failed in test-fixture compilation, C++ linking and legacy test-host startup. They are harness diagnostics, not behavioral red evidence. The working target uses a dedicated scene-based test host; its sources remain outside the production module.
Exact candidate:
fa2c58c29be1923fa27ba5e42120db765d235110; merge base:a344c131ee778ba856557aa8490de537e93055c0. Independent Standards and Spec reviews have zero unresolved findings; Spec independently passed 33 tests. UIKit native execution, its exact-result gates and the full manual verification workflow 40235150028 all pass. Main subsequently added #2839 without overlapping changed files; PR merge CI 40235372862 passes for that combination separately.Capture blocker and review path: native keyboard events cannot be exercised by Expo Web, and the assigned physical-keyboard/CJK device journey has not run this candidate. Follow the composer journey steps 9–10 with rebuilt native apps: confirm a candidate without sending, send once with the next shortcut, then change focus with a pending shortcut. Capture matched native recordings or key-state evidence there. The automated result bundles do not replace device or Human acceptance.