Add custom "section" within Context Sidebar menu

Hi Owain, a late follow-up: this ships in Umbraco 19, which is now in RC :slightly_smiling_face:

From 19, entity actions can be grouped. You register an entityActionGroup and point your actions at it with group. The menu renders each group as its own block with a line between groups, so your actions stay together whichever of them are visible:

umbExtensionsRegistry.registerMany([
  {
    type: 'entityActionGroup',
    alias: 'Tp.EntityActionGroup.Locations',
    name: 'TP Locations Entity Action Group',
    weight: 300,
    meta: { label: 'Locations' },
  },
  {
    type: 'entityAction',
    kind: 'default',
    alias: 'tp.copytolocations.entity.action',
    name: 'TP: Copy To Locations : Action',
    group: 'Tp.EntityActionGroup.Locations',
    api: CopyToLocation,
    forEntityTypes: ['document'],
    meta: { label: 'Copy to Locations', icon: 'icon-pin-location' },
  },
]);

One difference from what you sketched: the group label isn’t shown as a heading. It’s the group’s accessible name (role="group"), so screen readers announce it. You get the grouping and the separators, but no visible heading. If one of the built-in groups fits, you can also join it (for example UMB_ENTITY_ACTION_GROUP_IMPORT_EXPORT) instead of registering your own.

Docs: https://docs.umbraco.com/umbraco-cms/19.latest/extend-your-project/backoffice-extensions/extending-overview/extension-types/entity-actions#grouping-entity-actions