You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Deep-link airing notifications to the media details page #111
Tapping an airing notification should open that anime's media-details page. Today the notification uses a generic launch intent, so a tap just opens the app to its home screen.
Split out from #106 (the episode-info text change landed there; deep-linking is tracked here).
Background
NotificationHelper.Show (src/AniSprinkles/Platforms/Android/NotificationHelper.cs) already has the mediaId at build time but wires a generic GetLaunchIntentForPackage PendingIntent. There is no intent-filter or deep-link routing.
Desired behavior
Tapping a notification routes to media-details for the notification's mediaId.
Works from both warm start (app already running) and cold start (process not running).
Implementation notes
Build a deep-link PendingIntent carrying the mediaId (extra or app://media-details?mediaId= URI) instead of the generic launch intent.
Add an intent-filter in AndroidManifest.xml (or handle the extra in MainActivity / App.CreateWindow).
Route via the existing Shell route: GoToAsync("media-details", new { mediaId }) (see AppShell.xaml.cs route registration + MediaDetailsPage.ApplyQueryAttributes).
Handle cold start: the navigation must run after Shell is constructed.
Constraint
Tapping an airing notification opens the correct media-details page from both cold and warm start.
Verification pass before kickoff. Checked against main (925d79f); facts only.
Still unimplemented.git log --since=2026-06-27 on NotificationHelper.cs, MainActivity.cs and Platforms/Android/AndroidManifest.xml returns only 490fdd5, the Core extraction move. NotificationHelper.Show still builds its PendingIntent from GetLaunchIntentForPackage.
No intent handling exists yet. Grepping the source (excluding obj/) for OnNewIntent, intent-filter and deeplink finds nothing. Platforms/Android/AndroidManifest.xml declares only the three uses-permission entries and the CustomTabs queries block — every intent-filter in the built manifest comes from MAUI/[Activity] defaults.
MainActivity is LaunchMode.SingleTop (MainActivity.cs:13). A warm-start tap therefore arrives at OnNewIntent, which the class does not override today.
The destination side is already in place.AppShell.xaml.cs:23 registers media-details → MediaDetailsPage, and MediaDetailsPage.ApplyQueryAttributes reads the id via QueryAttributeParser.ParseInt(query, "mediaId"). MediaDetailsPage also has a parameterless constructor that resolves from ServiceProviderHelper, so Shell can construct it.
PendingIntent request code is already mediaId (NotificationHelper.cs:40), with UpdateCurrent | Immutable. Two episodes of the same media share a request code, so extras carrying only mediaId are unaffected by the update-in-place.
Related: #141 is open against the same subsystem (moving the worker's pure logic into Core). It touches AiringCheckWorker.cs / AiringNotificationService.cs, which none of the work above touches.
Payload: an explicit intent with an int extra, not a URI scheme. The implementation notes above offer either; neither actually needs an intent-filter, since both use an explicit PendingIntent to MainActivity and only the payload differs. The anilist.co URL option — routing through the AniListLinkTarget resolver added in #137 — was considered seriously now that it is on main, but it means synthesizing https://anilist.co/anime/{id} purely to parse it back into the int the worker already holds. The reuse it buys is one line of routing; the untestable Android code is identical either way, and it would couple notifications to the bio-link parser so that #12 landing manga routing changes notification behaviour as a side effect.
Repeat taps push, not replace. Three notifications tapped in sequence gives three stacked details pages, and back walks them in reverse to the Library tab. Chosen for simplicity: the alternative needs a "what page am I on" check on the Android side, which is the part that cannot be unit-tested.
The cold/warm split in the constraint above is too coarse. There are four states, and the middle one breaks a lifecycle-branched design:
State
Delivery
Shell when the intent arrives
Process dead
OnCreate, savedInstanceState == null
Does not exist
Process alive, activity destroyed
OnCreate, savedInstanceState != null
May already be non-null
Backgrounded, activity alive
OnNewIntent
Live, on whatever page the user left
Foreground
OnNewIntent while resumed
Live
ServiceProviderHelper's own remarks describe the second state as a real scenario here. So the drain is attempt-based and idempotent rather than branched on lifecycle: attempted when the intent arrives, again from AppShell's existing OnShellNavigated handler (whose first fire means Shell finished its initial route), and once more from OnResume as a backstop.
Three things that fall out of that:
Clear on success, not on read.MauiShellNavigationService.GoToAsync returns Task.CompletedTask when Shell.Current is null — it logs a warning and bails — so a caller cannot tell a no-op from a real navigation. The holder checks Shell readiness itself and clears only after navigating, or a cold-start attempt that lands early swallows the link silently.
Stale intent replay. After a cold-start deep link, an activity recreation re-runs OnCreate with the same intent still attached and would re-navigate, pulling the user off wherever they had since browsed. Guarded by RemoveExtra after reading, SetIntent(intent) in OnNewIntent (Activity.Intent otherwise keeps returning the original launch intent), and a last-consumed nonce — for which the now-deterministic notification id from Airing notifications: parsing, pruning and title selection sit in the app project where no test can reach them #141 serves.
CustomTabs sits in the task. The manifest declares a CustomTabsService queries block and auth uses a Custom Tab, so mid-sign-in there can be a Chrome tab above MainActivity. Flags are NewTask | ClearTop | SingleTop. Side effect: tapping a notification mid-OAuth pulls the user out of the sign-in tab.
Nothing reads Activity.Intent today, so the SetIntent hygiene collides with nothing.
Also on the device verification list, as untested interactions rather than things designed around: a tap while a CommunityToolkit popup is open, and back-from-cold-start landing on the Library tab rather than exiting.
Being done on one branch with #141: feature/111-141-airing-notification-core-seams-and-deep-link.
Activity
Favorite toggle on details pages (#87) + episode number in airing not…
zhollis21 commentedon Aug 28, 2026
Verification pass before kickoff. Checked against
main(925d79f); facts only.Still unimplemented.
git log --since=2026-06-27onNotificationHelper.cs,MainActivity.csandPlatforms/Android/AndroidManifest.xmlreturns only 490fdd5, the Core extraction move.NotificationHelper.Showstill builds its PendingIntent fromGetLaunchIntentForPackage.No intent handling exists yet. Grepping the source (excluding
obj/) forOnNewIntent,intent-filteranddeeplinkfinds nothing.Platforms/Android/AndroidManifest.xmldeclares only the threeuses-permissionentries and the CustomTabsqueriesblock — every intent-filter in the built manifest comes from MAUI/[Activity]defaults.MainActivityisLaunchMode.SingleTop(MainActivity.cs:13). A warm-start tap therefore arrives atOnNewIntent, which the class does not override today.The destination side is already in place.
AppShell.xaml.cs:23registersmedia-details→MediaDetailsPage, andMediaDetailsPage.ApplyQueryAttributesreads the id viaQueryAttributeParser.ParseInt(query, "mediaId").MediaDetailsPagealso has a parameterless constructor that resolves fromServiceProviderHelper, so Shell can construct it.PendingIntent request code is already
mediaId(NotificationHelper.cs:40), withUpdateCurrent | Immutable. Two episodes of the same media share a request code, so extras carrying onlymediaIdare unaffected by the update-in-place.Related: #141 is open against the same subsystem (moving the worker's pure logic into Core). It touches
AiringCheckWorker.cs/AiringNotificationService.cs, which none of the work above touches.zhollis21 commentedon Aug 28, 2026
Kickoff decisions, agreed before any code.
Payload: an explicit intent with an
intextra, not a URI scheme. The implementation notes above offer either; neither actually needs an intent-filter, since both use an explicitPendingIntenttoMainActivityand only the payload differs. Theanilist.coURL option — routing through theAniListLinkTargetresolver added in #137 — was considered seriously now that it is onmain, but it means synthesizinghttps://anilist.co/anime/{id}purely to parse it back into the int the worker already holds. The reuse it buys is one line of routing; the untestable Android code is identical either way, and it would couple notifications to the bio-link parser so that #12 landing manga routing changes notification behaviour as a side effect.Repeat taps push, not replace. Three notifications tapped in sequence gives three stacked details pages, and back walks them in reverse to the Library tab. Chosen for simplicity: the alternative needs a "what page am I on" check on the Android side, which is the part that cannot be unit-tested.
The cold/warm split in the constraint above is too coarse. There are four states, and the middle one breaks a lifecycle-branched design:
OnCreate,savedInstanceState == nullOnCreate,savedInstanceState != nullOnNewIntentOnNewIntentwhile resumedServiceProviderHelper's own remarks describe the second state as a real scenario here. So the drain is attempt-based and idempotent rather than branched on lifecycle: attempted when the intent arrives, again fromAppShell's existingOnShellNavigatedhandler (whose first fire means Shell finished its initial route), and once more fromOnResumeas a backstop.Three things that fall out of that:
MauiShellNavigationService.GoToAsyncreturnsTask.CompletedTaskwhenShell.Currentis null — it logs a warning and bails — so a caller cannot tell a no-op from a real navigation. The holder checks Shell readiness itself and clears only after navigating, or a cold-start attempt that lands early swallows the link silently.OnCreatewith the same intent still attached and would re-navigate, pulling the user off wherever they had since browsed. Guarded byRemoveExtraafter reading,SetIntent(intent)inOnNewIntent(Activity.Intentotherwise keeps returning the original launch intent), and a last-consumed nonce — for which the now-deterministic notification id from Airing notifications: parsing, pruning and title selection sit in the app project where no test can reach them #141 serves.queriesblock and auth uses a Custom Tab, so mid-sign-in there can be a Chrome tab aboveMainActivity. Flags areNewTask | ClearTop | SingleTop. Side effect: tapping a notification mid-OAuth pulls the user out of the sign-in tab.Nothing reads
Activity.Intenttoday, so theSetIntenthygiene collides with nothing.Also on the device verification list, as untested interactions rather than things designed around: a tap while a CommunityToolkit popup is open, and back-from-cold-start landing on the Library tab rather than exiting.
Being done on one branch with #141:
feature/111-141-airing-notification-core-seams-and-deep-link.Move airing-notification logic into Core and deep-link the notificati…
Favorite toggle on details pages (#87) + episode number in airing not…
Move airing-notification logic into Core and deep-link the notificati…