Skip to content

Optim/unified player sheet arch redesign#1022

Merged
theovilardo merged 3 commits intomasterfrom
optim/unified-player-sheet-arch-redesign
Feb 10, 2026
Merged

Optim/unified player sheet arch redesign#1022
theovilardo merged 3 commits intomasterfrom
optim/unified-player-sheet-arch-redesign

Conversation

@theovilardo
Copy link
Copy Markdown
Owner

No description provided.

- **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.
@theovilardo theovilardo merged commit f94b31e into master Feb 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant