♻️ Add @MainActor to RadioButtonDelegate, AdReporterDelegate and ConfirmationViewDelegate - #1457
Merged
Merged
Conversation
…irmationViewDelegate All three protocols are main-actor in practice: RadioButton, AdReporterView and ConfirmationView are UIView subclasses, and every delegate call site is inside them. Annotating the protocols lets @mainactor conformers satisfy them without the "conformance crosses into main actor-isolated code" warning under StrictConcurrency. Continues the work in #1453, #1454, #1455 and #1456.
starv
marked this pull request as ready for review
August 7, 2026 10:11
AndreyMomot
approved these changes
Aug 7, 2026
starv
added a commit
that referenced
this pull request
Aug 11, 2026
…rizontalSlideTransitionDelegate (#1459) All three protocols are main-actor in practice: FeedbackView and InfoboxView are UIView subclasses and every delegate call site is inside them, and HorizontalSlideTransition only invokes its delegate from a UIPresentationController callback. Annotating the protocols lets @mainactor conformers satisfy them without the "conformance crosses into main actor-isolated code" warning under StrictConcurrency. The internal HorizontalSlideControllerDelegate is annotated too, because it is not optional here: HorizontalSlideTransition is a plain NSObject whose HorizontalSlideControllerDelegate witness is what forwards to the now-main-actor HorizontalSlideTransitionDelegate. Isolating only the public protocol would make that forwarding call an error inside FinniversKit. Its only caller is HorizontalSlideController, a UIPresentationController subclass, so it is already on the main actor. Continues the work in #1453, #1454, #1455, #1456 and #1457.
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.
Why?
The NMP iOS app is migrating
app-modulestargets to theStrictConcurrencyupcoming feature flag, one module per PR (finn-no/ios-app#10447). TheAdReportingmodule needs three@preconcurrencyescape hatches to build cleanly, and all three exist only because of FinniversKit declarations.This continues the work started in #1453, #1454, #1455 and #1456.
What?
@MainActoronRadioButtonDelegate,AdReporterDelegateandConfirmationViewDelegateAll three protocols are already main-actor in practice.
RadioButton(viaSelectionbox),AdReporterViewandConfirmationViewareUIView/UIScrollViewsubclasses and therefore implicitly@MainActor, and every delegate call site is inside them —RadioButton.handleSelecting(_:),AdReporterView's help-button handler, andConfirmationView's dismiss-button handler. Annotating the protocols makes that explicit so@MainActorconformers no longer warn that the conformance "crosses into main actor-isolated code". Same pattern as #1454, #1455 and #1456.AdReporterDelegaterefinesRadioButtonDelegate; it is annotated explicitly rather than relying on inheritance, since a refining protocol's own requirements do not pick up the parent's global actor.Blast radius is small. The only conformer in this repo is
AdReporterDemoView, aUIViewsubclass that is already main-actor isolated, so it needed no change. Across the NMP app there is exactly one conformer —AdReporterViewController— which is aUIViewControllerand likewise already isolated.Version Change
Minor.
@MainActoron a public protocol is potentially source-breaking for any nonisolated conformer, though there are none in this repo.UI Changes
None. Isolation annotations only, no behaviour or layout changes.
Verification
Demoscheme builds clean against these changes (Build Succeeded, zero errors), with all three changed sources plusAdReporterDemoViewconfirmed recompiled rather than served from cache.app-modulesat this local checkout via.package(path:)and enablingswiftSettings: .strictConcurrencyon theAdReportingtarget builds with zero errors and zero module-owned warnings and no@preconcurrencyannotations at all, confirming this change set is sufficient.FINN NMPapp build and simulator launch against this local checkout:** BUILD SUCCEEDED **, 0 errors, 0 warnings fromAdReporting, app launched successfully. This compiles every downstream vertical (Jobs, Mobility, RealEstate, Recommerce), not just the one module.