fix(mobile): editing a queued message while a question is open no longer throws#25498

merged1
main
fix/mobile-queued-edit-focus
opened2d agobyJJulius Marminge
View on GitHubTwo-way sync enabledPR last imported 2d ago

On iOS, starting an edit on a queued message while the composer is hidden (for example while the agent waits on a user-input question) logged Uncaught (in promise): Unable to find the 'T3ComposerEditorView' view with tag …. The edit-start path focuses the composer editor, but the hidden composer slot has no mounted native view, and the editor wrapper voided the native command's promise, so the rejection went unhandled.

The fix is in the native composer editor wrappers (T3ComposerEditor.ios.tsx and T3ComposerEditor.native.tsx): focus, blur, and setSelection now catch the native command's rejection instead of voiding the promise. The edit still starts. While the composer is hidden, focus does nothing. That matches the other view commands, which can also reach a view that was unmounted in the meantime.

Found during the simulator re-check of #25467. Not verified on a simulator. The change is a guard on a native call, so it has no new test. vp run check:changed passes.

Opus 5.5 via Claude Code.

🤖 Generated with Claude Code

Checks

23 successful · 12 skipped
All checks passed
f06055f

Added 1 commit

  • fix(mobile): editing a queued message while a question is open no longer throwsf06055f
Synced from GitHub

Approvability

Verdict: Approved at f06055f

Macroscope's review found this PR approvable — This narrowly scoped mobile fix prevents hidden Fabric composer commands from producing unhandled view lookup errors while preserving successful focus, blur, and selection behavior. It does not alter product defaults, schemas, security-sensitive code, or static-analysis configuration.

You can add or adjust custom eligibility rules. Learn more.

Synced from GitHub

Review in Change Stack →

No actionable comments were generated in the recent review.

External image Recent review info
External image Run configuration
External image Commits

Reviewing files that changed from the base of the PR and between 7d3208cbea86b91574366bb6e87d05f93c975127 and f06055ff1bc454df0a999e0e1f2bf2dbdd3fbd0b.

External image Files selected for processing: 2
  • apps/mobile/src/native/T3ComposerEditor.ios.tsx
  • apps/mobile/src/native/T3ComposerEditor.native.tsx

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

Walkthrough

Both native composer implementations now handle rejected promises from focus, blur, and setSelection commands. The changes include commands issued when the native view is unavailable.

Changes: Native composer command rejection handling

Layer / File(s)Summary
Handle native view command rejections
apps/mobile/src/native/T3ComposerEditor.ios.tsx, apps/mobile/src/native/T3ComposerEditor.native.tsx
Both implementations add settleViewCommand and use it for the focus, blur, and setSelection command promises.

Priority: External image Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: maria-rcks

Merge Risk: External image Minimal · up to f0605

The change prevents unhandled rejections when the composer view is unavailable, with no merge-blocking issue identified.

Pre-merge checks: Passed 4
Check nameStatusExplanation
Title checkPassedThe title clearly identifies the mobile editing failure and the fix. It is concise and follows the repository’s conventional commit style.
Description checkPassedThe description covers the problem, affected behavior, implementation, verification command, and known verification limits. It also explains why no new test was added. It does not provide an explicit …
Linked Issues checkPassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes checkPassedCheck skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description covers the problem, affected behavior, implementation, verification command, and known verification limits. It also explains why no new test was added. It does not provide an explicit approval link, but it identifies this as a small, focused guard for an obvious bug, so the description is mostly complete.

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

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