Skip to content

feat(render): complete renderer leaf view outputs - #1065

Merged
Kyle-Ye merged 1 commit into
mainfrom
feature/leaf_view
Sep 9, 2026
Merged

Kyle-Ye merged 1 commit into
mainfrom
feature/leaf_view

Conversation

@Kyle-Ye

@Kyle-Ye Kyle-Ye commented Sep 9, 2026

Copy link
Copy Markdown
Member

Summary

  • Register leaf display identities and apply input display-list options.
  • Publish requested view responders with animated geometry and the input transform.
  • Implement default leaf hit testing against the view bounds.

@github-actions github-actions Bot added area: event-gesture Events, gestures, tracing, or interaction plumbing. area: rendering DisplayList, render backends, renderer hosts, drawing, and effects. type: feature New API, behavior, platform support, or user-facing capability. labels Sep 9, 2026
@augmentcode

augmentcode Bot commented Sep 9, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: Completes output generation for renderer-backed leaf views.

Changes:

  • Creates and registers display-list identities for leaf display-list items.
  • Propagates incoming display-list options into leaf display-list canonicalization.
  • Publishes leaf view responders using animated size/position and the inherited transform.
  • Provides rectangular bounds hit testing as the default leaf responder behavior.

Technical Notes: Display and event preferences remain conditional on the outputs requested by the view graph.

🤖 Was this summary useful? React with 👍 or 👎

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review completed. 1 suggestion posted.

Fix All in Augment

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

if inputs.preferences.requiresViewResponders {
outputs.preferences.viewResponders = Attribute(
LeafResponderFilter(
data: view.value,

@augmentcode augmentcode Bot Sep 9, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[Sources/OpenSwiftUICore/Render/RendererLeafView.swift:54] Publishing this responder makes gesture hit testing of ColorView call its concrete contains(points:size:), which still invokes _openSwiftUIUnimplementedFailure() instead of inheriting the new rectangular default. A Color with a gesture will therefore terminate during hit testing.

Severity: high

Fix This in Augment

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

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Deep Code Review Agent🐛

Review completed with 0 suggestions.

Reviewed commit: d7417dd

@tuist

tuist Bot commented Sep 9, 2026 •

Copy link
Copy Markdown

🛠️ Tuist Run Report 🛠️

Tests 🧪

Scheme Status Cache hit rate Tests Skipped Ran Commit
OpenSwiftUI ✅ 0 % 1187 0 1187 c6822c324

Builds 🔨

Scheme Status Duration Commit
OpenSwiftUI ✅ 1m 18s c6822c324

@codecov

codecov Bot commented Sep 9, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 37.50000% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 27.39%. Comparing base (0f56cdf) to head (d7417dd).

Files with missing lines Patch % Lines
...rces/OpenSwiftUICore/Render/RendererLeafView.swift 37.50% 10 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1065      +/-   ##
==========================================
- Coverage   29.91%   27.39%   -2.52%     
==========================================
  Files         787      739      -48     
  Lines       62250    54521    -7729     
==========================================
- Hits        18621    14938    -3683     
+ Misses      43629    39583    -4046     

☔ View full report in Codecov by Harness.
📢 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.

@augmentcode

augmentcode Bot commented Sep 9, 2026

Copy link
Copy Markdown

PR Risk Analyzer Agent 🛡️

👀 Human review needed

Justification

This change completes the renderer leaf-view outputs and is small and mostly self-contained, but it introduces an unaddressed high-severity behavioral regression, so it is not eligible for automatic low-risk approval.

Verified crash regression (Color + gesture)

  • makeLeafView now publishes view responders whenever inputs.preferences.requiresViewResponders. Previously this path was unimplemented (// TODO / // FIXME), so leaf views never registered responders.
  • ColorView conforms to RendererLeafView and overrides contains(points:size:) with _openSwiftUIUnimplementedFailure(). The new rectangular default added to the RendererLeafView extension does not apply to ColorView, because its concrete override shadows the default implementation.
  • Gesture hit testing routes through LeafViewResponder.containsGlobalPoints(...) → data.contains(points:size:). With responders now published, a Color that has an attached gesture will trap during hit testing — a crash that did not occur before this PR.

This independently confirms the Deep Code Review high-severity inline finding at Sources/OpenSwiftUICore/Render/RendererLeafView.swift:54, which remains unaddressed on the current head.

Suggested resolution before merge

  • Implement ColorView.contains(points:size:) (for example by delegating to the new rectangular default), or
  • Guard responder publication so leaf views without a real hit-test implementation do not route through the unimplemented concrete contains.

Note: other RendererLeafView-related responders (e.g. ShapeStyledResponderData.contains) also still call _openSwiftUIUnimplementedFailure(); a human should confirm whether any of those are reachable via the newly published responder path.

Reviewed commit d7417dd

@Kyle-Ye
Kyle-Ye merged commit 5fe50c7 into main Sep 9, 2026
5 of 7 checks passed
@Kyle-Ye
Kyle-Ye deleted the feature/leaf_view branch September 9, 2026 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: event-gesture Events, gestures, tracing, or interaction plumbing. area: rendering DisplayList, render backends, renderer hosts, drawing, and effects. type: feature New API, behavior, platform support, or user-facing capability.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant