# `Cairnloop.Web.InboxLive`
[🔗](https://github.com/szTheory/cairnloop/blob/main/lib/cairnloop/web/inbox_live.ex#L1)

Inbox surface — list of conversations + Phase 25 bulk-recovery cockpit.

## Phase 25 responsibilities (decision-ID traceability)

- **D-03 / D-04:** Per-row checkbox + `@selected_ids :: MapSet.t/0` assign;
  selection is LiveView-local, cleared on remount (no persistence).
- **D-05 / research OQ4:** Sticky bulk-action bar appears at the BOTTOM of
  the inbox panel when `MapSet.size > 0`, shows the selection count, a
  `Clear selection` affordance, and a primary `Send recovery follow-up to N`
  button.
- **D-06 / D-07:** Confirmation modal renders the count, the first-5 sample
  (`updated_at desc` ordering owned by `Cairnloop.Governance.preview_bulk_recovery_cohort/1`),
  `+N more` tail, and the SINGLE rendered template body snapshotted at
  confirm-open time.
- **D-08 (Pitfall 6):** Cancel preserves `@selected_ids`. Success clears it.
- **D-10 (brand §7.5):** Oversized cohorts render a calm refusal banner with
  inline SVG icon + `var(--cl-danger)` accent (never color-alone) and the
  `Confirm send` button is `disabled`.
- **D-13:** Confirm calls `Cairnloop.Outbound.bulk_trigger/2` (through the
  `outbound_module()` indirection mirroring `conversation_live.ex`) with the
  snapshotted `:rendered_body` — the LiveView is the snapshot boundary.
- **D-14:** Cohort eligibility goes through `Cairnloop.Governance` ONLY;
  `InboxLive` runs no direct Ecto queries (the Phase 25 plan acceptance grep
  asserts the `Conversation`-where pattern is absent from this file).

## Brand tokens (WR-03 / Phase 29 D-10 closure)

Every brand color in this file uses the bare `var(--cl-<name>)` form —
no inline hex fallback. The canonical token definitions live in
`examples/cairnloop_example/assets/css/app.css` (copied from
`prompts/cairnloop.css`). Enforcement: the BRAND-04 gate test at
`test/cairnloop/web/brand_token_gate_test.exs` fails the build if any
`var(--cl-<token>, #<hex>)` string is re-introduced in `lib/cairnloop/web/`
or `examples/cairnloop_example/lib/cairnloop_example_web/live/`.

Canonical tokens used in this file: `--cl-primary`, `--cl-on-primary`
(aliased to `--cl-primary-text` in app.css), `--cl-surface`,
`--cl-surface-raised`, `--cl-border`, `--cl-text`, `--cl-danger`.

Non-canonical tokens that retain `rgba(...)` fallbacks (deferred to vM015):
`--cl-text-soft`, `--cl-overlay`, `--cl-shadow`, `--cl-danger-soft`,
`--cl-primary-disabled`, `--cl-surface-translucent`.

# `handle_event`

# `handle_info`

# `mount`

# `render`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
