diff --git a/static/components/PaneSubObjects.js b/static/components/PaneSubObjects.js index 3d43377..8c15b84 100644 --- a/static/components/PaneSubObjects.js +++ b/static/components/PaneSubObjects.js @@ -2,12 +2,11 @@ import { h } from 'vue'; import { ObjectShort } from './ObjectShort.js'; import { getKindGroups } from '../subobject-kinds.js'; -// Extract the P?L? fragment as a visual grouping key. -// Falls back to stripping trailing digits if the pattern is absent, -// which yields singleton groups — not a crash, just no visual grouping. +// Strip the final maximal run of same-class characters (all-digits or all-non-digits) +// from the ID tail. Everything before that run is the group key. function barGroupKey(id) { - const m = id.match(/P\d+L\d+/); - return m ? m[0] : id.replace(/\d+$/, ''); + const m = id.match(/(\d+|\D+)$/); + return m ? id.slice(0, m.index) : id; } export const PaneSubObjects = {