Skip to main content

Spec: ClimateTile

Implementable contract for the Cabin ClimateTile — automotive climate glance + adjustment (temp / fan / seat heat). Not a Material card clone. Overview: hvac.md. Layer 2 domain surface (features).

Purpose​

One zone’s climate at a glance: temperature, fan level, and seat heat with large steppers. Restriction Engine gates adjustments while Moving (fail-closed). Display remains honest under unavailable / stale / fault signals.

Anatomy​

┌──────────────────────────────────────────────┐
│ Zone label │
│ [−] 22° [+] Fan [−] ■■■□□ [+] │
│ Seat heat [1] [2] [3] │
└──────────────────────────────────────────────┘
RegionRole
Zone labelShort ownership (Driver / Passenger / Rear)
Temp stepper± with tabular numeric display
Fan stepper± with discrete level glyphs
Seat heatDiscrete level cycle / steps (0–max)

Craft constraints​

@sora craft locked for this slice:

  1. Cabin density — 76dp control minima; low-density zone layout (not phone card packing).
  2. Climate accent as accent only — thin domain mark; never body copy color and never a large climate wash fill.
  3. RE-quiet while Moving — values stay full opacity / glanceable; steppers soft-disable (quietAlpha) without a heavy grey wash or “restricted” banner.
  4. Honest empty / stale — unavailable → —; stale → last value + · stale (and a11y “(stale)”); fault → Fault — never invent numbers.
  5. Not a Material tile clone — flat cabin surface, outline affordances, no elevated card fill / radius wash.

Night warning / error / charging stay locked — unused as ClimateTile chrome.

States​

StateBehavior
LiveSignal.Value for temp / fan / seat heat
UnavailableEm dash — never invent values
StaleLast value + · stale label
FaultFault presentation; controls non-activatable for that channel
Power offShow off affordance; large target to power on when allowed
Restricted (gate)Adjustments Block → RE-quiet soft-disable; values stay glanceable
Day / NightTheme Kit; climate accent mark only

Sizes & type (from tokens)​

TokenRole
cabin.component.climateTile.controlMinSize76dp touch minimum
cabin.component.climateTile.gapInter-control gap
cabin.component.climateTile.paddingTile inset
cabin.component.climateTile.cornerRadiusModest radius
cabin.color.semantic.climateThin accent mark only (not body text / washes)
cabin.color.scheme.*.outlineQuiet control outlines
cabin.color.scheme.*.onSurfaceZone / temp / fan / seat body copy
cabin.type.role.title / label / statusTemp numeral / labels

Stub: tokens/cabin.tokens.json.

Night warning / error / charging stay locked — ClimateTile must not consume them for decoration.

Compliance gates​

InteractionClimateTile useMoving / Restricted / Unknown
GlanceDisplay onlyAllow
HvacAdjustTemp ±, fan ±, seat heatBlock (fail-closed)
HvacPeekSystem bar limited peek only — not this tileAllow (bar matrix)

Missing CabinComplianceHost / LocalCabinComplianceState is fail-closed (GateDisposition.Block) for adjustments.

Safety class: Convenience. Defrost stays on dedicated safety-critical controls (safety-critical) — not buried solely in this tile.

Views API (Alpha)​

class CabinClimateTileView @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
) : ViewGroup(context, attrs) {
fun bind(state: CabinClimateTileState) { /* … */ }
fun setOnActionListener(listener: ((CabinClimateTileAction) -> Unit)?) { /* … */ }
fun setCompliance(host: CabinComplianceHost?) { /* … */ }
}

Package: dev.decoupled.cabin.views. Module: cabin-views / CabinViews.

Compose API (Experimental)​

@Composable
fun CabinClimateTile(
state: CabinClimateTileState,
onAction: (CabinClimateTileAction) -> Unit,
modifier: Modifier = Modifier,
)

Package: dev.decoupled.cabin.compose. Same gates and Signal honesty as Views; wrap with CabinTheme. Not for SystemUI Soong adoption.

Shared state / actions (parity)​

data class CabinClimateTileState(
val zoneLabel: String,
val temperatureC: Signal<Int>,
val fanLevel: Signal<Int>, // 0..fanMax
val fanMax: Int = 5,
val seatHeatLevel: Signal<Int>, // 0..seatHeatMax
val seatHeatMax: Int = 3,
val powerOn: Boolean = true,
)

sealed interface CabinClimateTileAction {
data object TempUp : CabinClimateTileAction
data object TempDown : CabinClimateTileAction
data object FanUp : CabinClimateTileAction
data object FanDown : CabinClimateTileAction
data object SeatHeatUp : CabinClimateTileAction
data object SeatHeatDown : CabinClimateTileAction
}

Identical contracts on Compose and Views (duplicated types; same fields).

Acceptance criteria​

  • Automotive ClimateTile (not Material tile/card clone)
  • Views-first Alpha + Compose Experimental parity
  • HvacAdjust Block while Moving / Restricted / Unknown; fail-closed null host
  • RE-quiet while Moving (values glanceable; soft-disable steppers)
  • Exhaustive Signal for temp / fan / seat heat — honest empty/stale
  • Climate accent as mark only (not body copy / not large washes)
  • 76dp cabin density; Theme Kit outline; locked night safety unused as chrome
  • Unit tests for RE + states on both stacks
  • No catalog / marketing / docs-site edits as product deps