fix(dees-chart-log): replay buffered log entries when terminal becomes ready and sync logEntries updates to re-render filtered logs

This commit is contained in:
2026-02-21 18:06:42 +00:00
parent 68790a26ed
commit f124091784
3 changed files with 21 additions and 1 deletions

View File

@@ -445,6 +445,19 @@ export class DeesChartLog extends DeesElement {
this.rateInterval = setInterval(() => this.calculateRate(), 1000);
this.terminalReady = true;
// Replay any entries that arrived via updateLog()/addLog() before terminal was ready
for (const entry of this.logBuffer) {
this.writeLogEntry(entry);
}
}
public updated(changedProperties: Map<string, any>) {
super.updated(changedProperties);
if (changedProperties.has('logEntries') && this.terminalReady && this.logEntries.length > 0) {
this.logBuffer = [...this.logEntries];
this.reRenderFilteredLogs();
}
}
private getTerminalTheme() {