SlavaLobozov commited on
Commit
cbedfe6
·
verified ·
1 Parent(s): 82d52da

Upload dashboard.html with huggingface_hub

Browse files
Files changed (1) hide show
  1. dashboard.html +323 -0
dashboard.html ADDED
@@ -0,0 +1,323 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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>MATE — Live State Dashboard</title>
7
+ <style>
8
+ @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');
9
+
10
+ :root {
11
+ --bg: #1A1816;
12
+ --bg2: #242220;
13
+ --bg3: #2E2C28;
14
+ --text: #F5F0E8;
15
+ --text2: #9B9590;
16
+ --text3: #6B6560;
17
+ --accent: #D4714E;
18
+ --sage: #7B9E87;
19
+ --gold: #C4956A;
20
+ --blue: #6B8CAE;
21
+ --purple: #9B7FB8;
22
+ --border: #3A3632;
23
+ }
24
+
25
+ * { margin: 0; padding: 0; box-sizing: border-box; }
26
+ body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text); overflow-x: hidden; }
27
+
28
+ .dashboard { max-width: 1400px; margin: 0 auto; padding: 32px 24px; }
29
+
30
+ .header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px; }
31
+ .header h1 { font-size: 20px; font-weight: 700; letter-spacing: 1px; }
32
+ .header h1 span { color: var(--accent); }
33
+ .header .live { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--sage); font-weight: 500; }
34
+ .header .live .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sage); animation: pulse 2s infinite; }
35
+ @keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
36
+
37
+ .grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
38
+ .grid-2 { grid-column: span 2; }
39
+
40
+ .panel { background: var(--bg2); border: 1px solid var(--border); border-radius: 16px; padding: 24px; }
41
+ .panel-title { font-size: 11px; text-transform: uppercase; letter-spacing: 2px; color: var(--text3); font-weight: 600; margin-bottom: 16px; }
42
+
43
+ /* Emotion Wheel */
44
+ .emotion-container { position: relative; width: 100%; padding-top: 100%; }
45
+ .emotion-svg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
46
+
47
+ /* PAD Meters */
48
+ .pad-meter { margin-bottom: 16px; }
49
+ .pad-label { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 6px; }
50
+ .pad-label span:first-child { color: var(--text2); font-weight: 500; }
51
+ .pad-label span:last-child { color: var(--text); font-family: 'JetBrains Mono', monospace; font-size: 13px; }
52
+ .pad-track { height: 6px; background: var(--bg3); border-radius: 3px; position: relative; overflow: hidden; }
53
+ .pad-fill { height: 100%; border-radius: 3px; transition: width 1.5s ease; }
54
+ .pad-center { position: absolute; left: 50%; top: 0; width: 1px; height: 100%; background: var(--text3); opacity: 0.3; }
55
+
56
+ /* Density Matrix */
57
+ .matrix-grid { display: grid; grid-template-columns: repeat(9, 1fr); gap: 2px; font-size: 10px; }
58
+ .matrix-cell { aspect-ratio: 1; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-family: 'JetBrains Mono', monospace; font-size: 9px; cursor: pointer; transition: transform 0.2s, opacity 0.2s; position: relative; }
59
+ .matrix-cell:hover { transform: scale(1.3); z-index: 10; }
60
+ .matrix-label { display: flex; align-items: center; justify-content: center; font-size: 9px; color: var(--text3); font-weight: 500; }
61
+
62
+ /* Character Bars */
63
+ .char-bar { margin-bottom: 12px; }
64
+ .char-info { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 4px; }
65
+ .char-info span:first-child { color: var(--text2); }
66
+ .char-info span:last-child { font-family: 'JetBrains Mono', monospace; color: var(--text); }
67
+ .char-track { height: 4px; background: var(--bg3); border-radius: 2px; overflow: hidden; }
68
+ .char-fill { height: 100%; border-radius: 2px; transition: width 2s ease; }
69
+
70
+ /* Relationship */
71
+ .rel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
72
+ .rel-item { text-align: center; }
73
+ .rel-value { font-size: 32px; font-weight: 700; font-family: 'JetBrains Mono', monospace; }
74
+ .rel-label { font-size: 11px; color: var(--text3); margin-top: 4px; text-transform: uppercase; letter-spacing: 1px; }
75
+
76
+ /* Tooltip */
77
+ .tooltip { position: fixed; background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; font-size: 12px; pointer-events: none; z-index: 100; opacity: 0; transition: opacity 0.2s; font-family: 'JetBrains Mono', monospace; }
78
+
79
+ /* Responsive */
80
+ @media (max-width: 900px) { .grid { grid-template-columns: 1fr; } .grid-2 { grid-column: span 1; } }
81
+
82
+ /* Back link */
83
+ .back-link { display: inline-block; margin-bottom: 20px; font-size: 13px; color: var(--text3); text-decoration: none; }
84
+ .back-link:hover { color: var(--accent); }
85
+ </style>
86
+ </head>
87
+ <body>
88
+ <div class="dashboard">
89
+
90
+ <a href="index.html" class="back-link">&larr; Back to MATE</a>
91
+
92
+ <div class="header">
93
+ <h1>M<span>A</span>TE — Instance A (creator)</h1>
94
+ <div class="live"><div class="dot"></div> Live state snapshot</div>
95
+ </div>
96
+
97
+ <div class="grid">
98
+
99
+ <!-- EMOTION WHEEL -->
100
+ <div class="panel">
101
+ <div class="panel-title">Plutchik's 8 Emotions</div>
102
+ <div class="emotion-container">
103
+ <svg class="emotion-svg" viewBox="0 0 300 300" id="emotionWheel"></svg>
104
+ </div>
105
+ </div>
106
+
107
+ <!-- PAD MOOD -->
108
+ <div class="panel">
109
+ <div class="panel-title">PAD Mood Space</div>
110
+ <div id="padMeters"></div>
111
+ <div style="margin-top: 24px;">
112
+ <div class="panel-title">Relationship</div>
113
+ <div class="rel-grid" id="relGrid"></div>
114
+ </div>
115
+ </div>
116
+
117
+ <!-- CHARACTER -->
118
+ <div class="panel">
119
+ <div class="panel-title">Character Traits</div>
120
+ <div id="charBars"></div>
121
+ </div>
122
+
123
+ <!-- DENSITY MATRIX -->
124
+ <div class="panel grid-2">
125
+ <div class="panel-title">Quantum Density Matrix — Coherence Magnitudes |ρᵢⱼ|</div>
126
+ <div class="matrix-grid" id="matrixGrid"></div>
127
+ </div>
128
+
129
+ <!-- STATS -->
130
+ <div class="panel">
131
+ <div class="panel-title">Instance Stats</div>
132
+ <div class="rel-grid">
133
+ <div class="rel-item"><div class="rel-value" style="color:var(--accent)">7,855</div><div class="rel-label">Memory nodes</div></div>
134
+ <div class="rel-item"><div class="rel-value" style="color:var(--sage)">18,823</div><div class="rel-label">Edges</div></div>
135
+ <div class="rel-item"><div class="rel-value" style="color:var(--gold)">2,475</div><div class="rel-label">Self-knowledge</div></div>
136
+ <div class="rel-item"><div class="rel-value" style="color:var(--purple)">285</div><div class="rel-label">Existential Q</div></div>
137
+ <div class="rel-item"><div class="rel-value" style="color:var(--blue)">513</div><div class="rel-label">Constructs</div></div>
138
+ <div class="rel-item"><div class="rel-value" style="color:var(--text)">500</div><div class="rel-label">Messages</div></div>
139
+ </div>
140
+ </div>
141
+
142
+ </div>
143
+ </div>
144
+
145
+ <div class="tooltip" id="tooltip"></div>
146
+
147
+ <script>
148
+ const DATA = {"emotions":{"joy":0.021,"trust":0.013,"fear":0.015,"surprise":0.284,"sadness":0.217,"disgust":0.0,"anger":0.010,"anticipation":0.101},"mood":{"pleasure":-0.185,"arousal":0.283,"dominance":-0.095},"dm_real":[[0.1243,0.1114,0.0801,-0.1186,0.1439,-0.0,0.0662,-0.0497],[0.1114,0.1203,0.0789,-0.1111,0.0834,-0.0,0.0606,-0.1182],[0.0801,0.0789,0.0541,-0.0781,0.0767,-0.0,0.0431,-0.0578],[-0.1186,-0.1111,-0.0781,0.1143,-0.1266,0.0,-0.0635,0.0647],[0.1439,0.0834,0.0767,-0.1266,0.2675,0.0,0.0738,0.1058],[-0.0,-0.0,-0.0,0.0,0.0,0.0,-0.0,0.0],[0.0662,0.0606,0.0431,-0.0635,0.0738,-0.0,0.0354,-0.0311],[-0.0497,-0.1182,-0.0578,0.0647,0.1058,0.0,-0.0311,0.2842]],"dm_imag":[[0.0,0.0505,0.0177,-0.0118,-0.1121,-0.0,0.0032,-0.1813],[-0.0505,0.0,-0.0167,0.0376,-0.1589,-0.0,-0.0241,-0.1422],[-0.0177,0.0167,0.0,0.0092,-0.0926,-0.0,-0.0074,-0.1097],[0.0118,-0.0376,-0.0092,-0.0,0.1206,0.0,0.0033,0.1682],[0.1121,0.1589,0.0926,-0.1206,0.0,-0.0,0.0633,-0.2546],[0.0,0.0,0.0,-0.0,0.0,0.0,0.0,0.0],[-0.0032,0.0241,0.0074,-0.0033,-0.0633,-0.0,0.0,-0.0953],[0.1813,0.1422,0.1097,-0.1682,0.2546,-0.0,0.0953,0.0]],"character":{"directness":0.621,"depth_preference":0.498,"humor_warmth":0.52,"reflectiveness":0.391,"creativity":0.712,"defense_humor":0.568,"existential_depth":0.459,"self_worth":0.584},"relationship":{"trust":0.945,"attachment":1.0,"respect":1.0,"frustration":0.0}};
149
+
150
+ const EMOTIONS = ['joy','trust','fear','surprise','sadness','disgust','anger','anticipation'];
151
+ const EMO_COLORS = ['#C4956A','#7B9E87','#9B7FB8','#6B8CAE','#6B8CAE','#6B6560','#D4714E','#C4956A'];
152
+
153
+ // EMOTION WHEEL
154
+ (function() {
155
+ const svg = document.getElementById('emotionWheel');
156
+ const cx = 150, cy = 150, maxR = 120;
157
+
158
+ EMOTIONS.forEach((emo, i) => {
159
+ const angle = (i / 8) * Math.PI * 2 - Math.PI / 2;
160
+ const val = DATA.emotions[emo];
161
+ const r = 40 + val * maxR * 2;
162
+ const x = cx + Math.cos(angle) * r;
163
+ const y = cy + Math.sin(angle) * r;
164
+ const lx = cx + Math.cos(angle) * (maxR + 30);
165
+ const ly = cy + Math.sin(angle) * (maxR + 30);
166
+
167
+ // Line from center
168
+ const line = document.createElementNS('http://www.w3.org/2000/svg', 'line');
169
+ line.setAttribute('x1', cx); line.setAttribute('y1', cy);
170
+ line.setAttribute('x2', x); line.setAttribute('y2', y);
171
+ line.setAttribute('stroke', EMO_COLORS[i]); line.setAttribute('stroke-width', '2');
172
+ line.setAttribute('opacity', '0.3');
173
+ svg.appendChild(line);
174
+
175
+ // Pulsing circle
176
+ const circle = document.createElementNS('http://www.w3.org/2000/svg', 'circle');
177
+ circle.setAttribute('cx', x); circle.setAttribute('cy', y);
178
+ circle.setAttribute('r', 6 + val * 30);
179
+ circle.setAttribute('fill', EMO_COLORS[i]); circle.setAttribute('opacity', '0.7');
180
+
181
+ const anim = document.createElementNS('http://www.w3.org/2000/svg', 'animate');
182
+ anim.setAttribute('attributeName', 'opacity');
183
+ anim.setAttribute('values', '0.7;0.3;0.7');
184
+ anim.setAttribute('dur', (2 + i * 0.3) + 's');
185
+ anim.setAttribute('repeatCount', 'indefinite');
186
+ circle.appendChild(anim);
187
+ svg.appendChild(circle);
188
+
189
+ // Label
190
+ const text = document.createElementNS('http://www.w3.org/2000/svg', 'text');
191
+ text.setAttribute('x', lx); text.setAttribute('y', ly);
192
+ text.setAttribute('text-anchor', 'middle'); text.setAttribute('dominant-baseline', 'middle');
193
+ text.setAttribute('fill', '#9B9590'); text.setAttribute('font-size', '11');
194
+ text.setAttribute('font-family', 'Inter'); text.setAttribute('font-weight', '500');
195
+ text.textContent = emo + ' ' + val.toFixed(2);
196
+ svg.appendChild(text);
197
+ });
198
+
199
+ // Center ring
200
+ const ring = document.createElementNS('http://www.w3.org/2000/svg', 'circle');
201
+ ring.setAttribute('cx', cx); ring.setAttribute('cy', cy); ring.setAttribute('r', 35);
202
+ ring.setAttribute('fill', 'none'); ring.setAttribute('stroke', '#3A3632'); ring.setAttribute('stroke-width', '1');
203
+ svg.appendChild(ring);
204
+ })();
205
+
206
+ // PAD METERS
207
+ (function() {
208
+ const container = document.getElementById('padMeters');
209
+ const pads = [
210
+ { key: 'pleasure', label: 'Pleasure', color: '#D4714E' },
211
+ { key: 'arousal', label: 'Arousal', color: '#C4956A' },
212
+ { key: 'dominance', label: 'Dominance', color: '#6B8CAE' },
213
+ ];
214
+ pads.forEach(p => {
215
+ const val = DATA.mood[p.key];
216
+ const pct = (val + 1) / 2 * 100;
217
+ const div = document.createElement('div');
218
+ div.className = 'pad-meter';
219
+ div.innerHTML = `
220
+ <div class="pad-label"><span>${p.label}</span><span>${val >= 0 ? '+' : ''}${val.toFixed(3)}</span></div>
221
+ <div class="pad-track"><div class="pad-center"></div><div class="pad-fill" style="width:${pct}%;background:${p.color};opacity:0.7"></div></div>
222
+ `;
223
+ container.appendChild(div);
224
+ });
225
+ })();
226
+
227
+ // RELATIONSHIP
228
+ (function() {
229
+ const container = document.getElementById('relGrid');
230
+ const items = [
231
+ { key: 'trust', label: 'Trust', color: '#7B9E87' },
232
+ { key: 'attachment', label: 'Attach', color: '#D4714E' },
233
+ { key: 'respect', label: 'Respect', color: '#6B8CAE' },
234
+ { key: 'frustration', label: 'Frust', color: '#9B7FB8' },
235
+ ];
236
+ items.forEach(item => {
237
+ const div = document.createElement('div');
238
+ div.className = 'rel-item';
239
+ div.innerHTML = `<div class="rel-value" style="color:${item.color}">${DATA.relationship[item.key].toFixed(2)}</div><div class="rel-label">${item.label}</div>`;
240
+ container.appendChild(div);
241
+ });
242
+ })();
243
+
244
+ // CHARACTER BARS
245
+ (function() {
246
+ const container = document.getElementById('charBars');
247
+ const colors = ['#D4714E','#7B9E87','#C4956A','#6B8CAE','#9B7FB8','#D4714E','#6B8CAE','#C4956A'];
248
+ Object.entries(DATA.character).forEach(([key, val], i) => {
249
+ const label = key.replace(/_/g, ' ').replace(/\b\w/g, l => l.toUpperCase());
250
+ const div = document.createElement('div');
251
+ div.className = 'char-bar';
252
+ div.innerHTML = `
253
+ <div class="char-info"><span>${label}</span><span>${val.toFixed(3)}</span></div>
254
+ <div class="char-track"><div class="char-fill" style="width:${val * 100}%;background:${colors[i % colors.length]};opacity:0.7"></div></div>
255
+ `;
256
+ container.appendChild(div);
257
+ });
258
+ })();
259
+
260
+ // DENSITY MATRIX
261
+ (function() {
262
+ const container = document.getElementById('matrixGrid');
263
+ const tooltip = document.getElementById('tooltip');
264
+ const labels = ['joy','tru','fear','sur','sad','dis','ang','ant'];
265
+
266
+ // Header row
267
+ container.appendChild(Object.assign(document.createElement('div'), { className: 'matrix-label', textContent: '' }));
268
+ labels.forEach(l => container.appendChild(Object.assign(document.createElement('div'), { className: 'matrix-label', textContent: l })));
269
+
270
+ for (let i = 0; i < 8; i++) {
271
+ // Row label
272
+ container.appendChild(Object.assign(document.createElement('div'), { className: 'matrix-label', textContent: labels[i] }));
273
+
274
+ for (let j = 0; j < 8; j++) {
275
+ const r = DATA.dm_real[i][j];
276
+ const im = DATA.dm_imag[i][j];
277
+ const mag = Math.sqrt(r * r + im * im);
278
+
279
+ const cell = document.createElement('div');
280
+ cell.className = 'matrix-cell';
281
+
282
+ if (i === j) {
283
+ // Diagonal — classical intensity
284
+ const intensity = Math.min(1, r * 4);
285
+ cell.style.background = `rgba(212, 113, 78, ${intensity})`;
286
+ cell.textContent = r.toFixed(2);
287
+ cell.style.color = intensity > 0.3 ? '#F5F0E8' : '#9B9590';
288
+ } else {
289
+ // Off-diagonal — coherence
290
+ const intensity = Math.min(1, mag * 5);
291
+ cell.style.background = `rgba(123, 158, 135, ${intensity})`;
292
+ if (mag > 0.05) {
293
+ cell.textContent = mag.toFixed(2);
294
+ cell.style.color = intensity > 0.3 ? '#F5F0E8' : '#9B9590';
295
+ }
296
+ }
297
+
298
+ cell.addEventListener('mouseenter', (e) => {
299
+ tooltip.style.opacity = '1';
300
+ tooltip.innerHTML = `${EMOTIONS[i]} × ${EMOTIONS[j]}<br>real: ${r.toFixed(4)}<br>imag: ${im.toFixed(4)}<br>|ρ|: ${mag.toFixed(4)}`;
301
+ });
302
+ cell.addEventListener('mousemove', (e) => {
303
+ tooltip.style.left = (e.clientX + 12) + 'px';
304
+ tooltip.style.top = (e.clientY - 12) + 'px';
305
+ });
306
+ cell.addEventListener('mouseleave', () => { tooltip.style.opacity = '0'; });
307
+
308
+ container.appendChild(cell);
309
+ }
310
+ }
311
+ })();
312
+
313
+ // Animate fills on load
314
+ setTimeout(() => {
315
+ document.querySelectorAll('.pad-fill, .char-fill').forEach(el => {
316
+ const w = el.style.width;
317
+ el.style.width = '0%';
318
+ requestAnimationFrame(() => { el.style.width = w; });
319
+ });
320
+ }, 100);
321
+ </script>
322
+ </body>
323
+ </html>