feat(studio): update to v0.1.3 with v2 design and timeline improvements#56
feat(studio): update to v0.1.3 with v2 design and timeline improvements#56miguel-heygen wants to merge 2 commits intomainfrom
Conversation
80f7c52 to
2ab150a
Compare
2ab150a to
95054b0
Compare
Code Review: feat(studio) v0.1.3Critical1. XSS via unsanitized ID injection in
const re = new RegExp(`(${attrName}=["'])([^"']*)(["'])`);
return tag.replace(re, `$1${newValue}$3`);A crafted element ID like 2. The 3. No request body size limit on PUT Accepts arbitrary content with no cap. Add a size limit (e.g. 10MB). Important4. Zero tests for 5. Zero tests for 6. 7. Puppeteer browser singleton never closes — No cleanup handler on dev server shutdown. Leaves orphaned Chrome processes. Fix: server.httpServer?.on('close', async () => {
if (_browser) await _browser.close().catch(() => {});
});8. Render job TTL parses timestamps from key — 9. 10. 11. Removed Suggestions12. 13. 14. Speed menu has no click-outside-to-close. 15. 16. Auto-scroll RAF in What's well done
|
- v2 teal color scheme (buttons, playhead, progress bar) - CompositionThumbnail: server-rendered JPEG film strips for timeline clips - TimelineToolbar: Split, Delete, and Zoom controls - TimelineClip: draggable clips with resize handles - VideoThumbnail: client-side video frame extraction - Teal playhead line with glow, always visible above clips - Progress thumb: always-visible teal dot - Auto-scroll timeline to follow playhead during seek - Vite plugin: thumbnail endpoint, render proxy, file watcher - Standalone dev mode with full editor Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
95054b0 to
91d4bac
Compare
Remove the Split and Delete toolbar buttons which had many edge cases (style capture, media offset, depth counting, DOMParser + regex hybrid). Replace with an Edit button that: 1. Opens a modal with time range selection (start/end sliders) 2. Shows all elements that overlap the selected range 3. Provides a prompt textarea for describing the desired change 4. "Copy to Agent" button copies structured context to clipboard The AI agent handles the actual HTML mutation — which is what it's good at. This eliminates ~300 lines of fragile split/delete code. Removed: splitElement, deleteElement, applyBakedStyles, styleCapture.ts Kept: parseStyleString, mergeStyleIntoTag, findElementBlock (useful utilities)
91d4bac to
a4c5fd1
Compare
New Features
@use-gesture/react<video>clipspnpm devruns full editor with all API endpoints via Vite plugin — no separate backendDesign Updates
--hf-accent(customizable by consumers)Architecture
Mapwith TTL cleanup (replaces globalThis)parseTimelineFromDOM()— shared helper for DOM → TimelineElement[] (deduplicated from 3 locations)magic-edit-*postMessage references — onlyhf-parent/hf-previewnowclearThumbnailCache,disposeThumbnailIframe,requestThumbnail)Test Coverage
Timeline.tsxtick generation and formattingplayerStore.tsstate management andliveTimesubscription systemformatTimeutility function edge casesVersion Updates
0.1.1to0.1.2(studio to0.1.3)zustandfrom v4 to v5 with peer dependency changespuppeteer-core,vitest,@use-gesture/react