# ADR-011: Vanilla Android 16 Navigation Transitions (Deprecated)

**Status:** Deprecated (Reverted to Vanilla Slide Transitions)

## Context
As of early 2026, Android 15/16 standardized "Card-style" predictive back gestures and navigation transitions. An initial attempt was made to replicate this behavior using custom Jetpack Compose and Navigation 3 APIs. It served as a high-fidelity bridge until Google provides official code or APIs to 100% replicate the internal system transition behavior.

However, the implementation was complex, relied on manual z-indexing, heavy composable drawing for scrims, and brittle heuristic state tracking (inferring pops from backstack size changes). It has been decided to drop the predictive back portion completely and implement a vanilla transition spec that aligns with standard Material 3 / Android horizontal slides.

## Current Implementation (Vanilla Slide)
The app now uses standard `slideInHorizontally` and `slideOutHorizontally` combined with `fadeIn` and `fadeOut`. This perfectly mimics the Material 3 Shared Axis X pattern and standard pre-Android 14 system slides.

*   **Forward Navigation:** Target screen slides in from the right and fades in. The outgoing screen slides slightly left (parallax of `-it/4`) and fades out.
*   **Backward Navigation:** Target screen slides in from the left (parallax of `-it/4`) and fades in. The outgoing screen slides out to the right and fades out.

This approach requires no custom `VanillaEntry` drawing hacks or predictive completion tracking, significantly reducing complexity while maintaining a highly polished and consistent look.

## Previous Implementation Details (For Historical Context)

*(These features have been removed)*

### 1. The Scrim Backdrop
Instead of a hardcoded black background behind the `NavDisplay` (which causes a harsh black gap around scaled views), we dynamically tracked the navigation direction (`isPop`). 
The `NavDisplay` container used the app's `MaterialTheme.colorScheme.background`. The target (bottom) screen applied an oversized opaque black backdrop (`alpha = 0.6f`) over itself using a custom `drawWithContent` modifier in `VanillaEntry`.

### 2. Predictive Easing ("The Limit")
To prevent horizontal movement during the back gesture drag, but ensure a smooth, zero-velocity landing when the screen was finally swiped away, we used a specialized piecewise easing (`SmoothStuckEasing`).

### 3. Dynamic Corner Radius
To avoid a mismatch between the app's card corners and the device's physical screen corners, we retrieved the radius dynamically using `view.rootWindowInsets?.getRoundedCorner(RoundedCorner.POSITION_TOP_LEFT)`.

## Consequences
*   **Pros:** The codebase is now significantly simpler, and transitions are stable and completely free of custom drawing or heuristic bugs.
*   **Cons:** We no longer support the Android 15/16 predictive back "Card" scaling effect natively inside the app's navigation graph.
*   **Maintenance:** Revisit when official Material 3 or Navigation Compose APIs provide a simple, 1:1 replica of the system predictive transition without requiring custom easings and scale logic.
