Skip to content

fix(mobile): iOS shell keeps WebKit text interaction on so page fields take text - #24270

Merged
Jinwoo-H merged 2 commits into
mainfrom
ios-shell-text-interaction
Oct 1, 2026
Merged

Jinwoo-H merged 2 commits into
mainfrom
ios-shell-text-interaction

Conversation

@Jinwoo-H

@Jinwoo-H Jinwoo-H commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

What

On the iOS OTA TestFlight build (0.0.52 build 2) the software keyboard comes up over the Claude Chat composer and typing puts nothing in it. Leaving the app and coming back makes it work.

Cause. The iOS shell's WebView sets isTextInteractionEnabled = false, added in #21589 so a long press would reach the page instead of raising WebKit's selection loupe. With it off, WebKit delivers keydown to a focused page textarea but never starts a text-input session: no beforeinput, no input, no caret, the value stays empty. Bisected on an iPhone 17 Pro simulator (iOS 26.5, release OTA build, two runs per arm): turning text interaction on fixes typing on the first open; the #23110 accessory-bar and keyboard-observer changes toggled off change nothing. The setting must be on before the focusing tap, so there is no page-side mitigation for shells already shipped. The native app's terminal WebView never set this flag, which is why the native build types.

Fix. The line goes. What kept WebKit's selection off the page's long presses is now the page's own rule, user-select: none on the body with inputs, textareas and the editor selectable, which ships over the air in #24277 (native parity: React Native Text is unselectable unless selectable). Measured on the fixed build: typing and sending from the composer on first open, and a 600 ms hold on a worktree row still opens the page's action sheet with no Copy / Look Up / Translate callout.

Merge order: after #24277 lands. Merged alone this brings back #21589's dead long presses on iOS.

Needs a new iOS shell release. Until it ships, typing into page fields stays broken on the iOS OTA build; the background-and-return workaround reproduces on the simulator.

Tests

  • No unit test: the module's Swift check target compiles without WebKit, and a source grep for the removed line would be decoration. The simulator proof is the evidence.
  • Simulator: fixed release OTA build, Claude Chat on first open, typed "Reply with the single word pineapple" and sent; it shows in the transcript with the reply. Hold-mode dictation in the terminal view runs to release with no selection or callout.

…s take text

With isTextInteractionEnabled = false (#21589), a focused page textarea gets
keydown but WebKit never inserts text: no beforeinput, no input, no caret.
On the iOS OTA build the Claude Chat composer showed the keyboard and took no
characters. Measured on an iPhone 17 Pro simulator, Release OTA build: text
interaction on alone fixes it; the #23110 accessory and keyboard-observer
changes are not involved. The page's user-select rule (previous commit) keeps
WebKit's selection off its long presses.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
…ion line

A negative grep passes on any other spelling or a deleted file, and the Swift
checks compile without WebKit, so neither can pin a WKWebView setting.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
@greptile-apps

greptile-apps Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 4/5

[Medium risk] Changes WebKit text interaction behavior in the iOS shell.

Do not merge or release the shell change before the page selection rule lands, or iOS page long presses can regress.

Findings

  1. P1 Long presses can regress ▶

Summary

Removes the iOS web shell’s explicit disabling of WebKit text interaction so focused page fields can accept typed text. The change relies on a separate, not-yet-included page selection rule to preserve long-press actions.

Reviews (1) · Last reviewed commit: "test(mobile): drop the source-text check..."

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

The code change is correct, but the page rule this PR depends on is not yet on main, and the PR body describes it as unprefixed user-select: none. Unprefixed user-select has no stable Safari release, and this module's floor is iOS 15.1 — so please confirm the sibling page rule carries -webkit-user-select: none before merging.

Reviewed changes

  • Drops the isTextInteractionEnabled = false setting in MobileWebShellView.swift, restoring WebKit's default. With the flag off, a focused page field received keydown but WebKit never started a text-input session, so the iOS Claude Chat composer took no characters until background/resume.
  • Updates the adjacent comment to say the page's user-select: none is what keeps WebKit's selection assistant off long presses.
  • Removes the source-grep test added in the first commit; a readFileSync negative match cannot pin a WKWebView setting, so dropping it is right.

⚠️ The replacement mitigation must use the -webkit- prefix to cover the iOS floor

This PR removes the only in-shell guard against WebKit's selection assistant and hands that job to the page's user-select rule, which is not yet on main and which the PR body describes as unprefixed user-select: none. Unprefixed user-select has no stable Safari/WebKit release in MDN browser-compat-data (safari is listed as preview; safari_ios only -webkit- since 3), while this module's floor is iOS 15.1. If the page rule ships only the unprefixed form, WebKit ignores it across the supported iOS range and the long-press actions #21589 fixed go dead again — the iOS 26.5 simulator evidence would not surface that gap. The repo's own convention is misleading here: src/renderer/src/assets/main.css uses bare user-select, which is fine for Electron/Chromium but not for the WKWebView page.

Technical details
# The page's long-press mitigation needs `-webkit-user-select` on iOS

## Affected sites
- `mobile/modules/orca-mobile-web-shell/ios/MobileWebShellView.swift:204` — the new comment asserts the page's `user-select: none` covers this; it should hold regardless of which iOS build renders the page.
- The page rule itself (from `mobile-page-hold-dictation`, not on `main` at review time) — wherever the body rule lands, it must pair the prefixed property.
- `src/renderer/src/assets/main.css` — bare `user-select: none` is the existing convention and would be copied into the page rule; it is ignored by older WebKit.

## Required outcome
- The page-level rule must include `-webkit-user-select: none` alongside `user-select: none`, with inputs, textareas, and the editor re-enabled via `-webkit-user-select: text` (not only the unprefixed form).
- Verify on an iOS 15/16 runtime, not solely the newest simulator, since that is the documented floor (`mobile/modules/orca-mobile-web-shell/ios/OrcaMobileWebShell.podspec:10`).

## Open question for the human
- Does the `mobile-page-hold-dictation` rule already carry the `-webkit-` prefix? The branch is not on the remote yet, so this review could not confirm it. The author-stated merge order (this PR after the page rule) is otherwise correct.

Pullfrog  | Fix it ➔ | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@coderabbitai

coderabbitai Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

📝 Walkthrough

Walkthrough

The view no longer disables WebKit text interaction. Updated comments state that page CSS user-select: none handles selection during long presses.

Priority: ⬆️ High

Merge Risk: 🔵 Low · up to 5c4e1

Typing is enabled, but long presses on ordinary file-explorer text can still show WebKit’s selection UI. This is a bounded interaction regression; add the page-level selection rule while preserving editable fields before shipping, or explicitly accept it as a follow-up.

Security Architecture Review

Security architecture risk: 🔵 Low · up to 5c4e1

The change restores normal text entry without changing the inspected session or navigation protections. Selection behavior now depends on the page version, however, and compatibility with the separately released page changes has not been established.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The direct behavioral exposure is text interaction within documents displayed by newly configured iOS shell WebViews, including content outside .xterm. The inspected change does not grant additional bridge authority; possible operating-system selection actions remain unverified.

Trust Boundaries and Controls

  • inferred — Enabling input and selection does not establish a bypass from page-controlled text to privileged native messages or navigation. Those outcomes remain gated independently. Selection CSS governs interaction behavior and is not demonstrated to be a security fence.

Resilience and Maintainability Implications

  • observed — The existing lifecycle removes prior bridge targets during replacement and failure, and refuses loading when isolation setup fails. Text-interaction enablement does not alter these cleanup and failure-containment paths.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the failure, cause, fix, dependency, release impact, and simulator testing. However, it omits required template sections, including ELI5, Why, Linked Issue, Visual Proof or an… Add the missing required sections. Include an actual linked issue, provide before-and-after visual proof or write N/A with a reason, complete the testing and checklist items, address cross-platform and compatibility considerations, and comp…
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
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.
Title check ✅ Passed The title clearly identifies the main change: keeping WebKit text interaction enabled in the iOS shell so page fields accept text.
Full details: Description check

Explanation

The description explains the failure, cause, fix, dependency, release impact, and simulator testing. However, it omits required template sections, including ELI5, Why, Linked Issue, Visual Proof or an explicit N/A rationale, AI Disclosure, Review, Agent skill upstream boundary, Notes, and the Checklist.

Resolution

Add the missing required sections. Include an actual linked issue, provide before-and-after visual proof or write N/A with a reason, complete the testing and checklist items, address cross-platform and compatibility considerations, and complete the AI Disclosure, Review, and Agent skill upstream boundary sections as applicable.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: c9d4baaf-b877-4457-8081-0df2117dcd8d

📥 Commits

Reviewing files that changed from the base of the PR and between 78daf71 and 5c4e1da.

📒 Files selected for processing (1)
  • mobile/modules/orca-mobile-web-shell/ios/MobileWebShellView.swift

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

@Jinwoo-H
Jinwoo-H merged commit 069eaf5 into main Oct 1, 2026
26 checks passed
@Jinwoo-H
Jinwoo-H deleted the ios-shell-text-interaction branch October 1, 2026 05:19
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