Skip to content

Add auto-reload option for the log list - #538

Open
YazidKHALDI wants to merge 2 commits into
opcodesio:mainfrom
YazidKHALDI:feature/auto-reload-logs
Open

YazidKHALDI wants to merge 2 commits into
opcodesio:mainfrom
YazidKHALDI:feature/auto-reload-logs

Conversation

@YazidKHALDI

Copy link
Copy Markdown

Adds an optional auto-reload to the log list, with a small dropdown next to the existing "Reload current results" button.

log-viewer-1

What it does

  • Interval dropdown: Off (default), 5s, 10s, 30s, 1m, 5m, 15m. The choice is saved in localStorage and follows the existing use_local_storage setting.
  • Silent reloads: auto-reloads use loadLogs({ silently: true }), so there's no loading overlay and the scroll position is kept.
  • Visible activity:
    • the reload icon spins during any reload (for at least one rotation, so quick reloads are still noticeable);
    • a thin ring around the reload button counts down to the next auto-reload;
    • new entries briefly highlight and fade out. Entries are matched across reloads by file_identifier + index, which stays the same for existing entries when lines are appended.
  • Skipped reloads: a tick is skipped while the tab is hidden or a request or scan is still running. Auto-reload pauses while a log entry is expanded (the ring dims), since new rows would shift the open entry. A manual reload restarts the countdown.

Notes

  • Off by default, so nothing changes for existing users until they pick an interval.
  • Frontend only, no backend changes. The production assets are rebuilt.
  • Like the existing reload button, the controls are shown from the md breakpoint up.
  • The store gets a reloading flag that is also set during silent reloads. It's only cleared by the latest request, so a request that a newer one aborted can't clear it early.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant