Skip to content

Conversation

@Kyle-Ye
Copy link
Collaborator

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

No description provided.

@augmentcode
Copy link

augmentcode bot commented Dec 28, 2025

🤖 Augment PR Summary

Summary: This PR advances BlendMode support by wiring blend mode into the shape-style resolution pipeline.

Changes:

  • Marks BlendMode as audited/complete and adds availability gates for the public APIs.
  • Expands _BlendModeShapeStyle to handle additional _ShapeStyle_Shape.Operation cases (resolve/copy/multilevel) instead of failing.
  • Applies the requested blend mode to resolved style packs via ShapeStyle.Pack.modify and Style.applyBlend.
  • Implements _ShapeStyle_Pack.modify and Style.applyBlend, and adjusts _ShapeStyle_Shape.stylePack’s _modify accessor to mutate safely.

Technical Notes: Blend application behavior is gated by _SemanticFeature_v6 to avoid overwriting an existing blend when the semantic feature is enabled.

🤖 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. 2 suggestions posted.

Fix All in Augment

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



private func indices(of name: ShapeStyle.Name) -> Range<Int> {
_openSwiftUIUnimplementedFailure()
Copy link

Choose a reason for hiding this comment

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

indices(of:) currently calls _openSwiftUIUnimplementedFailure(), but _ShapeStyle_Pack.modify(...) now depends on it (and BlendMode calls modify in the .resolveStyle path), so using blendMode(_:) during style resolution will still trap at runtime.

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎

blendMode: blendMode
)
}
case .primaryStyle:
Copy link

Choose a reason for hiding this comment

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

In the .primaryStyle operation, _BlendModeShapeStyle currently does nothing, which can cause ShapeStyle.primaryStyle(in:) to return nil even if the wrapped style provides a primary style (other wrappers like OffsetShapeStyle forward something here).

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎

@codecov
Copy link

codecov bot commented Dec 28, 2025

Codecov Report

❌ Patch coverage is 0% with 48 lines in your changes missing coverage. Please review.
✅ Project coverage is 13.84%. Comparing base (793b5ec) to head (bd514a0).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...nSwiftUICore/Shape/ShapeStyle/ShapeStylePack.swift 0.00% 25 Missing ⚠️
...s/OpenSwiftUICore/Shape/ShapeStyle/BlendMode.swift 0.00% 23 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (793b5ec) and HEAD (bd514a0). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (793b5ec) HEAD (bd514a0)
2 1
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #682       +/-   ##
===========================================
- Coverage   28.45%   13.84%   -14.62%     
===========================================
  Files         586      560       -26     
  Lines       35480    32867     -2613     
===========================================
- Hits        10095     4549     -5546     
- Misses      25385    28318     +2933     

☔ 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 51197b7 into main Dec 28, 2025
9 of 12 checks passed
@Kyle-Ye Kyle-Ye deleted the feature/blendmode branch December 28, 2025 12:37
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