Skip to content

Fix navigation bar titles not displaying for Trio on iOS 26#92

Draft
MikePlante1 wants to merge 4 commits into
loopandlearn:devfrom
MikePlante1:fix/nav-titles
Draft

Fix navigation bar titles not displaying for Trio on iOS 26#92
MikePlante1 wants to merge 4 commits into
loopandlearn:devfrom
MikePlante1:fix/nav-titles

Conversation

@MikePlante1

Copy link
Copy Markdown

Problem

On iOS 26, SwiftUI's .navigationTitle and .navigationBarTitleDisplayMode no longer
propagate to a hosting UIKit UINavigationController's navigation bar. The Omnipod UI hosts
all of its SwiftUI screens inside a UIKit coordinator (OmniUICoordinator), so:

  • navigation titles render blank, and
  • because the coordinator sets prefersLargeTitles = true, screens that should be inline
    render with large titles.

Same root cause as MedtrumKit's jbr7rr/MedtrumKit#148.

Changes

Coordinator-pushed screens (setup flow + settings root)

The coordinator already sets navigationItem.title directly for every screen it pushes, so
these display correctly on iOS 26. This removes the now-redundant .navigationTitle /
.navigationBarTitle modifiers still lingering in those views, and fixes two latent title
issues that only surfaced once iOS 26 made the coordinator's value authoritative:

  • RileyLink Setup showed the pod-type name instead of "RileyLink Setup".
  • Low Reservoir setup now uses the coordinator's localized "Low Reservoir" (previously an
    unlocalized "Low Reservoir Default").

NavigationLink-pushed settings sub-screens

These are created by SwiftUI when a NavigationLink is tapped, so the coordinator can't set
their titles. Added a uikitNavigationTitle(_:displayMode:) helper that keeps the SwiftUI
modifiers (which still work on iOS 17–25) and additionally sets navigationItem.title and
largeTitleDisplayMode directly on the pushed view controller (for iOS 26). Applied to: Pod
Details, Previous Pod, Notification Settings, Confidence Reminders, Silence Pod, Pod Keep
Alive, Diagnostics, Read Pod Status, Play Test Beeps, Read Pod Info, Pump Manager Details, and
Insulin Type.

Routing these through the coordinator (as MedtrumKit does for its screens) was deliberately
avoided: these views dismiss themselves via presentationMode.dismiss(), which only works
inside SwiftUI navigation — a UIKit push would break their save/cancel auto-dismiss.

Insulin Type is a special case: its view (InsulinTypeSetting) lives in LoopKitUI and sets
no navigation title at all, so it was blank on every iOS version, not just 26. It's fixed
here from the OmnipodKit side by applying the helper at the NavigationLink destination, with
no change to shared LoopKitUI code.

Testing

  • Verified in Trio via Xcode 26.5 to iPhone simulators (17 Pro iOS 26.5, 14 Plus iOS 18.6)

🤖 Generated with Claude Code

Introduce View.uikitNavigationTitle(...) to ensure SwiftUI screens pushed within a UIKit UINavigationController have their navigationItem.title and largeTitleDisplayMode set correctly. Adds View+UIKitNavigationTitle.swift implementing a UIViewControllerRepresentable proxy that maps NavigationBarItem.TitleDisplayMode to UINavigationItem.LargeTitleDisplayMode and applies the title on the enclosing navigation controller's top view controller. Replace usages of .navigationTitle / .navigationBarTitleDisplayMode with .uikitNavigationTitle(...) across multiple PumpManagerUI views (BeepPreferenceSelectionView, NotificationSettingsView, PlayTestBeepsView, PodDetailsView, PodDiagnosticsView, PodKeepAliveView, PumpManagerDetailsView, ReadPodInfoView, ReadPodStatusView, SilencePodSelectionView) so titles display properly when hosted in UIKit flows.
@marionbarker marionbarker changed the base branch from main to dev June 25, 2026 12:51
@marionbarker marionbarker changed the title Fix navigation bar titles not displaying on iOS 26 Fix navigation bar titles not displaying for Trio on iOS 26 Jun 25, 2026
@marionbarker

marionbarker commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Trio Test

✅ I tested this on real hardware and it does fix the Trio Issue.

What are we trying to solve

With Trio, if you tap on a pump icon from the main screen, the navigation headers are missing in some cases whereas going to that same screen using the Trio, Settings, Devices, Pump path, the navigation headers are shown as expected.

Test

The table below indicates whether the navigation titles are visible when coming from Trio main screen before and with code from this PR applied.

Navigation Title before PR with PR
Omnipod NAME
Pair NAME Pod
Attach Pod
Insert Cannula
Check Cannula
Setup Complete
Temporary Basal
Pod Details
Previous Pod
Notification Reminders
Confidence Reminders
Silence Pod
Insulin Type
Deactivate Pod
Pod Keep Alive
Pod Diagnostics
All submenus

@marionbarker

marionbarker commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Loop Test

✅ Using this code in LoopWorkspace works as expected with no change in behavior (except for one improvement)

  • I did not realize until I did this test that the Insulin type navigation heading does not show up for for OmnipodKit Insulin Type screen for LoopWorkspace as well as for Trio

Repeat the Navigation Header test with Loop

Start with update_dev_to_3.14.3, commit 29512d2
update to use this PR for OmnipodKit

Test

The table below indicates whether the navigation titles are visible when coming from Loop main screen before and with code from this PR applied.

Navigation Title before PR with PR
Omnipod NAME
Pair NAME Pod
Attach Pod
Insert Cannula
Check Cannula
Setup Complete
Temporary Basal
Pod Details
Previous Pod
Notification Reminders
Confidence Reminders
Silence Pod
Insulin Type
Deactivate Pod
Pod Keep Alive
Pod Diagnostics
All submenus

@MikePlante1 MikePlante1 marked this pull request as draft June 25, 2026 20:01
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