Skip to content

Feature/pbi 72 playlist export#90

Open
cthorn77 wants to merge 53 commits into
charles-merge-sprint3from
feature/pbi-72-playlist-export
Open

Feature/pbi 72 playlist export#90
cthorn77 wants to merge 53 commits into
charles-merge-sprint3from
feature/pbi-72-playlist-export

Conversation

@cthorn77

@cthorn77 cthorn77 commented Dec 1, 2025

Copy link
Copy Markdown
Contributor

No description provided.

vas2000-emu and others added 30 commits September 13, 2025 23:13
- Remove Privacy and Notifications tabs from settings navigation
- Delete privacy and notifications page files
- Improve mobile responsiveness with better padding and layouts
- Enhance SettingsNav mobile menu (slides from right, better touch targets)
- Add notification bell icon to Navbar (desktop and mobile)
- Create NotificationBell and NotificationDropdown components
- Create useNotifications hook with placeholder data
- Optimize form inputs for mobile (better touch handling, responsive text)
- Update conflict resolution handlers to remove privacy/notifications cases
- Add old-pbi/ and pbi-77/ to .gitignore

All settings now focus on essential features: Profile and Account only.
- Add 'Export to YouTube' button to group playlist view
  - Button only visible for users with YouTube/Google accounts
  - Works for both individual and 'All Playlists' views
  - Uses Youtube icon from lucide-react

- Create /api/export/youtube POST endpoint
  - Authenticates user via Supabase session
  - Validates playlistId and groupId parameters
  - Fetches songs from playlist_songs table (ordered by position/created_at)
  - Creates YouTube playlist using YouTube Data API v3
  - Returns playlist URL and metadata

- Fix middleware to allow API routes to handle their own auth
  - API routes can now return proper JSON error responses (401, etc.)
  - Prevents unwanted redirects to sign-in page for API endpoints

Note: Requires Supabase configuration:
- Google OAuth scope: youtube.force-ssl
- RLS policy fix for youtube_tokens table
See pbi-72/SUPABASE-YOUTUBE-SETUP-REQUIRED.md for setup guide
- Added youtube.force-ssl scope to Google OAuth sign-in
- This enables playlist creation/management permissions
- Users will see a new consent screen requesting YouTube permissions
…& add

- Implemented search-and-add loop for songs using YouTube Search API
- Added sequential processing with 100ms rate limiting between requests
- Implemented robust error handling for search failures and quota limits
- Added detailed result tracking (successful/failed songs with reasons)
- Returns comprehensive response with song counts and error details
- Gracefully handles quota exceeded errors (testing pending quota reset)

Testing Notes:
- Feature implementation complete and validated in logs
- Hit YouTube API quota limit during testing (resets midnight PT)
- Will validate full success with smaller playlist tomorrow

Related Files:
- apps/web/app/api/export/youtube/route.js
- memory-bank/progress.md
- memory-bank/architecture.md
- memory-bank/code-review-notes.md
- Connected frontend UI to API using React Query useMutation
- Added loading states and user feedback with toast notifications
- Removed temporary console.log debugging statements (kept console.error for error handling)
- Updated progress.md to mark feature as COMPLETE
- Rewrote code-review-notes.md into cohesive presentation script
- Updated architecture.md with frontend integration details
HuTaoEMU and others added 23 commits November 24, 2025 13:41
…iting

- Add sleep() helper and addVideoToPlaylistWithRetry() function
- Implement 1-second throttle between YouTube API requests
- Add retry logic (1 retry with 2s delay) for 409/503/429 errors
- Change loop to for...of for cleaner sequential processing
- Reliability > Speed: exports now complete 100% vs random failures

Fixes random SERVICE_UNAVAILABLE/ABORTED errors during playlist export
@vercel

vercel Bot commented Dec 1, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
vybe Ready Ready Preview Dec 1, 2025 3:26am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants