Commit Graph

6 Commits

Author SHA1 Message Date
Loma Bot Ops 8086197f58 Add review window and manual content generation 2026-11-27 13:34:41 +07:00
Loma Bot Ops 7f1a9face1 Add image art direction, Thai date picker on week board, sturdier image download
- Share IMAGE_ART_DIRECTION between editable image prompts and queued post drafts
- Use ThaiDateTimePicker for week board planning; a11y, clear action, mobile layout
- Show planned day in Thai format in the generation queue
- Wait longer for ChatGPT image download and handle the download menu item

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-23 23:14:13 +07:00
Loma Bot Ops 7d6f42b964 Use dedicated Chrome profile for image automation 2026-11-23 22:51:57 +07:00
Loma Bot Ops ac4d3bf7a5 Prepare dedicated Playwright image browser and login checks 2026-11-23 22:36:22 +07:00
Loma Bot Ops df20406cf5 Diagnose image worker failures and normalize Facebook uploads 2026-11-23 22:27:53 +07:00
Loma Bot Ops 6994ba1a4e Move AI to Codex CLI + ChatGPT browser workers with a durable post queue
Text generation now runs through a PM2 automation worker (codex exec) and
images through the ChatGPT Chrome extension, replacing the Anthropic API.
generateStructured keeps its signature; results are Zod-validated on the web
side and the worker is reached with a bearer secret.

- AI image assistant in the post editor: editable prompt step, then image
  (square or 3:2 only, since Instagram rejects 2:3), stored via putBlob
- Full-post queue (PostGenerationJob + migration): enqueue returns 202, FIFO
  claim under an advisory lock, heartbeat, stale-job failure, per-user
  request key, cancel while QUEUED; output is always a DRAFT with audit rows
- Separate 10 images/page/day quota; text quota excludes images
- Worker reports Codex usage-limit as 429 with a clear Thai message
- Docs: AI-AUTOMATION.md, ARCHITECTURE/README/.env.example updated

Known gap: the live FIFO queue check (scripts/check-post-queue.mjs) has not
passed yet; the last run hit the Codex account usage limit.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-22 21:52:09 +07:00