claude-mpm 4.2.44__py3-none-any.whl → 4.2.51__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. claude_mpm/VERSION +1 -1
  2. claude_mpm/agents/BASE_PM.md +43 -1
  3. claude_mpm/agents/INSTRUCTIONS.md +75 -1
  4. claude_mpm/agents/WORKFLOW.md +46 -1
  5. claude_mpm/agents/frontmatter_validator.py +20 -12
  6. claude_mpm/agents/templates/nextjs_engineer.json +277 -0
  7. claude_mpm/agents/templates/python_engineer.json +289 -0
  8. claude_mpm/agents/templates/react_engineer.json +11 -3
  9. claude_mpm/agents/templates/security.json +50 -9
  10. claude_mpm/cli/commands/agents.py +2 -2
  11. claude_mpm/cli/commands/uninstall.py +1 -2
  12. claude_mpm/cli/interactive/agent_wizard.py +3 -3
  13. claude_mpm/cli/parsers/agent_manager_parser.py +3 -3
  14. claude_mpm/cli/parsers/agents_parser.py +1 -1
  15. claude_mpm/constants.py +1 -1
  16. claude_mpm/core/error_handler.py +2 -4
  17. claude_mpm/core/file_utils.py +4 -12
  18. claude_mpm/core/log_manager.py +8 -5
  19. claude_mpm/core/logger.py +1 -1
  20. claude_mpm/core/logging_utils.py +6 -6
  21. claude_mpm/core/unified_agent_registry.py +18 -4
  22. claude_mpm/dashboard/react/components/DataInspector/DataInspector.module.css +188 -0
  23. claude_mpm/dashboard/react/components/EventViewer/EventViewer.module.css +156 -0
  24. claude_mpm/dashboard/react/components/shared/ConnectionStatus.module.css +38 -0
  25. claude_mpm/dashboard/react/components/shared/FilterBar.module.css +92 -0
  26. claude_mpm/dashboard/static/archive/activity_dashboard_fixed.html +248 -0
  27. claude_mpm/dashboard/static/archive/activity_dashboard_test.html +61 -0
  28. claude_mpm/dashboard/static/archive/test_activity_connection.html +179 -0
  29. claude_mpm/dashboard/static/archive/test_claude_tree_tab.html +68 -0
  30. claude_mpm/dashboard/static/archive/test_dashboard.html +409 -0
  31. claude_mpm/dashboard/static/archive/test_dashboard_fixed.html +519 -0
  32. claude_mpm/dashboard/static/archive/test_dashboard_verification.html +181 -0
  33. claude_mpm/dashboard/static/archive/test_file_data.html +315 -0
  34. claude_mpm/dashboard/static/archive/test_file_tree_empty_state.html +243 -0
  35. claude_mpm/dashboard/static/archive/test_file_tree_fix.html +234 -0
  36. claude_mpm/dashboard/static/archive/test_file_tree_rename.html +117 -0
  37. claude_mpm/dashboard/static/archive/test_file_tree_tab.html +115 -0
  38. claude_mpm/dashboard/static/archive/test_file_viewer.html +224 -0
  39. claude_mpm/dashboard/static/archive/test_final_activity.html +220 -0
  40. claude_mpm/dashboard/static/archive/test_tab_fix.html +139 -0
  41. claude_mpm/dashboard/static/built/assets/events.DjpNxWNo.css +1 -0
  42. claude_mpm/dashboard/static/built/components/activity-tree.js +1 -1
  43. claude_mpm/dashboard/static/built/components/agent-hierarchy.js +777 -0
  44. claude_mpm/dashboard/static/built/components/agent-inference.js +1 -1
  45. claude_mpm/dashboard/static/built/components/build-tracker.js +333 -0
  46. claude_mpm/dashboard/static/built/components/code-simple.js +857 -0
  47. claude_mpm/dashboard/static/built/components/code-tree/tree-breadcrumb.js +353 -0
  48. claude_mpm/dashboard/static/built/components/code-tree/tree-constants.js +235 -0
  49. claude_mpm/dashboard/static/built/components/code-tree/tree-search.js +409 -0
  50. claude_mpm/dashboard/static/built/components/code-tree/tree-utils.js +435 -0
  51. claude_mpm/dashboard/static/built/components/code-viewer.js +2 -1076
  52. claude_mpm/dashboard/static/built/components/connection-debug.js +654 -0
  53. claude_mpm/dashboard/static/built/components/diff-viewer.js +891 -0
  54. claude_mpm/dashboard/static/built/components/event-processor.js +1 -1
  55. claude_mpm/dashboard/static/built/components/event-viewer.js +1 -1
  56. claude_mpm/dashboard/static/built/components/export-manager.js +1 -1
  57. claude_mpm/dashboard/static/built/components/file-change-tracker.js +443 -0
  58. claude_mpm/dashboard/static/built/components/file-change-viewer.js +690 -0
  59. claude_mpm/dashboard/static/built/components/file-tool-tracker.js +1 -1
  60. claude_mpm/dashboard/static/built/components/module-viewer.js +1 -1
  61. claude_mpm/dashboard/static/built/components/nav-bar.js +145 -0
  62. claude_mpm/dashboard/static/built/components/page-structure.js +429 -0
  63. claude_mpm/dashboard/static/built/components/session-manager.js +1 -1
  64. claude_mpm/dashboard/static/built/components/ui-state-manager.js +2 -465
  65. claude_mpm/dashboard/static/built/components/working-directory.js +1 -1
  66. claude_mpm/dashboard/static/built/connection-manager.js +536 -0
  67. claude_mpm/dashboard/static/built/dashboard.js +1 -1
  68. claude_mpm/dashboard/static/built/extension-error-handler.js +164 -0
  69. claude_mpm/dashboard/static/built/react/events.js +30 -0
  70. claude_mpm/dashboard/static/built/shared/dom-helpers.js +396 -0
  71. claude_mpm/dashboard/static/built/shared/event-bus.js +330 -0
  72. claude_mpm/dashboard/static/built/shared/event-filter-service.js +540 -0
  73. claude_mpm/dashboard/static/built/shared/logger.js +385 -0
  74. claude_mpm/dashboard/static/built/shared/page-structure.js +251 -0
  75. claude_mpm/dashboard/static/built/shared/tooltip-service.js +253 -0
  76. claude_mpm/dashboard/static/built/socket-client.js +1 -1
  77. claude_mpm/dashboard/static/built/tab-isolation-fix.js +185 -0
  78. claude_mpm/dashboard/static/css/dashboard.css +28 -5
  79. claude_mpm/dashboard/static/dist/assets/events.DjpNxWNo.css +1 -0
  80. claude_mpm/dashboard/static/dist/components/activity-tree.js +1 -1
  81. claude_mpm/dashboard/static/dist/components/agent-inference.js +1 -1
  82. claude_mpm/dashboard/static/dist/components/code-viewer.js +2 -0
  83. claude_mpm/dashboard/static/dist/components/event-processor.js +1 -1
  84. claude_mpm/dashboard/static/dist/components/event-viewer.js +1 -1
  85. claude_mpm/dashboard/static/dist/components/export-manager.js +1 -1
  86. claude_mpm/dashboard/static/dist/components/file-tool-tracker.js +1 -1
  87. claude_mpm/dashboard/static/dist/components/module-viewer.js +1 -1
  88. claude_mpm/dashboard/static/dist/components/session-manager.js +1 -1
  89. claude_mpm/dashboard/static/dist/components/working-directory.js +1 -1
  90. claude_mpm/dashboard/static/dist/dashboard.js +1 -1
  91. claude_mpm/dashboard/static/dist/react/events.js +30 -0
  92. claude_mpm/dashboard/static/dist/socket-client.js +1 -1
  93. claude_mpm/dashboard/static/events.html +607 -0
  94. claude_mpm/dashboard/static/index.html +713 -0
  95. claude_mpm/dashboard/static/js/components/activity-tree.js +3 -17
  96. claude_mpm/dashboard/static/js/components/agent-hierarchy.js +4 -1
  97. claude_mpm/dashboard/static/js/components/agent-inference.js +3 -0
  98. claude_mpm/dashboard/static/js/components/build-tracker.js +8 -0
  99. claude_mpm/dashboard/static/js/components/code-viewer.js +306 -66
  100. claude_mpm/dashboard/static/js/components/event-processor.js +3 -0
  101. claude_mpm/dashboard/static/js/components/event-viewer.js +39 -2
  102. claude_mpm/dashboard/static/js/components/export-manager.js +3 -0
  103. claude_mpm/dashboard/static/js/components/file-tool-tracker.js +30 -10
  104. claude_mpm/dashboard/static/js/components/socket-manager.js +4 -0
  105. claude_mpm/dashboard/static/js/components/ui-state-manager.js +285 -85
  106. claude_mpm/dashboard/static/js/components/working-directory.js +3 -0
  107. claude_mpm/dashboard/static/js/dashboard.js +61 -33
  108. claude_mpm/dashboard/static/js/socket-client.js +12 -8
  109. claude_mpm/dashboard/static/js/stores/dashboard-store.js +562 -0
  110. claude_mpm/dashboard/static/js/tab-isolation-fix.js +185 -0
  111. claude_mpm/dashboard/static/legacy/activity.html +736 -0
  112. claude_mpm/dashboard/static/legacy/agents.html +786 -0
  113. claude_mpm/dashboard/static/legacy/files.html +747 -0
  114. claude_mpm/dashboard/static/legacy/tools.html +831 -0
  115. claude_mpm/dashboard/static/monitors-index.html +218 -0
  116. claude_mpm/dashboard/static/monitors.html +431 -0
  117. claude_mpm/dashboard/static/production/events.html +659 -0
  118. claude_mpm/dashboard/static/production/main.html +715 -0
  119. claude_mpm/dashboard/static/production/monitors.html +483 -0
  120. claude_mpm/dashboard/static/socket.io.min.js +7 -0
  121. claude_mpm/dashboard/static/socket.io.v4.8.1.backup.js +7 -0
  122. claude_mpm/dashboard/static/test-archive/dashboard.html +635 -0
  123. claude_mpm/dashboard/static/test-archive/debug-events.html +147 -0
  124. claude_mpm/dashboard/static/test-archive/test-navigation.html +256 -0
  125. claude_mpm/dashboard/static/test-archive/test-react-exports.html +180 -0
  126. claude_mpm/dashboard/templates/index.html +79 -9
  127. claude_mpm/hooks/claude_hooks/services/connection_manager_http.py +1 -1
  128. claude_mpm/services/agents/deployment/agent_discovery_service.py +3 -0
  129. claude_mpm/services/agents/deployment/agent_template_builder.py +25 -8
  130. claude_mpm/services/agents/deployment/agent_validator.py +3 -0
  131. claude_mpm/services/agents/deployment/validation/template_validator.py +13 -4
  132. claude_mpm/services/agents/local_template_manager.py +2 -6
  133. claude_mpm/services/monitor/daemon.py +1 -2
  134. claude_mpm/services/monitor/daemon_manager.py +2 -5
  135. claude_mpm/services/monitor/event_emitter.py +2 -2
  136. claude_mpm/services/monitor/handlers/code_analysis.py +4 -6
  137. claude_mpm/services/monitor/handlers/hooks.py +2 -4
  138. claude_mpm/services/monitor/server.py +27 -4
  139. claude_mpm/tools/code_tree_analyzer.py +2 -2
  140. {claude_mpm-4.2.44.dist-info → claude_mpm-4.2.51.dist-info}/METADATA +1 -1
  141. {claude_mpm-4.2.44.dist-info → claude_mpm-4.2.51.dist-info}/RECORD +146 -81
  142. claude_mpm/dashboard/static/test-browser-monitor.html +0 -470
  143. claude_mpm/dashboard/static/test-simple.html +0 -97
  144. /claude_mpm/dashboard/static/{test_debug.html → test-archive/test_debug.html} +0 -0
  145. {claude_mpm-4.2.44.dist-info → claude_mpm-4.2.51.dist-info}/WHEEL +0 -0
  146. {claude_mpm-4.2.44.dist-info → claude_mpm-4.2.51.dist-info}/entry_points.txt +0 -0
  147. {claude_mpm-4.2.44.dist-info → claude_mpm-4.2.51.dist-info}/licenses/LICENSE +0 -0
  148. {claude_mpm-4.2.44.dist-info → claude_mpm-4.2.51.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,234 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <title>File Tree Tab Fix Test</title>
6
+ <style>
7
+ body {
8
+ font-family: monospace;
9
+ max-width: 1200px;
10
+ margin: 20px auto;
11
+ padding: 20px;
12
+ background: #1e1e1e;
13
+ color: #d4d4d4;
14
+ }
15
+ .test-section {
16
+ background: #2d2d2d;
17
+ padding: 20px;
18
+ margin-bottom: 20px;
19
+ border-radius: 5px;
20
+ border: 1px solid #444;
21
+ }
22
+ h2 {
23
+ color: #569cd6;
24
+ margin-top: 0;
25
+ }
26
+ button {
27
+ padding: 10px 20px;
28
+ margin: 5px;
29
+ background: #007acc;
30
+ color: white;
31
+ border: none;
32
+ border-radius: 3px;
33
+ cursor: pointer;
34
+ font-size: 14px;
35
+ }
36
+ button:hover {
37
+ background: #005a9e;
38
+ }
39
+ .status {
40
+ padding: 10px;
41
+ border-radius: 3px;
42
+ margin: 10px 0;
43
+ font-size: 14px;
44
+ }
45
+ .info {
46
+ background: #2d4a5d;
47
+ color: #9cdcfe;
48
+ border: 1px solid #3e6379;
49
+ }
50
+ .success {
51
+ background: #1b3b1b;
52
+ color: #4ec24e;
53
+ border: 1px solid #2d5a2d;
54
+ }
55
+ .error {
56
+ background: #5a1d1d;
57
+ color: #f48771;
58
+ border: 1px solid #8b2c2c;
59
+ }
60
+ .log-output {
61
+ background: #1e1e1e;
62
+ border: 1px solid #444;
63
+ border-radius: 3px;
64
+ padding: 10px;
65
+ margin-top: 10px;
66
+ max-height: 400px;
67
+ overflow-y: auto;
68
+ font-size: 12px;
69
+ white-space: pre-wrap;
70
+ }
71
+ .log-entry {
72
+ margin: 2px 0;
73
+ padding: 2px 5px;
74
+ }
75
+ .log-entry.info { color: #9cdcfe; }
76
+ .log-entry.success { color: #4ec24e; }
77
+ .log-entry.error { color: #f48771; }
78
+ .log-entry.warning { color: #dcdcaa; }
79
+ </style>
80
+ </head>
81
+ <body>
82
+ <h1>🔧 File Tree Tab Fix Verification</h1>
83
+
84
+ <div class="test-section">
85
+ <h2>Test Configuration</h2>
86
+ <div class="status info">
87
+ <strong>Dashboard URL:</strong> http://localhost:8765<br>
88
+ <strong>Issue:</strong> File Tree tab shows Events list instead of D3.js tree<br>
89
+ <strong>Expected:</strong> File Tree tab should show D3.js tree or empty state
90
+ </div>
91
+ <button onclick="openDashboard()">Open Dashboard</button>
92
+ <button onclick="testFileTree()">Test File Tree Tab</button>
93
+ <button onclick="checkTabState()">Check Tab State</button>
94
+ <button onclick="clearLog()">Clear Log</button>
95
+ </div>
96
+
97
+ <div class="test-section">
98
+ <h2>Test Results</h2>
99
+ <div id="test-results"></div>
100
+ </div>
101
+
102
+ <div class="test-section">
103
+ <h2>Debug Log</h2>
104
+ <div class="log-output" id="log-output"></div>
105
+ </div>
106
+
107
+ <script>
108
+ const dashboardUrl = 'http://localhost:8765';
109
+ let dashboardWindow = null;
110
+
111
+ function log(message, type = 'info') {
112
+ const logOutput = document.getElementById('log-output');
113
+ const entry = document.createElement('div');
114
+ entry.className = `log-entry ${type}`;
115
+ const time = new Date().toLocaleTimeString();
116
+ entry.textContent = `[${time}] ${message}`;
117
+ logOutput.appendChild(entry);
118
+ logOutput.scrollTop = logOutput.scrollHeight;
119
+ }
120
+
121
+ function clearLog() {
122
+ document.getElementById('log-output').innerHTML = '';
123
+ document.getElementById('test-results').innerHTML = '';
124
+ log('Logs cleared', 'info');
125
+ }
126
+
127
+ function openDashboard() {
128
+ dashboardWindow = window.open(dashboardUrl + '#file_tree', 'dashboard');
129
+ log('Opening dashboard with File Tree tab...', 'info');
130
+
131
+ setTimeout(() => {
132
+ if (dashboardWindow && !dashboardWindow.closed) {
133
+ log('Dashboard window opened', 'success');
134
+ log('Navigate to File Tree tab and check what content is displayed', 'warning');
135
+ checkTabState();
136
+ } else {
137
+ log('Failed to open dashboard window', 'error');
138
+ }
139
+ }, 2000);
140
+ }
141
+
142
+ function testFileTree() {
143
+ log('Testing File Tree tab behavior...', 'info');
144
+
145
+ if (!dashboardWindow || dashboardWindow.closed) {
146
+ log('Dashboard window not open. Opening...', 'warning');
147
+ openDashboard();
148
+ setTimeout(() => testFileTree(), 3000);
149
+ return;
150
+ }
151
+
152
+ try {
153
+ // Try to interact with the dashboard window
154
+ dashboardWindow.location.hash = '#file_tree';
155
+ log('Set URL hash to #file_tree', 'info');
156
+
157
+ setTimeout(() => {
158
+ checkTabState();
159
+ }, 1000);
160
+
161
+ } catch (e) {
162
+ log('Cannot interact with dashboard due to same-origin policy', 'error');
163
+ log('Please manually click on File Tree tab and observe the content', 'warning');
164
+ }
165
+ }
166
+
167
+ function checkTabState() {
168
+ if (!dashboardWindow || dashboardWindow.closed) {
169
+ log('Dashboard window not available', 'error');
170
+ return;
171
+ }
172
+
173
+ const results = document.getElementById('test-results');
174
+ results.innerHTML = '';
175
+
176
+ log('Checking dashboard state...', 'info');
177
+
178
+ // Create manual checklist
179
+ const checklist = `
180
+ <div class="status info">
181
+ <strong>Manual Verification Checklist:</strong><br><br>
182
+
183
+ 1. <strong>URL Hash Check:</strong><br>
184
+ &nbsp;&nbsp;&nbsp;• Is the URL showing #file_tree? ✓/✗<br><br>
185
+
186
+ 2. <strong>Tab Button Highlight:</strong><br>
187
+ &nbsp;&nbsp;&nbsp;• Is ONLY the "📝 File Tree" tab button highlighted? ✓/✗<br>
188
+ &nbsp;&nbsp;&nbsp;• Are any other tabs also highlighted? (Should be NO)<br><br>
189
+
190
+ 3. <strong>Content Display:</strong><br>
191
+ &nbsp;&nbsp;&nbsp;• What do you see in the main content area?<br>
192
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;❌ WRONG: "Search events..." input box<br>
193
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;❌ WRONG: "All Events" dropdown<br>
194
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;❌ WRONG: List of hook events<br>
195
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;✅ CORRECT: "📁 File Activity Tree" title<br>
196
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;✅ CORRECT: "No file operations recorded yet" message<br>
197
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;✅ CORRECT: D3.js tree visualization (if files have been accessed)<br><br>
198
+
199
+ 4. <strong>Console Errors:</strong><br>
200
+ &nbsp;&nbsp;&nbsp;• Open browser console (F12)<br>
201
+ &nbsp;&nbsp;&nbsp;• Any errors related to CodeViewer? ✓/✗<br>
202
+ &nbsp;&nbsp;&nbsp;• Any errors about containers not found? ✓/✗<br><br>
203
+
204
+ <strong>Current Issue Status:</strong><br>
205
+ If you see Events content in File Tree tab, the issue is NOT fixed.
206
+ </div>
207
+ `;
208
+
209
+ results.innerHTML = checklist;
210
+
211
+ log('Manual verification checklist displayed', 'success');
212
+ log('Please check each item in the dashboard', 'warning');
213
+ }
214
+
215
+ // Auto-run on load
216
+ window.addEventListener('load', () => {
217
+ log('File Tree Fix Test Suite loaded', 'info');
218
+ log('Click "Open Dashboard" to begin testing', 'info');
219
+ log('The dashboard should open directly to File Tree tab', 'info');
220
+
221
+ // Provide diagnostic info
222
+ setTimeout(() => {
223
+ log('', 'info');
224
+ log('DIAGNOSTIC STEPS:', 'warning');
225
+ log('1. Open dashboard and click File Tree tab', 'info');
226
+ log('2. Check browser console for errors (F12)', 'info');
227
+ log('3. Note EXACTLY what content you see', 'info');
228
+ log('4. If you see Events list, the bug persists', 'error');
229
+ log('5. If you see File Tree or empty state, it\'s fixed!', 'success');
230
+ }, 1000);
231
+ });
232
+ </script>
233
+ </body>
234
+ </html>
@@ -0,0 +1,117 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>File Tree Rename Test</title>
5
+ <style>
6
+ body {
7
+ font-family: Arial, sans-serif;
8
+ max-width: 1200px;
9
+ margin: 0 auto;
10
+ padding: 20px;
11
+ }
12
+ h1 { color: #333; }
13
+ .test-section {
14
+ background: #f5f5f5;
15
+ padding: 15px;
16
+ margin: 20px 0;
17
+ border-radius: 8px;
18
+ }
19
+ .success { color: green; font-weight: bold; }
20
+ .failure { color: red; font-weight: bold; }
21
+ iframe {
22
+ width: 100%;
23
+ height: 600px;
24
+ border: 2px solid #ddd;
25
+ border-radius: 8px;
26
+ }
27
+ pre {
28
+ background: #fff;
29
+ padding: 10px;
30
+ border: 1px solid #ddd;
31
+ border-radius: 4px;
32
+ overflow-x: auto;
33
+ }
34
+ </style>
35
+ </head>
36
+ <body>
37
+ <h1>File Tree Rename Verification</h1>
38
+
39
+ <div class="test-section">
40
+ <h2>Test Results</h2>
41
+ <div id="test-results"></div>
42
+ </div>
43
+
44
+ <div class="test-section">
45
+ <h2>Live Dashboard Preview</h2>
46
+ <p>The dashboard below should display "📝 File Tree" as the rightmost tab:</p>
47
+ <iframe src="http://localhost:8765" id="dashboard-iframe"></iframe>
48
+ </div>
49
+
50
+ <script>
51
+ async function runTests() {
52
+ const results = document.getElementById('test-results');
53
+ let testsPassed = 0;
54
+ let totalTests = 0;
55
+
56
+ // Test 1: Check if dashboard is accessible
57
+ totalTests++;
58
+ try {
59
+ const response = await fetch('http://localhost:8765');
60
+ if (response.ok) {
61
+ results.innerHTML += '<p class="success">✓ Dashboard is accessible</p>';
62
+ testsPassed++;
63
+
64
+ // Test 2: Check if HTML contains "File Tree"
65
+ totalTests++;
66
+ const html = await response.text();
67
+ if (html.includes('📝 File Tree')) {
68
+ results.innerHTML += '<p class="success">✓ HTML contains "File Tree" button text</p>';
69
+ testsPassed++;
70
+ } else {
71
+ results.innerHTML += '<p class="failure">✗ HTML does not contain "File Tree" button text</p>';
72
+ }
73
+
74
+ // Test 3: Check that "Claude Tree" is not in button text
75
+ totalTests++;
76
+ if (!html.includes('>📝 Claude Tree<')) {
77
+ results.innerHTML += '<p class="success">✓ "Claude Tree" button text has been removed</p>';
78
+ testsPassed++;
79
+ } else {
80
+ results.innerHTML += '<p class="failure">✗ "Claude Tree" button text still exists</p>';
81
+ }
82
+
83
+ // Test 4: Check comments were updated
84
+ totalTests++;
85
+ if (html.includes('File activity tree will be rendered here') ||
86
+ html.includes('File Tree tab')) {
87
+ results.innerHTML += '<p class="success">✓ Comments have been updated to "File Tree"</p>';
88
+ testsPassed++;
89
+ } else {
90
+ results.innerHTML += '<p class="failure">✗ Comments still reference "Claude Tree"</p>';
91
+ }
92
+
93
+ } else {
94
+ results.innerHTML += '<p class="failure">✗ Dashboard is not accessible (status: ' + response.status + ')</p>';
95
+ }
96
+ } catch (error) {
97
+ results.innerHTML += '<p class="failure">✗ Failed to connect to dashboard: ' + error.message + '</p>';
98
+ }
99
+
100
+ // Summary
101
+ results.innerHTML += '<hr>';
102
+ results.innerHTML += '<h3>Summary: ' + testsPassed + '/' + totalTests + ' tests passed</h3>';
103
+
104
+ if (testsPassed === totalTests) {
105
+ results.innerHTML += '<p class="success">🎉 All tests passed! The rename from "Claude Tree" to "File Tree" was successful.</p>';
106
+ } else {
107
+ results.innerHTML += '<p class="failure">⚠️ Some tests failed. Please review the changes.</p>';
108
+ }
109
+ }
110
+
111
+ // Run tests when page loads
112
+ window.addEventListener('load', () => {
113
+ setTimeout(runTests, 1000); // Give iframe time to load
114
+ });
115
+ </script>
116
+ </body>
117
+ </html>
@@ -0,0 +1,115 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <title>File Tree Tab Test</title>
6
+ <style>
7
+ body {
8
+ font-family: monospace;
9
+ padding: 20px;
10
+ background: #f5f5f5;
11
+ }
12
+ .test-section {
13
+ background: white;
14
+ padding: 15px;
15
+ margin: 10px 0;
16
+ border-radius: 5px;
17
+ box-shadow: 0 2px 4px rgba(0,0,0,0.1);
18
+ }
19
+ .status {
20
+ padding: 5px 10px;
21
+ border-radius: 3px;
22
+ display: inline-block;
23
+ margin: 5px 0;
24
+ }
25
+ .pass {
26
+ background: #d4edda;
27
+ color: #155724;
28
+ }
29
+ .fail {
30
+ background: #f8d7da;
31
+ color: #721c24;
32
+ }
33
+ .info {
34
+ background: #d1ecf1;
35
+ color: #0c5460;
36
+ }
37
+ pre {
38
+ background: #f8f9fa;
39
+ padding: 10px;
40
+ border-radius: 3px;
41
+ overflow-x: auto;
42
+ }
43
+ </style>
44
+ </head>
45
+ <body>
46
+ <h1>🧪 File Tree Tab Test Results</h1>
47
+
48
+ <div class="test-section">
49
+ <h2>Test Instructions:</h2>
50
+ <ol>
51
+ <li>Open the Claude MPM Dashboard at <a href="http://localhost:8765" target="_blank">http://localhost:8765</a></li>
52
+ <li>Click on the "File Tree" tab</li>
53
+ <li>Verify what content is displayed</li>
54
+ </ol>
55
+ </div>
56
+
57
+ <div class="test-section">
58
+ <h2>Expected Behavior:</h2>
59
+ <div class="status pass">✅ File Tree tab should show D3.js tree visualization</div>
60
+ <div class="status pass">✅ Tree should show at least a session root node</div>
61
+ <div class="status pass">✅ No event items should be visible</div>
62
+ <div class="status pass">✅ Control buttons: Expand All, Collapse All, Reset Zoom</div>
63
+ <div class="status pass">✅ Legend showing file/class/function/method indicators</div>
64
+ </div>
65
+
66
+ <div class="test-section">
67
+ <h2>Fixed Issues:</h2>
68
+ <div class="status info">🔧 EventViewer now respects container ID passed to constructor</div>
69
+ <div class="status info">🔧 UIStateManager cleans up leaked event items from non-event tabs</div>
70
+ <div class="status info">🔧 CodeViewer aggressively removes foreign content from its container</div>
71
+ <div class="status info">🔧 Added tab activity checks to prevent rendering in inactive tabs</div>
72
+ </div>
73
+
74
+ <div class="test-section">
75
+ <h2>Console Commands for Testing:</h2>
76
+ <pre>
77
+ // Check if File Tree tab is active
78
+ document.getElementById('claude-tree-tab').classList.contains('active')
79
+
80
+ // Check File Tree container content
81
+ document.getElementById('claude-tree-container').children.length
82
+
83
+ // Force render the tree
84
+ window.CodeViewer.show()
85
+
86
+ // Check for leaked event items
87
+ document.querySelectorAll('#claude-tree-container .event-item').length
88
+ </pre>
89
+ </div>
90
+
91
+ <div class="test-section">
92
+ <h2>Files Modified:</h2>
93
+ <ul>
94
+ <li><code>/src/claude_mpm/dashboard/static/js/components/event-viewer.js</code></li>
95
+ <li><code>/src/claude_mpm/dashboard/static/js/components/ui-state-manager.js</code></li>
96
+ <li><code>/src/claude_mpm/dashboard/static/js/components/code-viewer.js</code></li>
97
+ </ul>
98
+ </div>
99
+
100
+ <script>
101
+ // Auto-check if dashboard is accessible
102
+ fetch('http://localhost:8765')
103
+ .then(response => {
104
+ if (response.ok) {
105
+ document.body.insertAdjacentHTML('afterbegin',
106
+ '<div class="test-section"><div class="status pass">✅ Dashboard is accessible at http://localhost:8765</div></div>');
107
+ }
108
+ })
109
+ .catch(error => {
110
+ document.body.insertAdjacentHTML('afterbegin',
111
+ '<div class="test-section"><div class="status fail">❌ Dashboard is not accessible. Please run: ./scripts/claude-mpm --use-venv monitor start</div></div>');
112
+ });
113
+ </script>
114
+ </body>
115
+ </html>
@@ -0,0 +1,224 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>File Viewer Test</title>
7
+ <style>
8
+ body {
9
+ font-family: Arial, sans-serif;
10
+ padding: 20px;
11
+ background: #1e1e1e;
12
+ color: #d4d4d4;
13
+ }
14
+ .test-container {
15
+ max-width: 800px;
16
+ margin: 0 auto;
17
+ }
18
+ h1 {
19
+ color: #4EC9B0;
20
+ }
21
+ .info {
22
+ background: #2d2d30;
23
+ padding: 15px;
24
+ border-radius: 5px;
25
+ margin: 20px 0;
26
+ }
27
+ .test-files {
28
+ background: #252526;
29
+ padding: 15px;
30
+ border-radius: 5px;
31
+ }
32
+ .file-link {
33
+ display: block;
34
+ padding: 10px;
35
+ margin: 5px 0;
36
+ background: #3e3e42;
37
+ border-radius: 3px;
38
+ cursor: pointer;
39
+ text-decoration: none;
40
+ color: #4EC9B0;
41
+ }
42
+ .file-link:hover {
43
+ background: #4e4e52;
44
+ }
45
+ .status {
46
+ padding: 10px;
47
+ margin: 10px 0;
48
+ border-radius: 3px;
49
+ }
50
+ .status.connected {
51
+ background: #2d5a2d;
52
+ color: #4EC9B0;
53
+ }
54
+ .status.disconnected {
55
+ background: #5a2d2d;
56
+ color: #f48771;
57
+ }
58
+ .debug-output {
59
+ background: #1e1e1e;
60
+ border: 1px solid #3e3e42;
61
+ padding: 10px;
62
+ margin: 20px 0;
63
+ max-height: 300px;
64
+ overflow-y: auto;
65
+ font-family: monospace;
66
+ font-size: 12px;
67
+ }
68
+ .debug-line {
69
+ margin: 2px 0;
70
+ }
71
+ .debug-line.error {
72
+ color: #f48771;
73
+ }
74
+ .debug-line.success {
75
+ color: #4EC9B0;
76
+ }
77
+ .debug-line.info {
78
+ color: #69b7ff;
79
+ }
80
+ </style>
81
+ </head>
82
+ <body>
83
+ <div class="test-container">
84
+ <h1>File Viewer Test Page</h1>
85
+
86
+ <div class="info">
87
+ <p>This page tests the file viewer functionality. Click on any file below to test the viewer.</p>
88
+ <p>Open the browser console (F12) to see debug output.</p>
89
+ </div>
90
+
91
+ <div id="connection-status" class="status disconnected">
92
+ Socket.IO Status: <span id="status-text">Disconnected</span>
93
+ </div>
94
+
95
+ <div class="test-files">
96
+ <h2>Test Files</h2>
97
+ <a class="file-link" onclick="testFileViewer('/Users/masa/Projects/claude-mpm/README.md')">
98
+ 📄 /Users/masa/Projects/claude-mpm/README.md
99
+ </a>
100
+ <a class="file-link" onclick="testFileViewer('/Users/masa/Projects/claude-mpm/pyproject.toml')">
101
+ 📄 /Users/masa/Projects/claude-mpm/pyproject.toml
102
+ </a>
103
+ <a class="file-link" onclick="testFileViewer('/Users/masa/Projects/claude-mpm/VERSION')">
104
+ 📄 /Users/masa/Projects/claude-mpm/VERSION
105
+ </a>
106
+ <a class="file-link" onclick="testFileViewer('/Users/masa/Projects/claude-mpm/src/claude_mpm/__init__.py')">
107
+ 📄 /Users/masa/Projects/claude-mpm/src/claude_mpm/__init__.py
108
+ </a>
109
+ </div>
110
+
111
+ <div class="debug-output" id="debug-output">
112
+ <div class="debug-line info">Debug output will appear here...</div>
113
+ </div>
114
+ </div>
115
+
116
+ <!-- Load Socket.IO client -->
117
+ <script src="https://cdn.socket.io/4.5.4/socket.io.min.js"></script>
118
+
119
+ <script>
120
+ // Debug logging
121
+ function log(message, level = 'info') {
122
+ console.log(`[FileViewerTest] ${message}`);
123
+ const debugOutput = document.getElementById('debug-output');
124
+ const line = document.createElement('div');
125
+ line.className = `debug-line ${level}`;
126
+ line.textContent = `[${new Date().toLocaleTimeString()}] ${message}`;
127
+ debugOutput.appendChild(line);
128
+ debugOutput.scrollTop = debugOutput.scrollHeight;
129
+ }
130
+
131
+ // Initialize Socket.IO connection
132
+ log('Initializing Socket.IO connection...');
133
+ const socket = io('http://localhost:8765', {
134
+ reconnection: true,
135
+ reconnectionDelay: 1000,
136
+ reconnectionDelayMax: 5000,
137
+ reconnectionAttempts: 5
138
+ });
139
+
140
+ // Connection status handling
141
+ socket.on('connect', () => {
142
+ log('Connected to Socket.IO server!', 'success');
143
+ document.getElementById('connection-status').className = 'status connected';
144
+ document.getElementById('status-text').textContent = 'Connected';
145
+ });
146
+
147
+ socket.on('disconnect', () => {
148
+ log('Disconnected from Socket.IO server', 'error');
149
+ document.getElementById('connection-status').className = 'status disconnected';
150
+ document.getElementById('status-text').textContent = 'Disconnected';
151
+ });
152
+
153
+ socket.on('connect_error', (error) => {
154
+ log(`Connection error: ${error.message}`, 'error');
155
+ });
156
+
157
+ // Test file viewer function
158
+ function testFileViewer(filePath) {
159
+ log(`Testing file viewer with: ${filePath}`);
160
+
161
+ if (!socket.connected) {
162
+ log('Socket not connected! Please ensure the dashboard server is running on port 8765', 'error');
163
+ alert('Not connected to server. Please ensure the dashboard server is running.');
164
+ return;
165
+ }
166
+
167
+ // Set up response handler
168
+ socket.once('file_content_response', (data) => {
169
+ log(`Received file_content_response:`, 'info');
170
+ console.log('Response data:', data);
171
+
172
+ if (data.success) {
173
+ log(`Successfully loaded file: ${data.file_path}`, 'success');
174
+ log(`File size: ${data.file_size} bytes`, 'info');
175
+ log(`Extension: ${data.extension}`, 'info');
176
+ log(`Encoding: ${data.encoding}`, 'info');
177
+
178
+ // Display first 500 characters of content
179
+ const preview = data.content.substring(0, 500);
180
+ log(`Content preview (first 500 chars):`, 'info');
181
+ log(preview, 'info');
182
+
183
+ // Show success alert with file info
184
+ alert(`File loaded successfully!\n\nPath: ${data.file_path}\nSize: ${data.file_size} bytes\nType: ${data.extension}\n\nCheck console and debug output for content preview.`);
185
+ } else {
186
+ log(`Failed to load file: ${data.error}`, 'error');
187
+ alert(`Failed to load file:\n${data.error}`);
188
+ }
189
+ });
190
+
191
+ // Set timeout for response
192
+ const timeoutId = setTimeout(() => {
193
+ log('Request timed out after 10 seconds', 'error');
194
+ alert('Request timed out. The server may not be responding.');
195
+ }, 10000);
196
+
197
+ // Send read_file request
198
+ const requestData = {
199
+ file_path: filePath,
200
+ working_dir: '/Users/masa/Projects/claude-mpm',
201
+ max_size: 5 * 1024 * 1024 // 5MB limit
202
+ };
203
+
204
+ log(`Sending read_file event with data: ${JSON.stringify(requestData)}`);
205
+ socket.emit('read_file', requestData);
206
+
207
+ // Clear timeout if we get a response
208
+ socket.once('file_content_response', () => {
209
+ clearTimeout(timeoutId);
210
+ });
211
+ }
212
+
213
+ // Test connection on load
214
+ window.addEventListener('load', () => {
215
+ log('Page loaded, checking Socket.IO connection...');
216
+ if (socket.connected) {
217
+ log('Already connected to Socket.IO server', 'success');
218
+ } else {
219
+ log('Waiting for Socket.IO connection...', 'info');
220
+ }
221
+ });
222
+ </script>
223
+ </body>
224
+ </html>