diff --git a/packages/extension/src/manager/panes/persona-list.tsx b/packages/extension/src/manager/panes/persona-list.tsx index 6eeecc7..635fa17 100644 --- a/packages/extension/src/manager/panes/persona-list.tsx +++ b/packages/extension/src/manager/panes/persona-list.tsx @@ -36,7 +36,7 @@ // on purpose is its own decision. import { useCallback, useMemo, useState } from "react"; -import { personaAttributeDelete, personaProfilePut } from "@openvtc/pnm-core/admin"; +import { personaAttributeDelete, personaProfilePut, type PoolFacet } from "@openvtc/pnm-core/admin"; import type { ClaimTypeRegistry } from "@openvtc/pnm-core/persona"; import { Button, Note, Pill } from "../../ui.js"; import { c, t, font } from "../../theme.js"; @@ -60,6 +60,9 @@ import { type DeletePreview, } from "../attribute-list.js"; import { AttributeValue } from "./persona-editors.js"; +import { worldsOfAttribute } from "../world-model.js"; +import { worldHue } from "../world-colour.js"; +import type { FacetColour } from "@openvtc/pnm-core/admin"; import type { RevealTarget } from "../reveal-value.js"; /** @@ -94,16 +97,51 @@ function TriCheck({ ); } +/** + * The worlds an attribute belongs to, as dots. + * + * Dots and a title rather than named chips: a row already carries a type, a + * value, a provenance and a status, and four more words per row would bury the + * value under its own metadata. The name is on the title and in the editor — + * this is a reminder that the attribute is arranged, not the place a person + * reads the arrangement. + */ +function WorldDots({ worlds }: { worlds: readonly PoolFacet[] }) { + if (worlds.length === 0) return null; + return ( + w.name).join(", ")}`} + aria-label={`In ${worlds.map((w) => w.name).join(", ")}`} + > + {worlds.map((w) => ( + + ); +} + function Row({ attribute, selected, registry, + worlds, reveal, onToggle, onEdit, }: { attribute: AttributeNode; selected: boolean; + worlds: readonly PoolFacet[]; registry: ClaimTypeRegistry | null; reveal: (target: RevealTarget) => Promise; onToggle: (id: string, shift: boolean) => void; @@ -156,6 +194,7 @@ function Row({ {prov.text} + {attribute.stale && {staleWords(attribute.staleReason)}}