Add "Render Selected" for video generation - #200
Merged
Merged
Conversation
When a user highlights text in the editor, it's now automatically detected and passed to the video renderer. If selection exists, only that portion is rendered; otherwise, the full note is rendered. Changes: - Frontend: Detect selection using getEditorSelectionMarkdown(), filter diagram rasterization to selected blocks only, pass selectedContent through the render pipeline - Backend: Accept optional selected_content in VideoRenderRequest, store in VideoRenderJob, use in estimate and render endpoints - Database: Add nullable selected_content column to video_render_jobs via migration UX: Selection detection is transparent - single "Video (MP4)" button automatically uses selection if present, falls back to full note if not. Estimate endpoint returns accurate segment/duration for selection.
…meter The function implementation accepted selectedContent but the interface didn't, causing TypeScript compilation error TS2554 in EditorView.tsx.
Owner
Author
|
Fixed TypeScript compilation error in the initial commit. The issue was that the Fix: Updated the Commit: 2b97dde Generated by Claude Code |
Owner
Author
|
✅ CI is now passing! Both checks completed successfully:
The TypeScript fix resolved the compilation error. The PR is now ready for code review and testing. Generated by Claude Code |
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.
Summary
Implement automatic detection and rendering of selected text in video generation. When a user highlights a portion of their note, the video renderer now uses only that selection instead of the entire note.
Key features:
getEditorSelectionMarkdown()function from AI assistant/video/estimateendpoint respects selected content for accurate segment/duration predictionsChanges
Frontend
EditorView.tsx: Detect selection, filter diagram rasterization to selected blocks, passselectedContentthrough VideoGenModalVideoGenModal.tsx: Accept optionalselectedContentprop, pass to render functionactivity.ts: ThreadselectedContentthroughstartVideo()callvideoGen.ts: Includeselected_contentin API request payloadBackend
schemas.py: Addselected_content: Optional[str]toVideoRenderRequestmodels.py: Addselected_content: Optional[str]column toVideoRenderJobrouters/video.py: Storeselected_contentin job, use in estimate endpointworker.py: Usejob.selected_contentif present, else fetch full notedatabase.py: Migration to add nullableselected_contentcolumn tovideo_render_jobsTesting
Generated with Claude Code
https://claude.ai/code/session_01KrPcbycrTZrrThFR2a23Yz
Generated by Claude Code