Fix dashboard count for scheduled posts and improve AI text display

Correctly set the status of scheduled posts to "scheduled" instead of "draft" and update the dashboard count. Also, reposition AI text variations for a better user workflow.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: ae4037a0-2a6f-4530-9bac-79b543286bda
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/397bca8c-984f-43ff-841a-10897aeb8140/ae4037a0-2a6f-4530-9bac-79b543286bda/vX672i1
This commit is contained in:
michaelschal committed 2025-10-09 14:18:04 +00:00
1 parent 2e2949be27
commit 27b4f32e62
2 files changed
+12

No files matched your search

+7
View File
@@ -8,6 +8,13 @@ Social Flow is a comprehensive social media automation platform designed to stre
Preferred communication style: Simple, everyday language.
## Recent Changes
### October 9, 2025
- **AI Variants Position**: Repositioned AI-generated text variations to display after "Contenu" card and before "Texte de la publication" card in new-post page for better workflow
- **Calendar Auto-Refresh**: Fixed calendar not updating after creating a new scheduled post. Added `queryClient.invalidateQueries` with `refetchType: 'all'` in `createPostMutation.onSuccess` to force cache invalidation and immediate refetch
- **Dashboard Scheduled Posts Count**: Fixed scheduled posts count showing 0 in dashboard. Problem was that posts with `scheduledFor` were created with status "draft" instead of "scheduled". Solution: POST /api/posts now sets `status = "scheduled"` when `scheduledFor` is provided. Legacy posts updated with SQL: `UPDATE posts SET status = 'scheduled' WHERE scheduled_for IS NOT NULL AND status = 'draft'`
## System Architecture
### Frontend Architecture