Anchor log viewer scroll to visible content and add 1m/2m timeline presets
The log table no longer jumps when a sliding window prunes rows from the front: scroll position now tracks the same visible row instead of holding scrollTop constant in pixels. Also adds 1m/2m to the timeline quick-range presets. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XFUNZwCvz3kcod3352ZR2o
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
070e835fa4
commit
ae4e550c1f
@@ -9,10 +9,12 @@ export interface TimeRange {
|
||||
}
|
||||
|
||||
// `'all'` clears the range (the implicit default); the rest resolve to a window ending "now" at the moment they're (re-)computed — see `computePresetRange`.
|
||||
export type TimeRangePresetId = 'all' | '5m' | '15m' | '1h' | '24h'
|
||||
export type TimeRangePresetId = 'all' | '1m' | '2m' | '5m' | '15m' | '1h' | '24h'
|
||||
|
||||
export const TIME_RANGE_PRESETS: { id: TimeRangePresetId; label: string; ms: number | null }[] = [
|
||||
{ id: 'all', label: 'All', ms: null },
|
||||
{ id: '1m', label: '1m', ms: 60 * 1000 },
|
||||
{ id: '2m', label: '2m', ms: 2 * 60 * 1000 },
|
||||
{ id: '5m', label: '5m', ms: 5 * 60 * 1000 },
|
||||
{ id: '15m', label: '15m', ms: 15 * 60 * 1000 },
|
||||
{ id: '1h', label: '1h', ms: 60 * 60 * 1000 },
|
||||
|
||||
Reference in New Issue
Block a user