Skip to content

Conversation

@andorthehood
Copy link
Owner

@andorthehood andorthehood commented Jan 2, 2026

This PR adds manual compilation functionality by renaming compilation-related functions and flags to differentiate between automatic and manual compilation modes. The changes enable users to manually trigger code and config compilation even when auto-compilation is disabled.

Renamed compileProject to compileCode and disableCompilation to disableAutoCompilation for clarity
Added manual compilation menu items and event handler for 'compileCode'
Removed deprecated sample rate functionality and Project Settings menu

@andorthehood andorthehood self-assigned this Jan 2, 2026
@andorthehood andorthehood marked this pull request as ready for review January 2, 2026 22:48
Copilot AI review requested due to automatic review settings January 2, 2026 22:48
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds manual compilation functionality by renaming compilation-related functions and flags to differentiate between automatic and manual compilation modes. The changes enable users to manually trigger code and config compilation even when auto-compilation is disabled.

  • Renamed compileProject to compileCode and disableCompilation to disableAutoCompilation for clarity
  • Added manual compilation menu items and event handler for 'compileCode'
  • Removed deprecated sample rate functionality and Project Settings menu

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/editor.ts Updated import and reference from compileProject to compileCode
src/compiler-callback.ts Renamed function compileProject to compileCode
packages/editor/packages/editor-state/src/types.ts Updated type definitions: compileProjectcompileCode and disableCompilationdisableAutoCompilation
packages/editor/packages/editor-state/src/effects/compiler.ts Refactored to separate auto-compilation (onRecompile) from manual compilation (onForceCompile), added 'compileCode' event listener
packages/editor/packages/editor-state/src/effects/config.ts Updated to use disableAutoCompilation flag
packages/editor/packages/editor-state/src/effects/menu/menus.ts Added 'Compile Config' and 'Compile Code' menu items, removed Project Settings menu
packages/editor/packages/editor-state/src/configSchema.ts Updated schema property from disableCompilation to disableAutoCompilation
packages/editor/packages/editor-state/src/impureHelpers/config/applyConfigToState.ts Updated to handle disableAutoCompilation config property
packages/editor/packages/editor-state/src/pureHelpers/state/createDefaultState.ts Updated default state to use disableAutoCompilation
packages/editor/packages/editor-state/src/pureHelpers/testingUtils/testUtils.ts Updated mock state to use disableAutoCompilation
packages/editor/packages/editor-state/src/index.ts Removed import and initialization of deprecated sampleRate effect
packages/editor/packages/editor-state/src/effects/sampleRate.ts Deleted file - removed sample rate effect entirely
packages/editor/packages/editor-state/src/effects/disableCompilation.test.ts Renamed test suite and updated all references to use new naming
packages/editor/packages/editor-state/src/effects/runtimeReadyProject.test.ts Updated test mocks to use compileCode
packages/editor/packages/editor-state/src/effects/projectImport.test.ts Updated test assertions to use disableAutoCompilation
packages/editor/packages/editor-state/src/impureHelpers/config/applyConfigToState.test.ts Updated tests for disableAutoCompilation
packages/editor/packages/web-ui/screenshot-tests/utils/generateContextMenuMock.ts Removed Project Settings menu mock item

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 74 to 78
// Check if compilation is disabled by config
if (state.compiler.disableCompilation) {
log(state, 'Config compilation skipped: disableCompilation flag is set', 'Config');
if (state.compiler.disableAutoCompilation) {
log(state, 'Config compilation skipped: disableAutoCompilation flag is set', 'Config');
return;
}
Copy link

Copilot AI Jan 2, 2026

Choose a reason for hiding this comment

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

While the disableAutoCompilation check is correctly implemented here, the config effect is missing a handler for the 'compileConfig' event that would allow manual config compilation (as introduced in the menu). Similar to how compiler.ts implements onForceCompile for the 'compileCode' event, you should add a function that bypasses this check and register it as an event listener for 'compileConfig'. Without this, the 'Compile Config' menu item added in menus.ts will not function.

Copilot uses AI. Check for mistakes.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 42 out of 42 changed files in this pull request and generated 6 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@andorthehood andorthehood merged commit 2071642 into main Jan 3, 2026
1 check passed
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.

2 participants