The Insights tab ignored the time-range picker in the upper right: clicking "15 minutes" still showed findings from the analyzer's fixed background window (WindowDays, e.g. 7 days), because /api/insights always returned the cached background result regardless of what range the UI requested.
internal/insights/analyzer.go: split Refresh()'s logic into a shared analyze(from, to) core, and add a public AnalyzeRange(from, to) that runs the detectors on demand for an arbitrary window without disturbing the cached background result used by Latest() and the Stop-hook/surfacing path.
internal/web/insights.go: handleInsights now honors optional from/to query params, calling AnalyzeRange for that window instead of Latest() when present.
internal/web/static/app.js: loadInsights() sends the current state.rangeMicros as from/to, and the window label now renders minutes/hours/days appropriately (windowLabel()) instead of always rounding up to whole days, so a 15-minute selection reads as "15 minutes" rather than "1 day".
The Insights tab ignored the time-range picker in the upper right: clicking "15 minutes" still showed findings from the analyzer's fixed background window (WindowDays, e.g. 7 days), because `/api/insights` always returned the cached background result regardless of what range the UI requested.
- `internal/insights/analyzer.go`: split `Refresh()`'s logic into a shared `analyze(from, to)` core, and add a public `AnalyzeRange(from, to)` that runs the detectors on demand for an arbitrary window without disturbing the cached background result used by `Latest()` and the Stop-hook/surfacing path.
- `internal/web/insights.go`: `handleInsights` now honors optional `from`/`to` query params, calling `AnalyzeRange` for that window instead of `Latest()` when present.
- `internal/web/static/app.js`: `loadInsights()` sends the current `state.rangeMicros` as `from`/`to`, and the window label now renders minutes/hours/days appropriately (`windowLabel()`) instead of always rounding up to whole days, so a 15-minute selection reads as "15 minutes" rather than "1 day".
The Insights tab ignored the time-range picker in the upper right: clicking
'15 minutes' still showed findings from the analyzer's fixed background
window (WindowDays, e.g. 7 days), because /api/insights always returned the
cached background result regardless of what range the UI requested.
- internal/insights/analyzer.go: split Refresh()'s logic into a shared
analyze(from, to) core, and add a public AnalyzeRange(from, to) that runs
the detectors on demand for an arbitrary window without disturbing the
cached background result used by Latest() and the Stop-hook/surfacing
path.
- internal/web/insights.go: handleInsights now honors optional from/to query
params, calling AnalyzeRange for that window instead of Latest() when
present.
- internal/web/static/app.js: loadInsights() sends the current
state.rangeMicros as from/to, and the window label now renders
minutes/hours/days appropriately (windowLabel()) instead of always
rounding up to whole days, so a 15-minute selection reads as '15 minutes'
rather than '1 day'.
Merged manually via fast-forward (git merge --ff-only) and pushed directly to main at 47fbe58, so Gitea did not flag this as merged automatically. Closing — the change is on main.
Merged manually via fast-forward (`git merge --ff-only`) and pushed directly to `main` at 47fbe58, so Gitea did not flag this as merged automatically. Closing — the change is on main.
Pull request closed
This pull request cannot be reopened because the branch was deleted.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
The Insights tab ignored the time-range picker in the upper right: clicking "15 minutes" still showed findings from the analyzer's fixed background window (WindowDays, e.g. 7 days), because
/api/insightsalways returned the cached background result regardless of what range the UI requested.internal/insights/analyzer.go: splitRefresh()'s logic into a sharedanalyze(from, to)core, and add a publicAnalyzeRange(from, to)that runs the detectors on demand for an arbitrary window without disturbing the cached background result used byLatest()and the Stop-hook/surfacing path.internal/web/insights.go:handleInsightsnow honors optionalfrom/toquery params, callingAnalyzeRangefor that window instead ofLatest()when present.internal/web/static/app.js:loadInsights()sends the currentstate.rangeMicrosasfrom/to, and the window label now renders minutes/hours/days appropriately (windowLabel()) instead of always rounding up to whole days, so a 15-minute selection reads as "15 minutes" rather than "1 day".Merged manually via fast-forward (
git merge --ff-only) and pushed directly tomainat47fbe58, so Gitea did not flag this as merged automatically. Closing — the change is on main.Pull request closed