From 55e0351c1db11fcf3cf1c7c483feef0998fedffb Mon Sep 17 00:00:00 2001 From: hypercross Date: Sat, 8 Aug 2026 17:40:37 +0800 Subject: [PATCH] fix(web): select tree nodes by index path instead of GUID Cards in a deck share the deck's GUID, so GUID-based selection highlighted every card with that GUID and rendered the first match. Key selection by the node's unique index path instead. --- apps/web/src/components/ObjectTree.tsx | 25 +++++++++++++----------- apps/web/src/pages/ModPage.tsx | 27 +++++++++++++------------- 2 files changed, 28 insertions(+), 24 deletions(-) diff --git a/apps/web/src/components/ObjectTree.tsx b/apps/web/src/components/ObjectTree.tsx index dcac417..daa8e6f 100644 --- a/apps/web/src/components/ObjectTree.tsx +++ b/apps/web/src/components/ObjectTree.tsx @@ -5,11 +5,11 @@ import { iconsForObject } from './objectIcons'; interface Props { nodes: ObjectTreeNode[]; - selectedGuid: string | null; - onSelect: (guid: string) => void; + selectedPath: string | null; + onSelect: (path: string) => void; } -export default function ObjectTree({ nodes, selectedGuid, onSelect }: Props) { +export default function ObjectTree({ nodes, selectedPath, onSelect }: Props) { return (