Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
447377e
Replace hamburger flyout with a bottom tab bar (#43 phase 1)
Aug 21, 2026
3bd55e8
Move search from Discover onto its own tab (#43 phase 2)
Aug 21, 2026
9da1053
CI: Update UI screenshots [skip ci]
github-actions[bot] Aug 21, 2026
a9f96ca
CI: relabel the Library screenshot after the tab rename
Aug 21, 2026
fda2079
CI: Update UI screenshots [skip ci]
github-actions[bot] Aug 21, 2026
054c3f6
PR feedback: close three races and relabel the Search screenshot (#116)
Aug 21, 2026
58043ee
CI: Update UI screenshots [skip ci]
github-actions[bot] Aug 21, 2026
9a583c3
Gate Load More on a reload in flight for Discover and View All (#116)
Aug 21, 2026
6624a70
CI: Update UI screenshots [skip ci]
github-actions[bot] Aug 21, 2026
121c8af
Reset search results on query change; rethrow cancellation in AuthSer…
Aug 21, 2026
3a1fdde
CI: Update UI screenshots [skip ci]
github-actions[bot] Aug 21, 2026
7c9c169
Capture the auth flag at search-issue time alongside the adult flag (…
Aug 21, 2026
fe847f7
CI: Update UI screenshots [skip ci]
github-actions[bot] Aug 21, 2026
c1fa935
driver: uninstall before a doomed install, and report why one failed
Aug 21, 2026
d52651a
CI: Update UI screenshots [skip ci]
github-actions[bot] Aug 21, 2026
48e5ca0
Route install through the serial-aware wrapper; guard the auth write …
Aug 22, 2026
e3368c0
CI: Update UI screenshots [skip ci]
github-actions[bot] Aug 22, 2026
8ea0cbb
Filter the auth cancellation rethrow to the caller's own token (#116)
Aug 22, 2026
ec930c4
CI: Update UI screenshots [skip ci]
github-actions[bot] Aug 22, 2026
0961a5b
CI: never publish a stale screenshot; align the docs with the tab str…
Aug 22, 2026
8c241e7
CI: Update UI screenshots [skip ci]
github-actions[bot] Aug 22, 2026
f575d36
Pin the adult filter to the result set; close the pre-IsBusy refresh …
Aug 22, 2026
8e454b5
CI: Update UI screenshots [skip ci]
github-actions[bot] Aug 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude/skills/ani-kickoff/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ than saying it was the only thing considered.

Check candidate approaches against the conventions that actually bite here:

- **DI lifetimes** — services and flyout PageModels are singleton; pages and
- **DI lifetimes** — services and tab PageModels are singleton; pages and
details PageModels are transient. Getting this wrong produces state that leaks
across navigations or is silently discarded. See `/project-architecture`.
- **Navigation** — routes plus lightweight query params, never full objects.
Expand Down
13 changes: 7 additions & 6 deletions .claude/skills/project-architecture/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ description: "AniSprinkles project architecture reference: DI lifetimes, page/Pa
| Registration | Lifetime |
| ------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- |
| `ErrorReportService`, `HttpClient`, `IAuthService`, `IAniListClient`, `IAiringNotificationService`, `IOutageStateService`, `INavigationService`, `IUserFeedback` | Singleton |
| `MyAnimePageModel`, `DiscoverPageModel`, `SettingsPageModel` | **Singleton** (survive page recreation across flyout switches) |
| `MyAnimePageModel`, `DiscoverPageModel`, `SearchPageModel`, `SettingsPageModel` | **Singleton** (survive page recreation across tab switches) |
| `LoggingHandler`, `AniListRateLimitHandler` | Transient |

`IAniListClient` resolves to `CachingAniListClient` wrapping the concrete `AniListClient` (session-lifetime in-memory cache of character/staff reads, with request coalescing). The shared `HttpClient` pipeline is `AniListRateLimitHandler` → `LoggingHandler` → `HttpClientHandler`, so every AniList call is serialized and 429/`Retry-After`-aware app-wide.
| `MyAnimePage`, `DiscoverPage`, `SettingsPage`, `MediaDetailsPageModel`, `MediaDetailsPage`, `StaffDetailsPageModel`, `StaffDetailsPage`, `CharacterDetailsPageModel`, `CharacterDetailsPage`, `StudioDetailsPageModel`, `StudioDetailsPage`, `MediaBrowsePageModel`, `MediaBrowsePage` | Transient |
| `MyAnimePage`, `DiscoverPage`, `SearchPage`, `FeedPage`, `MyMangaPage`, `SettingsPage`, `MediaDetailsPageModel`, `MediaDetailsPage`, `StaffDetailsPageModel`, `StaffDetailsPage`, `CharacterDetailsPageModel`, `CharacterDetailsPage`, `StudioDetailsPageModel`, `StudioDetailsPage`, `MediaBrowsePageModel`, `MediaBrowsePage` | Transient |

## Page ↔ PageModel Binding

Two-constructor pattern: parameterless (for XAML tooling) + DI constructor. `ServiceProviderHelper` provides `IServiceProvider` fallback via `IPlatformApplication.Current.Services` when `Application.Current.Handler` is not ready during Shell startup.

## OnAppearing Three-Branch Pattern (all flyout pages)
## OnAppearing Three-Branch Pattern (all tab pages)

1. Content alive → background refresh
2. Content gone + `HasLoadedData` → immediate rebuild + background refresh
Expand All @@ -30,7 +30,8 @@ See `MyAnimePage.xaml.cs` and `SettingsPage.xaml.cs` for reference implementatio

## Discover / Browse / Search

- `DiscoverPageModel` (singleton): one aliased `DiscoverSections` request seeds every row (a `DiscoverRow` wrapping a `PaginatedSection<BrowseMediaItem>`); rows then page themselves horizontally through `BrowseAnimePageAsync` (one request per row-page) via the shared `DiscoverSectionFetch` helper. Card badges follow the row's sort via `MediaMetricBadges.ForMediaSort`. Search is revealed by a toolbar icon (same toggle pattern as My Anime); debounced (600 ms, 2+ chars) queries swap the rows for a `PaginatedSection` results list via visibility (rows stay alive underneath).
- `DiscoverPageModel` (singleton): one aliased `DiscoverSections` request seeds every row (a `DiscoverRow` wrapping a `PaginatedSection<BrowseMediaItem>`); rows then page themselves horizontally through `BrowseAnimePageAsync` (one request per row-page) via the shared `DiscoverSectionFetch` helper. Card badges follow the row's sort via `MediaMetricBadges.ForMediaSort`. Discover holds no search — it moved to its own tab in #43.
- `SearchPageModel` (singleton): global anime search on the Search tab, extracted from `DiscoverPageModel`. Debounced (600 ms, 2+ chars) queries seed a `PaginatedSection<BrowseMediaItem>` via `SearchAnimePageAsync`; a keystroke cancels the pending or in-flight fetch, and `_activeSearchQuery` guards a superseded response from landing. Four visibility states: idle prompt / spinner / results / no matches. The singleton keeps the query across tab switches on purpose; `OnAppearingAsync` re-runs it when an auth or adult-toggle flip has changed what the results should contain. Long-press goes through its own `EntryActionCoordinator`, writing mutations back onto matching results.
- `MediaBrowsePage` ("View All", transient): `DeferredContentLoader` + one `PaginatedSection<BrowseMediaItem>` over the same `DiscoverSectionFetch`; `DiscoverSectionDefinitions` is the single source of truth for section title/sort/filters/format/rank. Has the My Anime view-mode switcher; the mode persists to the shared `ListViewModePreference` key, so My Anime and View All always match (My Anime re-syncs in `OnAppearing`).
- `BrowseTemplates.xaml` (merged in App.xaml) holds the shared templates: `BrowseMediaRowTemplate` (Standard, also used by search results), `BrowseMediaLargeTemplate` (2-col grid), `BrowseMediaCompactTemplate`, plus `ListStatusPillStyle` — the ONE on-list status pill style. Rows/grid cards overlay it inline (their own layout); the 130×170 carousel cards get it for free from `CoverImage` (`ListStatusText`/`ListStatusColor` props), which is the shared cover used by the Discover carousel AND every detail-page media carousel (relations, recommendations, studio productions, staff production roles, character appearances). Those detail pages send the viewer token so `mediaListEntry` is populated. Tap commands resolve from the hosting CollectionView's BindingContext (`NavigateToMediaCommand`).
- `EntryActionCoordinator` (`PageModels/`) owns the long-press action flows (menu, add/move/rate/edit-progress/complete/remove, persistence, toasts/snackbars) for My Anime AND the browse surfaces; page models supply `EntryActionHost` callbacks (optimistic removal, reload vs in-place chip update, error details). `CollectionViewLongPress` (`Views/`) is the reusable Android RecyclerView long-press hook for flat CollectionViews; navigate commands call `ShouldSuppressTap()` to swallow the synthetic tap that follows a long press.
Expand All @@ -49,11 +50,11 @@ Spinner-first flow: lightweight shell page appears immediately, full content vie

## Navigation

Shell flyout (`my-anime`, `discover`, `settings`). Details routes registered in `AppShell.xaml.cs`: `media-details` → `MediaDetailsPage`, `staff-details` → `StaffDetailsPage`, `character-details` → `CharacterDetailsPage`, `studio-details` → `StudioDetailsPage`, `media-browse` → `MediaBrowsePage` (Discover "View All"; takes a `section` enum-name param decoded against `DiscoverSectionDefinitions`). Navigate via `Shell.Current.GoToAsync` (or the injected `INavigationService`) with lightweight query params (`mediaId` / `staffId` / `characterId` / `studioId` / `section` + trace IDs) — never pass full model objects. Rapid-tap prevention on My Anime → details. Default Shell back behavior — no custom Android back overrides.
Shell bottom tab bar (`my-anime` shown as "Library", `discover`, `search`, `feed`, `settings`). The Library tab holds two `ShellContent`s (`anime`, `manga`), which Shell renders as a native swipeable top tab strip. Placeholder pages: `manga` pending #12, `feed` pending #14. Details routes registered in `AppShell.xaml.cs`: `media-details` → `MediaDetailsPage`, `staff-details` → `StaffDetailsPage`, `character-details` → `CharacterDetailsPage`, `studio-details` → `StudioDetailsPage`, `media-browse` → `MediaBrowsePage` (Discover "View All"; takes a `section` enum-name param decoded against `DiscoverSectionDefinitions`). Navigate via `Shell.Current.GoToAsync` (or the injected `INavigationService`) with lightweight query params (`mediaId` / `staffId` / `characterId` / `studioId` / `section` + trace IDs) — never pass full model objects. Rapid-tap prevention on My Anime → details. Default Shell back behavior — no custom Android back overrides.

## Performance Defaults

- 5-minute stale refresh window for flyout pages.
- 5-minute stale refresh window for tab pages.
- Compiled XAML bindings enabled (`MauiEnableXamlCBindingWithSourceCompilation`).
- Details page: keep above-the-fold small; lazy-load extended sections below; one primary spinner per screen state.
- My Anime selection clear deferred until after navigation begins.
Expand Down
47 changes: 28 additions & 19 deletions .claude/skills/run-anisprinkles/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ Then drive it. Every command is `driver.ps1 <command> [args]`:
| `swipe up\|down\|left\|right` | one content-area swipe |
| `scroll-to <text>` | swipe up until `<text>` is on screen (max 10) |
| `wait-for <text> [secs]` | poll until `<text>` appears (default 30s) |
| `flyout` / `goto <page>` | open the drawer / open the drawer and pick `My Anime`\|`Discover`\|`Settings` |
| `search` | tap the Discover toolbar search icon (see Gotchas) |
| `goto <tab>` | switch tabs: `Library`\|`Discover`\|`Search`\|`Feed`\|`Settings` — a plain label tap, so it works from inside a pushed details stack too |
| `search` | shortcut for `goto Search` |
| `logcat [n]` / `applog` | app-PID logcat tail / the on-device rotating file log |

`driver.ps1 help` prints the same list.
Expand Down Expand Up @@ -121,13 +121,13 @@ Then `Read` the two PNGs: heart outline → filled, Favourites `90,457` → `90,

`CIAniListClient` serves a fixed set, so these strings are always tappable:

- **My Anime**: `ONE PIECE`, `Shingeki no Kyojin`, `Jujutsu Kaisen`, `HUNTER×HUNTER (2011)`;
- **Library › Anime** (nav title reads "Library"; sub-tabs are `ANIME` / `MANGA`): `ONE PIECE`, `Shingeki no Kyojin`, `Jujutsu Kaisen`, `HUNTER×HUNTER (2011)`;
section headers `Watching` / `Planning` / `Completed`
- **Media details** (ONE PIECE): `Monkey D. Luffy`, `Roronoa Zoro`, `Nami`,
studios `Toei Animation` / `Madhouse` / `Studio Pierrot`; content-descs
`Toggle favorite` and `Open studio Toei Animation`
- **Discover**: `Currently Airing`, `Trending Now`, `Top Anime`, `View All ›`
- **Search** filters that same fixture list client-side — `one` matches `ONE PIECE`;
- **Search tab** filters that same fixture list client-side — `one` matches `ONE PIECE`;
anything else (e.g. `cowboy bebop`) correctly renders `No anime found`. That is
the stub, not a bug.

Expand Down Expand Up @@ -181,22 +181,31 @@ works — that is what the driver above is for.
post-tap settle. Always `wait-for "<text you expect>"` between them. I caught
`Loading discover...` and a stale details page this way twice.

- **`DiscoverPageModel` is a singleton, so the search bar keeps its text forever** —
navigating away, backing out of the app entirely, and coming back still shows the
old query and its results, not the section rows. If `wait-for "Trending Now"`
times out on Discover, the search bar is open: `driver.ps1 search` toggles it
shut and the sections come back.

- **MAUI Shell toolbar items are invisible to uiautomator.** Only the hamburger has
a content-desc; the search / sort / layout icons have no node at all, so there is
nothing to `tap-desc`. `driver.ps1 search` works around it by mirroring the
hamburger's x across the screen width (`1080 - 74 = 1006`), which is
resolution-independent.

- **`back` at a flyout root exits the app silently** — no confirm dialog, you just
- **`SearchPageModel` is a singleton, so the Search tab keeps its query forever** —
leaving the tab, backing out of the app entirely, and coming back still shows the
old query and its results. That is deliberate, not a bug. Clear the field (or the
`clear` command) if a test needs the idle prompt back. Discover no longer has a
search bar at all, so a `wait-for "Trending Now"` timeout there means something
else went wrong.

- **The Search tab's keyboard covers the bottom tab bar.** The field auto-focuses
when the query is empty, so arriving on the tab immediately raises the keyboard and
hides every tab label — a `goto` straight after typing taps the keyboard instead and
silently stays put. Send `back` first to dismiss it, then switch tabs.

- **MAUI Shell toolbar items are invisible to uiautomator, and there is no longer an
anchor to mirror.** The page-level search / sort / layout icons have no node at
all. This used to be worked around by mirroring the hamburger's x across the
screen width, but the bottom tab bar (issue #43) removed the hamburger, so that
trick has no anchor left. Tab **labels** are real nodes, so navigation is fine —
it is only the in-page toolbar icons (My Anime's sort / search / layout) that now
need hand-computed coordinates: they sit in the nav-bar row, right-aligned, about
`74px` in from each edge at 1080 wide.

- **`back` at a tab root exits the app silently** — no confirm dialog, you just
land on the launcher and every subsequent `tap` fails with a confusing
"No node with text=...". `driver.ps1 resume` gets you back in ~3s. Prefer `goto`
over `back` for switching pages.
over `back` for switching tabs.

- **`View All ›` carries a multibyte chevron in its text node.** Exact-match `tap`
never finds it; use `tap-prefix "View All"`.
Expand Down Expand Up @@ -244,7 +253,7 @@ works — that is what the driver above is for.
| `INSUFFICIENT_STORAGE: Failed to override installation location` | `driver.ps1 install` handles it; if it still fails, wipe the AVD from Device Manager. |
| `UI dump was empty — is the app foregrounded?` | The app is backgrounded or crashed. `driver.ps1 resume`, then `driver.ps1 logcat`. |
| `No node with text='X'` right after it worked | You probably backed out to the launcher. `driver.ps1 dump` to confirm, then `resume`. |
| `'X' never appeared within Ns` on Discover | Search bar is still open with an old query — `driver.ps1 search`. |
| `'X' never appeared within Ns` right after typing a query | The keyboard is covering the tab bar — `driver.ps1 back`, then `goto`. |
| `More than one device attached — set ANDROID_SERIAL to choose` | Two emulators/devices online. Pick one with `ANDROID_SERIAL=<serial>`, or shut the other down. `driver.ps1 env` lists them. |
| `sys.boot_completed never reached 1 after 180s` | The emulator attached to adb but never finished booting. Check the emulator window; a wipe-data from Device Manager usually clears it. |
| `df 'C:/Program Files/Git/data': No such file` | Git Bash path mangling — `MSYS_NO_PATHCONV=1`. |
Expand Down
31 changes: 8 additions & 23 deletions .claude/skills/run-anisprinkles/driver.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,8 @@ AniSprinkles driver — pwsh .claude/skills/run-anisprinkles/driver.ps1 <command
swipe up|down|left|right One content-area swipe
scroll-to <text> Swipe up until <text> appears (max 10)
wait-for <text> [secs] Poll the UI until <text> appears (default 30s)
flyout Open the Shell navigation drawer
search Tap the Discover toolbar search icon (see Gotchas)
goto <My Anime|Discover|Settings> Open the drawer and pick a page
goto <tab> Switch tabs: Library|Discover|Search|Feed|Settings
search Shortcut for `goto Search`

logcat [lines] App-PID logcat tail (default 200)
applog Pull the on-device rotating file log
Expand Down Expand Up @@ -411,32 +410,19 @@ function Cmd-WaitFor {
throw "'$Text' never appeared within ${Seconds}s"
}

function Cmd-Flyout {
# The hamburger is the only Shell toolbar item uiautomator exposes with a
# content-desc; the page's own toolbar icons are invisible to it (see Gotchas).
Tap-By -Attr 'content-desc' -Value 'Open navigation drawer'
Start-Sleep -Milliseconds 800
}

function Cmd-Goto {
param([string]$Page)
Cmd-Flyout
# Bottom tab bar (issue #43): every tab label is a real uiautomator node carrying
# both text and content-desc, so a tab switch is a plain text tap. This replaced
# the old open-the-drawer-then-pick dance, and works from anywhere — including
# partway down a pushed details stack.
Tap-By -Attr 'text' -Value $Page
Start-Sleep -Seconds 2
}

function Cmd-Search {
# MAUI Shell's page-level ToolbarItems are NOT exposed to uiautomator — they have
# no text and no content-desc, so there is no node to find. The hamburger IS
# exposed, and the toolbar is horizontally symmetric, so the rightmost icon sits
# at (screenWidth - hamburgerCX, hamburgerCY). Resolution-independent.
$b = Find-Bounds -Xml (Get-UiDump) -Attr 'content-desc' -Value 'Open navigation drawer'
if (-not $b) { throw 'toolbar hamburger not found — is a flyout page foregrounded?' }
$w, $null = Get-ScreenSize
$x = $w - $b.CX
Say "tap toolbar search at ($x,$($b.CY)) [mirror of hamburger $($b.CX),$($b.CY) on width $w]"
Adb shell input tap $x $b.CY *> $null
Start-Sleep -Milliseconds 1200
# Search is its own tab now, so this is just a tab switch.
Cmd-Goto 'Search'
}

function Cmd-Logcat {
Expand Down Expand Up @@ -495,7 +481,6 @@ switch ($cmd) {
'wait-for' { $secs = 30; $txt = $a -join ' '
if ($a.Count -gt 1 -and $a[-1] -match '^\d+$') { $secs = [int]$a[-1]; $txt = ($a[0..($a.Count - 2)] -join ' ') }
Cmd-WaitFor $txt $secs }
'flyout' { Cmd-Flyout }
'search' { Cmd-Search }
'goto' { Cmd-Goto ($a -join ' ') }
'logcat' { if ($a[0]) { Cmd-Logcat ([int]$a[0]) } else { Cmd-Logcat } }
Expand Down
Loading