fix-6: raise ring display cap to 5000 (viewer + Entries clamp); viewer default limit 1000

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017CDMFpFx84pfviCTVuGGhf
This commit is contained in:
2026-07-12 10:21:34 +02:00
parent e030b8d9a9
commit 40498254c6
3 changed files with 8 additions and 3 deletions
+5 -1
View File
@@ -79,8 +79,12 @@ func (lb *LogBuffer) Entries(minLevel string, limit int, after time.Time) ([]Log
total = lb.pos
}
if limit <= 0 || limit > 1000 {
// fix-6: clamp to the ring's own capacity, not a hardcoded 1000 — a larger ring is useless if the
// viewer can never request more than 1000 of it. A missing/invalid limit still defaults to 200.
if limit <= 0 {
limit = 200
} else if limit > lb.size {
limit = lb.size
}
levelOrder := levelPriority(minLevel)