Phase 1, part 2: Inbox, scheduled publishing and UTM tags

- Inbox: a top-level page, with a count in the menu, for everything
  waiting for approval; Content's drafts are reviewed there. /drafts
  redirects to it.
- Scheduling: publish a draft now or at a time (migration 3 adds
  publish_at). A scheduler in the app publishes due drafts every 30
  seconds. Posts more than 12 hours overdue, or refused before posting,
  go back to the Inbox with the reason. Content gets Scheduled and
  Published tabs.
- UTM tags on links to the company's own websites and product pages,
  added when publishing; drafts stay untagged.
- The container runs in the computer's time zone, so times are shown
  and read correctly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-20 13:17:38 -07:00
co-authored by Claude Opus 5.5
parent 13bf18facc
commit f275f039f9
24 changed files with 873 additions and 184 deletions
+17 -1
View File
@@ -330,7 +330,7 @@ mcphub failed.
### Phase 1: Content (today's pipeline, generalized) + Reddit
**Status (2026-11-20): part 1 of 4 built on `phase0-foundation`.** Phase 1 is
**Status (2026-11-20): parts 1 and 2 of 4 built on `phase0-foundation`.** Phase 1 is
built in four parts, each committed on its own: (1) the pipeline, items 1–2
below, for X and LinkedIn; (2) the approval inbox, schedule and UTM tags,
item 5; (3) Reddit, item 4; (4) promoting our own products, the rest of
@@ -347,6 +347,22 @@ item 3. Part 1:
quotes. An X draft over the limit gets one request to shorten it.
- Publishing claims the draft first (`publishing`), so it can't post twice;
a draft left `publishing` by a restart is marked failed for review.
Part 2:
- **Inbox** (top-level menu, with a count): everything waiting for
approval, one section per module; Content's drafts for now. Phase 2's
prospects and Phase 3's SEO changes add sections.
- **Scheduling**: a draft is published now or scheduled (`scheduled`,
`publish_at`, migration 3). A scheduler in the app checks every 30
seconds. A post more than 12 hours overdue (the computer was off) goes
back to the Inbox rather than out stale, and so does one refused before
posting (signed out, too long). Content has Scheduled and Published tabs.
- **UTM tags** only on links to the company's websites and product URLs
(from the profile), added at publishing; drafts are stored untagged.
`utm_source` = channel, `utm_medium` = social, `utm_campaign` = kind of
post, `utm_content` = entry slug and draft ID.
- The container now runs in the computer's time zone (`SUPERMARKET_TZ` in
compose.env, from /etc/localtime), so times show and parse correctly.
1. Port fetch → browse → select → generate → approve → publish into the web
UI, keeping the dismiss feature, tracking of what was posted where, partial
posting, and X length handling.