Skip to content

feat(engine): implement Spec 20 JUCE audio engine foundation#57

Open
marius-patrik wants to merge 14 commits into
mainfrom
feat/20-juce-audio-engine-foundation
Open

feat(engine): implement Spec 20 JUCE audio engine foundation#57
marius-patrik wants to merge 14 commits into
mainfrom
feat/20-juce-audio-engine-foundation

Conversation

@marius-patrik

Copy link
Copy Markdown
Owner

Implements the full Spec 20 JUCE audio engine foundation as described in specs/20-juce-audio-engine-foundation.md. Includes TCP command server, lock-free command queue, transport, project model shells, metering, C++ unit tests, CTest integration, build:engine script, and a Bun integration test for engine.ping.

Kimi Agent and others added 14 commits June 28, 2026 17:59
- Configure Bun workspaces and root package scripts
- Add per-package package.json and tsconfig.json for all packages
- Set up Rsbuild for ui, web, and desktop
- Add minimal Tauri v2 desktop skeleton
- Configure Husky + lint-staged
- Remove obsolete VS Code extension build scripts
- Add bun.lock

Closes #34
- Remove stale postcss/tailwind configs and old VS Code extension source
- Archive old source to archive/old-src/
- Update root tsconfig to moduleResolution: bundler
- Add minimal implementations replacing empty exports
- Add jest/bun test coverage for packages with test scripts
- Remove test scripts from packages without tests
- Update desktop Tauri config: Singularity product name, com.singularity.daw identifier, engine sidecar
- Fix desktop dev script to avoid background-process leaks
- Add minimal engine/CMakeLists.txt skeleton producing singularity-engine
- Ensure bun install, typecheck, lint, format:check, build, and test all pass at root

Refs #34
…system

Spec 18: Monorepo and Build System (skeleton)
- Add ThemeProvider and useTheme hook
- Add VS Code theme Zod schema and convertVsCodeTheme mapping
- Ship Dark+ built-in theme JSON
- Configure Tailwind CSS with CSS custom properties
- Set up Rsbuild and TypeScript for packages/ui

Refs #40
- Move theme Zod schemas and types to packages/shared/src/theme.ts
- Implement resolveAppTokens with full VS Code token map and fallback chain
- Implement Monaco theme conversion (toMonacoBase, toMonacoThemeData, slugifyThemeId)
- Export Tailwind preset from packages/ui/tailwind.preset.ts
- Ship Dark+, Light+, Dracula, and One Dark Pro built-in themes
- Switch packages/ui build to tsc --build for library output
- Add unit tests for token resolution and theme conversion

Refs #40
- Add shared theme schemas in packages/shared/src/theme.ts and messages/theme.ts
- Implement VS Code token map, fallback chain, and resolveAppTokens
- Implement Monaco theme conversion helpers
- Add built-in themes under packages/ui/src/themes/built-in/
- Export Tailwind preset from packages/ui/tailwind.preset.ts
- Implement ThemeProvider, ThemeSelector, ThemeImporter, and primitive components
- Implement backend theme/settings routes with persistence
- Add WebSocket broadcast for theme.changed and theme.scaleChanged
- Configure Tailwind preset in packages/web and packages/desktop
- Add unit and integration tests

Refs #40
- Add engine source classes: CommandServer, CommandQueue, Transport, Engine,
  Project, ChannelRack, Pattern, Playlist, Mixer, MeteringBus.
- Implement lifecycle, audio device, transport, and project model commands.
- Add engine events: engine.ready, engine.error, transport.positionChanged,
  transport.stateChanged, audio.xrun, meters.batch.
- Add Catch2 unit tests for time conversion, transport, command queue, metering.
- Add CTest integration and CMakePresets for macOS Intel/Apple Silicon and Linux x64.
- Add Bun integration test that starts the engine binary and verifies engine.ping.
- Add build:engine script and update root package.json.
…heck/lint errors

- Move engine frame serialization and parsing into shared/schemas/engine.
- Avoid duplicate type exports between schemas and shared/types.
- Make EngineReply generic to satisfy engine-bridge usage.
- Fix backend lint/style issues and TypeScript readonly/spread errors.
- Ensure root typecheck, lint, and test pass alongside the new engine.
- Make Engine::shutdown() idempotent with shutdownStarted_/shutdownComplete_
  flags and join broadcasterThread_ only once.
- Defer full teardown from engine.shutdown command to the main thread to avoid
  the CommandServer thread trying to join itself.
- Update engine protocol to match shared schema: replies are now
  { id, inReplyTo, success, payload?, error? } and events are
  { id, type: "event", topic, payload }.
- Emit engine.error events for failures.
- Update scripts/build.ts to find the engine binary via the CMake/JUCE
  artefacts path using bun run build:engine.
- Update engine integration test to verify ping replies and clean shutdown
  with exit code 0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant