diff --git a/apps/desktop/src/features/chords/index.test.tsx b/apps/desktop/src/features/chords/index.test.tsx index 18637d1d..7861f522 100644 --- a/apps/desktop/src/features/chords/index.test.tsx +++ b/apps/desktop/src/features/chords/index.test.tsx @@ -39,10 +39,10 @@ const mockSong: RehearsalSong = { range: { lowestNote: "D4", highestNote: "D5" }, confidence: { level: "high", reason: "test" }, rehearsalPriority: "high", - simplification: "none", - setupNote: "none", + simplification: "Simplify strumming pattern", + setupNote: "Drop D tuning", manualOverrides: [], - overlapWarnings: [], + overlapWarnings: ["Density warning: competing with Bass"], transpositionPlan: "Capo 2nd fret", }, ], @@ -74,4 +74,22 @@ describe("ChordsFeature", () => { expect(screen.getByText(/Capo 2nd fret/)).toBeInTheDocument(); expect(screen.getByText(/Transpose:/)).toBeInTheDocument(); }); + + it("renders setupNote when provided", () => { + render(); + expect(screen.getByText(/Drop D tuning/)).toBeInTheDocument(); + expect(screen.getAllByText(/Setup:/).length).toBeGreaterThan(0); + }); + + it("renders simplification when provided", () => { + render(); + expect(screen.getByText(/Simplify strumming pattern/)).toBeInTheDocument(); + expect(screen.getAllByText(/Simplification:/).length).toBeGreaterThan(0); + }); + + it("renders overlapWarnings when provided", () => { + render(); + expect(screen.getByText(/Density warning: competing with Bass/)).toBeInTheDocument(); + expect(screen.getByText(/Overlap Warning:/)).toBeInTheDocument(); + }); }); diff --git a/apps/desktop/src/features/chords/index.tsx b/apps/desktop/src/features/chords/index.tsx index c410304b..d0f64fd0 100644 --- a/apps/desktop/src/features/chords/index.tsx +++ b/apps/desktop/src/features/chords/index.tsx @@ -14,9 +14,27 @@ export function ChordsFeature(props: { title: string; song?: RehearsalSong | nul } // Collect unique chords across all sections and roles - const chordsBySectionLabel = new Map(); + const chordsBySectionLabel = new Map(); for (const section of song.sections) { - const entries: { chord: string; functionLabel: string; source: string; roleName: string; transpositionPlan?: string }[] = []; + const entries: { + chord: string; + functionLabel: string; + source: string; + roleName: string; + transpositionPlan?: string; + setupNote: string; + simplification: string; + overlapWarnings: string[]; + }[] = []; for (const role of section.roles) { entries.push({ chord: role.harmony.chord, @@ -24,6 +42,9 @@ export function ChordsFeature(props: { title: string; song?: RehearsalSong | nul source: role.harmony.source, roleName: role.name, transpositionPlan: role.transpositionPlan, + setupNote: role.setupNote, + simplification: role.simplification, + overlapWarnings: role.overlapWarnings, }); } chordsBySectionLabel.set(section.label, entries); @@ -75,6 +96,26 @@ export function ChordsFeature(props: { title: string; song?: RehearsalSong | nul Transpose: {role.transpositionPlan} )} + {role.setupNote && ( +
+ Setup: {role.setupNote} +
+ )} + {role.simplification && ( +
+ Simplification: {role.simplification} +
+ )} + {role.overlapWarnings && role.overlapWarnings.length > 0 && ( +
+ Overlap Warning: +
    + {role.overlapWarnings.map((warning, idx) => ( +
  • {warning}
  • + ))} +
+
+ )} ))} diff --git a/package-lock.json b/package-lock.json index cf1c991c..ff7604e4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -955,7 +955,6 @@ "os": [ "aix" ], - "peer": true, "engines": { "node": ">=18" } @@ -973,7 +972,6 @@ "os": [ "android" ], - "peer": true, "engines": { "node": ">=18" } @@ -991,7 +989,6 @@ "os": [ "android" ], - "peer": true, "engines": { "node": ">=18" } @@ -1009,7 +1006,6 @@ "os": [ "android" ], - "peer": true, "engines": { "node": ">=18" } @@ -1027,7 +1023,6 @@ "os": [ "darwin" ], - "peer": true, "engines": { "node": ">=18" } @@ -1045,7 +1040,6 @@ "os": [ "darwin" ], - "peer": true, "engines": { "node": ">=18" } @@ -1063,7 +1057,6 @@ "os": [ "freebsd" ], - "peer": true, "engines": { "node": ">=18" } @@ -1081,7 +1074,6 @@ "os": [ "freebsd" ], - "peer": true, "engines": { "node": ">=18" } @@ -1099,7 +1091,6 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=18" } @@ -1117,7 +1108,6 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=18" } @@ -1135,7 +1125,6 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=18" } @@ -1153,7 +1142,6 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=18" } @@ -1171,7 +1159,6 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=18" } @@ -1189,7 +1176,6 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=18" } @@ -1207,7 +1193,6 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=18" } @@ -1225,7 +1210,6 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=18" } @@ -1243,7 +1227,6 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=18" } @@ -1261,7 +1244,6 @@ "os": [ "netbsd" ], - "peer": true, "engines": { "node": ">=18" } @@ -1279,7 +1261,6 @@ "os": [ "netbsd" ], - "peer": true, "engines": { "node": ">=18" } @@ -1297,7 +1278,6 @@ "os": [ "openbsd" ], - "peer": true, "engines": { "node": ">=18" } @@ -1315,7 +1295,6 @@ "os": [ "openbsd" ], - "peer": true, "engines": { "node": ">=18" } @@ -1333,7 +1312,6 @@ "os": [ "openharmony" ], - "peer": true, "engines": { "node": ">=18" } @@ -1351,7 +1329,6 @@ "os": [ "sunos" ], - "peer": true, "engines": { "node": ">=18" } @@ -1369,7 +1346,6 @@ "os": [ "win32" ], - "peer": true, "engines": { "node": ">=18" } @@ -1387,7 +1363,6 @@ "os": [ "win32" ], - "peer": true, "engines": { "node": ">=18" } @@ -1405,7 +1380,6 @@ "os": [ "win32" ], - "peer": true, "engines": { "node": ">=18" } @@ -7179,9 +7153,9 @@ } }, "node_modules/undici": { - "version": "7.28.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-7.28.0.tgz", - "integrity": "sha512-cRZYrTDwWznlnRiPjggAGxZXanty6M8RV1ff8Wm4LWXBp7/IG8v5DnOm74DtUBp9OONpK75YlPnIjQqX0dBDtA==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-7.29.0.tgz", + "integrity": "sha512-IDxfleLmmbSskfWSUATiN1nfn2rDuvnMOqb5CWR92iIfojA0Ud+ulOAAEQ57LPr9rWmsreUyf5lwyao+7GNNVw==", "dev": true, "license": "MIT", "engines": {