API Reference MailglassAdmin v#1.0.0

Copy Markdown View Source

Modules

Mountable LiveView preview and operator surfaces for mailglass.

Stack-agnostic authorization seam for production operator access and future destructive actions.

Brand-book-aligned shared UI atoms used throughout mailglass_admin.

Compile-time asset server for the mailglass_admin preview dashboard.

Recent deliveries list with semantic selected-row treatment.

Shared action-time authorization helper for destructive operator work.

Selected delivery summary header.

Compact filter controls for the operator deliveries screen.

Internal on_mount authorization hook for the production operator surface.

Shared presenter for operator-facing replay availability and outcome wording.

Server-rendered replay confirmation modal for the operator delivery detail view.

Read-only tenant-scoped support cues for the selected delivery context.

Suppression visibility card with reversibility copy.

Read-only delivery timeline in chronological order.

Read-only operator dashboard for recent deliveries, timeline history, and suppression visibility.

Gateway for the optional {:phoenix_live_reload, "~> 1.6"} dep (CONTEXT D-24, dev-only).

Type-inferred assigns form per 05-UI-SPEC §"Assigns form — type-inferred fields" (lines 354-368) + 05-RESEARCH.md lines 1470-1571.

Device-width segmented control: three buttons (375 / 768 / 1024) that drive the iframe's inline width style per 05-UI-SPEC lines 267-280.

Reflection for mailable modules — finds use Mailglass.Mailable modules, reads their preview_props/0 callback if present, and returns the pair ready for the preview dashboard sidebar.

on_mount hook the Router macro appends after any adopter-provided :on_mount hooks. Reads the whitelisted session "mailables" value populated by the router's preview session callback and runs discovery before the preview LiveView finishes mounting.

Sidebar function component: mailable list with collapsible scenario groups + status badges.

Tabs function component: HTML · Text · Raw · Headers tab strip plus the matching content pane per 05-UI-SPEC lines 220-228 + 294-352.

The single dev-preview LiveView surface (PREV-03..PREV-05).

Typed topic builder for mailglass_admin PubSub broadcasts. Every topic is prefixed mailglass: — Phase 6 LINT-06 PrefixedPubSubTopics (see the forthcoming check in the core mailglass package) enforces the prefix at lint time. The prefixed shape matches Mailglass.PubSub.Topics in the core library; the two modules intentionally share the convention so adopter telemetry handlers can pattern-match on a single namespace.

Preview and operator dashboard mounts.

Mix Tasks

Compiles mailglass_admin/assets/css/app.css to mailglass_admin/priv/static/app.css via the tailwind Hex package — zero Node toolchain required.

Runs Tailwind in --watch mode. Recompiles priv/static/app.css on every save to assets/css/app.css or any HEEx source under lib/mailglass_admin/.

Curls the latest daisyui.js + daisyui-theme.js from the daisyUI GitHub releases page and writes them to assets/vendor/. Prepends a pin-comment with today's date + the source URL for CHANGELOG traceability per CONTEXT D-22.