Skip to content

Conversation

@Kyle-Ye
Copy link
Collaborator

@Kyle-Ye Kyle-Ye commented Dec 14, 2025

No description provided.

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. 4 suggestions posted. Main themes are protobuf decoding robustness and ensuring the new SPI PlatformDrawable surface is constructible/usable by external adopters.

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

Comment on lines +171 to +173
case 2: options.rbColorMode = Int32(try decoder.intField(field))
case 3: options.flags = Flags(rawValue: UInt32(try decoder.intField(field)))
case 4: options.maxDrawableCount = Int8(try decoder.intField(field))
Copy link

Choose a reason for hiding this comment

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

The Int32/UInt32/Int8(...) conversions in protobuf decoding will trap on out-of-range (or negative) values, so malformed/forward-version data could crash decoding. Consider validating/clamping before converting so decode failures are handled as errors instead of traps.

🤖 Was this useful? React with 👍 or 👎


package var _renderer: DisplayList.GraphicsRenderer?

package init() {
Copy link

Choose a reason for hiding this comment

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

PlatformDrawableContent.State is public but its initializers are package, and PlatformDrawableContent.draw(...) requires an inout State; SPI clients outside this package may have no way to create/retain a State. If draw is intended for external PlatformDrawable implementers, it likely needs a constructible state type.

🤖 Was this useful? React with 👍 or 👎


@_spi(DisplayList_ViewSystem)
@available(OpenSwiftUI_v6_0, *)
public struct PlatformDrawableOptions: Equatable, Sendable {
Copy link

Choose a reason for hiding this comment

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

PlatformDrawableOptions is public SPI and PlatformDrawable.options is get set, but there’s no public/SPI initializer (and base is internal), which can make it impossible for external adopters to initialize their stored options. If the intent is framework-owned mutation only, consider making that contract explicit.

🤖 Was this useful? React with 👍 or 👎


class RBDisplayListInterpolator {}

public enum RBDisplayList {}
Copy link

Choose a reason for hiding this comment

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

As a case-less enum, RBDisplayList is uninhabited, so any API that takes it can’t be called in shim builds. Is a constructible placeholder type intended here?

🤖 Was this useful? React with 👍 or 👎

@codecov
Copy link

codecov bot commented Dec 14, 2025

Codecov Report

❌ Patch coverage is 0% with 82 lines in your changes missing coverage. Please review.
✅ Project coverage is 13.82%. Comparing base (5534e8a) to head (3cd6e73).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
.../OpenSwiftUICore/Render/RasterizationOptions.swift 0.00% 54 Missing ⚠️
...rces/OpenSwiftUICore/Render/PlatformDrawable.swift 0.00% 28 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #673      +/-   ##
==========================================
- Coverage   13.86%   13.82%   -0.05%     
==========================================
  Files         558      559       +1     
  Lines       32492    32555      +63     
==========================================
- Hits         4505     4500       -5     
- Misses      27987    28055      +68     

☔ 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 027c339 into main Dec 14, 2025
7 of 9 checks passed
@Kyle-Ye Kyle-Ye deleted the feature/render branch December 14, 2025 08:28
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.

2 participants