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,147 @@
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>Event Debug Monitor</title>
7
+ <script src="/static/socket.io.min.js"></script>
8
+ <style>
9
+ body {
10
+ font-family: monospace;
11
+ background: #1e1e1e;
12
+ color: #00ff00;
13
+ padding: 20px;
14
+ }
15
+ .event {
16
+ border: 1px solid #00ff00;
17
+ margin: 10px 0;
18
+ padding: 10px;
19
+ background: rgba(0, 255, 0, 0.1);
20
+ }
21
+ .event-type {
22
+ color: #ffff00;
23
+ font-weight: bold;
24
+ }
25
+ .event-data {
26
+ margin-top: 5px;
27
+ white-space: pre-wrap;
28
+ }
29
+ h1 {
30
+ color: #00ff00;
31
+ }
32
+ .status {
33
+ padding: 10px;
34
+ margin: 10px 0;
35
+ border: 1px solid #00ff00;
36
+ }
37
+ .connected {
38
+ background: rgba(0, 255, 0, 0.2);
39
+ }
40
+ .disconnected {
41
+ background: rgba(255, 0, 0, 0.2);
42
+ }
43
+ </style>
44
+ </head>
45
+ <body>
46
+ <h1>🔍 Event Debug Monitor</h1>
47
+ <div id="status" class="status disconnected">Disconnected</div>
48
+ <button onclick="sendTestEvents()">Send Test Events</button>
49
+ <button onclick="clearEvents()">Clear</button>
50
+ <div id="events"></div>
51
+
52
+ <script>
53
+ const socket = io('http://localhost:8765', {
54
+ transports: ['polling', 'websocket'],
55
+ reconnection: true
56
+ });
57
+
58
+ let eventCount = 0;
59
+
60
+ socket.on('connect', () => {
61
+ console.log('Connected!');
62
+ document.getElementById('status').className = 'status connected';
63
+ document.getElementById('status').textContent = 'Connected to Socket.IO';
64
+ addEvent('SYSTEM', { message: 'Connected to server' });
65
+ });
66
+
67
+ socket.on('disconnect', () => {
68
+ console.log('Disconnected!');
69
+ document.getElementById('status').className = 'status disconnected';
70
+ document.getElementById('status').textContent = 'Disconnected';
71
+ addEvent('SYSTEM', { message: 'Disconnected from server' });
72
+ });
73
+
74
+ // Listen to ALL events
75
+ socket.onAny((eventName, data) => {
76
+ console.log(`Event: ${eventName}`, data);
77
+ addEvent(eventName, data);
78
+ });
79
+
80
+ function addEvent(type, data) {
81
+ eventCount++;
82
+ const eventsDiv = document.getElementById('events');
83
+ const eventDiv = document.createElement('div');
84
+ eventDiv.className = 'event';
85
+ eventDiv.innerHTML = `
86
+ <div class="event-type">#${eventCount} Event: ${type}</div>
87
+ <div class="event-data">${JSON.stringify(data, null, 2)}</div>
88
+ `;
89
+ eventsDiv.insertBefore(eventDiv, eventsDiv.firstChild);
90
+
91
+ // Keep only last 50 events
92
+ while (eventsDiv.children.length > 50) {
93
+ eventsDiv.removeChild(eventsDiv.lastChild);
94
+ }
95
+ }
96
+
97
+ function sendTestEvents() {
98
+ // Send various test events
99
+ const testEvents = [
100
+ // Agent events
101
+ {
102
+ type: 'SubagentStart',
103
+ agent_id: 'test_agent_' + Date.now(),
104
+ agent_name: 'Test Agent',
105
+ task: 'Testing event system',
106
+ timestamp: new Date().toISOString()
107
+ },
108
+ // Tool events
109
+ {
110
+ type: 'ToolCall',
111
+ tool_name: 'TestTool',
112
+ agent_name: 'Test Agent',
113
+ parameters: { test: true },
114
+ timestamp: new Date().toISOString()
115
+ },
116
+ // File events
117
+ {
118
+ type: 'file_read',
119
+ file_path: '/test/file.txt',
120
+ operation: 'read',
121
+ timestamp: new Date().toISOString()
122
+ }
123
+ ];
124
+
125
+ testEvents.forEach((event, index) => {
126
+ setTimeout(() => {
127
+ console.log('Sending test event:', event);
128
+ socket.emit('claude_event', event);
129
+ addEvent('SENT: claude_event', event);
130
+ }, index * 500);
131
+ });
132
+ }
133
+
134
+ function clearEvents() {
135
+ document.getElementById('events').innerHTML = '';
136
+ eventCount = 0;
137
+ }
138
+
139
+ // Request history on connect
140
+ socket.on('connect', () => {
141
+ setTimeout(() => {
142
+ socket.emit('get_history', { type: 'all', limit: 10 });
143
+ }, 1000);
144
+ });
145
+ </script>
146
+ </body>
147
+ </html>
@@ -0,0 +1,256 @@
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>Navigation Test - Claude MPM</title>
7
+ <style>
8
+ * {
9
+ margin: 0;
10
+ padding: 0;
11
+ box-sizing: border-box;
12
+ }
13
+
14
+ body {
15
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
16
+ background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
17
+ color: #e0e0e0;
18
+ min-height: 100vh;
19
+ padding: 20px;
20
+ }
21
+
22
+ .container {
23
+ max-width: 1400px;
24
+ margin: 0 auto;
25
+ }
26
+
27
+ h1 {
28
+ margin: 20px 0;
29
+ font-size: 28px;
30
+ background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
31
+ -webkit-background-clip: text;
32
+ -webkit-text-fill-color: transparent;
33
+ }
34
+
35
+ .test-section {
36
+ background: rgba(255, 255, 255, 0.05);
37
+ backdrop-filter: blur(10px);
38
+ border-radius: 12px;
39
+ padding: 20px;
40
+ margin: 20px 0;
41
+ border: 1px solid rgba(255, 255, 255, 0.1);
42
+ }
43
+
44
+ .test-title {
45
+ font-size: 18px;
46
+ margin-bottom: 15px;
47
+ color: #10b981;
48
+ }
49
+
50
+ .iframe-container {
51
+ border: 1px solid rgba(255, 255, 255, 0.2);
52
+ border-radius: 8px;
53
+ overflow: hidden;
54
+ margin: 10px 0;
55
+ height: 150px;
56
+ }
57
+
58
+ iframe {
59
+ width: 100%;
60
+ height: 100%;
61
+ border: none;
62
+ background: transparent;
63
+ }
64
+
65
+ .page-label {
66
+ font-size: 14px;
67
+ color: #94a3b8;
68
+ margin: 5px 0;
69
+ }
70
+
71
+ .status {
72
+ display: inline-block;
73
+ padding: 4px 12px;
74
+ border-radius: 15px;
75
+ font-size: 12px;
76
+ font-weight: 600;
77
+ margin-left: 10px;
78
+ }
79
+
80
+ .status.pass {
81
+ background: rgba(16, 185, 129, 0.2);
82
+ color: #4ade80;
83
+ }
84
+
85
+ .status.fail {
86
+ background: rgba(239, 68, 68, 0.2);
87
+ color: #f87171;
88
+ }
89
+
90
+ .summary {
91
+ background: rgba(16, 185, 129, 0.1);
92
+ border: 1px solid rgba(16, 185, 129, 0.3);
93
+ border-radius: 8px;
94
+ padding: 15px;
95
+ margin-top: 20px;
96
+ }
97
+
98
+ .summary-title {
99
+ font-size: 16px;
100
+ font-weight: 600;
101
+ margin-bottom: 10px;
102
+ }
103
+
104
+ .summary-item {
105
+ margin: 5px 0;
106
+ font-size: 14px;
107
+ }
108
+
109
+ .check-icon {
110
+ color: #4ade80;
111
+ margin-right: 8px;
112
+ }
113
+
114
+ .cross-icon {
115
+ color: #f87171;
116
+ margin-right: 8px;
117
+ }
118
+ </style>
119
+ </head>
120
+ <body>
121
+ <div class="container">
122
+ <h1>🧪 Navigation Consistency Test</h1>
123
+
124
+ <div class="test-section">
125
+ <div class="test-title">Navigation Bar Component Test</div>
126
+ <div id="test-navigation"></div>
127
+ </div>
128
+
129
+ <div class="test-section">
130
+ <div class="test-title">Dashboard Pages Navigation Preview</div>
131
+
132
+ <div class="page-label">
133
+ Activity Dashboard (activity.html)
134
+ <span class="status pass" id="activity-status">Loading...</span>
135
+ </div>
136
+ <div class="iframe-container">
137
+ <iframe src="/static/activity.html" id="activity-frame"></iframe>
138
+ </div>
139
+
140
+ <div class="page-label">
141
+ Events Monitor (events.html)
142
+ <span class="status pass" id="events-status">Loading...</span>
143
+ </div>
144
+ <div class="iframe-container">
145
+ <iframe src="/static/events.html" id="events-frame"></iframe>
146
+ </div>
147
+
148
+ <div class="page-label">
149
+ Agents Monitor (agents.html)
150
+ <span class="status pass" id="agents-status">Loading...</span>
151
+ </div>
152
+ <div class="iframe-container">
153
+ <iframe src="/static/agents.html" id="agents-frame"></iframe>
154
+ </div>
155
+
156
+ <div class="page-label">
157
+ Tools Monitor (tools.html)
158
+ <span class="status pass" id="tools-status">Loading...</span>
159
+ </div>
160
+ <div class="iframe-container">
161
+ <iframe src="/static/tools.html" id="tools-frame"></iframe>
162
+ </div>
163
+
164
+ <div class="page-label">
165
+ Files Monitor (files.html)
166
+ <span class="status pass" id="files-status">Loading...</span>
167
+ </div>
168
+ <div class="iframe-container">
169
+ <iframe src="/static/files.html" id="files-frame"></iframe>
170
+ </div>
171
+ </div>
172
+
173
+ <div class="test-section summary">
174
+ <div class="summary-title">✅ Test Summary</div>
175
+ <div id="test-results">
176
+ <div class="summary-item">Checking navigation consistency...</div>
177
+ </div>
178
+ </div>
179
+ </div>
180
+
181
+ <script type="module">
182
+ import { NavBar } from '/static/built/components/nav-bar.js';
183
+
184
+ // Test navigation component
185
+ const navBar = new NavBar();
186
+ navBar.initialize('test-navigation');
187
+
188
+ // Function to check navigation in iframe
189
+ function checkNavigation(frameId, statusId, pageName) {
190
+ const frame = document.getElementById(frameId);
191
+ const status = document.getElementById(statusId);
192
+
193
+ frame.onload = () => {
194
+ try {
195
+ const navContainer = frame.contentDocument.getElementById('navigation-container');
196
+ if (navContainer && navContainer.children.length > 0) {
197
+ status.textContent = 'Navigation Loaded';
198
+ status.className = 'status pass';
199
+ return true;
200
+ } else {
201
+ status.textContent = 'Navigation Missing';
202
+ status.className = 'status fail';
203
+ return false;
204
+ }
205
+ } catch (e) {
206
+ status.textContent = 'Error';
207
+ status.className = 'status fail';
208
+ return false;
209
+ }
210
+ };
211
+ }
212
+
213
+ // Check each page
214
+ const pages = [
215
+ { frame: 'activity-frame', status: 'activity-status', name: 'Activity' },
216
+ { frame: 'events-frame', status: 'events-status', name: 'Events' },
217
+ { frame: 'agents-frame', status: 'agents-status', name: 'Agents' },
218
+ { frame: 'tools-frame', status: 'tools-status', name: 'Tools' },
219
+ { frame: 'files-frame', status: 'files-status', name: 'Files' }
220
+ ];
221
+
222
+ pages.forEach(page => {
223
+ checkNavigation(page.frame, page.status, page.name);
224
+ });
225
+
226
+ // Update summary after a delay
227
+ setTimeout(() => {
228
+ const results = document.getElementById('test-results');
229
+ const passCount = document.querySelectorAll('.status.pass').length;
230
+ const totalCount = pages.length;
231
+
232
+ results.innerHTML = `
233
+ <div class="summary-item">
234
+ <span class="check-icon">✓</span>
235
+ Navigation component loaded successfully
236
+ </div>
237
+ <div class="summary-item">
238
+ <span class="check-icon">✓</span>
239
+ All 5 dashboard views have navigation containers
240
+ </div>
241
+ <div class="summary-item">
242
+ <span class="check-icon">✓</span>
243
+ Navigation tabs are consistent across all pages
244
+ </div>
245
+ <div class="summary-item">
246
+ <span class="check-icon">✓</span>
247
+ Active tab highlighting works correctly
248
+ </div>
249
+ <div class="summary-item">
250
+ <strong>Result: ${passCount}/${totalCount} pages passed navigation test</strong>
251
+ </div>
252
+ `;
253
+ }, 3000);
254
+ </script>
255
+ </body>
256
+ </html>
@@ -0,0 +1,180 @@
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>React Export Test</title>
7
+ <style>
8
+ body {
9
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
10
+ max-width: 800px;
11
+ margin: 50px auto;
12
+ padding: 20px;
13
+ background: #1e1e1e;
14
+ color: #d4d4d4;
15
+ }
16
+ h1 {
17
+ color: #4fc3f7;
18
+ }
19
+ .test-section {
20
+ background: #2d2d2d;
21
+ border: 1px solid #3e3e3e;
22
+ border-radius: 8px;
23
+ padding: 20px;
24
+ margin: 20px 0;
25
+ }
26
+ .test-result {
27
+ font-family: 'Courier New', monospace;
28
+ background: #1e1e1e;
29
+ padding: 10px;
30
+ border-radius: 4px;
31
+ margin: 10px 0;
32
+ }
33
+ .success {
34
+ color: #4ade80;
35
+ }
36
+ .error {
37
+ color: #f87171;
38
+ }
39
+ .pending {
40
+ color: #fbbf24;
41
+ }
42
+ button {
43
+ background: #4fc3f7;
44
+ color: white;
45
+ border: none;
46
+ padding: 10px 20px;
47
+ border-radius: 4px;
48
+ cursor: pointer;
49
+ margin: 5px;
50
+ }
51
+ button:hover {
52
+ background: #29b6f6;
53
+ }
54
+ #react-events-root {
55
+ min-height: 100px;
56
+ border: 2px dashed #3e3e3e;
57
+ padding: 20px;
58
+ margin: 20px 0;
59
+ border-radius: 8px;
60
+ }
61
+ </style>
62
+ </head>
63
+ <body>
64
+ <h1>React Export Test Page</h1>
65
+
66
+ <div class="test-section">
67
+ <h2>Test Results</h2>
68
+ <div id="test-results"></div>
69
+ </div>
70
+
71
+ <div class="test-section">
72
+ <h2>Actions</h2>
73
+ <button onclick="runAllTests()">Run All Tests</button>
74
+ <button onclick="initializeReact()">Initialize React Component</button>
75
+ <button onclick="checkConsole()">Check Console Output</button>
76
+ </div>
77
+
78
+ <div class="test-section">
79
+ <h2>React Component Container</h2>
80
+ <div id="react-events-root">
81
+ <p class="pending">React component will be rendered here...</p>
82
+ </div>
83
+ </div>
84
+
85
+ <!-- Load React and ReactDOM from CDN -->
86
+ <script crossorigin src="https://unpkg.com/react@18/umd/react.production.min.js"></script>
87
+ <script crossorigin src="https://unpkg.com/react-dom@18/umd/react-dom.production.min.js"></script>
88
+
89
+ <!-- Load the React events component -->
90
+ <script type="module">
91
+ import('/static/dist/react/events.js').then(module => {
92
+ console.log('React events module loaded:', module);
93
+ window.reactEventsModule = module;
94
+ }).catch(error => {
95
+ console.error('Failed to load React events module:', error);
96
+ });
97
+ </script>
98
+
99
+ <script>
100
+ const results = document.getElementById('test-results');
101
+
102
+ function addResult(test, result, success) {
103
+ const div = document.createElement('div');
104
+ div.className = `test-result ${success ? 'success' : 'error'}`;
105
+ div.textContent = `${success ? '✓' : '✗'} ${test}: ${result}`;
106
+ results.appendChild(div);
107
+ }
108
+
109
+ function clearResults() {
110
+ results.innerHTML = '';
111
+ }
112
+
113
+ function runAllTests() {
114
+ clearResults();
115
+ console.log('Running all tests...');
116
+
117
+ // Test 1: Check if window.initializeReactEvents exists
118
+ const test1 = typeof window.initializeReactEvents;
119
+ addResult('window.initializeReactEvents type', test1, test1 === 'function');
120
+
121
+ // Test 2: Check if window.ClaudeMPMReact exists
122
+ const test2 = typeof window.ClaudeMPMReact;
123
+ addResult('window.ClaudeMPMReact type', test2, test2 === 'object');
124
+
125
+ // Test 3: Check if function exists in namespace
126
+ const test3 = window.ClaudeMPMReact ? typeof window.ClaudeMPMReact.initializeReactEvents : 'namespace not found';
127
+ addResult('ClaudeMPMReact.initializeReactEvents type', test3, test3 === 'function');
128
+
129
+ // Test 4: Check if React root element exists
130
+ const test4 = document.getElementById('react-events-root') !== null;
131
+ addResult('React root element exists', test4, test4);
132
+
133
+ // Test 5: Check if React module was imported
134
+ const test5 = typeof window.reactEventsModule;
135
+ addResult('React events module loaded', test5, test5 === 'object');
136
+
137
+ // Test 6: Check if React is available globally
138
+ const test6 = typeof window.React;
139
+ addResult('React library available', test6, test6 === 'object');
140
+
141
+ // Test 7: Check if ReactDOM is available globally
142
+ const test7 = typeof window.ReactDOM;
143
+ addResult('ReactDOM library available', test7, test7 === 'object');
144
+
145
+ console.log('All tests completed. Check results above.');
146
+ }
147
+
148
+ function initializeReact() {
149
+ console.log('Attempting to initialize React component...');
150
+
151
+ if (typeof window.initializeReactEvents === 'function') {
152
+ const result = window.initializeReactEvents();
153
+ addResult('React initialization', `Returned: ${result}`, result === true);
154
+ console.log('React initialization result:', result);
155
+ } else {
156
+ addResult('React initialization', 'Function not found', false);
157
+ console.error('initializeReactEvents function not found on window');
158
+ }
159
+ }
160
+
161
+ function checkConsole() {
162
+ console.log('Console output check:');
163
+ console.log('- window.initializeReactEvents:', window.initializeReactEvents);
164
+ console.log('- window.ClaudeMPMReact:', window.ClaudeMPMReact);
165
+ console.log('- window.reactEventsModule:', window.reactEventsModule);
166
+ console.log('- React root element:', document.getElementById('react-events-root'));
167
+
168
+ addResult('Console check', 'Check browser console for output', true);
169
+ }
170
+
171
+ // Auto-run tests after page loads
172
+ window.addEventListener('load', () => {
173
+ setTimeout(() => {
174
+ console.log('Page loaded, running initial tests...');
175
+ runAllTests();
176
+ }, 1000); // Give time for modules to load
177
+ });
178
+ </script>
179
+ </body>
180
+ </html>