refactor(studio): code quality — 22 findings, dead code removal, App.tsx split#144
Merged
miguel-heygen merged 8 commits intomainfrom Mar 31, 2026
Merged
refactor(studio): code quality — 22 findings, dead code removal, App.tsx split#144miguel-heygen merged 8 commits intomainfrom
miguel-heygen merged 8 commits intomainfrom
Conversation
da7fc7c to
62da835
Compare
10c54a4 to
88c7ac9
Compare
Collaborator
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
This was referenced Mar 30, 2026
62da835 to
18f68dc
Compare
88c7ac9 to
603dda8
Compare
bff4940 to
5510cfd
Compare
This was referenced Mar 31, 2026
jrusso1020
approved these changes
Mar 31, 2026
18f68dc to
0a61067
Compare
9ecd4e6 to
3093cc4
Compare
6a7d8e0 to
70874f7
Compare
3093cc4 to
a1f2631
Compare
Critical: - PlayerControls: aria-valuenow updates imperatively via liveTime sub - PlayerControls: speed menu closes on outside click - RenderQueue: auto-scroll moved from render phase to useEffect Dead code removed: - PreviewPanel.tsx (180 lines, replaced by NLELayout) - useCodeEditor.ts (unused hook) - formatTick deprecated alias from Timeline.tsx - onClipChange from TimelineProps (never used) - trackH prop from TimelineClip (never used) - editRangeStart/End/Mode + individual updaters from playerStore Fixes: - CompositionsTab iframe hover debounced (300ms) - VideoFrameThumbnail re-extracts when src changes - playerStore.reset() documents preserved fields
…es from App.tsx - Extract LintModal (130 lines) to components/LintModal.tsx - Extract MediaPreview (75 lines) to components/MediaPreview.tsx - Extract shared media regexes to utils/mediaTypes.ts (single source of truth — App.tsx and AssetsTab.tsx were silently diverged) - Add useMemo for compositions/assets derivation and FileTree buildTree - Debounce handleContentChange PUT (600ms, was firing every keystroke) - Guard projectId null in LintModal render
The /api/render/:jobId/view route depended on an in-memory renderJobs map that's empty after server restart, causing 404s. Replace with a /api/projects/:id/renders/file/:filename route that reads directly from the renders directory on disk. Both view and download now use this path. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Match the same #3CE6AC active style used by timeline and renders toggles. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
CompositionThumbnail now takes one screenshot at the midpoint and stretches it across the clip (object-cover), same approach as After Effects for precomps. Avoids 6x Puppeteer render cost per composition. Timeline shift+drag range selection now works even when starting on a clip — the [data-clip] early return was blocking the shiftKey check. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
a1f2631 to
c757f91
Compare
70874f7 to
1bc83c6
Compare
Replace all 30 hardcoded [#3CE6AC] and blue-400/blue-500 Tailwind classes with the studio-accent token defined in tailwind.config.js. Single source of truth — change the accent in one place. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
c757f91 to
5e8927f
Compare
Collaborator
Author
Merge activity
|
10 tasks
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
Full code quality review of the studio package, fixing 22 of 25 findings. Removes dead code, extracts modules from App.tsx, fixes accessibility and performance issues.
Critical fixes (3)
aria-valuenowon seek bar now updates imperatively vialiveTime.subscribe— screen readers previously always reported position 0useEffect(was violating React render purity viaqueueMicrotaskduring render)Dead code removed (-331 lines)
PreviewPanel.tsxuseCodeEditor.tsformatTickaliasonClipChangeproptrackHpropeditRange*+ updaters in storeApp.tsx extraction
components/LintModal.tsxcomponents/MediaPreview.tsxutils/mediaTypes.tsPerformance fixes
useMemoforcompositions/assetsderivation fromfileTreeuseMemoforbuildTree(files)in FileTreehandleContentChangePUT (600ms — was firing on every keystroke)VideoFrameThumbnailre-extracts frame whensrcprop changesNot addressed (3 — low priority)
🤖 Generated with Claude Code