feat: group posts by batch in archive + fullscreen confirm modal
Backend: - Add batch_id column to Post model (UUID, groups posts from same generation) - Set batch_id in /generate endpoint for all posts in same request Frontend: - ContentArchive: group posts by batch_id into single cards with platform tabs - Character name at top, platform tabs below, status badge, text preview - Click platform tab to switch between variants of same content - ConfirmModal: render via React portal to document.body for true fullscreen overlay - Add box-shadow and higher z-index for better visual separation Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
Handles post generation via LLM, image generation, and CRUD operations on posts.
|
||||
"""
|
||||
|
||||
import uuid
|
||||
from datetime import date, datetime
|
||||
|
||||
from fastapi import APIRouter, Depends, HTTPException, Query
|
||||
@@ -132,7 +133,8 @@ def generate_content(
|
||||
for link in links
|
||||
]
|
||||
|
||||
# Generate one post per platform
|
||||
# Generate one post per platform, all sharing the same batch_id
|
||||
batch_id = str(uuid.uuid4())
|
||||
posts_created: list[Post] = []
|
||||
for platform in platforms:
|
||||
text = generate_post_text(
|
||||
@@ -152,6 +154,7 @@ def generate_content(
|
||||
)
|
||||
|
||||
post = Post(
|
||||
batch_id=batch_id,
|
||||
character_id=character.id,
|
||||
user_id=current_user.id,
|
||||
content_type=request.content_type,
|
||||
|
||||
Reference in New Issue
Block a user