Syncs video performance metrics (views, likes, comments) from YouTube
API to YouTubeContent.performance fields. Supports batch processing
with 50-video API limit, credential validation, and per-batch error
handling.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Syncs channel-level statistics (subscribers, views, video count) from
YouTube Data API to YouTubeChannels.currentMetrics fields for all active
channels. Follows the same credential-loading pattern as existing sync
services.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add batch video statistics retrieval method that fetches view counts,
like counts, and comment counts for up to 50 videos per request.
Includes unit tests covering normal operation, empty input, missing
statistics defaults, null API response, and error propagation.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add youtube.upload and yt-analytics.readonly scopes to enable video
uploading and analytics data retrieval in the YouTube Operations Hub.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
POST /api/youtube/thumbnails/bulk (Super-Admin only)
Supports ?dryRun=true for preview. Downloads sequentially with 500ms delay.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds channelThumbnailUrl field to store YouTube API URL.
afterChange hook downloads image to Payload Media when branding.logo is empty.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Mark Meta comment sync as completed, add CI/CD pipeline to completed
section, update changelog with 14.02.2026 entries, renumber next steps.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The manual sync button in Community Inbox was only syncing YouTube comments
via the legacy syncAllComments service. Now uses UnifiedSyncService to sync
all platforms (YouTube, Facebook, Instagram). Also adds comprehensive
Community Management documentation to CLAUDE.md.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
API returns 401 without auth, which proves it's alive. Only 5xx
indicates a real server failure.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
/api returns 404 in Payload CMS (no root handler). Use /api/users
which returns 401 (valid response, proves API is running).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Extend admin component overrides to cover all Payload admin views
(no-html-link-for-pages, no-img-element off for admin panel)
- Rename useGeneratedReply to applyGeneratedReply (not a hook)
- Fix useRealtimeUpdates: resolve circular dependency with connectRef,
wrap ref assignments in useEffect for React 19 compiler compliance
- Fix MetaBaseClient: let -> const for single-assignment variable
ESLint now passes with 0 errors (68 warnings only).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The GitHub environment 'production' was causing startup_failure on all
workflow_dispatch runs (0 jobs started). Remove the environment reference
to unblock deployments. Can be re-added once the root cause is identified.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update all version references from Payload 3.69.0 → 3.76.1 and Next.js
15.5.9 → 16.2.0-canary.41. Replace .env.example (MongoDB → PostgreSQL)
and README.md (generic template → project-specific). Remove obsolete
BUG_REPORT_CUSTOM_VIEWS.md. Add YouTube Analytics Dashboard to URLs and
February 2026 changelog entry.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
tsx was a transitive dependency that disappeared after the package
upgrade, causing queue-worker to crash on production.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace custom BEM classes and SCSS with Payload's native nav-group CSS
classes for Community and YouTube dashboard nav links. Removes emojis,
adds collapsible toggle with chevron, matches the native sidebar UX.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Clear data state on tab switch to prevent stale data type mismatch
- Add defensive null guards in all render functions (?.stats, ?.pipeline)
- Use channel ID instead of slug for API filtering
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Custom admin view at /admin/youtube-analytics with 4 tabs:
- Performance: Views, Watch Time, CTR, Subscribers with period comparison
- Pipeline: Status distribution, scheduled videos, overdue tasks
- Goals: Monthly target progress bars and custom KPIs
- Community: Sentiment analysis, response time, top topics
Includes channel selector, period selector (7d/30d/90d), and
sidebar nav link in the YouTube section.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Issue #15241 (TypeError: Missing parameter name with custom admin
components + multi-tenant plugin) is resolved in Payload 3.76.1.
Re-enable TenantDashboard custom view at /admin/tenant-dashboard.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Upgrade all 11 @payloadcms/* packages to 3.76.1, gaining fixes from
PRs #15404 (user.collection property for multi-tenant access control)
and #15499 (tenant selector uses beforeNav slot).
Fix afterLogin audit hook deadlock: payload.create() inside the hook
caused a transaction deadlock with PgBouncer in transaction mode under
Payload 3.76.1's stricter transaction handling. Changed to fire-and-forget
pattern to prevent login hangs.
Note: Next.js 15.5.9 peer dependency warning exists but build/runtime
work correctly. Consider upgrading Next.js to 16.x or downgrading to
15.4.11 in a follow-up.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add robust error handling to check_existing function
- Fix create_social_links to handle API errors gracefully
- Fix create_pages to handle API errors and track skipped/failed counts
- Fix create_navigation with proper error handling
- Replace ((count++)) with $((count + 1)) for POSIX compatibility
- Add 2>/dev/null to jq calls to suppress error output
- Return 0 from functions on early exit to prevent set -e issues
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Document develop → staging, main → production workflow
- Add branch descriptions and commit conventions
- Include workflow steps with commands
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add documentation for YouTube/Meta integration:
- YouTube Channels, Content, Series, Notifications APIs
- Social Platforms, Accounts, Community Interactions APIs
- Code examples for frontend integration
- Field documentation with curl examples
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Refactor custom login route to be more resilient:
- Lazy-load security modules to prevent initialization errors
- Wrap each security feature in try-catch for graceful degradation
- Skip CSRF validation for API requests (no Origin header + JSON content)
- Improve error handling and logging throughout
This ensures login works even if individual security modules fail,
while still providing full protection when everything is available.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Delete redundant TODO.md (consolidated into PROJECT_STATUS.md)
- Simplify STAGING-DEPLOYMENT.md to quick reference format
- Update PROJECT_STATUS.md with January 2026 status:
- Add Community Management System section
- Document Payload 3.72.0 login bug (#15243)
- Update roadmap and changelog
- Update framework-monitoring.md with current versions and bug warning
- Add YouTube/Meta collections to CLAUDE.md:
- YouTubeChannels, YouTubeContent, YtSeries, YtNotifications
- MetaAccounts
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implements a unified sync service that orchestrates comment
synchronization across all social media platforms.
UnifiedSyncService:
- Platform-agnostic sync orchestration
- Support for YouTube, Facebook, and Instagram
- Parallel platform detection and account grouping
- Progress tracking with live status updates
- Aggregated results per platform
- Error handling with partial results support
New API Endpoints:
- GET/POST /api/cron/community-sync
- Cron endpoint for scheduled multi-platform sync
- Query params: platforms, accountIds, analyzeWithAI, maxItems
- HEAD for monitoring status
- GET /api/community/sync-status
- Live sync status for dashboard
- Platform overview with account details
- Interaction statistics (total, today, unanswered)
- Last sync result summary
Configuration:
- vercel.json updated to use community-sync cron
- 15-minute sync interval maintained
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implements complete Meta Graph API integration for Facebook Pages
and Instagram Business Accounts.
Phase 2.3a - Meta OAuth & Base Infrastructure:
- Meta OAuth service with long-lived token support (60 days)
- MetaBaseClient with error handling and retry logic
- OAuth routes (/api/auth/meta, /api/auth/meta/callback)
- Type definitions for all Meta API responses
Phase 2.3b - Facebook Client:
- FacebookClient extending MetaBaseClient
- Page posts and comments retrieval
- Comment moderation (reply, hide, delete, like)
- Messenger conversations support
- Page insights and analytics
- FacebookSyncService for comment synchronization
Phase 2.3c - Instagram Client:
- InstagramClient for Business Accounts
- Media (posts/reels/carousels) retrieval
- Comment management with replies
- Mentions and Story-Mentions (24h expiry)
- Instagram Direct messaging
- Account and media insights
- InstagramSyncService for comment/mention sync
Additional changes:
- SocialPlatforms collection extended with oauthEndpoint field
- Environment variables documented (META_APP_ID, META_APP_SECRET)
- Module index with all exports
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Abschlussbericht für Konzept-KI erstellt
- vercel.json mit 15-Minuten Cron-Schedule hinzugefügt
- CRON_SECRET in .env konfiguriert (nicht committed)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implementiert automatische YouTube-Kommentar-Synchronisation und
KI-gestützte Antwortvorschläge für das Community Management.
Neue Features:
- Cron-Endpoint für externen Scheduler (/api/cron/youtube-sync)
- ClaudeReplyService für AI-generierte Antworten (3 Tonalitäten)
- Sync Status API mit Live-Polling
- AI Reply Suggestions UI mit Varianten-Auswahl
- Job Logger für strukturiertes Logging von Background Jobs
Änderungen:
- ClaudeAnalysisService: Model-Update auf claude-3-5-haiku-20241022
- CommunityInbox: Sync Status Badge, AI Reply Suggestions Integration
- SCSS: Styles für Sync-Indicator und Suggestion Cards
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Complete implementation verification for concept AI:
- All 6 API endpoints implemented
- All 6 React components implemented
- SCSS styling with BEM convention
- Responsive design (3 breakpoints)
- Sidebar navigation integration
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>