Skip to content

Conversation

@Kyle-Ye
Copy link
Collaborator

@Kyle-Ye Kyle-Ye commented Feb 11, 2026

No description provided.

@augmentcode
Copy link

augmentcode bot commented Feb 11, 2026

🤖 Augment PR Summary

Summary: Updates the platform display-list implementations for AppKit and UIKit to align with SwiftUI 6.5.4 behavior, especially around hit-testing and drawing.

Changes:

  • Refactors and completes `NSViewPlatformViewDefinition` / `UIViewPlatformViewDefinition` view+layer construction paths.
  • Adds accelerated drawing support by selecting `RBDrawingView` when `ORBDevice` is supported, with `CGDrawingView` fallback.
  • Implements AppKit hit-test customization knobs (ignore events, accepts-first-mouse/window activation, hit-tests-as-opaque) and shape hit testing.
  • Introduces new wiring points via environment/layout keys (`allowsWindowActivationEvents`, `TopAlignedFormValueKey`).
  • Updates projection transforms to use `CATransform3D(...)` consistently and exposes RB layers for integration.
  • Adjusts hit-testing behavior via `minOpacityForHitTest` and consolidates `GestureContainerFeature` into `UnifiedHitTestingFeature`.

Technical Notes: Several paths now branch on UnifiedHitTestingFeature and ResponderBasedHitTesting to choose between legacy and unified event routing.

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

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

Review completed. 5 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.


override func _nextResponder(for event: NSEvent?) -> NSResponder? {
nextResponder
}
Copy link

Choose a reason for hiding this comment

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

NSView.hitTest(_:) receives point in the receiver’s local coordinates, so checking frame.contains(point) (superview coordinates) can mis-evaluate hit-testing when the view’s frame origin isn’t (0,0).

Severity: high

Other Locations
  • Sources/OpenSwiftUI/Render/DisplayList/AppKitDisplayList.swift:232

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

}
guard hitTestsAsOpaque, frame.contains(point) else {
return nil
}
Copy link

Choose a reason for hiding this comment

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

In _NSInheritedView.hitTest, converting point “from: superview” and then passing that into each subview.hitTest looks inconsistent with AppKit’s coordinate expectations and can cause subviews to never be hittable.

Severity: high

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.


@objc
private class _NSPlatformLayerView: _NSGraphicsView {
override init(frame frameRect: NSRect) {
Copy link

Choose a reason for hiding this comment

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

_NSShapeHitTestingView.hitTest converts point from superview, but hitTest(_:)’s point is already in the view’s local coordinates; this can shift the point and make path.contains fail unexpectedly.

Severity: high

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

@codecov
Copy link

codecov bot commented Feb 11, 2026

Codecov Report

❌ Patch coverage is 10.42945% with 146 lines in your changes missing coverage. Please review.
✅ Project coverage is 26.30%. Comparing base (4190f6c) to head (140f000).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...SwiftUI/Render/DisplayList/AppKitDisplayList.swift 14.70% 87 Missing ⚠️
.../Render/DisplayList/AppKitHitTestCustomizing.swift 0.00% 45 Missing ⚠️
...es/OpenSwiftUI/View/Toggle/SwitchToggleStyle.swift 0.00% 8 Missing ⚠️
...urces/OpenSwiftUICore/Semantic/CustomFeature.swift 33.33% 4 Missing ⚠️
...ponder/AllowsWindowActivationEventsResponder.swift 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #787      +/-   ##
==========================================
- Coverage   26.38%   26.30%   -0.08%     
==========================================
  Files         651      653       +2     
  Lines       40801    40924     +123     
==========================================
  Hits        10767    10767              
- Misses      30034    30157     +123     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Kyle-Ye Kyle-Ye merged commit 9c71bdb into main Feb 11, 2026
8 checks passed
@Kyle-Ye Kyle-Ye deleted the k-branch-1 branch February 11, 2026 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant