Skip to content

feature(customware): add component context menu bundle#45

Draft
Magaav wants to merge 2 commits intoagent0ai:mainfrom
Magaav:feature/component-context-menu-bundle
Draft

feature(customware): add component context menu bundle#45
Magaav wants to merge 2 commits intoagent0ai:mainfrom
Magaav:feature/component-context-menu-bundle

Conversation

@Magaav
Copy link
Copy Markdown

@Magaav Magaav commented Apr 29, 2026

Summary

Adds a reference Customware Bundle Interface plugin for component-level context menus.

This is intentionally implemented as an installable customware bundle, not as Space Agent core behavior. It demonstrates how browser-side UI evolution can live behind space.bundle.yaml plus documented ext/js hooks while remaining removable and update-friendly.

What Changed

  • Adds tests/fixtures/component_context_menu_bundle/ as an installable reference bundle.
  • Declares space/component-context-menu with component-menu, actions, and browser-runtime capabilities.
  • Loads through _core/framework/initializer.js/initialize/end.
  • Installs space.componentMenu.registerAction(...) for custom component actions.
  • Adds a right-click menu for Space widget cards discovered through .spaces-widget-card and data-widget-id.
  • Keeps a footer Copy ID action so users can paste the exact UI entity id into Agent Space.

Why

Downstream teams need a safe way to attach precise UI actions without monkey patching Space Agent runtime files. Copy ID is especially useful because it lets a user right-click a widget/component, copy its stable id, and tell Agent Space exactly what to change.

Validation

  • node --input-type=module --check < tests/fixtures/component_context_menu_bundle/component-menu.js
  • node --input-type=module --check < tests/fixtures/component_context_menu_bundle/ext/js/_core/framework/initializer.js/initialize/end/component-context-menu.js
  • node --test tests/customware_bundle_test.mjs

Notes

This PR is stacked on #44 because the plugin depends on bundle manifest discovery and the browser-side bundle runtime.

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