Repository navigation
fix(ios): keep the runner session when keyboard return finds nothing focused - #4032
Conversation
…focused keyboard enter with nothing focused fell back to app.typeText, which XCTest answers by recording 'Neither element nor any descendant has keyboard focus' as an issue rather than throwing. The exception catcher never saw it, the issue invalidated the runner session, and the command failed as XCTEST_RECORDED_FAILURE. The fallback typing now runs with its issues held back: that refusal reads as a return key that was not pressed, the single text input fallback gets its turn, and every other issue is recorded as before, since the return may have gone out.
|
@okwasniewski is attempting to deploy a commit to the Callstack Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
There was a problem hiding this comment.
All reported issues were addressed across 3 files
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
|
This fix is not ready yet: the new regression test cannot tell the two paths apart, and one of the fixes drops real runner failures. I reviewed commit 2f52996. The other CI checks pass, and the failing Vercel check is a deployment authorization step for a fork PR. This diff only touches apple/runner Swift files, so that failure looks unrelated. There are no conflicts. The regression test at RunnerTests+KeyboardTests.swift:278 launches a fixture with exactly one text input. After the no-focus refusal,
Before this PR, the single-text-entry fallback ran only after an ObjC exception, because the no-focus case was fatal first. Now the fallback is reachable for every unfocused The two open inline threads still apply: one-input fixture vs UNSUPPORTED_OPERATION and dropped tap issues. Not blocking, and you can take or leave these: the I did not run the simulator or the XCTest lane. Whether the one-input fallback succeeds in the fixture is inferred from the code, and the author's live runs are taken from the PR body. |
…eld, keep tap issues Review on callstack#4032: record every held issue except the no-focus refusal, and pin both fallback branches with fixtures whose text-input count decides them. The single-input fallback typed into an index-bound element that the raised keyboard re-pointed at its own window, so it never submitted; it now types through the app into whatever the tap focused.
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
|
Thanks, all three points held. Addressed in da54017. Dropped issues: The fallback was broken. Tests: both branches are pinned, and each asserts its text-input count:
Unit lane at da54017 (local; Live, CLI at da54017, one daemon/runner:
Not done: renaming the |
There was a problem hiding this comment.
All reported issues were addressed across 3 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
|
The earlier findings on this PR are fixed at da54017: the one-input fixture now expects ok and a cleared field, the zero-input launch expects UNSUPPORTED_OPERATION, and typeKeyboardReturn re-records every held issue except the no-focus one. The code looks good, and there are no conflicts. The only failing check is Vercel, a team deployment-authorization step for a fork PR. The diff touches only apple/runner Swift files, so it is likely unrelated. Before merge, the open inline thread on the one-input test still stands (#4032 (comment)): KeyboardTests.swift now waits only for the app to run in the foreground, so a slow launch could give a spurious UNSUPPORTED_OPERATION. Please wait for agent-device-hardware-keyboard-input in the one-input test before keyboardReturn, and keep the foreground wait in the zero-input test. Or answer and resolve the thread. The two other threads, already resolved, are fixed at this commit: #4032 (comment) and #4032 (comment). Not blocking, and fine to take or leave: withIssueScope and the held-issue list are now general ("hold this block's XCTest issues") and keyboard return uses them too, but the names still say text-input probe (TextInputProbeIssues, textInputProbeIssues, containTextInputProbeIssue at RunnerTests.swift:283). Neutral names such as HeldIssueScope, heldIssueScope and holdIssueInScope would match the generic AGENT_DEVICE_RUNNER_RECORDED_ISSUE_HELD marker (https://github.com/callstack/agent-device/blob/da54017/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TextInputProbe.swift#L4). I did not run the simulator, the runner unit lane, or the live CLI routes. The live and unit-lane results come from your comment 6481712767. The index-shift cause of the old element.typeText failure is your diagnosis from the XCUI log; I only checked that the head types through app.typeText after the tap. I also did not confirm whether XCTest raises an interruption after the no-focus issue when the record override does not call super, though your 0 recorded failures and no second runner startup suggest it does not. |
|
overtaking this |
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
|
Validated
The focused
The suite reported 6 tests and 0 failures in 20.929 seconds. The outer Final diff relative to the merge base: 3 files; production +53/-25, tests +66/-0, docs 0. The only addition since |
|
The earlier findings from da54017 (#4032 (comment)) are fixed at 0e74498, and I found no new problems. The one-input test now waits for the text field before it sends keyboardReturn ( |
Summary
Keep the iOS runner session alive when
keyboard enterencounters no keyboard focus. Contain only XCTest's no-focus refusal; replay other held issues through the existing recorder so real failures keep their normal handling. With one text input, tap it and submit through the application; with no input, returnUNSUPPORTED_OPERATION.The one-input regression now waits for its named field before sending Return. The zero-input case keeps its foreground-only wait.
3 files. Relative to merge base
3537dc549a: production +53/-25, tests +66/-0, docs 0. No scope expansion. Reported by react-native-pager-view CI; original live CLI evidence.Validation
Tested head:
0e74498663b500107439d2bd69207ed43ff6898a.pnpm check:affected --run --head 0e74498663passed:exactCommit=true,checkoutChanged=false.xcodebuildexited 0. Includes one-input submission, zero-input refusal, and probe containment. Validation details.