Skip to content

[CHORE] 트랙 상세/수정 공통 데이터 모델 정비#25

Merged
leeminsel merged 1 commit into
developfrom
feat/#23-track-data-model
Jul 13, 2026
Merged

[CHORE] 트랙 상세/수정 공통 데이터 모델 정비#25
leeminsel merged 1 commit into
developfrom
feat/#23-track-data-model

Conversation

@seooyoon

@seooyoon seooyoon commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

#️⃣ 관련 이슈

📝 작업 요약

Track 타입에 소유자(creator)와 코드 진행(chordProgression) 필드 추가, 관련 mock 데이터 및 공용 표시 유틸 정비

🔧 변경 사항

  • Track 타입에 creator, chordProgression(마디별 코드, null=직전 코드 유지) 필드 추가
  • chordProgression이 없는 트랙을 위한 fallback 코드 진행 생성 함수 추가
  • mock 트랙 데이터에 creator/chordProgression 채워넣기, 내가 만든 트랙 예시(track-3) 추가(테스트용 mock 데이터)
  • 난이도 라벨/색상, Key mode 라벨 등 공용 표시 유틸(trackDisplay.ts)로 정리

💬 리뷰어 참고 사항

후속 PR(#8, #24)에서 사용할 데이터 기반 작업이라 UI 변화는 없습니다.
TrackCard 난이도 라벨 '전공'을 '고급'으로 통일한 것도 포함되어 있습니다.

✅ 체크리스트

  • 커밋 메시지 컨벤션을 준수했습니다.
  • 불필요한 console.log를 제거했습니다.
  • 관련 이슈를 연결했습니다.

Summary by CodeRabbit

  • 새 기능

    • 연습 트랙에 제작자 정보와 코드 진행 표시가 추가되었습니다.
    • 재즈 스탠더드, 재즈 왈츠, 12마디 블루스 등 다양한 연습 트랙이 제공됩니다.
    • 트랙별 박자와 코드 진행을 확인할 수 있습니다.
    • 코드 진행 정보가 없는 트랙도 기본 진행으로 안정적으로 표시됩니다.
    • 난이도와 조성 모드가 이해하기 쉬운 라벨과 색상으로 표시됩니다.
  • 버그 수정

    • 12마디 블루스 트랙의 박자 표기가 올바르게 수정되었습니다.

@seooyoon seooyoon added ♻️ Refactor Refactor codes 🛠️ Chore Maintenance tasks and project configuration work labels Jul 13, 2026
@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

트랙 모델에 마디별 코드 진행과 폴백 생성 로직을 추가하고, 난이도·모드 표시 매핑을 정리했다. 추천 및 전체 mock 트랙에는 creator와 코드 진행 데이터를 반영했으며 새 재즈 왈츠 트랙을 추가했다.

Changes

트랙 데이터 모델 및 mock 데이터

Layer / File(s) Summary
트랙 계약과 표시 유틸리티
src/types/track.ts, src/pages/practice/trackDisplay.ts
ChordMeasure와 선택적 chordProgression을 추가하고, 코드 배열 기반 폴백 진행 생성 및 난이도·모드 표시 매핑을 내보낸다.
Mock 트랙 데이터 확장
src/pages/practice/mockTracks.ts
추천 및 전체 트랙에 creator와 코드 진행을 추가하고, 공통 재즈 진행과 새 track-3를 정의하며 track-2의 박자를 3/4로 변경한다.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • Musereview/FE#12: 변경된 Track 타입과 mock 데이터가 PracticePage의 트랙 UI 렌더링 및 필터링과 연결된다.

Suggested labels: ✨ Feat

Suggested reviewers: andada-creator, leeminsel, kxxnayun

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed creator, chordProgression, fallback 생성, mock 데이터 보강, 공용 표시 유틸 정리가 이슈 #23 요구와 맞습니다.
Out of Scope Changes check ✅ Passed 요약된 변경은 모두 트랙 모델·목 데이터·표시 유틸 정비 범위 안에 있으며 별도 무관한 수정은 보이지 않습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 트랙 상세/수정용 공통 데이터 모델 정비라는 핵심 변경을 잘 요약하고 있습니다.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/#23-track-data-model

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@seooyoon seooyoon changed the title [FEAT] 트랙 상세/수정용 데이터 모델 정비 [CHORE] 트랙 상세/수정 공통 데이터 모델 정비 Jul 13, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
src/pages/practice/mockTracks.ts (1)

112-121: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

track-3 진행의 코드 표기를 chords 배열과 통일하는 것을 권장합니다.

chords 배열은 Gmaj7를 사용하지만 chordProgressionGM7를 사용하고 있습니다. 같은 코드이나 표기법이 다르면 데이터 매칭 시 혼란이 발생할 수 있습니다. chords 배열의 표기(maj7)에 맞추는 것을 권장합니다.

♻️ 제안: 표기법 통일
     chordProgression: [
-      ['GM7', 'Em7', null],
+      ['Gmaj7', 'Em7', null],
       ['Em7', null, 'Em7'],
-      ['CM7', null, 'D7'],
+      ['Cmaj7', null, 'D7'],
       ['D7', null, null],
-      ['CM7', null, 'D7'],
+      ['Cmaj7', null, 'D7'],
       ['D7', null, null],
-      ['GM7', 'Em7', null],
+      ['Gmaj7', 'Em7', null],
       ['Em7', null, 'Em7'],
     ],
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/pages/practice/mockTracks.ts` around lines 112 - 121, Update the track-3
chordProgression entries to use the same maj7 notation as the chords array,
replacing each GM7 and CM7 symbol with the corresponding Gmaj7 and Cmaj7
representation while leaving all other progression values unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/pages/practice/mockTracks.ts`:
- Around line 6-15: Update JAZZ_STANDARD_PROGRESSION to use the chord names
defined in the same track: replace each AM7 entry with Am7, add the missing Dm7
ii chord at the appropriate progression position, and align Cmaj7 notation with
the chords array instead of CM7.

---

Nitpick comments:
In `@src/pages/practice/mockTracks.ts`:
- Around line 112-121: Update the track-3 chordProgression entries to use the
same maj7 notation as the chords array, replacing each GM7 and CM7 symbol with
the corresponding Gmaj7 and Cmaj7 representation while leaving all other
progression values unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 0a9c3e9a-27dc-4c3d-a49a-446c75a89f96

📥 Commits

Reviewing files that changed from the base of the PR and between d119df5 and 2ba04ce.

📒 Files selected for processing (3)
  • src/pages/practice/mockTracks.ts
  • src/pages/practice/trackDisplay.ts
  • src/types/track.ts

Comment on lines +6 to +15
const JAZZ_STANDARD_PROGRESSION: Track['chordProgression'] = [
['CM7', 'AM7', null, null],
['AM7', null, 'AM7', null],
['CM7', null, 'G7', null],
['G7', null, null, null],
['CM7', null, 'G7', null],
['G7', null, null, null],
['CM7', 'AM7', null, null],
['AM7', null, 'AM7', null],
];

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

AM7(A 메이저 7)와 Am7(A 마이너 7) 코드가 혼용되어 있습니다.

JAZZ_STANDARD_PROGRESSION에서 AM7를 사용하지만, 같은 트랙의 chords 배열에는 Am7가 정의되어 있습니다. AM7(A, C♯, E, G♯)와 Am7(A, C, E, G)는 서로 다른 코드이며, C 메이저 키에서 Am7(vi 코드)가 다이아토닉 코드인 점을 고려하면 AM7Am7의 오타로 보입니다.

또한 chords 배열의 Dm7(ii 코드)가 진행에 누락되어 있고, 표기법(Cmaj7 vs CM7)이 chordschordProgression 간에 일치하지 않아 향후 혼동의 원인이 될 수 있습니다.

🔧 제안: 코드 표기 및 진행 수정
 const JAZZ_STANDARD_PROGRESSION: Track['chordProgression'] = [
-  ['CM7', 'AM7', null, null],
-  ['AM7', null, 'AM7', null],
-  ['CM7', null, 'G7', null],
+  ['Cmaj7', 'Am7', null, null],
+  ['Am7', null, 'Am7', null],
+  ['Cmaj7', null, 'Dm7', null],
   ['G7', null, null, null],
-  ['CM7', null, 'G7', null],
+  ['Cmaj7', null, 'G7', null],
   ['G7', null, null, null],
-  ['CM7', 'AM7', null, null],
-  ['AM7', null, 'AM7', null],
+  ['Cmaj7', 'Am7', null, null],
+  ['Am7', null, 'Am7', null],
 ];
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const JAZZ_STANDARD_PROGRESSION: Track['chordProgression'] = [
['CM7', 'AM7', null, null],
['AM7', null, 'AM7', null],
['CM7', null, 'G7', null],
['G7', null, null, null],
['CM7', null, 'G7', null],
['G7', null, null, null],
['CM7', 'AM7', null, null],
['AM7', null, 'AM7', null],
];
const JAZZ_STANDARD_PROGRESSION: Track['chordProgression'] = [
['Cmaj7', 'Am7', null, null],
['Am7', null, 'Am7', null],
['Cmaj7', null, 'Dm7', null],
['G7', null, null, null],
['Cmaj7', null, 'G7', null],
['G7', null, null, null],
['Cmaj7', 'Am7', null, null],
['Am7', null, 'Am7', null],
];
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/pages/practice/mockTracks.ts` around lines 6 - 15, Update
JAZZ_STANDARD_PROGRESSION to use the chord names defined in the same track:
replace each AM7 entry with Am7, add the missing Dm7 ii chord at the appropriate
progression position, and align Cmaj7 notation with the chords array instead of
CM7.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AM7이랑 Am7은 다른게 맞습니다~ 지금 표기가 맞아요!

@leeminsel leeminsel assigned leeminsel and seooyoon and unassigned leeminsel Jul 13, 2026

@leeminsel leeminsel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[CHORE] 트랙 상세/수정 공통 데이터 모델 정비

@leeminsel

Copy link
Copy Markdown
Contributor

구현하느라 수고하셨습니다~!!

@leeminsel
leeminsel merged commit 78f720a into develop Jul 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🛠️ Chore Maintenance tasks and project configuration work ♻️ Refactor Refactor codes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CHORE] 트랙 상세/수정 공통 데이터 모델 정비

2 participants