+
+
+ {progress}%
+
+
+
+
+
+
+
+
+
+
+ );
+}
+
+const PracticeProgress = memo(PracticeProgressComponent);
+
+export { PracticeProgress };
diff --git a/apps/desktop/src/features/workspace/Workspace.test.tsx b/apps/desktop/src/features/workspace/Workspace.test.tsx
index 39ffa05d..a3da5ffe 100644
--- a/apps/desktop/src/features/workspace/Workspace.test.tsx
+++ b/apps/desktop/src/features/workspace/Workspace.test.tsx
@@ -30,6 +30,36 @@ describe("Workspace", () => {
});
});
+ it("updates practice progress immutably through onSongUpdate", () => {
+ const song = createDemoRehearsalSong();
+ // Default mock setup puts "bass-guitar" as the role ID in index 0
+ song.sections[0]!.roles[0] = {
+ ...song.sections[0]!.roles[0]!,
+ id: "bass-guitar",
+ name: "Bass Guitar",
+ practiceProgress: 50
+ };
+ const onSongUpdate = vi.fn();
+
+ render(