From 32f4324c5be6b567291c1a07f8d8d1182cd9e410 Mon Sep 17 00:00:00 2001 From: Emerson Lopes <24904209+emerson-d-lopes@users.noreply.github.com> Date: Thu, 23 Jul 2026 08:05:38 -0300 Subject: [PATCH 1/3] fix(explorer): stop rendering search-highlight markup as tree labels After any project search, the explorer tree displayed the matching element name as literal markup (" Claude-Session: https://claude.ai/code/session_01U5TQ1y3yBEDx73tYTHoUBj --- .../__tests__/leaf-highlight.test.tsx | 51 +++++++++++++++++++ .../_molecules/project-tree/index.tsx | 19 ++++++- .../_organisms/explorer/project.tsx | 31 +++++++---- 3 files changed, 88 insertions(+), 13 deletions(-) create mode 100644 src/frontend/components/_molecules/project-tree/__tests__/leaf-highlight.test.tsx diff --git a/src/frontend/components/_molecules/project-tree/__tests__/leaf-highlight.test.tsx b/src/frontend/components/_molecules/project-tree/__tests__/leaf-highlight.test.tsx new file mode 100644 index 000000000..a7675ea9e --- /dev/null +++ b/src/frontend/components/_molecules/project-tree/__tests__/leaf-highlight.test.tsx @@ -0,0 +1,51 @@ +import { render, screen } from '@testing-library/react' + +import { ProjectTreeExpandableLeaf, ProjectTreeLeaf } from '../index' + +// https://github.com/Autonomy-Logic/openplc-editor/issues/640 +// The explorer used to pass a search-highlight HTML string as the leaf `label`, +// which ProjectTreeLeaf renders as plain text — after any project search, the +// matching POU's name appeared in the tree as literal markup +// (`