2 Commits
Author SHA1 Message Date
Andrew Beveridge ☄️andClaude Opus 4.6 937f8f7ec1 feat: YouTube quota GCP monitoring + legacy beta cleanup (#460)
## Summary
- Remove the deprecated beta enrollment system (endpoints, models, email
templates, admin UI, rate limits) — ~20 files cleaned
- Remove legacy count-based YouTube upload tracking from
rate_limit_service and dead blocklist methods
- Add GCP Cloud Monitoring integration to cross-reference YouTube API
quota usage with Firestore tracking
- Add drift detection (alerts when GCP reported vs Firestore tracked
differs >10%)
- Display GCP quota data in admin rate-limits dashboard

## Changes

### Backend (15 files)
- **Removed:** 5 beta endpoints, `BetaTesterStatus` enum, beta User
fields, beta email templates, `validate_email_for_beta()`, deprecated
YouTube/beta rate limit methods, dead blocklist CRUD methods
- **Added:** `get_gcp_quota_usage()` to `YouTubeQuotaService` with Cloud
Monitoring API query, 5-min cache, and drift detection
- **Updated:** Rate limits API response model with GCP quota fields
(`gcp_quota_available`, `gcp_quota_units_consumed`, `quota_drift`,
`quota_drift_alert`)

### Frontend (11 files)
- **Deleted:** `frontend/app/admin/beta/page.tsx` (entire beta admin
page)
- **Removed:** Beta sidebar nav, layout breadcrumb, admin stats card,
beta types/API methods, legacy YouTube stats cards
- **Added:** GCP Cloud Monitoring section in rate-limits page showing
reported usage, delay, and drift alerts

### Tests (4 files)
- Removed 8 obsolete tests for deprecated methods
- Created `test_gcp_quota_monitor.py` with 10 tests covering GCP quota
querying, caching, fallbacks, and drift detection
- Updated mock data and assertions across test files

### Docs (3 files)
- Removed beta endpoint docs from API.md, added GCP quota fields
- Updated ARCHITECTURE.md with Cloud Monitoring integration
- Removed beta program section from PRODUCT-VISION.md

## Test plan
- [x] All 2265 backend tests pass (1 pre-existing failure unrelated)
- [x] All 516 frontend Jest tests pass
- [x] New GCP quota monitor tests cover success, caching, fallbacks,
drift alerts
- [ ] Verify admin rate-limits page no longer shows beta/legacy cards
- [ ] Verify GCP quota section shows "unavailable" gracefully when
monitoring data not yet populated

@coderabbitai ignore

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 20:48:07 -05:00
Andrew Beveridge ☄️andClaude f661b6a27b feat(branding): Implement consistent brand theming across all frontends (#231)
## Summary

- Implement unified brand theming with brand pink (#ff7acc) as primary
color across all Nomad Karaoke frontends
- Create comprehensive brand style guide for human and LLM reference
- Add proper light/dark mode support throughout
- Update homepage content for transparency and accuracy
- Create product communication guide for consistent messaging

## Changes

### Homepage Content Updates
- Changed "in minutes" to "in under 30 minutes" for accuracy
- Removed AI terminology per user preference (use "our system" instead)
- Made review step clearly required, not optional polish
- Fixed YouTube claim: videos go to Nomad Karaoke channel, not user's
- Added demo video embed
- Added placeholder sections for screenshots (job dashboard, lyrics
review, etc.)

### Brand Style Guide (`docs/BRAND-STYLE-GUIDE.md`)
- Comprehensive guide covering colors, typography, logo usage, UI
components, email design
- Updated to v1.1: radial background gradients, logo usage (SVG
preferred), light/dark theme requirements
- Fixed success color consistency (#22c55e)

### Product Communication Guide (`docs/PRODUCT-COMMUNICATION-GUIDE.md`)
- Core principles: transparency over hype, avoid AI term, acknowledge
user effort
- Terminology preferences table
- FAQ guidance for consistent answers
- Referenced in CLAUDE.md for future agent sessions

### Main Frontend (`frontend/`)
- Updated CSS variables in `globals.css` for brand colors and light/dark
mode
- Added ThemeProvider to layout for proper theme switching
- Updated landing page, auth dialog, job cards with brand pink (#ff7acc)
- Created Playwright screenshot tests for visual verification

### Lyrics Transcriber Frontend
- Updated MUI theme with brand pink primary color
- Fixed theme-aware colors in: EditModal, EditWordList, WordDivider,
Word, CorrectedWordWithActions, TranscriptionView, ReferenceView,
AIFeedbackModal
- Fixed TapButton onMouseLeave race condition
- Added clarifying tooltip to Undo Auto Corrections button

### Email Templates
- Refactored to use reusable helper methods (`_build_email_html`,
`_get_email_header`, `_get_email_footer`)
- Updated all 7 email templates with brand pink headers, buttons, and
accents
- Fixed success color to match brand guide (#22c55e)
- Updated preview script to use actual email service

### Other
- Bumped versions: backend 0.96.0, frontend 0.81.0
- Added archive entry for brand consistency work

## Screenshots

### Homepage

| Hero Section | Full Page |
|--------------|-----------|
| ![Homepage
Hero](https://raw.githubusercontent.com/nomadkaraoke/karaoke-gen/feat/sess-20260107-0008-brand-consistency/frontend/public/screenshots/homepage-hero.png)
| ![Homepage
Full](https://raw.githubusercontent.com/nomadkaraoke/karaoke-gen/feat/sess-20260107-0008-brand-consistency/frontend/public/screenshots/homepage-full.png)
|

### Lyrics Review UI

![Lyrics
Review](https://raw.githubusercontent.com/nomadkaraoke/karaoke-gen/feat/sess-20260107-0008-brand-consistency/frontend/public/screenshots/lyrics-review.png)

### Instrumental Review UI

![Instrumental
Review](https://raw.githubusercontent.com/nomadkaraoke/karaoke-gen/feat/sess-20260107-0008-brand-consistency/frontend/public/screenshots/instrumental-review.png)

### Email Templates

| Job Completion | Action Reminder | Beta Welcome |
|----------------|-----------------|--------------|
| ![Job
Completion](https://raw.githubusercontent.com/nomadkaraoke/karaoke-gen/feat/sess-20260107-0008-brand-consistency/frontend/public/screenshots/email-job_completion.png)
| ![Action
Reminder](https://raw.githubusercontent.com/nomadkaraoke/karaoke-gen/feat/sess-20260107-0008-brand-consistency/frontend/public/screenshots/email-action_reminder.png)
| ![Beta
Welcome](https://raw.githubusercontent.com/nomadkaraoke/karaoke-gen/feat/sess-20260107-0008-brand-consistency/frontend/public/screenshots/email-beta_welcome.png)
|

## Test plan

- [x] Playwright screenshots captured
- [x] Visual verification of brand consistency
- [x] Frontend build passes
- [x] CodeRabbit review feedback addressed (3 cycles)

@coderabbitai ignore

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-01-07 23:10:35 -05:00