Company.xlsx
bulkmailer
bulkmailer_source.zip
memory.md
outputs
sendername.xlsx
summarized_conversations
todo.md
var
---
Dockerfile
README.md
alembic
alembic.ini
app
---
---
# Bug-Fix Punch List (user bug report + new features)

## Investigation
- [x] Survey workspace + server/worker state (server OK, worker OK)
- [x] Read shared app.js + all page JS files; compare expectations vs actual API responses
- [x] Reproduce Gmail bug locally (root cause: fixed sidebar overlapped left content — hid buttons)
- [x] Root-cause systemic layout bug: `main#content` lacked margin-left — FIXED in app.css

## Fixes (reported bugs) — progress update
- [x] Campaigns: emails not sent on start + nothing under "My Campaigns" — FULLY VERIFIED: wizard 12-step walk-through, campaign created + listed, Start pressed, Celery send_one tasks executed per recipient, per-recipient rows materialized (subject rotation, unique invoice numbers, amounts). Sends honestly fail at Gmail API boundary (no real OAuth client in sandbox) — pipeline proven.
- [x] Campaign monitor: live tracking FIXED — added 4s poll loop (SSE only fired on counter changes; retries didn't) + renamed Cancel→Stop; Start/Pause/Resume/Stop all browser-verified; meterSegs JS crash fixed (was number, called as function); stat grid + per-recipient table update live
- [x] "Edit" option not working — ROOT CAUSE: api() sent "[object Object]" for PUT/PATCH (3 call sites); fixed systemically in app.js (auto-JSON); browser-verified campaign rename end-to-end (paused → Edit → rename → Save → DB shows "QA Campaign 001 v2")
- [x] Subject line not used in sent emails — FIXED & VERIFIED: subject rendered via engine.substitute() at send time; DB send_attempts.subject shows fully rendered subjects ("Balance due: $1,017.64 — due 2026-09-25"); monitor table + CSV export now display the rendered subject (endpoint prefers send_attempts over raw template)
- [x] Templates: uploaded HTML file not appearing in saved template list — FIXED & VERIFIED: upload via Upload .html modal (qa_invoice.html) → appears in Saved Templates list (source: upload, 0.3 KB, all variables detected)
- [ ] Clear All buttons — verified on phones; check remaining pages (recipients, suppression, subjects, templates, attachments)
- [ ] Logo: no logo file in workspace — ASK USER to re-upload

## New features
- [x] Template section: convert HTML body to PDF / image / Word — FULLY VERIFIED END-TO-END: converters (WeasyPrint/wkhtmltoimage/python-docx) pass scripts/test_converters.py; Test Image + Test Word buttons (200 + toasts); wizard Step 5 auto-convert radios + info notice; fixed blocking step-validation bug (body_* modes wrongly required template/attachment); walked all 12 wizard steps → created campaign #2 "QA Auto-Convert Word" (body_word mode); Start → 3 recipients, each with unique invoice + real per-recipient DOCX attachment (DB: send_attempts.attachment_names = Invoice_INV-*.docx); subjects fully rendered. Monitor SUBJECT column now shows the ACTUALLY-RENDERED subject from send_attempts (was raw rotation template); CSV export now shows real account email/subject/template names (was numeric IDs) — verified via API. Campaign #2 stopped via Stop button (cancelled confirmed in DB).
- [x] Campaign monitor: live tracking + stop/pause/resume — VERIFIED: 4s poll loop, stat grid + per-recipient table live, Start/Pause/Resume/Stop all browser-verified (Stop re-verified this session: campaign #2 running→cancelled)
