Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 29, 2025

Module and project menus currently display as flat lists, limiting organization for large example sets. This adds support for nested categories using slash-delimited paths (e.g., Functions/Math, Effects/Audio).

Changes

  • Type system: Added optional category field to ProjectMetadata

  • Category tree builder (categoryTree.ts): Converts flat category lists into navigable tree structure

    • Parses category: "A/B/C" into nested nodes
    • Alphabetically sorts categories and items at each level
    • Defaults missing categories to "Uncategorized"
  • Menu navigation: Refactored moduleCategoriesMenu and projectMenu to support nested traversal

    • Added categoryPath parameter for navigation (e.g., "Functions/Math")
    • Each node shows subcategories (as submenus) and items (as actions)
    • Backward compatible with flat categories
  • Metadata updates: Organized ~110 modules and 14 projects into nested hierarchies

    • Modules: Functions/Buffer, I/O/MIDI, Sequencers/Break Beats
    • Projects: Music/MIDI, Graphics/Post-Processing, Machine Learning

Example Usage

// Before: Flat categories only
{ category: 'Random' }
{ category: 'Buffer' }

// After: Nested categories supported
{ category: 'Functions/Random' }
{ category: 'Functions/Buffer' }
{ category: 'Effects/Audio' }

// Menu navigation builds tree automatically
// Root → "Functions" → "Random" → "XORShift"

All 458 tests pass including 26 new tests for tree building and nested menu generation.

Original prompt

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


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

- Added category field to ProjectMetadata
- Created categoryTree utility for building nested menu structures
- Updated moduleCategoriesMenu and projectMenu to support nested categories
- Added comprehensive tests for tree building and menu generation
- Updated module and project metadata with nested category examples

Co-authored-by: andorthehood <[email protected]>
Copilot AI changed the title [WIP] Update 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:35
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