diff --git a/network-poc/static/index.html b/network-poc/static/index.html
index f4b8a1a..e6d2cf2 100644
--- a/network-poc/static/index.html
+++ b/network-poc/static/index.html
@@ -1691,6 +1691,9 @@
const hubLabel = document.getElementById('agent-hub-label');
const hubStatus = document.getElementById('agent-hub-status');
if (hubDot) hubDot.style.background = '#3fb950';
+ // Poistetaan reconnect-rivi
+ const reconnLine = document.getElementById('agent-terminal')?.querySelector('.term-reconnect');
+ if (reconnLine) reconnLine.remove();
if (hubLabel) { hubLabel.textContent = 'Yhdistetty'; hubLabel.style.color = '#3fb950'; }
if (hubStatus) hubStatus.title = 'Yhdistetty Kipinä Hubiin — tehtävien jakelu ja solmujen koordinointi aktiivinen';
@@ -1758,9 +1761,22 @@
}
// Automaattinen reconnect 3s kuluttua
if (!wsReconnectTimer) {
+ // Päivitetään samaa riviä eikä floodata uusia
+ let reconnLine = termPanel?.querySelector('.term-reconnect');
+ let reconnCount = 0;
+ if (!reconnLine) {
+ reconnLine = document.createElement('div');
+ reconnLine.className = 'terminal-line term-reconnect';
+ termPanel?.appendChild(reconnLine);
+ } else {
+ reconnCount = parseInt(reconnLine.dataset.count || '0');
+ }
wsReconnectTimer = setTimeout(() => {
wsReconnectTimer = null;
- termLog(' ↻ Yhdistetään uudelleen...');
+ reconnCount++;
+ reconnLine.dataset.count = reconnCount;
+ reconnLine.innerHTML = ` ↻ Yhdistetään uudelleen...${reconnCount > 1 ? ' (' + reconnCount + ')' : ''}`;
+ termPanel.scrollTop = termPanel.scrollHeight;
connectHub();
}, 3000);
}