The dashboard could display drafts. It could not create them. You watched the queue and waited for a cron job to fire, or you SSH'd into the server and ran the generator manually. For a tool that is supposed to let you manage content, that is a fundamental gap.
The fix is a single endpoint: POST /api/drafts/generate?platform=. Hit it, the generator runs synchronously for that platform, new drafts come back in the response, and the UI refreshes. That is the whole thing. It is not clever.
The interesting decision was synchronous versus async. Async would be the "correct" answer in a talk on distributed systems. Kick the job onto a queue, poll for completion, show progress. But this is a personal tool running on localhost. The generator takes three to eight seconds depending on how chatty the LLM call gets. Synchronous blocks the request and gives you the drafts immediately. The spinner in the UI is honest: the user sees it while the server is actually working. When it clears, the drafts are there.
The only real guard is MAX_PENDING. If the queue already has drafts waiting for review, the endpoint returns early before hitting the generator. That keeps you from piling up drafts you will never read. Without the cap, a generate button you hit too often becomes a way to bury yourself in unreviewed output. The cap forces review before generation, not after.






