# TV Material3 API Gotchas (262→0 error fix pass)

These are the exact signatures subagents get wrong. The first build had 262 errors; 90% were these patterns.

### Border / Focus
- ❌ `ImmutableBorder(width=2.dp, ...)` → ✅ `Border(BorderStroke(2.dp, color))`
- ❌ `ClickableSurfaceDefaults.border(focused=Border(...))` → ✅ `.border(focusedBorder=Border(BorderStroke(...)))`

### Surface
- ❌ `Surface(shape=RoundedCornerShape(...))` → ✅ `Surface()` — no shape param (expects ClickableSurfaceShape)
- ❌ `Surface(color=...)` → ✅ `Surface(colors=SurfaceDefaults.colors(containerColor=...))`

### Button colors
- ❌ `Button(colors=buttonColors(...))` → ✅ `Button(colors=ButtonDefaults.colors(...))`

### Duplicate imports
Delete duplicate `import androidx.tv.material3.Border` lines.

### Double-build
`MediaItem.Builder().setUri(url).build().build()` → remove second `.build()`

### Suspend DAO → Flow
```kotlin
// ❌ calling .map on suspend result
// ✅ wrap in flow { emit(dao.get().map{...}) }
```

### Other
- TextField → import from compose.material3, not tv.material3
- `MediaType.get()` → `"".toMediaType()` with `okhttp3.MediaType.Companion.toMediaType`
- `trafficMax` → `limitMax` in PremiumizeClient
- `crossinline` on non-inline fn → remove
- `onKeyEvent` block → remove entirely (API not available in this Compose version)
- Missing NavHost `composable()` entries → runtime crash, not compile error. Grep for all `Screen.X.route` navigations
