Skip to content

fix(node-ui): clarify context graph entity labels#605

Merged
Jurij89 merged 1 commit into
mainfrom
codex/cgux-m1-s8-terminology-labels
May 24, 2026
Merged

fix(node-ui): clarify context graph entity labels#605
Jurij89 merged 1 commit into
mainfrom
codex/cgux-m1-s8-terminology-labels

Conversation

@Jurij89
Copy link
Copy Markdown
Contributor

@Jurij89 Jurij89 commented May 23, 2026

Summary

  • Adds a shared layer-aware noun helper so Working Memory and Shared Working Memory render items as entities while Verified Memory continues to render Knowledge Assets.
  • Removes WM/SWM-facing asset wording from layer stats, detail headers, layer list empty states, action copy, and the provenance summary without changing the later tab IA scope.
  • Improves memory entity label derivation so name/title predicates win and raw urn:dkg:extraction:<uuid> values fall back to a readable extraction label.

Related

Files changed

File What
packages/node-ui/src/ui/views/project/helpers.ts Adds layerNoun and strengthens URI fallback labelling for extraction URNs.
packages/node-ui/src/ui/views/project/components.tsx Applies layer-aware nouns across layer stats, detail headers, empty labels, action copy, and provenance summary.
packages/node-ui/src/ui/hooks/useMemoryEntities.ts Centralizes readable entity label derivation and updates connection labels after entity labels settle.
packages/node-ui/test/ka-detail-label.test.ts Covers layer nouns and detail-header nouns per trust layer.
packages/node-ui/test/use-memory-entities-labels.test.ts Covers name/title preference and readable extraction fallback labels.

Test plan

  • pnpm --filter @origintrail-official/dkg-node-ui exec vitest run test/ka-detail-label.test.ts test/use-memory-entities-labels.test.ts test/use-memory-entities-counts.test.ts test/project-view-navigation.test.ts
  • pnpm --filter @origintrail-official/dkg-node-ui exec vitest run test/ui-compat.test.ts test/use-memory-entities-live-updates.test.ts test/use-memory-entities-partial.test.ts test/vm-hero-banner.test.ts
  • git diff --check
  • pnpm --filter @origintrail-official/dkg-node-ui run build
  • pnpm --filter @origintrail-official/dkg-node-ui run build:ui
  • Local Vite shell smoke at http://localhost:5175/ui/: dashboard and WM/SWM/VM layer pages loaded; empty WM/SWM pages showed Entities and VM showed Knowledge Assets. Local API returned expected 500s for missing/empty local graph data, so populated-node validation remains manual.
  • Local PR reviewer round against pr-diff.patch: no actionable comments.

@Jurij89 Jurij89 marked this pull request as ready for review May 23, 2026 19:19
if (name) return name;
}

if (entity.label && !isRawExtractionLabel(entity.label, entity.uri)) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Issue: entity.label starts life as shortLabel(uri), and shortLabel still returns the full string for colon-delimited URNs. That means this guard short-circuits the new fallback for most unnamed urn:* entities, so labels like urn:test:source will stay raw instead of becoming a readable tail. Consider treating the default URI-derived label as non-authoritative here (for example by comparing against shortLabel(entity.uri)) before returning it.

'http://schema.org/name',
'http://www.w3.org/2000/01/rdf-schema#label',
'http://purl.org/dc/terms/title',
'http://purl.org/dc/elements/1.1/title',
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Issue: this adds dc/elements/1.1/title to entity-label resolution, but the graph views still hard-code a smaller predicate allowlist. Entities that only have this title predicate will render with a friendly name in lists/detail panes and a raw URI in graph cards. Please thread the same predicate list into the graph label config, or centralize the list so these views stay consistent.

@Jurij89 Jurij89 merged commit 42ef1df into main May 24, 2026
36 checks passed
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