ADR 0005: Compose-first app kit, Views for build-tree, shared foundation
- Status: Accepted
- Date: 2026-09-21
Context
Cabin v0.1 froze Views-first platform chrome (ADR 0002): SystemUI consumes
CabinViews + tokens + compliance. App surfaces still need a full dual-stack
kit. Duplicating *State / *Action in Compose and Views (ClimateTile,
MediaNowPlaying) already drifted. car-ui-lib remains a Views/XML + RRO
chassis library; its Compose path is an alpha plugin ComposeView, not a
component kit. AAOS 25Q4 adds platform rotary for Compose on Android 14+.
Decision
- Compose-first for application surfaces. The Experimental kit in
cabin-composescaffolds the full component inventory. - Native Views only for Soong / SystemUI / build-tree needs: chrome already shipped, plus dock, app bar, list item, paged list, button, switch, slider, stepper, dialog, preference rows, quick settings, focus-area helper. Not 1:1 XML for climate/EV/ADAS/cluster.
cabin-foundationholds size classes, display profiles, and shared State/Action types. No Compose or Views widget dependencies.cabin-gaugesis a separate opt-in module. Never a SystemUIstatic_libsentry.- Inventory file
components/cabin.components.yamlplustools/generate_cabin_components.pyemit Experimental scaffolds. Handwritten bodies remain for the four implementable specs (System Bar, Status Bar, ClimateTile, MediaNowPlaying). - Coexist with
car-ui-lib. MapCarUxRestrictionsintoVehicleUiState. Do not replace CarUiRecyclerView / Toolbar / RotaryService. Hosts may keepFocusParkingView/FocusAreafrom car-ui-lib.
Scaffolds are Experimental (@CabinScaffold). They render, expose actions,
and honor the Restriction Engine. They are not production-complete visuals.
Consequences
- SystemUI sketch stays tokens + compliance + views (ADR 0002 unchanged)
- Compose ⊀ Views and Views ⊀ Compose still hold
- No umbrella
CabinAll - OEM apps depend on
cabin-compose(+ foundation transitively); platform chrome stays onCabinViews - ClimateTile / MediaNowPlaying state types live in foundation; Compose and
Views import those types (Kotlin typealiases cannot re-export sealed nested
members such as
TempUp/PlayPause)