# DRE Email Inbox Page Pattern ## Data Source Emails served from `/var/www/internal/data/dre-mails.json`, populated by `dre-mail-poller.py` (cron every 60s). Each record: ```json { "id": "dre:1234", "mailbox": "dre", "from": "client@example.com", "to": "dre@debtrecoveryexperts.com", "subject": "Question", "body_preview": "Hi...", "body": "Full body...", "date": "2026-07-08 09:30:00", "claim_match": "DRE-2026-0142", "is_read": false } ``` ## Inbox Page UI - **Stats:** Total count, unread (dre), unread (collections) - **Filters:** Search (sender/subject/body), mailbox toggle (All / Client / Debtor) - **Email rows:** Status dot (amber=unread, gray=read), mailbox badge (dre=blue, collections=amber), sender, subject, date, claim badge, expand button - **Expanded:** Full body, mark-as-read, claim link - **Refresh button:** Re-fetches `/data/dre-mails.json` ## Agents - **Internal Agent DRE** (letter queue sidebar) — knows DRE is a Texas-registered debt collection agency, FDCPA compliant. Responds to "who are you", "what is DRE", "are you registered", "collection agency". - **Public Agent DRE** (portal intake form) — same identity info. First interaction says "Texas-registered debt collection agency".