Migrate UIKit navigation to SwiftUI NavigationStack#3
Open
Conversation
8 tasks
f52333f to
9e64c51
Compare
8d94e85 to
ca1401e
Compare
g-enius
commented
Feb 27, 2026
g-enius
commented
Feb 28, 2026
g-enius
commented
Feb 28, 2026
ca1401e to
5ecdab7
Compare
g-enius
commented
Feb 28, 2026
This comment was marked as resolved.
This comment was marked as resolved.
g-enius
commented
Feb 28, 2026
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The DispatchQueue.main change was unnecessary and broke CI tests. RunLoop.main works correctly with Combine debounce in test contexts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ster Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Both feature branches target iOS 16+ where Task.sleep(for:) is available. .milliseconds/.seconds is clearer than raw nanosecond counts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…table import Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This branch is pure SwiftUI, no UIKit controllers. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
d10933c to
3a7a545
Compare
10 tasks
g-enius
commented
Mar 2, 2026
Owner
Author
g-enius
left a comment
There was a problem hiding this comment.
Reviewed again. All new changes LGTM!
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
Replaces the UIKit navigation layer (UINavigationController + Coordinator hierarchy) with pure SwiftUI NavigationStack, while keeping Combine for reactive state.
Next step: PR #4 — Replace Combine with AsyncSequence and @Observable builds on this branch.
Key Changes
Navigation
UINavigationController→NavigationStack+NavigationPathUITabBarController→ SwiftUITabViewAppCoordinator: ObservableObjectpushViewController(_:animated:)→path.append(item)present(_:animated:)→.sheet(isPresented:)App Lifecycle
AppDelegate+SceneDelegate→ SwiftUI@main Appscene(_:openURLContexts:)→.onOpenURL { }ViewModel → Coordinator Communication
var onShowDetail: ((FeaturedItem) -> Void)?) — same asmainbranchWhat Stays the Same
@Published+.sink) for reactive stateWhy NavigationStack + NavigationPath over NavigationLink
This branch uses programmatic navigation exclusively —
NavigationStackwithNavigationPathmanaged by the coordinator.NavigationLinkis deliberately avoided:NavigationLinkcouples navigation decisions to SwiftUI views, making it hard to trigger navigation from ViewModels, deep links, or programmatic flows.navigationDestination(for:)+NavigationPath, which is exactly what this branch uses.path.append(any Hashable)without Views knowing the destination type.NavigationLinkrequires the destination View at the call site.onShowDetail,onShowProfile) — no need to tap UI elements.If you support iOS 17+: how this code evolves
If your deployment target is iOS 17+, you can remove Combine entirely. Here's how each pattern changes:
ViewModels —
ObservableObject+@Published→@Observable:Views —
@ObservedObject/@StateObject→@Bindable/@State:Service events —
AnyPublisher→AsyncStream:See the
async-sequencebranch for the complete migration (PR #4).Test plan
.onOpenURL🤖 Generated with Claude Code