- Frontend v4 accessible sur réseau local (192.168.1.40) - Ports ouverts: 3002 (frontend), 5001 (backend), 5004 (dashboard) - Ollama GPU fonctionnel - Self-healing interactif - Dashboard confiance Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2.3 KiB
Documentation Tab Fix - Complete Resolution
Issue Resolved ✅
Problem: Documentation tab content would appear briefly but disappear after 1-2 seconds in the Visual Workflow Builder.
Root Cause: React state management conflict in PropertiesPanel component where tab state was being reset on every node parameter change.
Solution Applied
1. Fixed PropertiesPanel State Management
Before (Problematic):
useEffect(() => {
if (node) {
// ... parameter logic ...
setActiveTab(0); // ❌ Reset tab on every node change
}
}, [node]); // Too broad dependency
After (Fixed):
useEffect(() => {
if (node) {
// ... parameter logic only ...
}
}, [node]);
// Separate effect for tab reset
useEffect(() => {
setActiveTab(0);
}, [node?.id]); // ✅ Only reset when node ID changes
2. Optimized DocumentationTab Dependencies
// Improved dependency management
useEffect(() => {
if (nodeType) {
loadDocumentation();
}
}, [nodeType]); // Removed unnecessary selectedNodeId
useEffect(() => {
if (nodeType && currentConfiguration) {
loadContextualHelp();
}
}, [nodeType, JSON.stringify(currentConfiguration)]); // Stable comparison
3. Fixed TypeScript Compilation Error
Issue: selectedNodeId parameter was declared but not used after optimization.
Fix: Renamed parameter to _selectedNodeId to indicate intentional non-use:
const DocumentationTab: React.FC<DocumentationTabProps> = ({
selectedNodeId: _selectedNodeId, // Renamed to indicate it's not used
nodeType,
currentConfiguration,
onToolSelect
}) => {
Files Modified
visual_workflow_builder/frontend/src/components/PropertiesPanel/index.tsxvisual_workflow_builder/frontend/src/components/DocumentationTab/index.tsx
Tests Created
test_documentation_tab_fix.py: Automated verification scriptfix_typescript_compilation.sh: TypeScript compilation verification
Result
✅ Documentation tab now remains visible and functional
✅ Content persists during user interactions
✅ Tab only resets when switching between different nodes
✅ All documentation features accessible
✅ TypeScript compilation errors resolved
Status: RESOLVED - Users can now access tool documentation without interruption and the code compiles without errors.