Repository navigation
Description
Found on 2026-11-16 while driving the app to verify #173. A few pages deep in details pages, the only way back to a tab's root is pressing Back once per page.
Problem
Tapping the bottom-bar tab you are already on does nothing. If you are ten pages deep in the Library (media → character → voice actor → media → …), you have to back out of every one to get to the list.
Observed on device 2026-11-16 with -p:CiBuild=true on the Pixel 10 Pro XL / API 37 emulator: with ONE PIECE's details page pushed on the Library tab, a real tap on the Library tab icon (adb shell input tap, not a DevFlow tap, which sets the Shell item directly and isn't a fair test) left ONE PIECE on screen. No NAVTRACE navigation was logged.
Most apps with a bottom tab bar pop the tab's stack to its root on a re-tap, and scroll to the top when it is already at the root, so users expect it.
Our code does nothing with a reselect. A search of src/ for reselect, PopToRoot, OnTabReselected and ShellItemRenderer finds nothing (checked at origin/main 14af4cd). Android Shell is rendered by the legacy ShellRenderer (src/AniSprinkles/MauiProgram.cs:74, pinned in #177), so whatever hook a fix uses has to work with that renderer, and still work if #177 later moves us back to MAUI 11's handler.
Scope
- Every tab: Library, Discover, Search, Feed, Settings. A tab with nothing pushed has nothing to pop.
- At the root already, a re-tap scrolls the page to the top.
- A pop does not also scroll. Popping lands you on the root page wherever you left it scrolled, and only a second tap scrolls up (decided at kickoff).
- No refresh on a re-tap (decided at kickoff). Pull-to-refresh stays the way to refresh, so a re-tap spends no AniList requests.
- On the Search tab, a re-tap at the root also focuses the search box, keeping the query (decided at kickoff).
Options
Settled at kickoff: A. These are the shapes recorded while the context was fresh.
A. Handle the native reselect. Hook the bottom navigation view's item-reselected callback in the Android renderer, then PopToRootAsync on the current section's navigation, or scroll to the top when the stack is already at the root. It is the precise signal, but it is platform code on the app side of the test boundary, and it is tied to the renderer #177 pinned.
B. Detect it in Shell. Watch Shell.Navigating / Navigated for a tab change to the current item. It is cross-platform and closer to Core, but whether Shell raises anything at all for a reselect on the legacy renderer is unverified, and the on-device test above suggests it may not.
A, because both Android Shell renderers (the legacy one and MAUI 11's handler) already route a reselect to an overridable OnTabReselected(ShellSection), so B's indirect detection is not needed.
Constraint
- Popping pushed pages has to run their lifecycle cleanup (cancelling in-flight loads). Pushed pages never run OnDisappearing on a tab switch, so in-flight loads are not cancelled #132 is the history of what goes wrong when pushed pages are left behind without it.
- The Library tab has its own Anime / Manga top strip (Android Shell is pinned to the legacy ShellRenderer because MAUI 11's handler redraws the Anime/Manga strip over pushed pages #177). A pop must not disturb which sub-tab is selected.
- The Search tab keeps its query on purpose (
SearchPageModelis a singleton), and a re-tap should not clear it unless kickoff decides otherwise.
Related
- Android Shell is pinned to the legacy ShellRenderer because MAUI 11's handler redraws the Anime/Manga strip over pushed pages #177: the legacy
ShellRendererpin that any Android hook has to live with. - Pushed pages never run OnDisappearing on a tab switch, so in-flight loads are not cancelled #132: lifecycle of pushed pages on a tab switch.
- UI tests: nothing can catch page-lifecycle bugs on pushed detail pages #131: nothing tests the page lifecycle of pushed pages, which a pop-to-root also exercises.
Activity
zhollis21 commentedon Nov 17, 2026
Kickoff notes (checked against
origin/maincb87e24, MAUI11.0.10):OnTabReselected(ShellSection):src/AniSprinkles/MauiProgram.cs:74):ShellItemRenderer.OnItemSelectedcalls it when the tapped itemIsChecked(dotnet/maui11.0.10,src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellItemRenderer.cs:387-389,:556).ShellItemHandlerwiresTabbedViewManager.OnTabReselectedto the same-named virtual, commented as matching the legacy extension point (src/Controls/src/Core/Handlers/Shell/ShellItemHandler.Android.cs:198-206,:421).ShellRenderer.CreateShellItemRenderer(ShellItem)(protected virtual,ShellRenderer.cs:153).OnNavigatedFrom, notOnDisappearing(src/AniSprinkles/Pages/MediaDetailsPage.xaml.cs:113-121).MediaListLoadedContentViewCollectionView(Views/MediaListLoadedContentView.xaml:372), Discover and Settings aScrollViewinsideSfPullToRefresh(Views/DiscoverLoadedContentView.xaml:15,Views/SettingsLoadedContentView.xaml:14), SearchSearchResultsList(Pages/SearchPage.xaml:76). Feed is a static placeholder with nothing to scroll (Pages/FeedPage.xaml).zhollis21 commentedon Nov 17, 2026
Updated during planning: the two open questions are answered (a pop does not also scroll; no refresh on re-tap), a Search-tab scope line is added (a re-tap at the root also focuses the search box, keeping the query), and Options now records A as settled, because both Android Shell renderers already expose an
OnTabReselected(ShellSection)hook.Re-tapping the current bottom tab pops it to root, then scrolls to top (
Re-tapping the current bottom tab pops it to root, then scrolls to top (
Add UI journeys for list edits, Up Next, Shell tabs and every pushed …