Skip to content

fix(computer): retain wrappers during Linux focus search - #36388

Merged
AmoabaKelvin merged 1 commit into
mainfrom
linux-focus-traversal
Oct 30, 2026
Merged

AmoabaKelvin merged 1 commit into
mainfrom
linux-focus-traversal

Conversation

@AmoabaKelvin

@AmoabaKelvin AmoabaKelvin commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 0 0 0 0
Prod 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​17 $\color{#cf222e}{\Huge{\mathbf{−}}}$​2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​15

ELI5

Linux computer use now finds focused controls that were sometimes skipped.

What Changed

Keep visited accessibility wrappers alive until the search ends. Remembering only their Python IDs let new wrappers reuse an old ID and caused real subtrees to be skipped.

Why

Focused-text insertion and selection summaries depend on this search. A fresh-wrapper chain stopped at depth 3 before this fix; it now reaches the focused node at depth 30 while preserving the existing traversal limits.

Linked Issue

Visual Proof

N/A. Native accessibility discovery repair with no UI changes.

Testing

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below

The new regression fails on the previous code. All 26 renderer tests pass, and ORCA_BACKGROUND_LAUNCH=1 pnpm check:changed --maxWorkers=2 passed both applicable checks. Native Linux Unicode trials also reached the previously missed field and typed the full marker in three repeated trials.

AI Disclosure

Review

Independent read-only review found no issues in the traversal repair.

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Linux adapter only. No client/host protocol, workspace-path, mobile, macOS, or Windows changes.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

@coderabbitai

coderabbitai Bot commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
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: 376ef995-2a15-44c3-810c-991c4af337d0
Commits

Reviewing files that changed from the base of the PR and between 1cefa15 and 7033e7d.

Files selected for processing: 2
  • native/computer-use-linux/runtime.py
  • native/computer-use-linux/runtime_render_test.py

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

Walkthrough

first_descendant now stores visited nodes in a dictionary keyed by object identity. A regression test checks that it finds a node 30 levels deep when each child is returned as a newly created transient wrapper.

Priority: Normal

Merge Risk: Minimal · up to 7033e

The reviewed change preserves bounded traversal while preventing wrapper identity reuse from skipping descendants.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the primary change: retaining wrappers during Linux focus search.
Description check Passed The description is mostly complete. It explains the user impact, mechanism, rationale, scope, visual-proof status, regression test, and validation results. The Linked Issue section is empty, manual te…
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: Description check

Explanation

The description is mostly complete. It explains the user impact, mechanism, rationale, scope, visual-proof status, regression test, and validation results. The Linked Issue section is empty, manual testing is unchecked, and the full lint/typecheck/test/build checklist is not marked as passing.

Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. 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 1 functions across 2 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches: 💡 1
📝 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.

@AmoabaKelvin
AmoabaKelvin merged commit ac3b59a into main Oct 30, 2026
60 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