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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user