Skip to content

feat: surface enabled, selected and focused attributes from ios ui dump - #369

Merged
gmegidish merged 1 commit into
mainfrom
feat/ios-state-attributes
Aug 31, 2026
Merged

feat: surface enabled, selected and focused attributes from ios ui dump#369
gmegidish merged 1 commit into
mainfrom
feat/ios-state-attributes

Conversation

@gmegidish

@gmegidish gmegidish commented Aug 31, 2026

Copy link
Copy Markdown
Member

Summary

  • Parse the new enabled, selected and hasFocus attributes emitted by devicekit-ios and map them onto ScreenElement (hasFocusfocused), matching the fields already populated on Android
  • Attributes are pointers and omitted when absent, so output is unchanged for older agents

Test plan

  • TestFilterSourceElementsPreservesStateAttributes covers the mapping
  • Verified end-to-end on a simulator with the Playground app (Basic UI): focused text field, disabled button and selected segment all reported

Requires devicekit-ios release with mobile-next/devicekit-ios#69 (agent version bump will follow separately).

Summary by CodeRabbit

  • New Features

    • Screen elements now preserve enabled, selected, and focused states when reported by the device.
    • Focus information is supported for iOS elements that provide focus status.
  • Documentation

    • Updated focus-state documentation to clarify platform support.
  • Tests

    • Added coverage for preserving element states and handling missing state attributes.

@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 1c009896-400c-4037-9559-1e84dd9eea26

📥 Commits

Reviewing files that changed from the base of the PR and between 3fd9124 and 4868932.

📒 Files selected for processing (3)
  • devices/devicekit/source.go
  • devices/devicekit/source_test.go
  • types/screen.go

Included review availability: 0 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 2 reviews per hour.


📝 Walkthrough

Walkthrough

The source-tree element model now captures optional enabled, selected, and focus states. The filtering path transfers these values to generated types.ScreenElement instances. Tests cover populated and absent state attributes. Documentation includes iOS focus reporting.

Changes

Source element state propagation

Layer / File(s) Summary
State attributes and propagation
devices/devicekit/source.go, devices/devicekit/source_test.go, types/screen.go
The source-tree model stores optional enabled, selected, and hasFocus values. Filtering maps them to Enabled, Selected, and Focused. Tests cover populated and absent values. The Focused documentation includes iOS support.

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

Merge Risk: ⚪ Minimal · up to 48689

This localized change adds optional iOS state attributes while preserving behavior when attributes are absent; no actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 3 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: exposing enabled, selected, and focused attributes from iOS UI dumps.
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.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/ios-state-attributes

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

@gmegidish
gmegidish merged commit c26f604 into main Aug 31, 2026
17 checks passed
@gmegidish
gmegidish deleted the feat/ios-state-attributes branch August 31, 2026 15:34
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