Skip to content

feat: grok video reference frames, music studio, hero layout fix, and test fixes#32

Merged
Simplereally merged 10 commits intomainfrom
feature/grok-video-frames-and-music-studio
Mar 4, 2026
Merged

feat: grok video reference frames, music studio, hero layout fix, and test fixes#32
Simplereally merged 10 commits intomainfrom
feature/grok-video-frames-and-music-studio

Conversation

@Simplereally
Copy link
Copy Markdown
Owner

@Simplereally Simplereally commented Mar 4, 2026

Summary

  • Video Reference Frames: Add first/last frame picker for video generation with skeleton loading transitions
  • Music Studio: Full music generation feature with Suno/ElevenLabs providers, Convex persistence, concurrent generation, and reaction system
  • Hero Section: Fix model badges single-flow layout to prevent name truncation
  • Performance: Memoize QueueCardGrid and extract timer component to prevent cascading re-renders
  • Tests: Fix 60 failing tests by adding in-memory localStorage mock, correct error assertion in music generation, resolve lint errors (ref-in-render, unused vars)
  • Studio Controls: Preserve firstFrame/lastFrame positions with fixed-length array

Summary by CodeRabbit

Release Notes

  • New Features

    • Added Music Studio with full music generation capabilities supporting Suno and ElevenLabs providers
    • Added music generation controls, player bar, and track management
    • Added audio file upload functionality to R2 storage
    • Added FLUX.2 Dev image generation model
    • Added video reference frames picker for advanced video generation workflows
  • UI & UX Improvements

    • Updated navigation with new Music Studio link
    • Reorganized model showcase layout on landing page
    • Refreshed color theme to cool-neutral palette with improved contrast
    • Enhanced model badge styling with combined alpha/unrestricted indicators
    • Fixed image lightbox grid layout and containment issues
    • Improved canvas queue grid responsiveness and animation
  • Bug Fixes

    • Fixed drawer pointer-events cleanup to prevent UI unresponsiveness
    • Fixed lightbox image overflow and pane sizing issues
    • Improved video reference frame handling for interpolation workflows
  • Refactoring

    • Simplified file upload API surface
    • Restructured video reference data model for consistency
    • Updated model exports and categorization

Josh Mackus and others added 9 commits March 4, 2026 21:55
- Implement background persistence for music generations to prevent UI blocking.
- Fix interpolation slot positions in generation controls.
- Correct Suno model propagation in MusicAPI.
- Optimize re-renders in MusicPlayerBar using callback ref pattern.
- Robust handleDownload in music-player-bar.tsx with proper cleanup.
- Migrate ClerkThemeProvider to use centralized CSS variables.
- Implement runtime validation and narrowing to replace unsafe TypeScript 'as' casts.
- Clamp and normalize dimensions in LightboxPane to prevent negative values and unnecessary churn.
- Consolidate video frame picker logic into VideoFramesSection component.
- Centralize active model count in pricing data.
- Automatically filter out legacy models from MODEL_SEO_SLUGS registry.
- Improved accessibility with aria-labelledby for Suno model selection.
- Fix various test bugs and strengthen assertions.
- Relocate and document the experimental test-grid.html prototype.
…gth array

- Change handleInterpolationImagesChange to always output length-2 array
- Index 0 = firstFrame, Index 1 = lastFrame, empty string for missing slots
- Update consumers in studio-shell to handle fixed-length array correctly
- Extract LoadableFrameImage component with fade-in animation
- Prevents layout shift and provides visual feedback during image load
- Applied to both frame slots (128px) and recent image thumbnails (64px)
- Follows established pattern from gallery-thumbnail.tsx
- Split 8 image models into two explicit rows of 4 for stable layout
- Each row independently centered with flex justify-center
- Widened container across all breakpoints for breathing room
- Removed text truncation from model badges - names now fully visible
- Changed from truncate/min-w-0 to whitespace-nowrap
- Restored original font sizes for readability
- Tighter badge padding so 4 fit per row comfortably
…s, and studio refinements

- Simplify hero section model showcase to a single flex-wrap container
  eliminating forced row splits and orphan badge issues across breakpoints
- Harden music API client with improved error handling and test coverage
- Enhance use-music-generation hook with expanded state management
- Refine video reference frames picker and image canvas interactions
- Update Convex musicGenerations schema for consistency
- Extend playground test grid
- Add in-memory localStorage mock to vitest.setup.ts (fixes 5 test files / 59 tests)
  window.localStorage methods were not functions in jsdom environment
- Fix music generation test expectation: normalizeNetworkError wraps
  non-Error values via String(err), so raw string propagates as message
- Convert dismissedConvexIds from ref to state to satisfy react-hooks/refs
  lint rule and ensure immediate mergedTracks recomputation on dismiss
- Remove unused syncInFlightCount callback and prefix unused destructured
  vars in MusicStudioShell
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Mar 4, 2026

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
bloomstudio Ignored Ignored Preview Mar 4, 2026 2:36pm

@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 4, 2026

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

This PR introduces a comprehensive music generation studio feature powered by Suno and ElevenLabs APIs, adds Flux 2 Dev model support across the platform, refactors storage APIs from image-specific to generic file handling, enhances video reference frame management, implements theme refinements, and removes obsolete documentation files.

Changes

Cohort / File(s) Summary
Music Studio Components
app/studio/music/page.tsx, app/studio/music/loading.tsx, components/studio/music/*
New music generation UI with player bar, controls, prompt input, track list, and main studio shell. Includes comprehensive component library for music generation workflows.
Music Generation Backend
app/api/music/upload/route.ts, convex/musicGenerations.ts, convex/schema.ts
API endpoint for uploading audio to R2, Convex mutations/queries for managing music generation records, reactions, and schema table definition with composite indexes.
Music Generation Hook & API
hooks/use-music-generation.ts, hooks/use-music-generation.test.ts, lib/music-api.ts, lib/music-api.test.ts
Core music generation logic, provider/model metadata, audio format handling, error handling, and comprehensive test suites covering generation workflows and edge cases.
Video Reference Frames Picker
components/studio/controls/video-reference-frames-picker.tsx, components/studio/features/generation/controls-feature.tsx, components/studio/features/generation/controls-view.tsx
New non-interpolating video frames picker component with upload/selection flow; refactored controls to differentiate between interpolation and non-interpolation frame handling.
Flux 2 Dev Model Support
lib/config/models.ts, lib/config/models.test.ts, lib/schemas/pollinations-pricing.schema.ts, lib/schemas/pollinations-pricing.schema.test.ts, lib/models/model-seo-slugs.ts, lib/models/model-seo-slugs.test.ts, lib/config/resolution-tiers.test.ts
Added flux-2-dev image model with pricing, constraints, SEO metadata, resolution tiers, and comprehensive test coverage.
Storage API Refactoring
lib/storage/r2-client.ts, lib/storage/r2-client.test.ts, lib/storage/index.ts, app/api/upload/route.ts
Renamed uploadImage to uploadFile for generic file uploads; added optional cacheControl parameter; updated user hash truncation; updated all callers.
Theme & Global Styling
app/globals.css, components/clerk-theme-provider.tsx
Rewrote light/dark theme tokens to cool-neutral palette (260° hue) with orange accents; added keyframe animations (music-bar, waveform-pulse, ember-breathe, disc-spin, progress-shimmer); Clerk provider now uses CSS variables instead of theme-dependent colors.
Image Canvas & Gallery
components/studio/canvas/image-canvas.tsx, components/images/lightbox/lightbox-pane.tsx, components/images/lightbox/lightbox-compare-view.tsx, components/ui/drawer.tsx, components/ui/drawer.test.ts
Memoized QueueCardGrid with responsive layout, ResizeObserver-based image constraining, drawer pointer-events cleanup for nested dialogs.
Landing Page & Models
components/landing/hero-section.tsx, components/landing/model-badge.tsx, components/landing/models-section.tsx, components/pricing/model-value-showcase.tsx
Unified featured models rendering, combined alpha/unrestricted badge display, dynamic model count references, added flux-2-dev to pricing showcase.
Navigation & Layout
components/layout/header.tsx, components/studio/controls/collapsible-section.tsx, app/feed/[type]/page.tsx
Added Music studio navigation item, replaced inline JSON-LD with JsonLd component, updated collapsible section styling with dynamic backgrounds and shadows.
Pricing & Config
app/pricing/pricing-data.tsx, components/studio/upgrade-modal.tsx
Dynamic model count references replacing hard-coded values using ACTIVE_MODEL_COUNT constant.
Test Infrastructure & Cleanup
vitest.setup.ts, components/studio/controls/prompt-section.test.tsx, hooks/use-batch-mode.test.ts, hooks/use-studio-ui.test.ts, hooks/use-media-player.test.ts, hooks/use-image-edit.ts, convex/system_check.ts, eslint.config.mjs, components/gallery/history-client.tsx, components/images/image-lightbox.tsx, components/ui/media-player.tsx
Added localStorage mocking and cross-test cleanup, removed ESLint directives, fixed muted prop handling, updated parameter naming, added no-unused-vars rules for underscores.
Deleted Documentation
AI_IMAGE_PROMPTS.md, VIDEO_PROCESSING_PLAN.md, flux-constraints.md, lightbox_navigation_plan.md, nano-banana-pro-spec.md, nanobana-specs.md, next16-seo-playbook.md
Removed obsolete planning and specification documents.
Deleted Legacy Components
image-lightbox-old.tsx, use-image-lightbox-old.tsx
Removed deprecated lightbox implementation and related hook.
Music Generation Tests
components/studio/music/music-generation-controls.test.tsx, components/studio/music/music-prompt-input.test.tsx, components/studio/music/music-studio-shell.test.tsx
Comprehensive test coverage for music generation UI components and workflows.
Additional Exports & Config
components/studio/index.ts, hooks/index.ts, package.json, playground/test-grid.html, todo/music-generation/suno-discovery.md
Added VideoReferenceFramesPicker and media player hook exports, Radix UI overrides, CSS Grid test playground, Suno integration discovery doc.

Sequence Diagram

sequenceDiagram
    participant User as User
    participant UI as Music UI
    participant Hook as useMusicGeneration
    participant API as MusicAPI
    participant Upload as /api/music/upload
    participant R2 as Cloudflare R2
    participant Convex as Convex Backend

    User->>UI: Click Generate with Prompt
    UI->>Hook: generate(prompt, lyrics, options)
    Hook->>Hook: Create Placeholder Track
    UI->>UI: Show Generating State
    
    par Music Generation
        Hook->>API: generate(params)
        API->>API: Validate Prompt
        alt Suno Model
            API->>API: POST /v1/audio/speech
        else ElevenLabs
            API->>API: GET Audio Endpoint
        end
        API->>API: Convert to Blob
        API->>API: Create Object URL
    end
    
    API-->>Hook: MusicGenerationResult
    Hook->>Upload: Upload Blob to R2
    Upload->>R2: PUT Audio File
    R2-->>Upload: Confirm (URL, key, size)
    Upload-->>Hook: { audioUrl, r2Key, audioSizeBytes }
    
    Hook->>Convex: create(metadata with r2Key)
    Convex-->>Hook: { convexId }
    Hook->>Hook: Link convexId to Track
    
    Hook-->>UI: Updated Track with convexId
    UI->>UI: Show Player Controls
    User->>UI: Like/Dislike Track
    UI->>Hook: setReaction(trackId, reaction)
    Hook->>Convex: setReaction(mutation)
    Convex-->>Hook: Confirmed Reaction
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~75 minutes

Possibly related PRs

  • PR #31: Directly related—introduces identical music studio components, hooks, video reference frames picker, flux-2-dev model additions, and storage API refactoring (uploadFile rename).
  • PR #18: Related at code level—both modify Convex schema, authentication flows, and server-side API key encryption patterns for platform integrations.
  • PR #30: Related—both modify the image-canvas QueueCardGrid component structure and generation queue UI rendering logic.

Poem

🎵 A rabbit hops through rhythmic streams,
With Suno beats and ElevenLabs dreams,
Flux grows brighter, frames dance free,
The storage drawer springs—refactored spree!
Cool themes shimmer, animations play,
Music studio blooms—hip-hop hooray! 🐰✨

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/grok-video-frames-and-music-studio

@Simplereally Simplereally merged commit 90ccdb6 into main Mar 4, 2026
3 checks passed
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.

1 participant