Skip to content

Fix NamedImage crash for bundle image#814

Merged
Kyle-Ye merged 8 commits intomainfrom
bugfix/bitmap_image
Mar 8, 2026
Merged

Fix NamedImage crash for bundle image#814
Kyle-Ye merged 8 commits intomainfrom
bugfix/bitmap_image

Conversation

@Kyle-Ye
Copy link
Collaborator

@Kyle-Ye Kyle-Ye commented Mar 8, 2026

No description provided.

@github-actions github-actions bot added bug Something isn't working crash labels Mar 8, 2026
@augmentcode
Copy link

augmentcode bot commented Mar 8, 2026

🤖 Augment PR Summary

Summary: Addresses a crash when resolving named images (e.g. Image(decorative:)) by refining CoreUI-backed asset catalog lookup and trait handling.

Changes:

  • Add CoreUI ↔︎ OpenSwiftUI bridging for template rendering mode and size classes.
  • Update NamedImage bitmap lookup to support bundle, system, and private-system catalogs and to encode size-class traits using CoreUI raw values.
  • Introduce initial (WIP) vector-image plumbing (VectorImageLayer/VectorImageContents) and attempt to use preserved vector representations when available.
  • Add a decorative named-image example view and a snapshot UI test to prevent regressions.

Notes: Vector resolution is gated behind OPENSWIFTUI_LINK_COREUI and isLinkedOnOrAfter(.v3); the example app’s default content now renders the new named-image example.

🤖 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.

@github-actions github-actions bot added test Test related issue platform: Linux labels Mar 8, 2026
@codecov
Copy link

codecov bot commented Mar 8, 2026

Codecov Report

❌ Patch coverage is 23.85321% with 83 lines in your changes missing coverage. Please review.
✅ Project coverage is 27.51%. Comparing base (1e46475) to head (65654d2).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...ources/OpenSwiftUICore/View/Image/NamedImage.swift 28.57% 40 Missing ⚠️
.../OpenSwiftUICore/View/Image/VectorImageLayer.swift 0.00% 26 Missing ⚠️
...re/Data/EnvironmentKeys/EnvironmentAdditions.swift 37.03% 17 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #814      +/-   ##
==========================================
+ Coverage   27.38%   27.51%   +0.12%     
==========================================
  Files         659      660       +1     
  Lines       42366    42405      +39     
==========================================
+ Hits        11604    11667      +63     
+ Misses      30762    30738      -24     

☔ 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 bf0ff05 into main Mar 8, 2026
7 of 9 checks passed
@Kyle-Ye Kyle-Ye deleted the bugfix/bitmap_image branch March 8, 2026 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working crash platform: Linux test Test related issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant