@d86e/hive-panel 1.0.7 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/public/panel.js +13 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@d86e/hive-panel",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "A read-only board for a Hive swarm: agents, task lanes and the event tail, served from the refs and files you already have.",
5
5
  "type": "module",
6
6
  "bin": {
package/public/panel.js CHANGED
@@ -3244,6 +3244,15 @@ function supervisorWorkerCount(row) {
3244
3244
  return found ? total : null;
3245
3245
  }
3246
3246
 
3247
+ function taskDisplayTitle(title) {
3248
+ const full = asString(title);
3249
+ if (!full) return full;
3250
+ const stripped = full
3251
+ .replace(/^[\w.-]+\/[A-Za-z]?\d+\s*[::]\s*/, "")
3252
+ .replace(/^[A-Za-z]+-\d+\s*[::]\s*/, "");
3253
+ return stripped || full;
3254
+ }
3255
+
3247
3256
  function element(doc, tag, className, text) {
3248
3257
  const node = doc.createElement(tag);
3249
3258
  if (className) node.className = className;
@@ -6354,7 +6363,8 @@ export function mount(root, options = {}) {
6354
6363
 
6355
6364
  function renderCard(card, lane, existing) {
6356
6365
  const node = existing || element(doc, "article", "hive-card");
6357
- const title = card.title || translate("card.untitled");
6366
+ const fullTitle = card.title || translate("card.untitled");
6367
+ const title = taskDisplayTitle(fullTitle);
6358
6368
  if (!existing) {
6359
6369
  setAttr(node, "tabindex", "0");
6360
6370
  setAttr(node, "role", "button");
@@ -6372,8 +6382,8 @@ export function mount(root, options = {}) {
6372
6382
  node._hiveCard = card;
6373
6383
  node._hiveLane = lane;
6374
6384
  node._hiveTitle.textContent = title;
6375
- setAttr(node, "aria-label", translate("card.openAria") + " " + title);
6376
- setAttr(node, "title", title);
6385
+ setAttr(node, "aria-label", translate("card.openAria") + " " + fullTitle);
6386
+ setAttr(node, "title", fullTitle);
6377
6387
  return node;
6378
6388
  }
6379
6389
  function renderStageChips(model) {