feat(gui): Logs-feed time-range picker (#554) #609

Merged
p13marc merged 1 commit from logs/554-time-range-picker into master 2026-07-24 08:01:07 +00:00
p13marc commented 2026-07-24 07:56:06 +00:00 (Migrated from github.com)

Why

Completes the Logs-feed filter surface: until now the only time bound was the
live-tail pause point (an upper bound). This adds a relative time-range
picker
so operators can scope the feed — and the export — to a window.

What

A pick-list in the filter panel (All time / Last 15 min / hour / 6h / 24h /
7d
). Selecting a window resolves to an absolute from bound against now and
drives two paths:

  • Events queryquery_log_events now pushes from=/to= selectors, so
    the sensor answers from its durable store server-side (#544/#553) instead
    of only what the client already buffered. This is what turns the picker into
    real history depth, not just a client-side crop.
  • Filtered exportLogBundle.from carries the range lower bound (the
    live-tail pause point stays the upper bound), so #608's export honours it too.

The picker stores only the relative selection in SyslogFilterState
(time_range); the update handler resolves it to range_from via now_ms(),
keeping the view a pure function of state. has_active_filters / clear account
for the new field.

Verification

  • cargo clippy -p zensight --all-targets -D warnings clean; cargo fmt --check clean.
  • cargo test -p zensight — 461 lib + 152 ui pass. New: time_range_resolves_from_bound
    (resolution + bundle mapping) and test_logs_time_range_picker_renders.
  • Confirmed the sensor parses from=/to= and routes them to the durable store
    (zensight-sensor-logs/src/query.rs).

Best exercised against the just run demo, whose durable store is enabled (#606).

🤖 Generated with Claude Code

## Why Completes the Logs-feed filter surface: until now the only time bound was the live-tail pause point (an upper bound). This adds a **relative time-range picker** so operators can scope the feed — and the export — to a window. ## What A pick-list in the filter panel (**All time / Last 15 min / hour / 6h / 24h / 7d**). Selecting a window resolves to an absolute `from` bound against *now* and drives two paths: - **Events query** — `query_log_events` now pushes `from=`/`to=` selectors, so the sensor answers from its **durable store server-side** (#544/#553) instead of only what the client already buffered. This is what turns the picker into real *history depth*, not just a client-side crop. - **Filtered export** — `LogBundle.from` carries the range lower bound (the live-tail pause point stays the upper bound), so #608's export honours it too. The picker stores only the relative *selection* in `SyslogFilterState` (`time_range`); the update handler resolves it to `range_from` via `now_ms()`, keeping the view a pure function of state. `has_active_filters` / `clear` account for the new field. ## Verification - `cargo clippy -p zensight --all-targets -D warnings` clean; `cargo fmt --check` clean. - `cargo test -p zensight` — 461 lib + 152 ui pass. New: `time_range_resolves_from_bound` (resolution + bundle mapping) and `test_logs_time_range_picker_renders`. - Confirmed the sensor parses `from=`/`to=` and routes them to the durable store (`zensight-sensor-logs/src/query.rs`). Best exercised against the `just run` demo, whose durable store is enabled (#606). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
marcpardo/zensight!609
No description provided.