feat(web): display logs newest-first in web gateway UI (#369)

Reverse log display order so the most recent entries appear at the top,
removing the need to scroll to see latest activity.

Frontend: rename appendLogEntry to prependLogEntry, use prepend() for
DOM insertion, cap oldest entries from the bottom, and auto-scroll to
top. Backend: update recent_entries() doc comment to clarify the
oldest-first return order works correctly with the frontend's prepend.

Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
This commit is contained in:
Henry Park
2026-02-25 16:00:09 -08:00
committed by GitHub
co-authored by Claude Opus 4.6
parent db2ba424ce
commit 0c5f082d16
3 changed files with 19 additions and 9 deletions
+3
View File
@@ -90,6 +90,9 @@ impl LogBroadcaster {
}
/// Snapshot of recent entries for replaying to a new subscriber.
///
/// Returns entries oldest-first so that the frontend's `prepend()`
/// naturally places the newest entry at the top of the DOM.
pub fn recent_entries(&self) -> Vec<LogEntry> {
self.recent
.lock()