mirror of
https://github.com/outbackdingo/optimclaw.git
synced 2026-09-01 09:09:19 +00:00
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:
co-authored by
Claude Opus 4.6
parent
db2ba424ce
commit
0c5f082d16
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user