# UI surfaces by pillar

**One app shell** (`RootView` on macOS, `RootTabView` on iOS) hosts UI for **all
three pillars**. Pillars are not separate apps — they are product boundaries inside
the same container.

```mermaid
flowchart TB
    subgraph shell [TVAnarchy shell — cross-cutting chrome]
        Nav[Sidebar / tabs]
        Queue[Play queue popover]
        Gate[Fleet gate Intro / MeshJoin]
        Theme[Global theme + notifications]
    end

    subgraph watchUI [Watch UI]
        Home[Home · Player · Adult play UX]
    end

    subgraph libraryUI [Library UI]
        LibTab[Library · Metadata tabs]
    end

    subgraph downloadUI [Download UI]
        Search[Search tab]
        DlTab[Downloads tab]
        iOSDl[iOS Downloads]
    end

    subgraph devicesUI [Devices UI]
        DevTab[Devices · This Mac]
        Storage[Storage pools · extension quota]
    end

    subgraph netUI [Net UI — embedded]
        NetSet[Settings → Net]
        NetPlay[Player badges / contribute intro]
    end

    subgraph sharedSet [Settings by pillar]
        SetCross[theme · Winamp]
        SetWatch[playback · Home rails]
        SetLib[types · grouping]
        SetDl[notify · bandwidth]
        SetNet[subscriptions]
        SetDev[VPN · mesh join · pools]
    end

    Nav --> watchUI
    Nav --> downloadUI
    Nav --> sharedSet
    sharedSet --> SetWatch
    sharedSet --> SetDl
    sharedSet --> SetNet
    sharedSet --> SetX
    NetSet --> netUI
    NetPlay --> netUI
```

| Pillar | Dedicated tabs? | Primary UI homes |
|--------|-----------------|------------------|
| **Watch** | Home, Player | Queue popover, Continue UX |
| **Library** | Library, Metadata | Catalog browse, enrichment |
| **Download** | Search, Downloads | iOS Downloads tab |
| **Devices** | Devices, This Mac | Storage pools (planned), mesh join |
| **Net** | None (embedded) | Settings → Net, Player hooks |
| **Cross** | Logs, fleet gate | Theme, notifications, version |

v2 **does** change Download and Net UI — new Settings controls, Player merge
hints, Search ranking from `quality` part, Downloads accents. Winamp appearance
is **Watch-only** chrome, not the whole UI story.

## macOS sidebar (`RootView.Section`)

**Implementation detail (see plan.md Appendix C + RootView.swift)**: Single `NavigationSplitView` + `List(selection:)` with hardcoded `enum Section`. Selection drives a `@ViewBuilder` switch in the detail pane. Library gets auto-collapsed indented subnav (homeCategories). Global cross elements (queue popover, offline banner, build stamp, theme environment) always present. Visibility gating for heavy pollers (detailed player stats only on .player; transfers only on .downloads).

| Tab | Pillar | Notes |
|-----|--------|-------|
| Home | **Watch** | Rails, play/resume |
| Player | **Watch** | Transport, skip intro; Winamp chrome (custom sprites when skin active) |
| Library | **Library** | Browse, scan, refresh (+ subnav categories) |
| Metadata | **Library** | Enrichment queue |
| Search | **Download** | Torrent search → add |
| Downloads | **Download** | Transfer dashboard |
| Adult | **Watch** + **Library** | Play UX + catalog |
| This Mac | **Devices** | Local device, extension cache, policy |
| Devices | **Devices** | Registry, services, storage pools (planned) |
| Logs | **Cross** | |
| Settings | **All pillars** | Section per pillar + cross theme — [settings.md](../pillars/settings.md) |

### Global chrome (all tabs)

| Surface | Pillar |
|---------|--------|
| Play Queue popover | Watch |
| Offline sidebar status | Watch |
| Build stamp / version | X |
| Notification banner | X |
| Adult reveal toggle (`ENABLE_ADULT`) | Watch |

### Install / join gate (pre-tabs)

| Surface | Pillar |
|---------|--------|
| `IntroView` | X |
| `MeshJoinView` / QR scan | X |

## iOS tabs (`RootTabView`)

| Tab | Pillar |
|-----|--------|
| Library | Watch |
| Downloads | Download (files) + Watch (play local) |
| Remote | Watch |
| Settings | X |

### Install / join gate

| Surface | Pillar |
|---------|--------|
| `JoinFleetView` | X |
| `FleetGate` loading | X |

## Net UI (embedded, not a tab)

Net has UI — it is **not** a fourth sidebar tab. Surfaces attach to Watch and
Settings because Net is consumed while browsing/playing and configured in prefs.

| Surface | Status | Pillar | Purpose |
|---------|--------|--------|---------|
| Settings → Net subscriptions | Planned | Net | Toggle parts / trust per edition |
| Settings → contribute observations | Planned | Net | Master publish switch |
| Player → skip intro (merged bounds) | Partial | Watch + Net | Consumes `intro-markers` merge |
| Player → "intro via Net" / confidence | Planned | Net | Shows merge source |
| Player → contribute intro marker | Planned | Net | Publish observation on skip |
| Library → grouping hint badge | Planned | Net | Friend merge on show cluster |
| Search → quality-ranked releases | Planned | Net + Download | `quality` part ranks results |
| Settings → "3 fleets agree" conflict | Planned | Net | Merge transparency |

Background work (edition sync, merge) has no tab — same as governor custody has
no tab but Downloads dashboard shows the outcome.

## Download UI (shipped + planned)

| Surface | Status | Notes |
|---------|--------|-------|
| Search tab | Shipped | `SearchView` → add magnet |
| Downloads tab | Shipped | `DownloadsView` transfer dashboard |
| iOS Downloads | Shipped | `DownloadManager` / bridge |
| Offline download panel | Shipped | Watch tab chrome, Download job |
| Notification banner (download ready) | Shipped | Global chrome |
| Devices → custody / seed / etc. flags | Shipped | Full service toggles per device (see pillars/devices.md#device-services) |
| Settings → notify downloads | Shipped | Watch settings file, Download behavior |
| Settings → bandwidth policy | Planned | `BandwidthPolicy` surfacing |
| Sidebar progress / offline strip | Shipped | Download state in shell chrome |

## Watch appearance (Winamp)

macOS only. See [pillars/watch-appearance.md](../pillars/watch-appearance.md).

| Surface | When |
|---------|------|
| Settings → Appearance → theme picker | Always |
| Settings → Winamp `.wsz` import / Base / Clear | Winamp theme selected |
| Player → sprite transport / scrubber / LED | `winampSkinId` set + skin loads |
| Player → built-in bevel chrome | Winamp theme, no imported skin |
| Sidebar tint from `PLEDIT` | *planned* Phase 6a track D |

## Pillar color language (future design)

Partially implemented for Watch via `AppTheme` + imported skins:

- Watch — Standard dark or Winamp chrome (built-in or `.wsz`)
- Download — transfer/progress accents (already in Downloads tab)
- Net — subtle badge when a part has a merged friend/network view (*planned*)