Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 29, 2025

Modules and projects were previously organized in flat single-level category lists. This made it difficult to organize larger sets of items and forced awkward single-bucket groupings.

Changes

Type System

  • Added optional category field to ProjectMetadata for consistency with ModuleMetadata

Category Tree Builder

  • Created buildCategoryTree utility that interprets / as path separator (e.g., Effects/Time, MIDI/Instruments)
  • Handles nested and flat categories uniformly with deterministic alphabetical sorting
  • Defaults missing categories to Uncategorized

Menu Generation

  • Refactored moduleCategoriesMenu and builtInModuleMenu to traverse category tree
  • Added projectCategoriesMenu for hierarchical project navigation
  • Updated projectMenu to support both flat list (no categoryPath) and nested navigation (with categoryPath)
  • Menus dynamically route to appropriate submenu based on whether node has children

Metadata Organization

Updated categories to demonstrate nesting:

// Modules
{ slug: 'bufferCombinerInt', title: 'Buffer Combiner (Int)', category: 'Buffer/Combiner' }
{ slug: 'midiNoteOut', title: 'MIDI Note Out', category: 'MIDI/Output' }

// Projects  
{ slug: 'midiArpeggiator', title: 'MIDI Arpeggiator', category: 'MIDI/Instruments' }
{ slug: 'crtEffect', title: 'CRT Effect Demo', category: 'Visual/Effects' }

Navigation flow: Main Menu → "Buffer" → "Combiner" → "Buffer Combiner (Int)" adds module.

Flat categories (no /) continue to work as single-level menu items.

Original prompt

Please do this todo: docs/todos/126-nested-example-menus.md


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits December 29, 2025 21:05
- Added optional category field to ProjectMetadata
- Updated project metadata with nested categories (e.g., MIDI/Instruments, Visual/Effects)
- Updated module metadata with nested categories (e.g., Buffer/Combiner, Oscillators/Waveform)
- Created buildCategoryTree utility to transform flat metadata into hierarchical tree
- Added comprehensive unit tests for category tree builder
- Refactored moduleCategoriesMenu and builtInModuleMenu to support nested navigation
- Added projectCategoriesMenu to support nested project navigation
- Updated main menu to use projectCategoriesMenu
- All typechecks pass

Co-authored-by: andorthehood <[email protected]>
- Added tests for moduleCategoriesMenu nested behavior
- Added tests for builtInModuleMenu navigation
- Added tests for projectCategoriesMenu nested behavior
- Added tests for projectMenu navigation
- All tests pass successfully
- Production build succeeds

Co-authored-by: andorthehood <[email protected]>
Copilot AI changed the title [WIP] Add nested example menus documentation Add nested category support for module and project menus Dec 29, 2025
Copilot AI requested a review from andorthehood December 29, 2025 21:10
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.

2 participants