Repository navigation
feat(keyboard): report the return key in keyboard status - #4602
Conversation
Size Report
Startup median (7 runs, lower is better):
|
There was a problem hiding this comment.
All reported issues were addressed across 40 files
You’re at about 96% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
Apex Sentinel · ✅ ApproveSince the last review: 1 new · 0 still open · 0 no longer raised 1 finding(s): 1 minor. 🟡 Minor (1)
2 findings below 💬 Talking to SentinelIn a finding's thread, reply with:
On this conversation, comment Earlier reviewsReview of
|
| Where | Finding |
|---|---|
apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Keyboard.swift:207 |
iOS return-key label can only ever be one of nine English probe labels |
2 findings below minor hidden (user_settings.min_severity).
Reviewed with this repository's own Sentinel configuration (cb335952017e).
Review of 3a4d56c3 · 16.11.2026 16:56 UTC
Apex Sentinel · ✅ Approve
2 finding(s): 2 minor.
🟡 Minor (2)
| Where | Finding |
|---|---|
apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Keyboard.swift:207 |
iOS return-key read can only name the nine probe labels |
apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/UnitTests/RunnerTests+ModelsTests.swift:272 |
Merge-base exemption now skips witness assertion for volumeUp/volumeDown |
Reviewed with this repository's own Sentinel configuration (b3c1a3c8abd9).
There was a problem hiding this comment.
Apex Sentinel: 2 new findings on 3a4d56c. The verdict and the full list are in the summary comment.
|
The keyboard help text describes The help string at https://github.com/callstack/agent-device/blob/3a4d56c/packages/command-surface/src/system/index.ts#L322 says Not blocking, take or leave: the iOS status read classifies the element's localized label instead of the matched probe label or identifier, so a Polish "szukaj" key answers The open inline threads still apply. The review threads on visionOS eligibility (#4602 (comment)), comma truncation of the action label (#4602 (comment)) and the ModelsTests early return (#4602 (comment)) hold, as do the threads on the The live device runs are reported in the PR body. The checks show 16 of 17 passing, and the one pending is a review bot that does not exercise this code. There are no conflicts. Before merge, please fix the |
5981d97 to
fd62e5f
Compare
|
Review round addressed at Contracts and platform mapping
iOS status read no longer needs English Android Help, docs and tests Also: the Swift trailing-comma guard CI flagged is fixed — that syntax needs Swift 6.1+ — verified across |
|
Thanks for the update. I reviewed fd62e5f against the earlier findings (#4602 (comment)). Those are fixed, but the new iOS return-key fallback adds one problem. CI is green: 22 checks, 0 not passing at fd62e5f. There are no conflicts. When no observed key's wording maps to a known return kind, The review threads on the Not blocking, take or leave: the head commit message still says the iOS read "reads the same return control keyboard enter presses" and that Before merge, the number-pad case needs the fix, a fixture and a live run. |
fd62e5f to
4f1bcd0
Compare
|
Fixed at The rule. The anchor is a control whose wording is whitespace and nothing else, which is how the tree carries the space bar ( Dictation and globe. Neither can win the slot on the layout I measured (iOS 26.2, iPhone 17, Polish QWERTY + emoji). Dictation is exposed as a Fixtures ( Live, this head's runner, iOS Simulator 26.2. Contacts → Add → Insert add phone (phone pad focused): $ agent-device keyboard status
Keyboard visible: yes
Return key: unknown
$ agent-device keyboard status --json
{ "platform": "ios", "action": "status", "visible": true, "returnKey": "unknown" }No Also done: the commit message no longer says the read "reads the same return control |
|
The earlier findings from fd62e5f are fixed at 4f1bcd0, and one new problem remains in the iOS slot fallback. In RunnerKeyboardStatus.swift:117, the slot rule takes the nearest worded control right of the space bar. On the iPad full keyboard, the return key ends the third row. The bottom row right of the space bar holds the numbers key and then the hide-keyboard key. If no key maps through kind(of:), for example on a localized keyboard or with an unmapped return type, the rule picks the numbers key. Status then reports returnKey unknown with returnKeyLabel set to that key's wording. This contradicts the new text in commands.md that a label appears only for a key the platform identified as the return key. The rule holds on iPhone only. The slot candidate should be the space bar's immediate right neighbour and also the trailing worded control of its row, and otherwise there should be no candidate. Please add an iPad bottom-row fixture (numbers key and hide key right of the space bar, localized return key in row 3) that expects unknown and a nil label. Please also add one live keyboard status run on an iPad simulator with a non-English keyboard on a search field. It should show no "Return key label" line, or the real return key's wording. Could one positional rule replace the nearest-right rule and the English nonReturnKeyLabels denylist at RunnerKeyboardStatus.swift:121 and :135-138? The candidate would be the space bar's right neighbour that is also its row's trailing key. That excludes pads, the iPad numbers and hide keys, and a globe or dictation key on the right, so the denylist and its fixture could be deleted. Of the earlier inline threads, all ten are fixed at this head and can be resolved: #4602 (comment), #4602 (comment), #4602 (comment), #4602 (comment), #4602 (comment), #4602 (comment), #4602 (comment), #4602 (comment), #4602 (comment), #4602 (comment). The phone-pad live run covers the number-pad case. The iPad layout claim comes from how iPadOS lays out its keyboard, not a device run, so the fixture and live run will confirm or refute it. There are no conflicts. CI is green, with 22 checks and none failing at 4f1bcd0. Before merge, the iOS slot fallback must stop an iPad layout from supplying returnKeyLabel, with the iPad fixture and the live iPad run above. |
`keyboard status` now answers what the visible keyboard's return key offers, on both platforms. Android parses the focused editor's `imeOptions` action out of the `dumpsys input_method` output the visibility read already fetched, so no extra adb call is made; `IME_FLAG_NO_ENTER_ACTION` outranks the action bits, and an app's `actionLabel` is reported beside its action kind. iOS gains a read-only runner status command that reads the keyboard's own key elements, so a localized return key keeps its wording instead of needing English to be named; `keyboard enter`'s probe list and order are unchanged. Both readings project into one vocabulary (`KEYBOARD_RETURN_KEYS` in the contracts package): `none` is only Android's to establish, `unknown` means this read could not name the key rather than that the keyboard has one, and a hidden keyboard reports neither field. A label is reported only for a control the read identified as the return key — the one whose wording names an action, or the space bar's right neighbour where that neighbour also ends its row — so a number, decimal or phone pad, and an iPad keyboard whose bottom row holds numbers and hide keys, answers `unknown` with no label. Snapshot output and its device calls are unchanged. - Apple: `keyboardStatus` runner command (read-only, app-windows surface), `RunnerKeyboardStatus` - Android: `parseAndroidReturnKey` in `device-input-state.ts` - Daemon: projects `returnKey`/`returnKeyLabel`; a visibility-only owner publishes `unknown` - Output: `Return key:` and `Return key label:` lines, plus the JSON fields
4f1bcd0 to
af129d6
Compare
|
Fixed at The rule. The slot candidate must be the space bar's immediate right neighbour in the space bar's row AND that row's trailing worded control. Otherwise there is no candidate: Why both halves are needed. The pad case needs the anchor: a number, decimal or phone pad has no space bar, so its bottom-trailing Fixtures ( Live iPad run. pr4157-iPad-A16, iPadOS 26.2, runner built from this head. $ agent-device keyboard status
Keyboard visible: yes
Return key: unknown
$ agent-device keyboard status --json
{ "platform": "ios", "action": "status", "visible": true, "returnKey": "unknown" }No Keyboard visible: yes
Return key: search
Return key label: searchSo the empty label is the iPad rule at work, not a keyboard the read cannot see. Results. Native runner unit tests, |
There was a problem hiding this comment.
Apex Sentinel: 1 new finding on af129d6. The verdict and the full list are in the summary comment.
|
This PR is ready at af129d6. The delta fixes the iPad slot finding from my earlier review (#4602 (comment)). It adds a regression fixture that fails on 4f1bcd0, and the live iPad run is now posted. CI is green: 22 checks, none failing at af129d6. There are no conflicts, so nothing else must happen before merge. Not blocking: the doc comment at https://github.com/callstack/agent-device/blob/af129d6/packages/contracts/src/keyboard.ts#L10 breaks mid-sentence ("Android answers it when the" ends a short line), so reflowing the paragraph would help; take it or leave it. The open inline thread on prediction-bar cells (#4602 (comment)) does not apply. The real capture in packages/capture-kit/src/snapshot-chrome.fixtures.ts:61-65 puts those cells outside the Keyboard element, and the status code only queries that element. Please resolve it. Not measured yet: an iPhone landscape or floating/split iPad keyboard. If such a layout shows a worded, non-empty-frame control right of the return key in the space bar's row, a localized return label would be dropped and the status would report unknown with no label. That outcome is conservative and matches the docs. Prediction-bar placement is verified from one iOS 27 iPhone capture only. |
Summary
keyboard statusnow answers what the visible keyboard's return key offers, on both platforms.Android parses the focused editor's
imeOptionsout of thedumpsys input_methodoutput the visibility read already fetched, so no extra adb call;IME_FLAG_NO_ENTER_ACTIONoutranks the action bits, with the app'sactionLabelbeside it. iOS gains a read-onlykeyboardStatusrunner command that reads the keyboard's own key elements, so a localized return key keeps its wording;keyboard enter's probe order is unchanged. A label is reported only for a key the read identified as the return key: the one whose wording names an action, or the space bar's right neighbour where that neighbour also ends its row — so a number or phone pad, and an iPad keyboard whose bottom row holds numbers and hide keys, answerunknownwith no label. Both project intoKEYBOARD_RETURN_KEYS; only Android establishesnone.Validation
At
af129d6386.pnpm check:affected --runpassed every runnable check (exactCommit=true);typecheck,format,lint,buildgreen. Swift runner unit tests,AGENT_DEVICE_XCUITEST_INCLUDE_UNIT_TESTS=1: 19 cases, 0 failures.Device evidence (iOS/iPadOS 26.2, this head's runner; Android 17):
Deletebottom-trailing):unknown, no label line.unknown, no label; English keyboard:search.unknown/szukaj; Englishsearch/search.search; tester email →done.