From 69d1709523af4ba7dcd3316fa48bff661f2564ee Mon Sep 17 00:00:00 2001 From: Georg Bauer Date: Sat, 15 Aug 2026 12:06:41 +0200 Subject: [PATCH] Preserve detail navigation origin (#66) --- TESTING.md | 10 +++++++++- ios/Sources/AppContext.swift | 13 +++++-------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/TESTING.md b/TESTING.md index ebda70f..85c9f20 100644 --- a/TESTING.md +++ b/TESTING.md @@ -247,9 +247,17 @@ source update are published, and installs or updates Gotcha through AltStore PAL first activity-feed page without requiring a manual pull-up; the empty state appears only after every available page has been checked. - [ ] Tap repository, issue, pull-request, and commit activity. Each opens the - matching native tab and destination. + matching destination on the Home navigation stack. The navigation-bar + Back button and left-edge interactive swipe return directly to Home. - [ ] Non-linkable server activity does not navigate or appear tappable. +## Milestone navigation + +- [ ] Open a milestone, then open one of its issues and one of its pull + requests. For each detail, the navigation-bar Back button and left-edge + interactive swipe return directly to that milestone, preserving its + rows and scroll position. + ## Home-screen widgets - [ ] Upgrade over a build with an existing server. Launch Gotcha once, then diff --git a/ios/Sources/AppContext.swift b/ios/Sources/AppContext.swift index edbd165..21eb079 100644 --- a/ios/Sources/AppContext.swift +++ b/ios/Sources/AppContext.swift @@ -96,10 +96,10 @@ final class AppContext { } func route(_ activity: ActivityRow) { + let navigation = navigationControllers[0] switch activity.target { case .repository: - tabs.selectedIndex = 1 - navigationControllers[1].pushViewController( + navigation.pushViewController( IssuesViewController( context: self, owner: activity.owner, @@ -108,8 +108,7 @@ final class AppContext { animated: true ) case .issue: - tabs.selectedIndex = 1 - navigationControllers[1].pushViewController( + navigation.pushViewController( IssueViewController( context: self, owner: activity.owner, @@ -119,8 +118,7 @@ final class AppContext { animated: true ) case .pullRequest: - tabs.selectedIndex = 3 - navigationControllers[3].pushViewController( + navigation.pushViewController( PullViewController( context: self, owner: activity.owner, @@ -130,8 +128,7 @@ final class AppContext { animated: true ) case .commit: - tabs.selectedIndex = 2 - navigationControllers[2].pushViewController( + navigation.pushViewController( FilesViewController( context: self, owner: activity.owner,