Skip to content

🔴 code_generator.py falls back to identical vanilla template for every video #83

@groupthinking

Description

@groupthinking

Problem

All 11 uvai-generated-project-* repos contain byte-for-byte identical output. The ProjectCodeGenerator._generate_vanilla_js_project() ignores the extracted tutorial_steps, technologies, and features from the video analysis and generates the same boilerplate every time.

Root Cause

In src/youtube_extension/backend/code_generator.py:

  • _generate_vanilla_main_js() returns a hardcoded string with generic messages regardless of input
  • _generate_vanilla_index_html() lists 'Responsive Design' and 'Modern Ui' for every project
  • The title defaults to 'UVAI Web App' / 'UVAI Generated Project' because extracted_info title is not being passed through

Evidence

  • 11 repos created March 1-2, 2026 — all identical (verified via MD5 hash comparison)
  • _generate_repo_name() sanitizes the default title to uvai-generated-project every time
  • The 172KB ai_code_generator.py exists but is not wired into the vanilla JS path

Fix Required

  1. Wire ai_code_generator.py into ALL code generation paths
  2. Pass tutorial_steps into actual generated code — each video should produce unique output
  3. Use extracted technologies to select the right framework instead of always falling back to vanilla
  4. Generate meaningful title from video analysis, not a generic fallback

Acceptance Criteria

  • Process two different videos → get meaningfully different code
  • No more uvai-generated-project-XXXX naming — use video-derived names

References

  • Architecture Stage 3: Polymorphic Output Synthesis
  • Files: src/youtube_extension/backend/code_generator.py, ai_code_generator.py

Metadata

Metadata

Labels

bugSomething isn't workingenhancementNew feature or requesthigh-priorityUrgent - blocks revenue or core functionalityneeds-triage

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions