Skip to content

Per-platform promotion fields: caption override, locations, YouTube SEO metadata, video alt text - #310

Open
gynsus wants to merge 5 commits into
trypostit:mainfrom
gynsus:pr/promotion-fields
Open

Per-platform promotion fields: caption override, locations, YouTube SEO metadata, video alt text#310
gynsus wants to merge 5 commits into
trypostit:mainfrom
gynsus:pr/promotion-fields

Conversation

@gynsus

@gynsus gynsus commented Aug 30, 2026

Copy link
Copy Markdown

Stacked on #309 (YouTube description + first comment) — the two share PostPlatformMetaRules and the YouTube editor panel. Diff shrinks to just this feature once that one merges.

One post, many networks — but the fields that make a post promote well differ per network. This adds four per-platform capabilities, all stored in PostPlatform.meta, all validated centrally in PostPlatformMetaRules so the web editor, REST API, and MCP accept them equally.

Per-channel caption override (meta.content)

The most requested one: short punchy copy for X next to a long Instagram caption, without splitting the post. Every publisher and the publish-time length check now read PostPlatform::resolvedContent() (override if set, post content otherwise); the editor shows a per-channel "custom caption" card with that platform's character limit, and the preview renders the override.

Location tagging (Instagram + Facebook)

meta.location_id / meta.location_name tag IG feed/reel/carousel containers and FB feed/photo posts with a Facebook place. Meta closed place search to third-party apps, so the ID is entered by hand — the name field is just a human label. Stories and carousel children don't accept location_id (API limitation), and the publisher respects that.

YouTube SEO metadata

meta.title (own field instead of trimming the first content line), tagssnippet.tags, category_id, default_language, and recording_location {lat, lng, description}recordingDetails — the upload request asks for snippet,status,recordingDetails parts accordingly.

Video alt text (Mastodon + Bluesky)

Both accept media descriptions on video, but the alt editor only opened for images. It now opens for video items too; Mastodon sends it as the media description, Bluesky as embed.alt.

Testing

Meta persistence covered in PostApiPlatformMetaTest / PostPlatformMetaToolTest; publisher behavior in the Instagram (location on container), Mastodon (override + video alt), Facebook, X, Bluesky, and YouTube suites. All running in production on a self-hosted instance.

gynsus added 5 commits August 30, 2026 16:02
Two per-platform meta fields, wired through web/API/MCP validation like
Pinterest's board_id:

- description (YouTube, ≤5000): full video description with clickable
  links; the publisher falls back to the post content when absent, so the
  pre-meta behavior is unchanged.
- first_comment (YouTube + Instagram, ≤2200): posted by the account right
  after a successful publish — the classic home for links Instagram
  captions can't render and YouTube descriptions bury. Runs after
  markAsPublished and never fails the post; failures are logged.

Instagram connects now request the manage-comments scope (existing
accounts keep publishing; the first comment logs a permission error until
reconnected). YouTube already held youtube.force-ssl.
The 100-char cap predates the per-platform meta: back then the whole
content served as both title and description. Now the title comes from
meta.title (validated at 100) or is auto-truncated by buildTitle, and the
content lands in the description (5000) unless meta.description overrides
it — yet a fully meta-equipped post still failed publish-time validation
because the shared caption was longer than a title. Cap at 5000.
…uTube SEO meta

Per-platform meta additions, all wired through web/API/MCP validation:

- content: a caption override for one platform row (short copy for X next
  to a long Instagram caption) without splitting the post. Publishers and
  publish-time length checks read PostPlatform::resolvedContent(); the
  editor gets a per-channel override card with the platform's limit, and
  the preview renders the override.
- location_id/location_name (Instagram + Facebook): tags feed/reel/
  carousel containers and FB feed/photo posts with a Facebook place. Meta
  closed place search to third parties, so the ID is entered by hand.
- YouTube: title (own field instead of the trimmed first content line),
  tags -> snippet.tags, category_id, default_language, and
  recording_location {lat,lng,description} -> recordingDetails.
- Video alt text: Mastodon and Bluesky accept media descriptions on
  video; the alt editor now opens for video items too.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant