Skip to content

fix(emulator): quote Android text for the device shell - #35561

Merged
OrcaWin merged 1 commit into
mainfrom
audit/android-text-shell-quoting
Oct 29, 2026
Merged

OrcaWin merged 1 commit into
mainfrom
audit/android-text-shell-quoting

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​46 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​45
Prod 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​5 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​4

LoC: +51/-2

Quote typed Android text for the receiving shell using the existing POSIX quoting function. ADB joins shell arguments into command text, so ordinary text such as it's fine or hello&world can fail or become shell syntax despite using execFile locally. Keep space-to-%s encoding and raw emulator exec commands unchanged.

Validation: 32 configured tests/three suites, strict focused TypeScript and all five ordinary hook tasks pass. Exact base fails ten shell-boundary regressions and passes plain/space controls. Real Node26.8.1 execFile + POSIX shell, six baseline/seven final exact production modules, 26 groups per arm at N1/10: 110 incorrect text deliveries become zero; plain/space and compound raw-exec controls preserved. All 572 owned fixture Node/shell PIDs absent and profiles removed.

The owned adb executable fixture reproduces argv joining from pinned official AOSP ADB source 1cf2f017d312f73b3dc53bda85ef2610e35a80e9; its input function records arguments. No installed ADB/device/SDK, Android input service, Electron UI, macOS/Windows, CPU/RSS/latency proof. POSIX-shell regression tests skip Windows; production quoting targets Android's shell on every desktop OS. No new Unicode/newline behavior claimed.

Preserve #9950 and #19078 input tests/device controls on rebase; the latter's exact inspected head retains this raw text token. Initial backend wire expectation and native fixture syntax failures are retained with corrections. Aggregate queued after #35555; no pass or Claude takeover claimed. Frozen head b043aafa1e3949918ddc5cd460eda60c92b752ea, base 79dbada2c873bef3584a0c53b23ae98f2a84e536. Evidence /home/neil/.local/state/orca-electron-audit/android-text-shell-quoting/report.md; 59-payload seal 1d622dfa5afee68d0cd8424fa53ca41c22dc8c46ed86215cff4b51477261b3a3.

@greptile-apps

greptile-apps Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] This PR appears safe to merge; no actionable issues were found.

Summary

Quotes Android typed text for the receiving device shell.

  • Android emulator text entry keeps typed characters together for the device shell.

Reviews (4) · Last reviewed commit: "fix(emulator): quote Android text for th..." · Reviewed by Greptile

@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5564244b-1188-4ad6-81a8-ad6281e60510
Commits

Reviewing files that changed from the base of the PR and between b043aaf and 67a69f7.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
Walkthrough

androidTypeText now applies POSIX shell quoting after replacing spaces with %s. Tests check parsed command arguments for text containing spaces, quotes, shell metacharacters, backslashes, and an empty string.

Priority: Normal

Merge Risk: Minimal · previous review b043a

Android text is quoted for the device shell while space encoding remains unchanged. No merge-blocking risk is identified.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title "fix(emulator): quote Android text for the device shell" matches the main change in the summary: androidTypeText now applies POSIX shell quoting to typed text before it reaches the device …
Description check Passed The description covers most of the template. It has a clear 'What Changed'-style explanation of the quoting fix, the mechanism (ADB joins shell arguments, so text needs POSIX quoting), and the scope b…
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "fix(emulator): quote Android text for the device shell" matches the main change in the summary: androidTypeText now applies POSIX shell quoting to typed text before it reaches the device shell through adb shell input text. The title is short, specific, and names the affected area (emulator). It does not cover the new non-Windows test suite or the backend test expectation change, which is acceptable for a title.

Full details: Description check

Explanation

The description covers most of the template. It has a clear 'What Changed'-style explanation of the quoting fix, the mechanism (ADB joins shell arguments, so text needs POSIX quoting), and the scope boundary (space-to-%s encoding and raw emulator exec unchanged). It includes testing details and validation evidence, and it names the tests and platform limits. Gaps: the ELI5 section, the 'Why' section comparing alternatives, the Linked Issue section ('Fixes #' is left blank; the outside-contributor rule requires a real linked issue), the Visual Proof section (not marked N/A, though this is a non-UI change and the author did not explain it), the manual-testing checkbox (not ticked, though validation is described), and the AI Disclosure section (left unfilled). The Review and Agent skill boundary sections are also unaddressed. The description is long and mixes dense validation notes with the core explanation, which makes it hard to scan.

Resolution

Mostly complete. For a cleaner review, consider the following: add a short plain-language ELI5 section; state why POSIX quoting was chosen over the alternatives; fill in the 'Fixes #' line with a real linked issue, or explain why none exists; mark Visual Proof as N/A with a reason, since this change has no UI impact; tick the manual-testing checkbox if it was done or explain the gap; and fill in or remove the AI Disclosure section as the template instructs. The validation notes also refer to local paths and commit hashes that reviewers cannot follow. Replace them with reviewer steps.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 3 files.

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@OrcaWin
OrcaWin force-pushed the audit/android-text-shell-quoting branch 2 times, most recently from b21fce4 to 61a7ee7 Compare October 29, 2026 21:18
@OrcaWin
OrcaWin force-pushed the audit/android-text-shell-quoting branch from 61a7ee7 to 67a69f7 Compare October 29, 2026 21:43
@OrcaWin
OrcaWin merged commit 6c8baa3 into main Oct 29, 2026
41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant