Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
851964d
feat(workspace): name tonight's first dropout on the map
seonghobae Aug 18, 2026
7df6d90
test(workspace): distinguish dropout navigation from playback
seonghobae Aug 18, 2026
2e7baaa
fix(workspace): label dropout map navigation honestly
seonghobae Aug 18, 2026
26ac05e
feat(i18n): distinguish dropout navigation from playback
seonghobae Aug 18, 2026
6a852b7
feat(i18n): localize dropout map navigation
seonghobae Aug 18, 2026
3decb43
docs(workspace): distinguish dropout navigation from playback
seonghobae Aug 18, 2026
9ddd273
docs(workspace): align dropout action architecture copy
seonghobae Aug 18, 2026
bd7e3b1
test(workspace): decouple dropout navigation from analysis ids
seonghobae Aug 18, 2026
b60e0f4
fix(workspace): use renderer-owned dropout navigation targets
seonghobae Aug 18, 2026
f56bed7
fix(workspace): keep dropout analysis ids out of DOM authority
seonghobae Aug 18, 2026
d93ab2d
test(workspace): align dropout map contracts with current behavior
seonghobae Aug 18, 2026
15f68b7
test(workspace): reject cross-section dropout targets
seonghobae Aug 18, 2026
6f3a8fc
fix(workspace): keep dropout handoffs section-local
seonghobae Aug 18, 2026
f2dab08
test(workspace): ignore inactive dropout nodes
seonghobae Aug 18, 2026
6f02d69
fix(workspace): ignore inactive dropout nodes
seonghobae Aug 18, 2026
f58f67e
test(workspace): reject inconsistent dropout handoffs
seonghobae Aug 18, 2026
91ae7d4
test(workspace): keep dropout action mode authoritative
seonghobae Aug 18, 2026
ed8c0de
test(workspace): model reciprocal dropout graph evidence
seonghobae Aug 18, 2026
3d02d98
fix(workspace): require reciprocal dropout handoffs
seonghobae Aug 18, 2026
c3cfbf7
fix(workspace): keep dropout action mode authoritative
seonghobae Aug 18, 2026
f2a7b73
docs(workspace): define dropout action authority
seonghobae Aug 18, 2026
c28ca04
test: reject non-boolean dropout activity flags
seonghobae Aug 18, 2026
99c8bd4
fix: require boolean dropout activity evidence
seonghobae Aug 18, 2026
a6ae351
test: reject malformed dropout role ids
seonghobae Aug 18, 2026
55ac6da
fix: reject malformed dropout role ids
seonghobae Aug 18, 2026
4227399
test(workspace): reject ambiguous dropout identities
seonghobae Aug 18, 2026
5ded223
fix(workspace): fail closed on ambiguous dropout identities
seonghobae Aug 18, 2026
c711dbd
test(workspace): keep dropout fixture identities unique
seonghobae Aug 18, 2026
7c14a93
test(workspace): reject malformed dropout evidence
seonghobae Aug 19, 2026
9ddb70a
fix(workspace): contain malformed dropout evidence
seonghobae Aug 19, 2026
85e4dd5
refactor(workspace): preserve valid dropout edges
seonghobae Aug 19, 2026
b6b7ae7
test(workspace): require executed dropout actions
seonghobae Aug 19, 2026
6c602f8
feat(i18n): localize section form labels
seonghobae Aug 19, 2026
745008c
fix(workspace): arm dropout only after action
seonghobae Aug 19, 2026
64fbd94
test(workspace): lock first-dropout repair contracts
seonghobae Aug 19, 2026
c234b6c
test(workspace): model successful map navigation in integration
seonghobae Aug 19, 2026
73edbfe
fix(workspace): ignore malformed handoff entries safely
seonghobae Aug 19, 2026
a0b5fe9
fix(i18n): remove unsafe Korean role particles
seonghobae Aug 19, 2026
dd72cc1
Merge remote-tracking branch 'origin/develop' into HEAD
seonghobae Aug 25, 2026
550dbd6
Merge remote-tracking branch 'origin/develop' into HEAD
seonghobae Aug 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ This section applies to any agent (Claude, Codex, Cursor, opencode, ...) working
- Keep UI and analysis engine decoupled through shared contracts.
- Prefer minimal, test-first changes for production code.
- Prefer practical, friendly, rehearsal-first wording over academic or authority-heavy language.
- Name tonight's first dropout with the outgoing part, incoming part, section, and end time so the next action is obvious.
- Do not reduce the product to a chord analyzer when form, timing, player coordination, playable ranges, simplification, and setup cues are the real rehearsal blockers.
- Do not frame usability as a reason to accept weak analysis quality; BandScope should aim for both easy use and high accuracy.

Expand Down
1 change: 1 addition & 0 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Last updated: 2026-03-11

- Product identity, UX tone, copy rules, and prioritization tie-breakers live in `docs/brand-story.md`.
- Future PRDs, TRDs, onboarding copy, empty states, error messages, and marketing copy should use that document as the single brand source of truth.
- Workspace and player copy for tonight's first dropout must name the outgoing part, incoming part, section, and end time so the next action is obvious.

## Security source

Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

### Added

- Name tonight's first dropout on the workspace and player so the outgoing part can get out of the way; the workspace action arms the handoff and opens the matching map section, while the player exposes a Hear action only when its owning playback surface supplies a seek callback.
- Name tonight's first playable range on the ready rehearsal map and tell the player to check that span on their instrument before the section.
- Display the analyzed song tempo (BPM) as a badge in the rehearsal workspace.
- 각 합주 역할(Role)별 개인 연습 진행도를 0~100% 범위로 기록 및 시각화할 수 있는 연습 진척도(`practiceProgress`) 트래커 기능 추가. UI 컨트롤(슬라이더 및 +/- 버튼)과 한/영 다국어 지원 포함.
Expand Down Expand Up @@ -74,4 +75,5 @@

- `ChordsFeature` (코드 분석) 화면에서 각 파트(Role)의 `transpositionPlan`(이조/조옮김 계획)을 표시하는 기능을 추가했습니다.
- `RangesFeature` (음역대 분석) 화면에서 겹침 경고(Overlap warning) 외에 해당 파트의 채보(Transcription) 가능 노드 수를 요약하여 보여주는 기능을 추가했습니다.
- 신규 UI 요소에 대한 단위 테스트를 추가했습니다 (`apps/desktop/src/features/chords/index.test.tsx`, `apps/desktop/src/features/ranges/index.test.tsx`).
- 신규 UI 요소에 대한 100% 테스트 커버리지를 보장하는 단위 테스트를 추가했습니다 (`apps/desktop/src/features/chords/index.test.tsx`, `apps/desktop/src/features/ranges/index.test.tsx`).
- 신규 UI 요소에 대한 단위 테스트를 추가했습니다 (`apps/desktop/src/features/chords/index.test.tsx`, `apps/desktop/src/features/ranges/index.test.tsx`).
Comment on lines +78 to +79

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Duplicate changelog bullet under 0.1.4

Two bullets now describe unit tests for the chords and ranges features, both citing the same two test files. The reworded '100% coverage' line was added alongside the original verbatim line instead of replacing it.

Suggested change
- 신규 UI 요소에 대한 100% 테스트 커버리지를 보장하는 단위 테스트를 추가했습니다 (`apps/desktop/src/features/chords/index.test.tsx`, `apps/desktop/src/features/ranges/index.test.tsx`).
- 신규 UI 요소에 대한 단위 테스트를 추가했습니다 (`apps/desktop/src/features/chords/index.test.tsx`, `apps/desktop/src/features/ranges/index.test.tsx`).
- 신규 UI 요소에 대한 100% 테스트 커버리지를 보장하는 단위 테스트를 추가했습니다 (`apps/desktop/src/features/chords/index.test.tsx`, `apps/desktop/src/features/ranges/index.test.tsx`).
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

4 changes: 2 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ BandScope is a local-first desktop app for rehearsal prep: it turns a song into

Three layers, decoupled through shared contracts:

- `apps/desktop` — Tauri 2 + Vite + React 19 shell (Tailwind 4, Base UI, Storybook). Feature screens live in `src/features/` (home, workspace, chords, ranges, player, settings). The ready workspace names tonight's first playable range and the next instrument check. `src/lib/analysis.ts` and `src/lib/job_runner.ts` call typed Tauri IPC commands, with a browser fallback that serves demo data when not running inside Tauri.
- `apps/desktop` — Tauri 2 + Vite + React 19 shell (Tailwind 4, Base UI, Storybook). Feature screens live in `src/features/` (home, workspace, chords, ranges, player, settings). Workspace and player name tonight's first dropout so the outgoing part can get out of the way; the workspace action arms the handoff and opens its mapped section, while the player renders the Hear action only when its owning playback surface supplies a seek callback. The ready workspace also names tonight's first playable range and the next instrument check. `src/lib/analysis.ts` and `src/lib/job_runner.ts` call typed Tauri IPC commands, with a browser fallback that serves demo data when not running inside Tauri.
- `apps/desktop/src-tauri/src/main.rs` — the Rust orchestration boundary. Tauri commands (`start_analysis_job`, `get_analysis_job_status`, `select_local_audio_source`, `import_youtube_url`) validate untrusted input (project IDs, file paths, URLs) and spawn the Python engine as a subprocess. There is no loopback HTTP listener and no network path for local analysis.
- `services/analysis-engine` — Python package `bandscope_analysis` (librosa/numpy). Entry point `cli.py` reads a JSON job request on stdin and prints a structured job-status JSON envelope on stdout (`--progress-jsonl` streams progress lines). `api.py` orchestrates the pipeline across the `separation`, `sections`, `roles`, `chords`, `ranges`, `temporal`, `transcription`, and `youtube` modules.

Expand All @@ -72,4 +72,4 @@ Supporting packages:
- Documents under `docs/plans/` must include `Security Notes`; `scripts/checks/verify_security_notes.py` enforces this mechanically.
- Lockfiles (`package-lock.json`, `uv.lock`, `Cargo.lock`) are committed and must stay in sync; GitHub Actions are SHA-pinned. Adding a direct dependency requires the admission rationale defined in `AGENTS.md` and `docs/security/dependency-policy.md`.
- CI beyond quickcheck: `gate / ci / rust-check` (Tauri cargo check on macOS) and `build-baseline` Windows/macOS amd64+arm64 native builds are merge gates, alongside CodeQL, dependency-review, sbom, bandit, trivy, secret-scan, and security-audit workflows. Do not weaken or skip them.
- Version metadata lives in `VERSION`, the root `package.json`, and `CHANGELOG.md`; release flow is tag-driven (see `docs/operations/deploy-runbook.md`).
- Version metadata lives in `VERSION`, the root `package.json`, and `CHANGELOG.md`; release flow is tag-driven (see `docs/operations/deploy-runbook.md`).
44 changes: 44 additions & 0 deletions apps/desktop/src/features/player/index.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import { fireEvent, render, screen } from "@testing-library/react";
import { createDemoRehearsalSong } from "@bandscope/shared-types";
import { describe, expect, it, vi } from "vitest";
import { PlayerFeature } from "./index";

describe("PlayerFeature", () => {
it("asks the room to analyze first when no song is loaded", () => {
render(<PlayerFeature title="Player" />);
expect(
screen.getByText("Analyze tonight's song first, then hear the first dropout from this player.")
).toBeTruthy();
});

it("keeps the dropout hear action unavailable without a player playback callback", () => {
render(<PlayerFeature title="Player" song={createDemoRehearsalSong()} />);

expect(
screen.queryByRole("button", {
name: "Hear Bass Guitar drop out for Lead Vocal at 0:30"
})
).toBeNull();
expect(screen.getByText("Bass Guitar hands off to Lead Vocal at the end of the verse (0:30).")).toBeTruthy();
});

it("delegates the dropout hear action to the owning player callback", () => {
const onPlayFromSeconds = vi.fn();
render(
<PlayerFeature
title="Player"
song={createDemoRehearsalSong()}
onPlayFromSeconds={onPlayFromSeconds}
/>
);

fireEvent.click(
screen.getByRole("button", {
name: "Hear Bass Guitar drop out for Lead Vocal at 0:30"
})
);

expect(onPlayFromSeconds).toHaveBeenCalledTimes(1);
expect(onPlayFromSeconds).toHaveBeenCalledWith(30);
});
});
22 changes: 18 additions & 4 deletions apps/desktop/src/features/player/index.tsx
Original file line number Diff line number Diff line change
@@ -1,27 +1,41 @@
import type { RehearsalSong } from "@bandscope/shared-types";
import { FirstDropoutCallout } from "../workspace/FirstDropoutCallout";
import { createTranslator, detectPreferredLocale } from "../../i18n";

/** Documented. */
export function PlayerFeature(props: { title: string; song?: RehearsalSong | null }) {
const { title, song } = props;
type PlayerFeatureProps = {
title: string;
song?: RehearsalSong | null;
onPlayFromSeconds?: (startSeconds: number) => void;
};

/** Player surface that names tonight's first dropout and delegates playback to the owning player. */
export function PlayerFeature({ title, song, onPlayFromSeconds }: PlayerFeatureProps) {
const t = createTranslator(detectPreferredLocale());

if (!song) {
return (
<section style={{ padding: "24px" }}>
<h2>{title}</h2>
<p style={{ color: "#999" }}>No song loaded. Start an analysis to use the player.</p>
<p style={{ color: "#999" }}>{t("firstDropoutNeedsSong")}</p>
</section>
);
}

return (
<section style={{ padding: "24px" }}>
<h2>{title}</h2>
<FirstDropoutCallout
song={song}
actionMode="callback-only"
onHearDropout={onPlayFromSeconds}
/>
<div
style={{
padding: "16px",
backgroundColor: "#fafafa",
borderRadius: "8px",
border: "1px solid #e8e8e8",
marginTop: "16px",
}}
>
<div style={{ marginBottom: "12px" }}>
Expand Down
174 changes: 174 additions & 0 deletions apps/desktop/src/features/workspace/FirstDropoutCallout.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
import { fireEvent, render, screen } from "@testing-library/react";
import {
createDemoRehearsalSong,
type RehearsalSong
} from "@bandscope/shared-types";
import { afterEach, describe, expect, it, vi } from "vitest";
import { FirstDropoutCallout } from "./FirstDropoutCallout";

function appendSongStructureTarget() {
const grid = document.createElement("div");
grid.dataset.testid = "song-structure-grid";
const target = document.createElement("div");
const scrollIntoView = vi.fn();
Object.defineProperty(target, "scrollIntoView", {
configurable: true,
value: scrollIntoView
});
grid.appendChild(target);
document.body.appendChild(grid);
return { grid, scrollIntoView };
}

describe("FirstDropoutCallout", () => {
afterEach(() => {
vi.unstubAllGlobals();
});

it("names the first dropout as map navigation, scrolls to its rendered section, and arms that action", () => {
const { grid, scrollIntoView } = appendSongStructureTarget();

render(<FirstDropoutCallout song={createDemoRehearsalSong()} />);

const action = screen.getByRole("button", {
name: "Open Bass Guitar dropout for Lead Vocal at 0:30"
});
expect(action).toBeTruthy();
fireEvent.click(action);
expect(scrollIntoView).toHaveBeenCalledWith({ block: "nearest", behavior: "smooth" });
expect(screen.getByText(/Start the last bar of Bass Guitar before Lead Vocal takes the verse \(0:30\)/)).toBeTruthy();

grid.remove();
});

it("does not claim map navigation completed when the rendered section target is missing", () => {
render(<FirstDropoutCallout song={createDemoRehearsalSong()} />);

fireEvent.click(
screen.getByRole("button", {
name: "Open Bass Guitar dropout for Lead Vocal at 0:30"
})
);

expect(
screen.getByText("Bass Guitar hands off to Lead Vocal at the end of the verse (0:30).")
).toBeTruthy();
expect(
screen.queryByText(/Start the last bar of Bass Guitar before Lead Vocal takes the verse \(0:30\)/)
).toBeNull();
});

it("keeps workspace-scroll authoritative even when a playback callback is also supplied", () => {
const { grid, scrollIntoView } = appendSongStructureTarget();
const onHearDropout = vi.fn();

render(
<FirstDropoutCallout
song={createDemoRehearsalSong()}
actionMode="workspace-scroll"
onHearDropout={onHearDropout}
/>
);

fireEvent.click(
screen.getByRole("button", {
name: "Open Bass Guitar dropout for Lead Vocal at 0:30"
})
);
expect(onHearDropout).not.toHaveBeenCalled();
expect(scrollIntoView).toHaveBeenCalledWith({ block: "nearest", behavior: "smooth" });

grid.remove();
});

it("navigates by renderer-owned section position instead of untrusted analysis ids", () => {
const song = createDemoRehearsalSong();
song.sections[0]!.id = "analysis section / duplicate";
const { grid, scrollIntoView } = appendSongStructureTarget();

render(<FirstDropoutCallout song={song} />);

fireEvent.click(
screen.getByRole("button", {
name: "Open Bass Guitar dropout for Lead Vocal at 0:30"
})
);
expect(scrollIntoView).toHaveBeenCalledWith({ block: "nearest", behavior: "smooth" });

grid.remove();
});

it("shows fresh guidance when the first dropout changes or returns later", () => {
const initialSong = createDemoRehearsalSong();
const { grid } = appendSongStructureTarget();
const { rerender } = render(<FirstDropoutCallout song={initialSong} />);

fireEvent.click(
screen.getByRole("button", {
name: "Open Bass Guitar dropout for Lead Vocal at 0:30"
})
);
expect(screen.getByText(/Start the last bar of Bass Guitar before Lead Vocal takes the verse \(0:30\)/)).toBeTruthy();

const replacementSong = createDemoRehearsalSong();
replacementSong.id = "demo-song-replacement";
replacementSong.sections[0]!.roles[0]!.name = "Upright Bass";
rerender(<FirstDropoutCallout song={replacementSong} />);
expect(screen.getByText("Upright Bass hands off to Lead Vocal at the end of the verse (0:30).")).toBeTruthy();

rerender(<FirstDropoutCallout song={initialSong} />);
expect(screen.getByText("Bass Guitar hands off to Lead Vocal at the end of the verse (0:30).")).toBeTruthy();

grid.remove();
});

it("keeps placeholder-looking rehearsal data literal", () => {
const song = createDemoRehearsalSong();
song.sections[0]!.roles[0]!.name = "{section}";

render(<FirstDropoutCallout song={song} />);

expect(
screen.getByRole("button", {
name: "Open {section} dropout for Lead Vocal at 0:30"
})
).toBeTruthy();
});

it("tells the room to stay on the map when no dropout exists", () => {
const song = createDemoRehearsalSong();
song.sections = [];
render(<FirstDropoutCallout song={song} />);
expect(
screen.getByText("No dropout yet. Stay on tonight's map until a part hands off.")
).toBeTruthy();
});

it("contains a malformed runtime song root instead of crashing the callout", () => {
render(<FirstDropoutCallout song={null as unknown as RehearsalSong} />);

expect(
screen.getByText("No dropout yet. Stay on tonight's map until a part hands off.")
).toBeTruthy();
});

it("localizes the section form and keeps Korean role interpolation free of unsafe fixed particles", () => {
vi.stubGlobal("navigator", { language: "ko-KR" });
const song = createDemoRehearsalSong();
song.sections[0]!.roles[0]!.name = "베이스 기타";
song.sections[0]!.roles[2]!.name = "리드 보컬";
const { grid } = appendSongStructureTarget();

render(<FirstDropoutCallout song={song} />);

expect(screen.getByText("0:30 벌스 끝 파트 인계: 베이스 기타 → 리드 보컬.")).toBeTruthy();
expect(screen.queryByText(/verse 끝/)).toBeNull();

fireEvent.click(screen.getByRole("button", { name: /드롭아웃 위치 열기/ }));
expect(
screen.getByText("0:30 벌스: 리드 보컬 진입 전에 베이스 기타의 마지막 마디를 시작하세요.")
).toBeTruthy();

grid.remove();
});
});
Loading
Loading