Repository navigation
Conversation
pinieb
force-pushed
the
remediation/issue-4195
branch
from
November 17, 2026 16:33
9f53dcc to
b265469
Compare
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces a breaking change by making EnvironmentValues.a2uiCatalogs and EnvironmentValues.a2uiDefaultCatalogID read-only (public internal(set)) and removing the deprecated A2UICatalogsKey and A2UIDefaultCatalogIDKey structs. Consequently, catalogs are now injected exclusively via Surface, and the test suite has been updated to reflect this new pattern. The review feedback suggests improving code readability in several test files by using Swift's raw string literals (#"..."#) instead of escaped double quotes for JSON string instances.
pinieb
force-pushed
the
remediation/issue-4195
branch
from
November 17, 2026 16:56
7073278 to
1dad6ae
Compare
…ent values publicly read-only
pinieb
force-pushed
the
remediation/issue-4195
branch
from
November 17, 2026 16:58
1dad6ae to
84f84ca
Compare
pinieb
marked this pull request as ready for review
November 17, 2026 17:04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Note
Stacked on
release-2026-11-16(#4258). This PR will not be submitted until after #4258 merges intomain.Fixes #4195 by making
EnvironmentValues.a2uiCatalogsandEnvironmentValues.a2uiDefaultCatalogIDread-only (public internal(set)) on the publicA2UISwiftUIAPI surface and removing the deprecatedA2UICatalogsKeyandA2UIDefaultCatalogIDKeystructs, so catalogs are written into the SwiftUI environment only bySurface.Changes
EnvironmentValues.a2uiCatalogsandEnvironmentValues.a2uiDefaultCatalogIDaspublic internal(set)and removeA2UICatalogsKeyandA2UIDefaultCatalogIDKeyinA2UICatalogsKey.swift.EnvironmentValueswrites inCatalogImplementationTests.swift,A2UIDividerTests.swift,ModalHost.swift, andRenderedChildrenTests.swiftwithSurface-hosted views that exercise the public API without@testable import.swift/CHANGELOG.md.Impact & risks
A2UISwiftUI(for the upcoming0.12.0minor bump):EnvironmentValues.a2uiCatalogsandEnvironmentValues.a2uiDefaultCatalogIDare no longer writable outsideA2UISwiftUI, andA2UICatalogsKeyandA2UIDefaultCatalogIDKeyare removed.A2UIRow,A2UIColumn, and custom catalog implementations across v0.9, v0.9.1, and v1.0 surfaces) continue to read@Environment(\.a2uiCatalogs)and@Environment(\.a2uiDefaultCatalogID). Callers configure catalogs throughSurface.init(viewModel:catalogs:defaultCatalogID:)orSurface.makeWithBasicCatalogs(viewModel:).Testing
swift test --filter A2UISwiftUITests --no-parallel(188 tests in 33 suites passed)../scripts/fix_format.sh --check --only-swiftandnpx prettier@3.8.4 --config .prettierrc --check swift/CHANGELOG.md.How to inspect or modify this branch locally
To check out and make additional changes to this PR branch: