Skip to content

Commit d310ecf

Browse files
committed
refactor(studio): split oversized files and raise line limit to 600
Split PlayerControls.tsx into focused sub-components (SeekBar, WorkAreaOverlay, MuteButton, LoopButton, FullscreenButton, ShortcutsPanel, SpeedMenu) and extracted seek bar drag/progress tracking into useSeekBarDrag hook. Split manualEditsDom.ts patch-builder functions into manualEditsDomPatches.ts with data-driven helpers to reduce duplication and complexity. Extracted per-type reapply helpers from reapplyPositionEditsAfterSeek and factored out identity-matrix check from stripGsapTranslateFromTransform. Raised file-size limit from 500 to 600 lines, removed .filesize-allowlist.
1 parent 06e4db8 commit d310ecf

39 files changed

Lines changed: 1823 additions & 1772 deletions

.filesize-allowlist

Lines changed: 0 additions & 13 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ jobs:
469469
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
470470
with:
471471
fetch-depth: 0
472-
- name: Check file sizes (max 500 lines)
472+
- name: Check file sizes (max 600 lines)
473473
# Scoped to files THIS PR changed under packages/studio. Walking the
474474
# whole tree blamed every unrelated PR for pre-existing offenders.
475475
# Falls back to a full scan on push events (no base ref available)
@@ -494,10 +494,9 @@ jobs:
494494
for f in "${files[@]}"; do
495495
[ -z "$f" ] && continue
496496
[ -f "$f" ] || continue # skip files deleted in this PR
497-
if grep -qxF "$f" .filesize-allowlist 2>/dev/null; then continue; fi
498497
lines=$(wc -l < "$f")
499-
if [ "$lines" -gt 500 ]; then
500-
echo "::error file=$f::$f has $lines lines (max 500)"
498+
if [ "$lines" -gt 600 ]; then
499+
echo "::error file=$f::$f has $lines lines (max 600)"
501500
EXIT=1
502501
fi
503502
done

lefthook.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,16 @@ pre-commit:
2121
glob: "packages/**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}"
2222
run: bunx fallow audit --base origin/main --fail-on-issues
2323
filesize:
24-
# Scoped to packages/studio — the 500 LOC limit is a studio architecture
24+
# Scoped to packages/studio — the 600 LOC limit is a studio architecture
2525
# standard enforced as part of the App.tsx decomposition work. Player and
2626
# other packages enforce size discipline via code review and convention.
27-
# Files temporarily over the limit are listed in .filesize-allowlist.
2827
glob: "packages/studio/**/*.{ts,tsx}"
2928
exclude: "(\\.test\\.(ts|tsx)$|\\.generated\\.)"
3029
run: |
3130
for f in {staged_files}; do
32-
if grep -qxF "$f" .filesize-allowlist 2>/dev/null; then continue; fi
3331
lines=$(wc -l < "$f")
34-
if [ "$lines" -gt 500 ]; then
35-
echo "ERROR: $f has $lines lines (max 500) — add to .filesize-allowlist if temporarily needed"
32+
if [ "$lines" -gt 600 ]; then
33+
echo "ERROR: $f has $lines lines (max 600)"
3634
exit 1
3735
fi
3836
done
-1.01 KB
Loading
107 Bytes
Loading
623 Bytes
Loading
-238 Bytes
Loading
-762 Bytes
Loading
-1.06 KB
Loading
37 Bytes
Loading

0 commit comments

Comments
 (0)