# Social (`/social`)

Status: rewritten 2026-09-27 to the owner's Sagepilot plan (Stage 2, the
plan's Social row and DECISIONS 52) from the Posts spec he confirmed on
2026-09-12. Main confirms it with him. Admin and marketing see it.

## What it is for
The account's Instagram and Facebook posts, and for each post: what the AI knows
about it, what it has been told for that post, and every comment with the
decision the AI reached. Where the team checks the AI understood a post, acts on
its comments, and starts private conversations with the people commenting.

## What it must show
- One grid of both channels' posts, grouped by the day they went up, newest
  first, with the day and its post count. Filters: channel, organic or ad.
- A tile: the picture with its comment count and an AD badge for an ad or
  boosted post, the platform, the post's age, and the caption's first line.
- **Sync posts** (admin): pull the latest posts; new captioned posts are
  interpreted on their own afterwards (a queue job with retries).
- A post opens as a popup (a full-height sheet on a phone): the picture, the
  caption and a link to the post on its platform; then **The AI on this post**:
  the stay-away switch (no replies, no moderation), **What the AI knows** (the
  stored description the AI reads instead of the caption, ruling 13, with Edit
  and Interpret again), and **Added instructions** the AI follows when it
  replies to a comment on this post.
- **Comments**, newest or oldest first: the commenter, the text, its age, its
  sentiment (positive, neutral, negative, from the moderation pass), the AI's
  decision; counts per sentiment across the post, and a filter by one.
- A hidden or deleted comment stays listed, greyed, labelled with who or what
  did it and when: a named person, the AI, or the platform (DECISIONS 52).
- Our reply under the comment it answers, with an AI badge or the name of the
  person who sent it. A comment that started a conversation says so and links
  to it in the Inbox.
- Per comment (admin): the acts the registry allows (hide, unhide, delete with
  a confirm, reply, draft with the AI), the decision details and the full trace.

## What it must do
- Sync, interpret, edit the description, add or remove instructions, flip the
  stay-away switch (admin); act on a comment (admin).
- **Start a conversation** (admin and marketing, a person's act): a private
  message to the commenter, prefilled "Hi <name>!", once per comment, never on
  a deleted one. It lands in the Inbox; a refusal from the platform is said in
  plain words and nothing is recorded as sent.

## Deliberately not here
- No channel switches, thresholds or fixed sentences (Settings).
- No keyword lists or listing links (a later stage of the plan).

## Known gaps against intent
- A video shows its cover, not the video: the sync stores a thumbnail only.
- An interpretation that failed shows no reason here (the Activity row has it).

## Proof
`routes/Social.test.tsx` passes. On a local slot with Meta stubbed: a comment
hidden, replied to and turned into a conversation from the popup, a deleted one
still labelled, and a stubbed moderation pass's sentiment shown on its comment.
