MailglassAdmin.Inbound.RoutingTrace (MailglassAdmin v1.2.0)

Copy Markdown View Source

Routing-trace card (IADM-04) — the one novel inbound surface.

Answers "why did this message not match any mailbox?" without an iex session, by rendering a per-route clause diff for a :no_match record. This component is NET-NEW, but reuses ONLY existing card/badge/marker chrome (no charts, no JS).

The verdicts are computed upstream by MailglassInbound.Router.Matcher.explain/2 (reached through the runtime gateway, D-48-06), so the rendered pass/fail equals real matcher behavior — this view NEVER re-implements equality/regex/wildcard semantics. The trace assign is a list (declared route order) of %{mailbox: String.t(), verdicts: [tuple()]}; each verdict tuple's LAST element is the clause pass? boolean (per Matcher.clause_verdict):

  • {:recipient, matcher, actual, pass?}
  • {:subject, matcher, actual, pass?}
  • {:header, name, matcher, actual_list, pass?}

Recipient actuals are masked via Components.mask_recipient/1 (PII discipline, T-48-13). A nil matcher renders the literal any (wildcard); a %Regex{} renders ~r/.../; an exact string renders verbatim — all in .mono.

Summary

Functions

routing_trace(assigns)

Attributes

  • trace (:list) (required)