diff --git a/apps/desktop/src/App.test.tsx b/apps/desktop/src/App.test.tsx
index c039dfba..8f7c1918 100644
--- a/apps/desktop/src/App.test.tsx
+++ b/apps/desktop/src/App.test.tsx
@@ -1,4 +1,4 @@
-import { act, fireEvent, render, screen, waitFor } from "@testing-library/react";
+import { act, fireEvent, render, screen, waitFor, createEvent } from "@testing-library/react";
import { beforeEach, describe, expect, it, vi } from "vitest";
import { App } from "./App";
@@ -203,8 +203,8 @@ describe("App", () => {
expect(screen.getByText(/SYNCED • LOCAL/i)).toBeTruthy();
expect(screen.getByText(/Turn a song into a practical rehearsal view\./i)).toBeTruthy();
expect(screen.getByRole("button", { name: /^Workspace$/i })).toBeTruthy();
- expect(screen.getByRole("button", { name: /^Import$/i })).toBeTruthy();
- expect(screen.getByRole("button", { name: /^Export$/i })).toBeTruthy();
+ expect(screen.getAllByTitle("Coming soon").length).toBeGreaterThan(0);
+
expect(screen.getByText(/^Tempo$/i)).toBeTruthy();
expect(screen.getByText(/^Key$/i)).toBeTruthy();
expect(screen.getByText(/Local-first/i)).toBeTruthy();
@@ -1427,10 +1427,15 @@ describe("App", () => {
});
- it("renders disabled Settings and Help buttons as focusable spans for accessibility", () => {
+ it("renders disabled Settings and Help buttons using aria-disabled for accessibility", () => {
render();
- const settingsSpan = screen.getByTitle("Settings coming soon");
- expect(settingsSpan).toHaveAttribute("tabIndex", "0");
- expect(settingsSpan).toHaveAttribute("role", "button");
+ const settingsButton = screen.getByTitle("Settings coming soon");
+ expect(settingsButton).toHaveAttribute("aria-disabled", "true");
+ expect(settingsButton.tagName).toBe("BUTTON");
+
+ // Simulate click and ensure it prevents default
+ const clickEvent = createEvent.click(settingsButton);
+ fireEvent(settingsButton, clickEvent);
+ expect(clickEvent.defaultPrevented).toBe(true);
});
});
diff --git a/apps/desktop/src/App.tsx b/apps/desktop/src/App.tsx
index 24f5fb09..be9fcef6 100644
--- a/apps/desktop/src/App.tsx
+++ b/apps/desktop/src/App.tsx
@@ -492,24 +492,32 @@ export function App() {
@@ -535,41 +543,59 @@ export function App() {
-
+
-
+
+
+ e.preventDefault()}
+ className="inline-block cursor-not-allowed rounded-xl p-2 text-slate-600 transition focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-cyan-300"
+ >
Help coming soon
-
-
-
-
+
+
@@ -646,17 +672,18 @@ export function App() {
Save Project
) : (
-
-
-
- Save Project
-
-
+ e.preventDefault()}
+ variant="outline"
+ className="min-h-11 cursor-not-allowed border-white/10 bg-white/5 font-semibold text-slate-100 opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-cyan-300"
+ >
+ Analyze a song to enable saving
+
+ Save Project
+
)}
Stem Player
{activeRoleDetails?.name ?? activeRole}
-
- Play stem
-
-
- Loop section
-
-
- Solo / mute others
-
+ e.preventDefault()}
+ variant="outline"
+ className="min-h-11 cursor-not-allowed border-white/10 bg-white/5 text-slate-400 opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-cyan-300"
+ >
+ Coming soon
+ Play stem
+
+ e.preventDefault()}
+ variant="outline"
+ className="min-h-11 cursor-not-allowed border-white/10 bg-white/5 text-slate-400 opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-cyan-300"
+ >
+ Coming soon
+ Loop section
+
+ e.preventDefault()}
+ variant="outline"
+ className="min-h-11 cursor-not-allowed border-white/10 bg-white/5 text-slate-400 opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-cyan-300"
+ >
+ Coming soon
+ Solo / mute others
+
{canTranscribeBass ? (
) : (
-
-
- Transcribe Bass
-
-
+ e.preventDefault()}
+ variant="outline"
+ className="min-h-11 cursor-not-allowed border-white/10 bg-white/5 font-semibold text-slate-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-cyan-300"
+ >
+ {`${activeRoleDetails?.name ?? "This role"} transcription is coming soon. Bass is ready first.`}
+ Transcribe Bass
+
)}