Fix UI auto-scroll, make namespace optional, alias filePath, and downgrade ws logs

This commit is contained in:
Riz Ashraf committed 2026-09-25 21:38:21 +01:00
1 parent 175882dd1b
commit 4ecda68c1e
4 files changed
+15 -5

No files matched your search

+11 -1
View File
@@ -549,6 +549,9 @@
// Resize graph when becoming visible again
network.redraw();
network.fit();
} else if (tabId === 'activity-tab') {
const feed = document.getElementById('activity-feed');
feed.scrollTop = feed.scrollHeight;
}
}
@@ -929,14 +932,21 @@
try {
const data = JSON.parse(event.data);
if (data.type === 'activity') {
// Check scroll state before appending
const isScrolledToBottom = feed.scrollHeight - feed.clientHeight <= feed.scrollTop + 20;
const div = document.createElement('div');
div.className = 'feed-entry';
const timeStr = new Date(data.data.time).toLocaleTimeString([], {hour: '2-digit', minute:'2-digit', second:'2-digit'});
div.innerHTML = `<span class="time">[${timeStr}]</span> ${data.data.message || data.data.data || data.data}`;
feed.appendChild(div);
// Enforce max history
while (feed.children.length > MAX_ACTIVITY_HISTORY) {
feed.removeChild(feed.firstChild);
}
// Auto-scroll logic
const isScrolledToBottom = feed.scrollHeight - feed.clientHeight <= feed.scrollTop + 20;
if (isScrolledToBottom) {
feed.scrollTop = feed.scrollHeight;
}