kStatusLineRoles top-level property

Map<StatusLineRoleKey, Style Function(TuiTheme theme)> kStatusLineRoles
final

The statusLine role TABLE (issue #805 seam): maps each role key onto an EXISTING TuiTheme role. S1's token merge (#804) re-points these lambdas at the dedicated statusLine* roles — the only place that changes; every renderer paints through this table, never a raw color. Unmodifiable: a stray write must not corrupt every later frame (the S1 token merge re-points entries here, in code, not at runtime).

Implementation

final Map<StatusLineRoleKey, Style Function(TuiTheme theme)> kStatusLineRoles =
    UnmodifiableMapView(<StatusLineRoleKey, Style Function(TuiTheme theme)>{
      StatusLineRoleKey.brandA: (t) => t.accent,
      StatusLineRoleKey.brandB: (t) => t.accent2,
      StatusLineRoleKey.model: (t) => t.toolTitle,
      StatusLineRoleKey.mode: (t) => t.muted,
      StatusLineRoleKey.path: (t) => t.focusBorder,
      StatusLineRoleKey.gitClean: (t) => t.success,
      StatusLineRoleKey.gitDirty: (t) => t.warning,
      StatusLineRoleKey.gitStaged: (t) => t.success,
      StatusLineRoleKey.gitUntracked: (t) => t.focusBorder,
      StatusLineRoleKey.pr: (t) => t.accent,
      StatusLineRoleKey.subagents: (t) => t.accent2,
      StatusLineRoleKey.spend: (t) => t.accent2Soft,
      StatusLineRoleKey.output: (t) => t.toolOutput,
      StatusLineRoleKey.context: (t) => t.accent2Soft,
      StatusLineRoleKey.time: (t) => t.muted,
      StatusLineRoleKey.name: (t) => t.muted,
      StatusLineRoleKey.dim: (t) => t.muted,
      StatusLineRoleKey.warn: (t) => t.warning,
      StatusLineRoleKey.error: (t) => t.error,
      StatusLineRoleKey.separator: (t) => t.borderMuted,
      StatusLineRoleKey.gaugeUsed: (t) =>
          Style(foregroundRgb: t.focusBorder.foregroundRgb),
      StatusLineRoleKey.gaugeUnused: (t) => t.border,

      // The band fill (#806): the nearest existing background tint (the
      // composer-adjacent user-message band). S1's statusLine* tokens
      // re-point this one lambda — the band writer never names a color.
      StatusLineRoleKey.bandBg: (t) =>
          Style(backgroundRgb: t.userMessageBg.backgroundRgb),

      // Autopilot (gh-946): the accent — bold primary highlight — so the
      // never-blocks mode stands out from the quiet muted mode role.
      StatusLineRoleKey.autopilot: (t) => t.accent,
    });