Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
9 changes: 9 additions & 0 deletions .github/workflows/pr-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,15 @@ jobs:
if: steps.changes.outputs.code == 'true'
run: bun run test

- name: Install Storybook test browser
if: steps.changes.outputs.code == 'true'
working-directory: apps/storybook
run: bunx --no-install playwright install --with-deps chromium

- name: Test stories in light and dark themes
if: steps.changes.outputs.code == 'true'
run: bun run --filter @avoid.quest/storybook test:stories

- name: Build apps and shared consumers
if: steps.changes.outputs.code == 'true'
run: bun run build
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,6 @@ tmp
temp

apps/openDAW

*storybook.log
storybook-static
8 changes: 4 additions & 4 deletions THIRD_PARTY_NOTICES.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,10 @@ preserved. The mark identifies the repository link; it does not imply endorsemen

## Fonts and assets

Marketing bundles `@fontsource/geist-sans` and `@fontsource/geist-mono` **5.3.0**,
under **SIL OFL-1.1**. Their complete copyright and license files are copied into
its generated dependency notices. Font authors include Vercel, basement.studio
and the Geist Project Authors, as specified in those files.
Radio and marketing bundle `@fontsource-variable/geist-mono` **5.3.0** through
the shared UI theme, under **SIL OFL-1.1**. Its complete copyright and license file
is copied into each app's generated dependency notices. Copyright 2024 The Geist
Project Authors, as specified in that file.

Original avoid.quest logos, favicons and application screenshots are under MIT.
Third-party artwork or trademarks visible in screenshots remain their owners'
Expand Down
2 changes: 1 addition & 1 deletion apps/radio/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ play. See the [Mixcloud](../../packages/platforms/src/mixcloud/RESEARCH.md) and
- **Throttling**: `@tanstack/react-pacer` (`useThrottledCallback`)
- **DSP**: official openDAW Rust/WASM engine for supported active effect trees; radio AudioWorklet with `@opendaw/lib-dsp` primitives for compatibility
- **Audio**: Web Audio API, AudioWorklet, HLS.js, HTML5 Audio
- **UI**: React 19, Tailwind CSS v4, shadcn/ui, Radix UI, dnd-kit
- **UI**: React 19, Tailwind CSS v4, shadcn/ui, Base UI, Vaul, dnd-kit
- **Deploy**: Cloudflare Workers (Wrangler)
- **Monitoring**: Sentry (browser via `/tunnel`, Worker via its SDK)

Expand Down
5 changes: 3 additions & 2 deletions apps/radio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"@opendaw/studio-core": "^0.2.7",
"@opendaw/studio-core-wasm": "^0.0.18",
"@sentry/cloudflare": "11.8.0",
"@tabler/icons-react": "^3.50.0",
"@tanstack/react-db": "^0.5.0",
"@tanstack/react-pacer": "^0.24.0",
"@tanstack/react-query": "^5.104.0",
Expand All @@ -44,21 +45,20 @@
"@xyflow/react": "^12.12.0",
"git-feedback": "^0.5.1",
"hls.js": "^1.7.3",
"lucide-react": "catalog:",
"lz-string": "^1.5.0",
"next-themes": "catalog:",
"p-queue": "^9.3.3",
"react": "catalog:",
"react-dom": "catalog:",
"react-hook-form": "^7.89.0",
"sonner": "catalog:",
"zod": "catalog:"
},
"devDependencies": {
"@cloudflare/vite-plugin": "^1.64.0",
"@rolldown/plugin-babel": "^0.2.4",
"@sentry/core": "11.8.0",
"@sentry/tanstackstart-react": "11.8.0",
"@storybook/react-vite": "catalog:",
"@tailwindcss/vite": "catalog:",
"@testing-library/dom": "^10.4.2",
"@testing-library/react": "^16.3.3",
Expand All @@ -69,6 +69,7 @@
"@vitejs/plugin-react": "catalog:",
"babel-plugin-react-compiler": "^1.0.0",
"jsdom": "^30.1.3",
"storybook": "catalog:",
"typescript": "catalog:",
"vite": "catalog:",
"wrangler": "catalog:"
Expand Down
6 changes: 3 additions & 3 deletions apps/radio/scripts/check-node-chunk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const LAZY_VENDORS = [
// Node mode's resizable shell.
{ markers: ['"data-separator"'], name: "react-resizable-panels" },
// Node mode's branch edges and the What's new popover.
{ markers: ["PopoverTrigger"], name: "Radix Popover" },
{ markers: ["PopoverTrigger"], name: "Base UI Popover" },
// Audio effects load the Studio runtime on demand.
{ markers: ["WasmEngine.ensureReady must succeed"], name: "openDAW Studio" },
];
Expand Down Expand Up @@ -200,8 +200,8 @@ for (const [name, source] of flowChunks) {
}

// The canvas is Node mode's only door to React Flow: the chunk that lazily
// loads it also draws the Stage, Rack and inspector, which a phone opens
// first, so it must not reach React Flow through static imports.
// loads it also draws the Rack and inspector, which load without React
// Flow, so it must not reach React Flow through static imports.
const canvasChunks = [...chunks.keys()].filter(
(name) =>
name.startsWith("node-canvas-") || name.startsWith("immutable-node-canvas-")
Expand Down
81 changes: 62 additions & 19 deletions apps/radio/src/components/audio/control-wheel.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,10 @@ describe("fine control wheel changes", () => {
/>
);
const view = render(control(1));
const knob = requireElement(view.container, '[role="slider"]');
const knob = requireElement(
view.container,
':is([role="slider"], input[type="range"])'
);

expect(wheel(knob, -120).defaultPrevented).toBe(true);
wheel(knob, -120);
Expand All @@ -120,7 +123,7 @@ describe("fine control wheel changes", () => {
max={10}
min={0}
onValueChange={(next) => changes.push(next)}
onValueCommit={(next) => commits.push(next)}
onValueCommitted={(next) => commits.push(next)}
step={1}
value={[5]}
/>
Expand All @@ -134,7 +137,7 @@ describe("fine control wheel changes", () => {
});

test("uncontrolled slider displays repeated fine wheel changes", () => {
const ref = createRef<HTMLSpanElement>();
const ref = createRef<HTMLDivElement>();
const view = render(
<Slider defaultValue={[0.5]} max={1} min={0} ref={ref} step={0.1} />
);
Expand All @@ -143,9 +146,10 @@ describe("fine control wheel changes", () => {
wheel(slider, -1);
wheel(slider, -1);
expect(
requireElement(view.container, '[role="slider"]').getAttribute(
"aria-valuenow"
)
requireElement(
view.container,
':is([role="slider"], input[type="range"])'
).getAttribute("aria-valuenow")
).toBe("0.52");
});

Expand All @@ -161,7 +165,10 @@ describe("fine control wheel changes", () => {
/>
);
const view = render(renderKnob());
const knob = requireElement(view.container, '[role="slider"]');
const knob = requireElement(
view.container,
':is([role="slider"], input[type="range"])'
);
wheel(knob, -1);
expect(changes).toEqual([1]);
expect(wheel(knob, -1).defaultPrevented).toBe(false);
Expand All @@ -177,7 +184,7 @@ describe("fine control wheel changes", () => {
<Slider
max={16}
min={1}
minStepsBetweenThumbs={1}
minStepsBetweenValues={1}
onValueChange={(next) => changes.push(next)}
step={1}
value={[8, 10]}
Expand Down Expand Up @@ -212,7 +219,13 @@ describe("fine control wheel changes", () => {
wheelStep={1}
/>
);
wheel(requireElement(view.container, '[role="slider"]'), -1);
wheel(
requireElement(
view.container,
':is([role="slider"], input[type="range"])'
),
-1
);
expect(changes).toEqual([9]);
});

Expand All @@ -227,7 +240,10 @@ describe("fine control wheel changes", () => {
value={0.5}
/>
);
const knob = requireElement(view.container, '[role="slider"]');
const knob = requireElement(
view.container,
':is([role="slider"], input[type="range"])'
);
wheel(knob, -1);
act(() =>
knob.dispatchEvent(
Expand All @@ -251,7 +267,10 @@ describe("fine control wheel changes", () => {
value={[1]}
/>
);
const thumb = requireElement(view.container, '[role="slider"]');
const thumb = requireElement(
view.container,
':is([role="slider"], input[type="range"])'
);
wheel(thumb, -1);
expect(changes).toEqual([[1.01]]);
});
Expand All @@ -272,7 +291,10 @@ describe("fine control wheel changes", () => {
);
}
const view = render(<Fader />);
const thumb = requireElement(view.container, '[role="slider"]');
const thumb = requireElement(
view.container,
':is([role="slider"], input[type="range"])'
);
pressKey(thumb, "ArrowUp");
pressKey(thumb, "ArrowUp");
expect(thumb.getAttribute("aria-valuenow")).toBe("1.02");
Expand All @@ -297,7 +319,10 @@ describe("fine control wheel changes", () => {
);
}
const view = render(<Crossfader />);
const thumb = requireElement(view.container, '[role="slider"]');
const thumb = requireElement(
view.container,
':is([role="slider"], input[type="range"])'
);
pressKey(thumb, "ArrowRight");
pressKey(thumb, "ArrowRight");
expect(changes).toEqual([0.51, 0.52]);
Expand Down Expand Up @@ -331,7 +356,10 @@ describe("fine control wheel changes", () => {
value={0}
/>
);
const knob = requireElement(view.container, '[role="slider"]');
const knob = requireElement(
view.container,
':is([role="slider"], input[type="range"])'
);
wheel(knob, -1);
wheel(knob, -1);
wheel(knob, -1);
Expand Down Expand Up @@ -359,7 +387,10 @@ describe("immediate control input with throttled audio updates", () => {
);
}
const view = render(<Harness />);
const knob = requireElement(view.container, '[role="slider"]');
const knob = requireElement(
view.container,
':is([role="slider"], input[type="range"])'
);
act(() => {
for (let index = 0; index < 5; index += 1) {
knob.dispatchEvent(
Expand Down Expand Up @@ -393,7 +424,10 @@ describe("immediate control input with throttled audio updates", () => {
/>
);
const view = render(control(0));
const knob = requireElement(view.container, '[role="slider"]');
const knob = requireElement(
view.container,
':is([role="slider"], input[type="range"])'
);
pressKey(knob, "ArrowUp");
pressKey(knob, "ArrowRight");
pressKey(knob, "ArrowUp");
Expand Down Expand Up @@ -425,7 +459,10 @@ describe("immediate control input with throttled audio updates", () => {
/>
);
const view = render(control(0.5));
const knob = requireElement(view.container, '[role="slider"]');
const knob = requireElement(
view.container,
':is([role="slider"], input[type="range"])'
);
Object.defineProperty(knob, "setPointerCapture", {
value: () => undefined,
});
Expand Down Expand Up @@ -475,7 +512,10 @@ describe("immediate control input with throttled audio updates", () => {
/>
);
const view = render(control(0.51));
const knob = requireElement(view.container, '[role="slider"]');
const knob = requireElement(
view.container,
':is([role="slider"], input[type="range"])'
);
wheel(knob, -1);
wheel(knob, 1); // Back to 0.51, so the parent skips both renders.
act(() => {
Expand Down Expand Up @@ -503,7 +543,10 @@ describe("immediate control input with throttled audio updates", () => {
/>
);
const view = render(control(0.5));
const thumb = requireElement(view.container, '[role="slider"]');
const thumb = requireElement(
view.container,
':is([role="slider"], input[type="range"])'
);
pressKey(thumb, "ArrowUp");
pressKey(thumb, "ArrowUp");
pressKey(thumb, "ArrowUp");
Expand Down
12 changes: 6 additions & 6 deletions apps/radio/src/components/audio/effect-chain.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
verticalListSortingStrategy,
} from "@dnd-kit/sortable";
import { CSS } from "@dnd-kit/utilities";
import { PlusIcon } from "lucide-react";
import { IconPlus } from "@tabler/icons-react";
import {
type Dispatch,
type FocusEvent,
Expand Down Expand Up @@ -94,7 +94,7 @@ function EffectTempoControl({
return (
<div className="flex items-center justify-end gap-2">
<Label
className="font-mono text-[9px] text-muted-foreground uppercase tracking-wider"
className="font-mono text-muted-foreground text-xs uppercase tracking-wider"
htmlFor={`${deckId}-effects-tempo`}
>
Sync tempo
Expand All @@ -110,7 +110,7 @@ function EffectTempoControl({
step={0.1}
type="number"
/>
<span className="font-mono text-[9px] text-muted-foreground uppercase tracking-wider">
<span className="font-mono text-muted-foreground text-xs uppercase tracking-wider">
bpm
</span>
</div>
Expand Down Expand Up @@ -257,7 +257,7 @@ export function EffectChain({
</div>
<DragOverlay>
{activeEffect ? (
<div className="scale-[1.02] rounded-lg shadow-lg ring-2 ring-primary/50">
<div className="scale-[1.02] shadow-lg ring-2 ring-primary/50">
<EffectItem
effect={activeEffect}
isExpanded={false}
Expand All @@ -279,7 +279,7 @@ export function EffectChain({
size="sm"
variant="outline"
>
<PlusIcon className="size-3.5" />
<IconPlus className="size-3.5" />
Add effect
</Button>

Expand Down Expand Up @@ -382,7 +382,7 @@ function SortableEffectItem({
return (
<div
className={cn(
"rounded-lg transition-all duration-150",
"transition-all duration-150",
isDragging && "opacity-40",
isDraggingAny && !isDragging && "opacity-75"
)}
Expand Down
Loading
Loading