codedash-app 3.1.0 → 3.1.1
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.
- package/package.json +1 -1
- package/src/frontend/app.js +19 -8
- package/src/frontend/styles.css +6 -0
package/package.json
CHANGED
package/src/frontend/app.js
CHANGED
|
@@ -726,7 +726,7 @@ function render() {
|
|
|
726
726
|
}
|
|
727
727
|
|
|
728
728
|
if (currentView === 'running') {
|
|
729
|
-
renderRunning(content);
|
|
729
|
+
renderRunning(content, sessions);
|
|
730
730
|
return;
|
|
731
731
|
}
|
|
732
732
|
|
|
@@ -1440,7 +1440,7 @@ document.addEventListener('keydown', function(e) {
|
|
|
1440
1440
|
|
|
1441
1441
|
// ── Running Sessions View ──────────────────────────────────────
|
|
1442
1442
|
|
|
1443
|
-
function renderRunning(container) {
|
|
1443
|
+
function renderRunning(container, sessions) {
|
|
1444
1444
|
var activeIds = Object.keys(activeSessions);
|
|
1445
1445
|
|
|
1446
1446
|
if (activeIds.length === 0) {
|
|
@@ -1448,8 +1448,10 @@ function renderRunning(container) {
|
|
|
1448
1448
|
return;
|
|
1449
1449
|
}
|
|
1450
1450
|
|
|
1451
|
+
// Running cards at top
|
|
1451
1452
|
var html = '<div class="running-container">';
|
|
1452
|
-
html += '<h2 class="heatmap-title">Running Sessions</h2>';
|
|
1453
|
+
html += '<h2 class="heatmap-title">Running Sessions (' + activeIds.length + ')</h2>';
|
|
1454
|
+
html += '<div class="running-grid">';
|
|
1453
1455
|
|
|
1454
1456
|
activeIds.forEach(function(sid) {
|
|
1455
1457
|
var a = activeSessions[sid];
|
|
@@ -1466,7 +1468,6 @@ function renderRunning(container) {
|
|
|
1466
1468
|
html += '<span class="running-tool">' + escHtml(a.entrypoint || a.kind || 'claude') + '</span>';
|
|
1467
1469
|
html += '</div>';
|
|
1468
1470
|
|
|
1469
|
-
// Stats row
|
|
1470
1471
|
html += '<div class="running-stats">';
|
|
1471
1472
|
html += '<div class="running-stat"><span class="running-stat-val">' + a.cpu.toFixed(1) + '%</span><span class="running-stat-label">CPU</span></div>';
|
|
1472
1473
|
html += '<div class="running-stat"><span class="running-stat-val">' + a.memoryMB + 'MB</span><span class="running-stat-label">Memory</span></div>';
|
|
@@ -1476,22 +1477,32 @@ function renderRunning(container) {
|
|
|
1476
1477
|
}
|
|
1477
1478
|
html += '</div>';
|
|
1478
1479
|
|
|
1479
|
-
// Message preview
|
|
1480
1480
|
if (s && s.first_message) {
|
|
1481
1481
|
html += '<div class="running-msg">' + escHtml(s.first_message.slice(0, 150)) + '</div>';
|
|
1482
1482
|
}
|
|
1483
1483
|
|
|
1484
|
-
// Action buttons
|
|
1485
1484
|
html += '<div class="running-actions">';
|
|
1486
|
-
html += '<button class="launch-btn" style="background:var(--accent-green);color:#000" onclick="focusSession(\'' + sid + '\')">Focus
|
|
1485
|
+
html += '<button class="launch-btn" style="background:var(--accent-green);color:#000" onclick="focusSession(\'' + sid + '\')">Focus</button>';
|
|
1487
1486
|
if (s) {
|
|
1488
1487
|
html += '<button class="launch-btn btn-secondary" onclick="var ss=allSessions.find(function(x){return x.id===\'' + sid + '\'});if(ss)openDetail(ss);">Details</button>';
|
|
1488
|
+
html += '<button class="launch-btn btn-secondary" onclick="closeDetail();openReplay(\'' + sid + '\',\'' + escHtml((s.project || '').replace(/'/g, "\\'")) + '\')">Replay</button>';
|
|
1489
1489
|
}
|
|
1490
1490
|
html += '</div>';
|
|
1491
|
-
|
|
1492
1491
|
html += '</div>';
|
|
1493
1492
|
});
|
|
1494
1493
|
|
|
1494
|
+
html += '</div>';
|
|
1495
|
+
|
|
1496
|
+
// Also show recent non-active sessions below
|
|
1497
|
+
var recentInactive = sessions.filter(function(s) { return !activeSessions[s.id]; }).slice(0, 6);
|
|
1498
|
+
if (recentInactive.length > 0) {
|
|
1499
|
+
html += '<h3 style="margin:24px 0 12px;font-size:14px;color:var(--text-secondary)">Recently Inactive</h3>';
|
|
1500
|
+
html += '<div class="grid-view">';
|
|
1501
|
+
var idx = 0;
|
|
1502
|
+
recentInactive.forEach(function(s) { html += renderCard(s, idx++); });
|
|
1503
|
+
html += '</div>';
|
|
1504
|
+
}
|
|
1505
|
+
|
|
1495
1506
|
html += '</div>';
|
|
1496
1507
|
container.innerHTML = html;
|
|
1497
1508
|
}
|
package/src/frontend/styles.css
CHANGED
|
@@ -1586,6 +1586,12 @@ body {
|
|
|
1586
1586
|
|
|
1587
1587
|
.running-container { padding: 20px; }
|
|
1588
1588
|
|
|
1589
|
+
.running-grid {
|
|
1590
|
+
display: grid;
|
|
1591
|
+
grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
|
|
1592
|
+
gap: 12px;
|
|
1593
|
+
}
|
|
1594
|
+
|
|
1589
1595
|
.running-card {
|
|
1590
1596
|
background: var(--bg-card);
|
|
1591
1597
|
border: 1px solid var(--border);
|