From 201e274ca5968cd839bf6b78e99bc2857e7440b7 Mon Sep 17 00:00:00 2001 From: vegu-ai-tools <152010387+vegu-ai-tools@users.noreply.github.com> Date: Sun, 31 May 2026 13:37:09 +0300 Subject: [PATCH] entity tooltip for active scene characters shouldn't show add detail op --- .../src/components/EntityHighlightMixin.js | 21 ++++++++++++++----- .../src/components/EntityTooltip.vue | 2 +- .../src/components/WorldState.vue | 14 ++++++++----- 3 files changed, 26 insertions(+), 11 deletions(-) diff --git a/talemate_frontend/src/components/EntityHighlightMixin.js b/talemate_frontend/src/components/EntityHighlightMixin.js index 2ac9e4b8..65a45b60 100644 --- a/talemate_frontend/src/components/EntityHighlightMixin.js +++ b/talemate_frontend/src/components/EntityHighlightMixin.js @@ -126,8 +126,22 @@ export default { this.openEntityTooltip(span, entity); }, + // True when `name` is a live Scene actor (active or inactive roster). + characterIsKnown(name) { + return isKnownSceneCharacter(this.scene?.data, name); + }, + openEntityTooltip(activator, entity) { - this.entityTooltip = { open: true, activator, entity }; + // Stamp whether a character entity is a live Scene actor. Existing + // characters have their own detail surfaces (sheet, attributes, + // progression), so Add Detail is hidden for them — but background + // characters (named in narrative, not actors) have no other + // fleshing-out path, so they keep it like items and places do. + const enriched = + entity?.kind === 'character' + ? { ...entity, isKnownCharacter: this.characterIsKnown(entity.name) } + : entity; + this.entityTooltip = { open: true, activator, entity: enriched }; }, // Flip the menu closed but keep `activator` and `entity` populated — @@ -180,10 +194,7 @@ export default { dispatchLookAtEntity(this.getWebsocket(), { name: entity.name, kind: entity.kind, - isKnownCharacter: isKnownSceneCharacter( - this.scene?.data, - entity.name, - ), + isKnownCharacter: this.characterIsKnown(entity.name), }); }, }, diff --git a/talemate_frontend/src/components/EntityTooltip.vue b/talemate_frontend/src/components/EntityTooltip.vue index 840d7c5a..3037b0d2 100644 --- a/talemate_frontend/src/components/EntityTooltip.vue +++ b/talemate_frontend/src/components/EntityTooltip.vue @@ -57,7 +57,7 @@ Look at - +