Add native iOS notifications (#64)

This commit is contained in:
Georg Bauer
2026-08-15 12:50:05 +02:00
parent 69d1709523
commit 8ba7f5ad39
23 changed files with 1561 additions and 22 deletions

View File

@@ -243,6 +243,7 @@ source update are published, and installs or updates Gotcha through AltStore PAL
background with no border or pill and defaults to the clock. Select the
issue and pull-request icons in turn; each shows only matching recent
activity or the native empty state, then the clock restores all rows.
The bell remains a separate, accessible Notifications destination.
- [ ] Pull-request activity includes older creation and close events beyond the
first activity-feed page without requiring a manual pull-up; the empty
state appears only after every available page has been checked.
@@ -251,6 +252,40 @@ source update are published, and installs or updates Gotcha through AltStore PAL
Back button and left-edge interactive swipe return directly to Home.
- [ ] Non-linkable server activity does not navigate or appear tappable.
## Notifications
- [ ] Launch a fresh install. Gotcha does not request notification permission
at launch. Open Settings and turn on **Background notifications**; only
then does the standard iOS authorization sheet appear. Deny once and
confirm Gotcha keeps the switch off, explains that notifications are
disabled, and offers **Open Settings**. The **Notification Settings** row
opens Gotcha's page in iOS Settings.
- [ ] Allow notifications. Settings reports the current system authorization,
the app switch persists across relaunches, and iOS Settings remains the
source of truth for alerts, sounds, Focus, and scheduled summaries.
Turning the app switch off cancels pending alerts and background refresh.
- [ ] Tap the Home bell. Open and Closed each show the matching server
notification threads with a type icon, title, repository, date, Dynamic
Type layout, and accessible Open/Closed value. Pull to refresh, switch
status repeatedly, and load a list longer than one page without duplicate
or stale rows.
- [ ] Tap open and closed issue, pull-request, commit, and repository
notifications. Each opens the native destination on the Home navigation
stack; opening an unread thread marks it read, Back returns to the
notification list, and the next refresh moves it from Open to Closed.
- [ ] After the first poll establishes a cursor, create or receive another
server notification and background Gotcha. From Xcode's debugger, run
`e -l objc -- (void)[[BGTaskScheduler sharedScheduler] _simulateLaunchForTaskWithIdentifier:@"de.rfc1437.gotcha.notifications.refresh"]`.
Confirm one ordinary-priority local notification is delivered with no
private issue title or repository name on the Lock Screen. A repeated
update replaces the same thread alert rather than stacking duplicates;
tapping it selects the correct configured server, opens the originating
item, and marks the Gitea thread read.
- [ ] Bring Gotcha to the foreground while a poll finds an update. It refreshes
notification data without displaying a banner over the active app. Leave
it backgrounded and confirm iOS, not an in-app timer, chooses subsequent
refresh timing.
## Milestone navigation
- [ ] Open a milestone, then open one of its issues and one of its pull