fix(node-ui): clarify context graph entity labels#605
Conversation
| if (name) return name; | ||
| } | ||
|
|
||
| if (entity.label && !isRawExtractionLabel(entity.label, entity.uri)) { |
There was a problem hiding this comment.
🟡 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', |
There was a problem hiding this comment.
🟡 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.
Summary
urn:dkg:extraction:<uuid>values fall back to a readable extraction label.Related
Files changed
packages/node-ui/src/ui/views/project/helpers.tslayerNounand strengthens URI fallback labelling for extraction URNs.packages/node-ui/src/ui/views/project/components.tsxpackages/node-ui/src/ui/hooks/useMemoryEntities.tspackages/node-ui/test/ka-detail-label.test.tspackages/node-ui/test/use-memory-entities-labels.test.tsTest 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.tspnpm --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.tsgit diff --checkpnpm --filter @origintrail-official/dkg-node-ui run buildpnpm --filter @origintrail-official/dkg-node-ui run build:uihttp://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.pr-diff.patch: no actionable comments.