# NuvioTV Port Reversion — Build Damage Catalog (2026-05-28)

The NuvioTV port was reverted, but the revert was incomplete —
699 compilation errors across 30+ files. This catalog captures the error patterns.

## Error Categories (by impact)

### 1. ImmutableBorder — 23 files
`androidx.tv.material3.ImmutableBorder` removed between alpha and RC.
Fix: migrate to `Border` + `BorderStroke` (see tv-material3-api-pitfalls.md §11).

### 2. Coil v3 Migration — 1 file (NexStreamApplication.kt)
- `OkHttpFetcher` → `networkFetcherFactory` (Coil 3.0.4)
- `crossfade` → `crossfade()` extension
- `DiskCache.Builder.directory(File)` → `.directory(String.toPath())`
- `ImageLoaderFactory` interface replaces `newImageLoader()`

### 3. Theme/Acitvity — 1 file (MainActivity.kt)
- `NexTheme` — NuvioTV theme, doesn't exist in UNSPOOLED
- `TvMaterialTheme` + `tvColorScheme` — API changed

### 4. DebridProvider References — 4 files
AllDebridClient, PremiumizeClient, RealDebridClient, TorBoxClient
reference `DebridProvider` from NuvioTV's domain model.
UNSPOOLED uses `DebridService` + `DebridProvider` (different type).

### 5. Component API Mismatches — ~12 files
- `ContextMenu.kt:130` — `.height` → `.heightIn`
- `MediaRow.kt:74` — missing `Column` import
- `NexFocusIndicator.kt:13` — `isFocused` removed from Modifier (need `onFocusChanged`)
- `ProfileSelectScreen.kt:37` — same `isFocused`
- `DebridSetupCard.kt:44` — `TextField` import from wrong package
- `ProfileCreateScreen.kt:51` — same `TextField`
- `PlayerScreen.kt:30` — `onKeyEvent` → `onPreviewKeyEvent`
- `OnboardingScreen.kt:227` — `buttonColors` → `colors`
- `OttRowPicker.kt:145` — same `buttonColors`
- `TraktSetupCard.kt:53` — missing `collectAsState` import
- `StatsOverlay.kt:63` — `EnterTransition` vs `ExitTransition` swapped

### 6. Structural/Type Errors — 5 files
- `SettingsViewModel.kt` — 50-field `combine` destructuring (Kotlin max: component5)
- `CacheManager.kt` — public inline accessing non-public API (6 errors)
- `TraktService.kt:167` — return type mismatch (Flow vs List)
- `SearchViewModel.kt:330` — unresolved label
- `AddonsViewModel.kt:287` — cannot infer type parameter

## Fix Strategy (3 batches, ~2-3 hours)

**Batch 1 — Infrastructure (fixes most files at once):**
1. Migrate ImmutableBorder → Border (23 files, one pattern)
2. Fix NexStreamApplication.kt → Coil v3
3. Fix MainActivity.kt → theme setup

**Batch 2 — NuvioTV Artifacts:**
4. Replace DebridProvider references
5. Fix missing imports (isFocused, collectAsState, TextField, Column, buttonColors)

**Batch 3 — Structural:**
6. SettingsViewModel destructuring → indexed access
7. CacheManager visibility → make internal/public
8. Individual type mismatches

## Environment Setup (already done)
- gradlew 8.13 generated
- local.properties with SDK + JAVA_HOME
- gradle.properties jvmargs=-Xmx2048m
- tv_banner.xml drawable created
- ic_launcher_foreground.xml + manifest switch
- Duplicate colors removed from styles.xml