From d5acf76d0bf92d23f9a18d10ef76e9f1f3aa896e Mon Sep 17 00:00:00 2001 From: Agent Zero Date: Wed, 16 Sep 2026 23:12:14 +0200 Subject: [PATCH] task(CAD-14): phase 4b - dynamic plugin tools section in left sidebar (all registry tools reachable, single tool location) --- frontend/src/components/LeftSidebar.tsx | 32 ++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/LeftSidebar.tsx b/frontend/src/components/LeftSidebar.tsx index c0cdd3f..418f02f 100644 --- a/frontend/src/components/LeftSidebar.tsx +++ b/frontend/src/components/LeftSidebar.tsx @@ -1,6 +1,7 @@ -import React, { useState, useCallback } from 'react'; +import React, { useState, useCallback, useMemo } from 'react'; import type { LeftSidebarProps } from '../types/ui.types'; import { SEATING_TEMPLATES } from '../services/seatingService'; +import { pluginRegistry } from '../plugins'; interface ToolDef { tool: string; @@ -138,6 +139,35 @@ const LeftSidebar: React.FC = ({ activeTool, onToolChange, sel ))} + {/* CAD-14 Phase 4b: Dynamische Sektion fuer Registry-Werkzeuge ohne + statischen Button (truss, boxcorner, circle-truss, measure, ...). + Ein Ort fuer ALLE Werkzeuge — keine Doppelung mehr. */} + {(() => { + const staticIds = new Set(sections.flatMap((s) => s.tools.map((t) => t.tool))); + const v2Tools = pluginRegistry.getToolsV2().filter((t) => !staticIds.has(t.manifest.id)); + if (v2Tools.length === 0) return null; + return ( +
+ {renderSectionLabel('Werkzeuge (Plugins)', 'v2-extra')} +
+ {v2Tools.map((tool) => ( + + ))} +
+
+ ); + })()} + {(onGroup || onUngroup) && (
{renderSectionLabel("Gruppierung", "grouping")}