refactor: 대형 프론트엔드·백엔드 모듈 경계 분리와 ASIO 검증 보강 - #154
Open
lee-sihun wants to merge 246 commits into
Open
Conversation
Member
|
+123,940 ? |
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.
개요
동작과 공개 계약을 유지하면서 대형 프론트엔드·백엔드 파일을 책임 경계별로 분리하고, Grid의 키·통계·그래프·노브 표면을 실제 재사용 가능한 단위로 공용화함. 동시에 하드웨어 없이 검증할 수 있는 ASIO 정책과 오류 계약을 테스트로 고정하고 Windows ASIO CI를 추가함
작업 중
main에 먼저 들어간 2.0.2 변경 33개 커밋도 최종 단계에서 병합했다. 물리 좌표 기반 패널 drag·overlay 복원, 탭 rename/reorder/bar count, pointer focus, gooey·motion 정책을 리팩터링 이전 구조로 되돌리지 않고 분리된 모듈에 반영했다af1bc19cmain기준:4b4d6c22(2.0.2)main통합·Windows CI 보정 커밋 3개 (총 246개)변경 내용
프론트엔드 책임 분리
프로퍼티 패널
PropertiesPanel.tsx를 선택 route, 표시 모델, commit runtime, plugin 설정, rename, layer action으로 분리Grid와 공용 표면
KeyElementFace: 키·통계 placeholder, border, image/error, label, inside counter 표면CounterPreviewBody/CounterPreviewLayer: 키·통계 외부 카운터 body와 layerGraphPanel: Grid와 overlay 그래프 표면KnobFace: 링, 이미지, indicator 표면NativeGridElements: 네이티브 요소 scene 조립과 adapternativeElementReferenceRegistry: mount/unmount ref 등록·삭제 계약Graph 데이터 adapter, Knob 회전 상태, Key active 상태, Stat 정수 정규화처럼 의미가 다른 정책은 공통 컴포넌트 조건문으로 합치지 않았다
입력·팝업·에디터 runtime
Dropdown,FloatingPopup,NumberInput,ColorPicker, counter animation editor, sound trim의 상태 머신과 UI를 분리editorCoordinator의 queue/retry/rebase/projection과elementOps의 property/group/style/geometry 연산을 분리use no memo경계를 유지백엔드 책임 분리
state/store.rs: 22,978줄 → 829줄 façade. persistence/writer/recovery/asset/editor/plugin transaction 분리state/editor_ops.rs: 10,154줄 → 49줄 façade. property/structural/transition 연산과 검증 분리state/migration.rs: 6,053줄 → 275줄. normalization/recovery/assets/tests 분리state/editor.rs: 5,777줄 → 176줄. request/limits/violations/tests 분리state/app_state.rs: 9,314줄 → 1,259줄. window geometry, keyboard, counter, lifecycle, panel/overlay runtime 분리store 분리에서는 다음 불변식을 그대로 유지했다
trash/<세션>/에 30일 격리keys[mode][i]와keyPositions[mode][i]의 인덱스 결합 유지최신 main 변경 통합
tabOrder,barCount, custom tab rename/reorder를 migration, preset, history, bootstrap, overlay 메뉴에 함께 반영window_geometry공통 좌표와overlay_placement를 분리panel_drag.rs를 공통 상태 머신·기하, Windows native adapter, 테스트로 순수 이동 분리origin/main과 동일한 150개이며 permissions, 생성 schema, API 문서도origin/main과 일치main추가 Rust 함수·테스트 이름 전체 대조에서 누락 0개origin/main을 다시 확인하고, 이후 추가된 선행 커밋·PR이 있으면 기능을 제외하지 않고 현재 모듈 경계에 먼저 통합하는 것을 머지 조건으로 둠ASIO 검증 보강
동작 동일성 검증 방식
rustfmt정규화 결과를 비교panel_drag최종 분리는origin/main원본을 재조립해 core/Windows/tests 세 파일 모두rustfmt기준 정확히 동일함을 확인main과 branch의 Tauri command 이름·개수, permissions/schema/docs 차이를 별도 확인검증
npx tsc --noEmit통과npm run lint통과, 오류·경고 0npm run format:check통과npm run build통과. 기존 700 kB 초과 chunk 경고만 유지cargo fmt --all -- --check통과cargo check --all-targets통과cargo clippy --all-targets -- -D warnings통과cargo test --all-targets --quiet: 1,044개 통과, 6개 ignored, 실패 0cargo check --all-targets --features asio-backend통과cargo clippy --all-targets --features asio-backend -- -D warnings통과-D warnings, 정책 테스트 통과git diff-tree --check통과Vitest에는 기존 React
act(...), mock DOM prop, CSS parser stderr가 남아 있으나 실패와 분리되어 있고 이번 변경으로 새 lint warning은 없다리뷰 순서 권장
GitHub의 전체 diff보다 커밋 단위로 보는 편이 의도와 검증 경계를 확인하기 쉽다
docs/code-quality-refactoring-plan.md에서 전체 경계와 보존 불변식 확인test:커밋의 characterization contract 확인refactor:커밋에서 동일 동작의 파일 이동·의존성 축소 확인merge:커밋에서 2.0.2 선행 기능과 분리 구조 통합 확인리뷰 시 주의할 지점
Grid·PropertiesPanel
KeyElementFace,GraphPanel,KnobFace가 DOM/CSS만 공유하고 각 요소의 데이터 의미를 섞지 않는지use no memo와 manual memo 경계가 보존됐는지store·migration·history
tabOrder와barCount가 undo/redo, preset, 손상 복구에서 함께 이동하는지팝업·focus·탭 UI
Windows native 좌표
panel_drag/windows.rs는 순수 이동이지만 macOS 로컬 빌드가 Windows API type-check를 대신하지 못하므로 Windows CI 통과 결과와 실기 동작을 함께 확인ASIO
알려진 한계와 머지 전 실기 확인
WebGLTracksOGL/noteBuffer)과 note timing은 별도 harness가 필요아래 기존 결함은 동작 동일성을 위해 이번 PR에서 수정하지 않았다. 기대 동작을 먼저 정한 별도 bug-fix가 필요하다
PluginElement비동기 subscription의 unmount 경계와 같은 tick shallow state 경쟁NativeGridElements의 type+index action이 reorder/delete와 경합하는 경우SoundTrimModal,useLayerDnD, 일부 picker/dialog의 직접 unmount cleanup 경계