Repository navigation
fix(genai): replace "video_item" placeholder with meaningful video/quiz names - #1059
Open
karan033-cybertech wants to merge 1 commit into
Conversation
- 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
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.tshardcodedvideoItemBaseName = 'video_item'as defaultGenAIService.tsused this value directly as the item name in DBFix
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
video_itemVideovideo_itemx3Video 1,Video 2,Video 3Introx3Intro 1,Intro 2,Intro 3Files changed
backend/src/modules/genAI/services/GenAIService.tsfrontend/src/lib/genai-api.ts