Skip to content

Implement chords, separation, and ranges modules; align shared types; build out frontend feature components#102

Merged
seonghobae merged 7 commits into
developfrom
copilot/implement-missing-features
Mar 28, 2026
Merged

Implement chords, separation, and ranges modules; align shared types; build out frontend feature components#102
seonghobae merged 7 commits into
developfrom
copilot/implement-missing-features

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 28, 2026

Three Python analysis modules were empty placeholders, two fields were missing from the TypeScript shared types contract, and five frontend feature components were stub-only.

Python analysis modules

  • chords/ChordAnalyzer extracts harmony data from roles per section, infers key centers from chord symbols, deduplicates, and elevates confidence for user-sourced chords.
  • ranges/RangeAnalyzer extracts pitch ranges and detects pairwise overlaps using MIDI-based comparison with severity classification (low/medium/high by overlap ratio).
  • separation/StemSeparator categorizes roles into stem groups (vocals, bass, drums, keys, guitar, other) via keyword allowlist matching on role metadata.

Each module follows the existing model.py + extractor/analyzer pattern with full TypedDict models. 98 Python tests, 100% coverage, mypy clean.

TypeScript shared types alignment

  • Added overlapWarnings: string[] to RehearsalRole — was defined in the Python RehearsalRolePayload but missing from the TS contract.
  • Added PartGraphNode type and partGraph: PartGraphNode[] to RehearsalSection — same contract gap.
  • Updated validators, parsers, and demo seed data accordingly.

Frontend feature components

  • HomeFeature — project overview with section/role counts and export summary
  • ChordsFeature — per-section chord display with function labels and user-source indicators
  • RangesFeature — range display per role with overlap warning rendering
  • PlayerFeature — song metadata with section chips
  • SettingsFeature — supported formats, pipeline stages, about info
  • SectionRoadmap — now renders overlapWarnings inline per role

Example

from bandscope_analysis.ranges import RangeAnalyzer

analyzer = RangeAnalyzer()
result = analyzer.analyze(
    [{"id": "verse-1"}],
    roles_by_section={
        "verse-1": [
            {"id": "bass", "name": "Bass", "range": {"lowestNote": "C#2", "highestNote": "E3"}},
            {"id": "keys", "name": "Keys", "range": {"lowestNote": "C#2", "highestNote": "C#3"}},
        ]
    },
)
# result["sections"][0]["overlaps"] → [{"role_a": "bass", "role_b": "keys", "severity": "high", ...}]

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • astral.sh
    • Triggering command: /usr/bin/curl curl -LsSf REDACTED grep -l \|HACK\|NotImplemented\|pass$ ity/app-security.md (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.

@seonghobae seonghobae marked this pull request as ready for review March 28, 2026 11:31
@seonghobae seonghobae self-requested a review as a code owner March 28, 2026 11:31
@seonghobae seonghobae enabled auto-merge (squash) March 28, 2026 11:31
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 28, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: d5a6fd43-5e5b-44e1-9908-39216b66df44

📥 Commits

Reviewing files that changed from the base of the PR and between dd3bbab and f6cd1e8.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (22)
  • apps/desktop/src/App.test.tsx
  • apps/desktop/src/features/chords/index.tsx
  • apps/desktop/src/features/home/index.tsx
  • apps/desktop/src/features/player/index.tsx
  • apps/desktop/src/features/ranges/index.tsx
  • apps/desktop/src/features/settings/index.tsx
  • apps/desktop/src/features/workspace/SectionRoadmap.tsx
  • apps/desktop/src/lib/export.test.ts
  • packages/shared-types/src/index.ts
  • packages/shared-types/test/index.test.ts
  • services/analysis-engine/src/bandscope_analysis/chords/__init__.py
  • services/analysis-engine/src/bandscope_analysis/chords/analyzer.py
  • services/analysis-engine/src/bandscope_analysis/chords/model.py
  • services/analysis-engine/src/bandscope_analysis/ranges/__init__.py
  • services/analysis-engine/src/bandscope_analysis/ranges/analyzer.py
  • services/analysis-engine/src/bandscope_analysis/ranges/model.py
  • services/analysis-engine/src/bandscope_analysis/separation/__init__.py
  • services/analysis-engine/src/bandscope_analysis/separation/model.py
  • services/analysis-engine/src/bandscope_analysis/separation/separator.py
  • services/analysis-engine/tests/test_chords.py
  • services/analysis-engine/tests/test_ranges.py
  • services/analysis-engine/tests/test_separation.py

Cache: Disabled due to Reviews > Disable Cache setting

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.


📝 Walkthrough

Summary by CodeRabbit

  • 새로운 기능
    • 홈/플레이어/화음/음역 화면이 곡 로드 여부에 따라 빈 상태 ↔ 곡 상세로 조건부 전환
    • 섹션·역할 기반 화음 카드, 사용자 화음 배지, 역할별 음역 카드 및 오버랩(겹침) 경고 표시
    • 섹션 로드맵에 겹침 경고 라인 추가 및 핸드오프(part graph) 활성 표시
    • 설정에 지원 오디오 포맷 배지 추가
  • 테스트
    • 화음·음역·분리 분석 로직과 형식 검증에 대한 단위 테스트 대폭 추가/강화

Walkthrough

데스크톱 UI 컴포넌트들이 선택적 song prop을 수용하도록 시그니처와 렌더 로직이 확장되고, 공유 타입에 overlapWarningspartGraph/PartGraphNode가 추가되었으며, 분석 엔진에 코드·음역·분리 분석 모듈과 해당 단위 테스트들이 도입되었습니다.

Changes

Cohort / File(s) Summary
Desktop UI - song prop 통합
apps/desktop/src/features/home/index.tsx, apps/desktop/src/features/chords/index.tsx, apps/desktop/src/features/player/index.tsx, apps/desktop/src/features/ranges/index.tsx
각 Feature 시그니처에 song?: RehearsalSong | null 추가. song 존재 여부에 따른 조건부 렌더링(곡 메타·섹션·역할 출력 또는 빈 상태 온보딩 메시지)로 JSX가 확장됨. (chords는 내부에 미사용된 chordsBySectionLabel Map 생성 포함).
데스크톱 테스트 픽스처 업데이트
apps/desktop/src/App.test.tsx, apps/desktop/src/lib/export.test.ts
테스트 픽스처에 역할별 overlapWarnings 필드(빈 배열 또는 경고 문자열)와 섹션 수준 partGraph 추가 — 입력 구조 확장만(검증/기대값 변경 없음).
Settings / Workspace UI 변경
apps/desktop/src/features/settings/index.tsx, apps/desktop/src/features/workspace/SectionRoadmap.tsx
SettingsFeatureSUPPORTED_AUDIO_FORMATS 사용 및 다중 섹션 레이아웃 추가. SectionRoadmaprole.overlapWarnings 조건부 렌더링(⚠️ 스타일 경고 라인) 추가.
공유 타입 확장 및 유효성 검사 갱신
packages/shared-types/src/index.ts
RehearsalRoleoverlapWarnings: string[] 필드 추가, PartGraphNode 타입 신설 및 RehearsalSection.partGraph: PartGraphNode[] 추가. 타입 검증 로직에 overlapWarnings/partGraph 유효성 검사 함수(및 demo 데이터 업데이트) 포함.
공유 타입 테스트 확장
packages/shared-types/test/index.test.ts
overlapWarningspartGraph에 대한 부정적 검증 케이스(비배열, 요소 타입 오류, null 요소, 서브필드 타입 오류, 허용되지 않은 추가 필드 등) 추가.
분석 엔진 — 코드 분석 (파이썬)
services/analysis-engine/src/bandscope_analysis/chords/...
도메인 모델(ChordLabel, SectionChordSummary, ChordAnalysisResult) 추가, ChordAnalyzer 구현(섹션별 코드 추출·중복 제거·키 중심 추론·신뢰도 집계), 패키지 수준 all 노출 추가 및 관련 단위 테스트 추가.
분석 엔진 — 음역 분석 (파이썬)
services/analysis-engine/src/bandscope_analysis/ranges/...
노트 파싱·MIDI 환산·범위 겹침 판정·심각도 산정 유틸리티와 RangeAnalyzer 구현, 도메인 모델(RangeInfo, RangeOverlap, SectionRangeSummary, RangeAnalysisResult) 및 단위 테스트 추가.
분석 엔진 — 음원 분리 (파이썬)
services/analysis-engine/src/bandscope_analysis/separation/...
StemCategory enum, StemDescriptor, SeparationResult 타입 추가, 역할 키워드 매핑 기반 _categorize_roleStemSeparator.separate() 구현, 모듈 all 노출 및 단위 테스트 추가.
분석 엔진 테스트 추가
services/analysis-engine/tests/test_chords.py, .../test_ranges.py, .../test_separation.py
Chord/Range/Separation 모듈의 단위 테스트 추가 — 정상·경계·오염 입력 케이스와 반환 구조·내용 검증을 포함한 광범위한 커버리지.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Poem

🐰 새 파트가 깜빡, 경고가 반짝,
코드와 음표가 같이 춤을 추네,
그래프는 길을 밝히고, 겹침은 속삭여,
분석은 깡충깡충, 결과는 반짝반짝,
래빗이 박수로 축하해요 🎵

✨ 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 copilot/implement-missing-features

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

@seonghobae
Copy link
Copy Markdown
Owner

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 28, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

auto-merge was automatically disabled March 28, 2026 11:31

Head branch was pushed to by a user without write access

@seonghobae seonghobae enabled auto-merge (squash) March 28, 2026 11:31
@seonghobae seonghobae force-pushed the copilot/implement-missing-features branch from b8e86aa to 04fae99 Compare March 28, 2026 11:33
Copilot AI changed the title [WIP] Implement missing features based on feedback Implement chords, separation, and ranges modules; align shared types; build out frontend feature components Mar 28, 2026
Copilot AI and others added 6 commits March 28, 2026 20:35
Agent-Logs-Url: https://github.com/seonghobae/bandscope/sessions/402aa854-387b-414d-9a78-61fee06fcc8f

Co-authored-by: seonghobae <8172694+seonghobae@users.noreply.github.com>
…t coverage

Agent-Logs-Url: https://github.com/seonghobae/bandscope/sessions/402aa854-387b-414d-9a78-61fee06fcc8f

Co-authored-by: seonghobae <8172694+seonghobae@users.noreply.github.com>
…l validation

Agent-Logs-Url: https://github.com/seonghobae/bandscope/sessions/402aa854-387b-414d-9a78-61fee06fcc8f

Co-authored-by: seonghobae <8172694+seonghobae@users.noreply.github.com>
…w fields

Agent-Logs-Url: https://github.com/seonghobae/bandscope/sessions/402aa854-387b-414d-9a78-61fee06fcc8f

Co-authored-by: seonghobae <8172694+seonghobae@users.noreply.github.com>
…er review feedback

Agent-Logs-Url: https://github.com/seonghobae/bandscope/sessions/402aa854-387b-414d-9a78-61fee06fcc8f

Co-authored-by: seonghobae <8172694+seonghobae@users.noreply.github.com>
@seonghobae seonghobae force-pushed the copilot/implement-missing-features branch from 04fae99 to 7b770d7 Compare March 28, 2026 11:35
@seonghobae
Copy link
Copy Markdown
Owner

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 28, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@seonghobae seonghobae merged commit 508122c into develop Mar 28, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants