Skip to content

WIP: create-streamer page #789

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

WIP: create-streamer page #789

wants to merge 4 commits into from

Conversation

thomshutt
Copy link
Contributor

@thomshutt thomshutt commented Jun 9, 2025

PR Type

Enhancement


Description

  • New /create-streamer page with browser fallbacks

  • Implement StreamerDreamshaper streaming UI orchestration

  • Add StreamerPromptQueue live prompt sidebar component

  • Integrate onboarding flow with main experience


Changes walkthrough 📝

Relevant files
Enhancement
page.tsx
Create-streamer page routing and fallback                               

apps/app/app/create-streamer/page.tsx

  • New Next.js /create-streamer page added
  • Detects TikTok/Instagram UA and shows fallback
  • Adds page metadata and tracking events
  • +39/-0   
    StreamerDreamshaper.tsx
    StreamerDreamshaper main UI orchestration                               

    apps/app/components/daydream-streamer/StreamerDreamshaper.tsx

  • New component orchestrating streaming UI state
  • Hooks initialization, error monitoring, stream updates
  • Implements tracking and unload visibility events
  • Renders main content, prompt queue, overlays
  • +300/-0 
    StreamerMainExperience.tsx
    Main experience wrapper with permissions                                 

    apps/app/components/daydream-streamer/StreamerMainExperience.tsx

  • Wraps StreamerDreamshaper in sidebar provider
  • Requests and manages camera permissions
  • Handles visibility fade transitions
  • +64/-0   
    StreamerPromptQueue.tsx
    Prompt queue UI component                                                               

    apps/app/components/daydream-streamer/StreamerPromptQueue.tsx

  • New prompt queue listing recent prompts
  • Includes gradient overlays and submission form
  • Validates inputs and tracks submissions
  • Highlights current and past prompts
  • +310/-0 
    index.tsx
    StreamerDaydream entry and onboarding                                       

    apps/app/components/daydream-streamer/index.tsx

  • Top-level StreamerDaydream entry and onboarding logic
  • Handles login, onboarding, user initialization
  • Integrates analytics and pending clip modal
  • +223/-0 

    Need help?
  • Type /help how to ... in the comments thread for any questions about PR-Agent usage.
  • Check out the documentation for more information.
  • Copy link

    vercel bot commented Jun 9, 2025

    The latest updates on your projects. Learn more about Vercel for Git ↗︎

    Name Status Preview Comments Updated (UTC)
    pipelines-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 10, 2025 1:16pm

    Copy link

    github-actions bot commented Jun 9, 2025

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 4 🔵🔵🔵🔵⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Analytics Payload

    The sendBeaconEvent calls include the entire user object rather than a user ID or token, which may bloat payloads or leak data. Verify that only necessary fields are sent.

      sendBeaconEvent(
        "stream_trace",
        eventData,
        "daydream",
        window.location.hostname,
        user || undefined,
      );
    };
    Uncleaned Timeouts

    The handlePastPromptClick function sets multiple timeouts without clearing them on unmount, potentially causing memory leaks if the component unmounts quickly.

      setPromptValue(prompt);
      setIsTextareaHighlighted(true);
      setTimeout(() => {
        setIsTextareaHighlighted(false);
      }, 1500);
    
      // Focus the textarea after setting the prompt
      setTimeout(() => {
        if (textareaRef.current) {
          textareaRef.current.focus();
          // Move cursor to the end of the text
          const length = textareaRef.current.value.length;
          textareaRef.current.setSelectionRange(length, length);
        }
      }, 50);
    };
    Event Type Mismatch

    The handleKeyDown handler casts the keyboard event to a form event for handleSubmit, which may lead to unexpected behavior. Consider separating submission logic from form events.

    const handleKeyDown = (e: React.KeyboardEvent<HTMLTextAreaElement>) => {
      if (e.key === "Enter" && !e.shiftKey) {
        e.preventDefault();
        if (isValid && !isSubmitting) {
          handleSubmit(e as any);
        }
      }

    Copy link

    github-actions bot commented Jun 9, 2025

    PR Code Suggestions ✨

    No code suggestions found for the PR.

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

    Successfully merging this pull request may close these issues.

    1 participant