Optim/unified player sheet arch redesign#1022
Merged
theovilardo merged 3 commits intomasterfrom Feb 10, 2026
Merged
Conversation
- **Architecture Refactoring**:
- Implements `UnifiedPlayerSheetV2` as a standalone host to decouple the new player logic from the legacy implementation.
- Introduces `SheetActionHandlers` and `FullPlayerRuntimePolicy` to centralize callback management and runtime behavior rules.
- Extracts composition policies into `rememberFullPlayerCompositionPolicy` to granularly control when the full player is rendered vs. disposed.
- **Performance & UI Optimization**:
- Adds `allowRealtimeUpdates` logic to disable expensive progress and wavy slider animations when the player is occluded by overlays (Queue/Cast) or partially collapsed.
- Implements `reconcileQueueUiItems` to preserve `QueueUiItem` identity across queue updates, reducing unnecessary recompositions.
- Dynamically swaps expensive smooth-corner shapes for simpler `RoundedCornerShape` during scrolls and reordering to improve frame rates.
- Opt-out of expensive shadow blur effects when the player is expanded or the queue is active.
- **Interaction & Gestures**:
- Refines `QueueSheetController` with a specific "quick flick" velocity threshold for easier queue expansion via short, fast upward gestures.
- Optimizes `WavySliderExpressive` to accept an external `InteractionSource`, fixing stepping lag by deriving progress directly from state.
- Adjusts drag activation thresholds and adds velocity tracking to the `FullPlayerContent` gesture area for improved responsiveness.
- **State Management**:
- Refactors `MainActivity` state collection to use granular "slices" for `DismissUndoBar` and playback visibility, reducing root-level recompositions.
- Streamlines telemetry state collection in `UnifiedPlayerQueueAndSongInfoHost` to only observe active timers when the queue is visible.
- **Miscellaneous**:
- Adds `profileable` manifest entry for benchmarking.
- Fixes an issue where `QueueBottomSheet` could snap to an invalid offset if measured height was not yet available during an open request.
- **Cast UI**: Refine `CastBottomSheet` click logic to allow re-selection of a selected device unless it is explicitly in a "connecting" state.
- **Session Management**:
- Enable retrying a failed connection to the same route in `PlayerViewModel` by forcing a disconnect/re-select flow if no active session exists.
- End the current session and reset state if the Cast player is unavailable during playback transfer.
- **Queue Loading**: Implement a retry mechanism for the initial queue load in `CastTransferStateHolder` to handle transient failures before giving up and ending the session.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.