Skip to content

Add VoxGrain main App component (src/App.tsx)#6

Open
jpbpari-sys wants to merge 1 commit intomainfrom
codex/add-help-overlay-for-modules
Open

Add VoxGrain main App component (src/App.tsx)#6
jpbpari-sys wants to merge 1 commit intomainfrom
codex/add-help-overlay-for-modules

Conversation

@jpbpari-sys
Copy link
Copy Markdown
Owner

Motivation

  • Provide the main React application for the VoxGrain UI, wiring frontend controls to the audio/service layer and exposing core features (Jam Engine, Granular/3D synthesis, Harmonizer, Looper, Chain Lab, Neural Engine).
  • Centralize state, presets, and module integration so the UI can control and monitor the AudioEngine and subsystem services in real time.
  • Offer developer conveniences such as persona synthesis (Gemini), manifest export for Xcode/AUv3, and an in-app help/operational manual overlay.

Description

  • Added a new file src/App.tsx that implements the top-level App React component and small internal UI components (LEDBar, WaveformSymbol, HelpOverlay).
  • Integrated service imports and wiring for AudioEngine, BasinService, FMJService, CRISPRService, DirectorService, and NeuralSuitService, and exposed control functions including startEngine, updateSetting, and handlePersonaGen.
  • Implemented state management and periodic updates with React hooks (useState, useEffect, useRef) to update levels, agent activity, basin/sub-module states, and integrity effects; added looper functions (toggleRecording, removeLoop, toggleMute), Chain Lab playback (captureNode, triggerChain, playStep) and preset management (savePreset, deleteUserPreset).
  • Built a detailed UI layout containing controls, knobs, visualizer, Jam Engine, Harmonizer Matrix, Granular Engine, Looper, BasinModule integration, 3D Synthesis, Chain Lab, Neural Engine prompt/synthesis, and a manifest export helper (handleExportManifest).

Testing

  • No automated tests were run on this change.

Codex Task

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7c87277161

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +300 to +302
engineRef.current = new AudioEngine();
await engineRef.current.startMic();
setAnalyzer(engineRef.current.getAnalyzer());
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Retry mic startup instead of caching failed engine instance

When startMic() rejects (for example, permission denied or no input device), engineRef.current has already been set, so later clicks skip initialization and never call startMic() again. In that failure path the UI can still be marked active without a working microphone pipeline, and the user cannot recover without a full reload.

Useful? React with 👍 / 👎.

Comment on lines +226 to +227
const saved = localStorage.getItem('voxgrain_user_presets');
return saved ? JSON.parse(saved) : [];
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Guard preset hydration against invalid localStorage JSON

The initial userPresets state parses raw localStorage data without error handling, so any malformed or legacy value in voxgrain_user_presets throws during render and prevents the app from mounting. This should fall back to an empty preset list instead of crashing startup.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant