Overview
The calendar displays posts in two views:- Month View: Grid calendar with posts by day (desktop default)
- Week View: List view with detailed post cards (mobile default)
/social/calendar
Calendar Views
Month View
Layout:- 7-column grid (Sunday - Saturday)
- 6 rows (42 days including padding)
- Previous/next month days shown in muted gray
- Today highlighted with accent color
- Date number (bold if current month)
- Up to 3 post previews
- “+X more” link if >3 posts
- Empty state if no posts
- Time (12-hour format)
- Approval status badge
- Post status label
- Content preview (2 lines, truncated)
- Click to open post detail
- All posts for that day
- Full post cards with actions
- Scroll for many posts
- Close with X or backdrop click
Month view automatically switches to week view on mobile (less than 768px) unless manually overridden.
Week View
Layout:- Vertical list of 7 days
- Each day in a card
- Date displayed as large number + day name
- Today highlighted
- Date indicator (left side)
- List of all posts for that day
- Full post details visible
- No truncation or overflow
- Time (12-hour format with AM/PM)
- Approval status badge
- Late status label
- Platform icons (colored badges)
- Content preview (2 lines with ellipsis)
- Hover effect to accent color
- Click to open post detail
Navigation
Date Navigation:- Previous/Next buttons (chevron icons)
- “Today” button to jump to current date
- View mode toggles (Grid for month, List for week)
- Refresh button with loading spinner
- Month view: “Month Year” (e.g., “March 2026”)
- Week view: “Week of Start Date” (e.g., “Week of 3/1/2026”)
Filters
Filter Panel: Card above calendar with 4 dropdownsPlatform
Filter by social platform: LinkedIn, Instagram, Twitter, TikTok, YouTube, or all
Late Status
Filter by posting status: Draft, Scheduled, Publishing, Published, Failed, Partial, Cancelled, or all
Approval Status
Filter by internal approval: Draft, Pending Approval, Changes Requested, Approved, or all
Episode
Filter by associated episode number (extracted from tags)
- Multiple filters combine with AND logic
- Default: All filters set to “all”
- Real-time filtering (no “Apply” button)
- Post count updates in header
episode:123 format are grouped by episode. Dropdown shows all unique episode numbers in descending order (most recent first).
Status Indicators
Late Status
Indicates publication state from Late.com:- Draft: Not yet scheduled, editable
- Scheduled: Queued for future publication
- Publishing: Currently being posted
- Published: Successfully posted to platforms
- Failed: Error during publication
- Partial: Posted to some platforms, failed on others
- Cancelled: Scheduled post cancelled
Approval Status
Internal YBH approval workflow:- Draft: Not submitted for approval (gray)
- Pending Approval: Awaiting review (yellow)
- Changes Requested: Needs revision (red)
- Approved: Ready to publish (green)
autoApprove: true in metadata always show “Approved”
Approval status is stored in Sanity social metadata, not Late.com. Use Post Detail page to change approval state.
Platform Icons
Display: Colored badge pills showing first letter of platform name Colors:- LinkedIn:
#0A66C2 - Instagram:
#E4405F(gradient implied) - Twitter:
#1DA1F2 - TikTok:
#000000 - YouTube:
#FF0000
Post Actions
Primary Action: Click any post card to open Post Detail page Post Detail Page:- Full content with formatting
- Media attachments (images, videos)
- Edit copy and media
- Change scheduled time
- Update approval status
- Retry failed posts
- Delete post
Responsive Design
Desktop (≥768px):- Month view by default
- Side-by-side filter dropdowns
- Wide calendar grid
- Sticky header
- Month or week view (user choice)
- Stacked filter dropdowns (2x2 grid)
- Scrollable calendar
- Week view by default (more readable)
- Single-column filters
- Full-width day cards
- Touch-friendly tap targets
Users can manually switch view modes on any device. Choice persists until page refresh.
Empty States
No Posts in Range:- Calendar/week view displays with no content
- Message: “No posts” in each day
- Empty day cells
- Footer shows “0 posts”
- Spinner overlay
- “Loading…” message
- Skeleton UI (optional enhancement)
- Red alert card above calendar
- Error message displayed
- Retry button
Data Loading
Query Strategy:- Fetch posts for current month/week from Late.com API
- Fetch social metadata for all post IDs from Sanity
- Merge data client-side
- Filter and group by date
- Render calendar
- React Query with 5-minute stale time
- Refetch on window focus disabled
- Manual refresh via button
- Limit: 100 posts per date range
- Month view: Max ~3000 posts/month (30 days × 100)
- Week view: Max ~700 posts/week (7 days × 100)
If you have more than 100 posts in a single day, increase the API limit or implement pagination.
View Analytics
Calendar does not display analytics directly. For post performance metrics, use:Social Analytics Dashboard
View impressions, engagement, and follower growth
Keyboard Shortcuts
Planned (Not Yet Implemented):←/→- Navigate previous/next periodT- Go to todayM- Switch to month viewW- Switch to week viewR- Refresh dataESC- Close drawer/modal
Technical Details
Component:SocialCalendarPage.tsx
API Routes:
GET /api/late/posts- List posts with date rangeGET /api/sanity/social-meta- Batch fetch metadata
- React Query for data fetching
- Day.js (implied) for date manipulation
- Lucide React for icons
- React useState for view mode, filters, drawer
- URL params not used (ephemeral state)
- Memoized filtered posts
- Memoized calendar days computation
- Debounced filter changes (optional)
Related Features
Social Analytics
Track post performance and engagement
Post Scheduling
Create and schedule new social posts