Skip to content

fix(genai): replace "video_item" placeholder with meaningful video/quiz names - #1059

Open
karan033-cybertech wants to merge 1 commit into
vicharanashala:mainfrom
karan033-cybertech:fix/video-item-placeholder-name-in-sidebar
Open

karan033-cybertech wants to merge 1 commit into
vicharanashala:mainfrom
karan033-cybertech:fix/video-item-placeholder-name-in-sidebar

Conversation

@karan033-cybertech

Copy link
Copy Markdown

Problem — Closes #713

Every video in the course sidebar was showing "video_item" as its title
instead of a real name. This affected all courses created using the AI
workflow (teacher uploads video → AI splits into segments → creates items).

Root cause:

  • genai-api.ts hardcoded videoItemBaseName = 'video_item' as default
  • GenAIService.ts used this value directly as the item name in DB

Fix

Backend: Treat 'video_item'/'quiz_item' as placeholder values.
Fall back to 'Video'/'Quiz'. For multi-segment videos, append index
so names read "Video 1", "Video 2" instead of duplicates.

Frontend: Changed default from 'video_item' to '' so backend
placeholder check works correctly.

Before / After

Scenario Before After
Single video video_item Video
3-segment video video_item x3 Video 1, Video 2, Video 3
Custom name "Intro" Intro x3 Intro 1, Intro 2, Intro 3

Files changed

  • backend/src/modules/genAI/services/GenAIService.ts
  • frontend/src/lib/genai-api.ts

- Backend: treat 'video_item'/'quiz_item' as placeholder defaults
  and fall back to 'Video'/'Quiz' with segment index appended
  for multi-segment uploads (Video 1, Video 2, ...)
- Frontend: change default param from 'video_item' to '' so
  the backend placeholder check works correctly

Fixes vicharanashala#713
@github-actions github-actions Bot added frontend Changes to the frontend of the project backend labels Jun 5, 2026

This branch has not been deployed

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

Labels

backend frontend Changes to the frontend of the project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Every Video on viBe is labeled as Video_item

1 participant