On Android, artwork colors on album and playlist pages popped in after the slide transition finished. The background, header, tab bar and text each changed at a different moment. #75 brought the slide transitions back, but added about 490 lines of animated palette machinery to do it: a Reanimated shared palette that pushed the whole tab standardAppearance through setNativeProps on every frame, palette animations started from two places, PaletteText/PaletteIcon wrappers, and unstable_nativeProps on each tab trigger.
This replaces that with a simpler model:
Each pushed album/playlist page paints its own artwork palette (background, header, text, icons), so the colors slide in and out with the page.
Shared chrome (the tab bar and mini player) switches palettes once, on the stack's transitionStart event, and reverts on gestureCancel. Nothing updates per frame.
Deleted palette-text.tsx, the per-frame native tab color hook, unstable_nativeProps, and the transparent header/tab bar backgrounds. iPad keeps its 400ms sidebar fade through a small useTabletBackgroundStyle.
Transition and cache follow-ups
Android page transitions are now a 100ms fade through black (old page out in 50ms, new page in over the next 50ms), replacing the ~400ms slide. Android ignores animationDuration, so plugins/with-android-fast-fade.js writes app-level overrides of react-native-screens' rns_fade_in/rns_fade_out resources. App resources take precedence over library ones, so the library and its patch are untouched. This needs a native rebuild.
Toggling "New artwork colors" in settings now clears cached palettes (in memory and the persisted palette: entries) for both algorithms, so covers are re-extracted with the selected one. Adds clearCachePrefix to the persistent cache.
Verification (Android emulator, API 37)
tsc --noEmit passes for apps/mobile.
Fade transition: fade.mp4. Pages appear fully colored with the tab bar already matching. Emulator screenrecord only encodes changed frames, so it can't show the exact 100ms timing.
Slide-era before/after videos: before.mp4, after.mp4. Before: the page slides in on black, then the background, header, tab bar and buttons fill in separately. After: each page arrives fully colored and slides out with its color. The tab bar switches when the transition starts.
Not verified / known gaps
The settings toggle's cache clear was typechecked but not exercised on device.
iPad and iOS were not run (iOS keeps its native push). The iPad fade code path is preserved but untested.
Playlist pages use the same hook but I only recorded albums.
Pre-existing, not touched here: on a cover whose persisted swatches differ from a fresh extraction, useCoverPalette repaints the page about 2s after it opens. It shows on the first album in both videos. It lives in the palette cache, not navigation, so I'm leaving it for a separate fix.
The tab ripple and the … menu button color are handled in their own PRs.
Changes made by Claude Opus 5.5 (Claude Code, via T3 Code).
On Android, artwork colors on album and playlist pages popped in after the slide transition finished. The background, header, tab bar and text each changed at a different moment. #75 brought the slide transitions back, but added about 490 lines of animated palette machinery to do it: a Reanimated shared palette that pushed the whole tab `standardAppearance` through `setNativeProps` on every frame, palette animations started from two places, `PaletteText`/`PaletteIcon` wrappers, and `unstable_nativeProps` on each tab trigger.
This replaces that with a simpler model:
- Each pushed album/playlist page paints its own artwork palette (background, header, text, icons), so the colors slide in and out with the page.
- Shared chrome (the tab bar and mini player) switches palettes once, on the stack's `transitionStart` event, and reverts on `gestureCancel`. Nothing updates per frame.
- Deleted `palette-text.tsx`, the per-frame native tab color hook, `unstable_nativeProps`, and the transparent header/tab bar backgrounds. iPad keeps its 400ms sidebar fade through a small `useTabletBackgroundStyle`.
**Transition and cache follow-ups**
- Android page transitions are now a 100ms fade through black (old page out in 50ms, new page in over the next 50ms), replacing the ~400ms slide. Android ignores `animationDuration`, so `plugins/with-android-fast-fade.js` writes app-level overrides of react-native-screens' `rns_fade_in`/`rns_fade_out` resources. App resources take precedence over library ones, so the library and its patch are untouched. This needs a native rebuild.
- Toggling "New artwork colors" in settings now clears cached palettes (in memory and the persisted `palette:` entries) for both algorithms, so covers are re-extracted with the selected one. Adds `clearCachePrefix` to the persistent cache.
**Verification (Android emulator, API 37)**
- `tsc --noEmit` passes for `apps/mobile`.
- Fade transition: [fade.mp4](https://gitcoffee.dev/attachments/18181e3e-4f72-4fbc-8c20-d91a13d80be2). Pages appear fully colored with the tab bar already matching. Emulator screenrecord only encodes changed frames, so it can't show the exact 100ms timing.
- Slide-era before/after videos: [before.mp4](https://gitcoffee.dev/attachments/5533515f-fe73-4daa-9e8e-63738ff8ed2e), [after.mp4](https://gitcoffee.dev/attachments/3577a227-94c3-4ebe-b66f-b7ce3d1f4886). Before: the page slides in on black, then the background, header, tab bar and buttons fill in separately. After: each page arrives fully colored and slides out with its color. The tab bar switches when the transition starts.
**Not verified / known gaps**
- The settings toggle's cache clear was typechecked but not exercised on device.
- iPad and iOS were not run (iOS keeps its native push). The iPad fade code path is preserved but untested.
- Playlist pages use the same hook but I only recorded albums.
- Pre-existing, not touched here: on a cover whose persisted swatches differ from a fresh extraction, `useCoverPalette` repaints the page about 2s after it opens. It shows on the first album in both videos. It lives in the palette cache, not navigation, so I'm leaving it for a separate fix.
- The tab ripple and the `…` menu button color are handled in their own PRs.
Changes made by Claude Opus 5.5 (Claude Code, via T3 Code).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Replace the 400ms slide with a 100ms fade through black, set via app-level
overrides of react-native-screens' fade anim resources.
Clear cached artwork palettes when the artwork color setting changes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
joshuafhiggins
changed title from fix(mobile): simplify Android artwork colors during page transitions to fix(mobile): fast Android page fades with artwork colors2026-11-16 21:41:03 -05:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
On Android, artwork colors on album and playlist pages popped in after the slide transition finished. The background, header, tab bar and text each changed at a different moment. #75 brought the slide transitions back, but added about 490 lines of animated palette machinery to do it: a Reanimated shared palette that pushed the whole tab
standardAppearancethroughsetNativePropson every frame, palette animations started from two places,PaletteText/PaletteIconwrappers, andunstable_nativePropson each tab trigger.This replaces that with a simpler model:
transitionStartevent, and reverts ongestureCancel. Nothing updates per frame.palette-text.tsx, the per-frame native tab color hook,unstable_nativeProps, and the transparent header/tab bar backgrounds. iPad keeps its 400ms sidebar fade through a smalluseTabletBackgroundStyle.Transition and cache follow-ups
animationDuration, soplugins/with-android-fast-fade.jswrites app-level overrides of react-native-screens'rns_fade_in/rns_fade_outresources. App resources take precedence over library ones, so the library and its patch are untouched. This needs a native rebuild.palette:entries) for both algorithms, so covers are re-extracted with the selected one. AddsclearCachePrefixto the persistent cache.Verification (Android emulator, API 37)
tsc --noEmitpasses forapps/mobile.Not verified / known gaps
useCoverPaletterepaints the page about 2s after it opens. It shows on the first album in both videos. It lives in the palette cache, not navigation, so I'm leaving it for a separate fix.…menu button color are handled in their own PRs.Changes made by Claude Opus 5.5 (Claude Code, via T3 Code).
🤖 Generated with Claude Code
fix(mobile): simplify Android artwork colors during page transitionsto fix(mobile): fast Android page fades with artwork colors