Skip to content

feat: auto-refresh via Stimulus for dashboard, jobs, processes, and history#24

Merged
eclectic-coding merged 2 commits into
mainfrom
feat/auto-refresh
May 26, 2026
Merged

feat: auto-refresh via Stimulus for dashboard, jobs, processes, and history#24
eclectic-coding merged 2 commits into
mainfrom
feat/auto-refresh

Conversation

@eclectic-coding
Copy link
Copy Markdown
Owner

Summary

  • Adds RefreshController — a Stimulus controller that polls the current URL on a configurable interval, swapping the turbo-frame content via fetch + DOMParser; pauses when the tab is hidden or any checkbox is checked; resumes immediately on tab focus
  • Wraps four views in turbo frames with refresh wired up:
    • Dashboard (sqw-dashboard) — uses dashboard_refresh_interval (default 5 s)
    • Jobs index (sqw-jobs-filter) — converts existing raw <turbo-frame> to helper; uses default_refresh_interval (default 10 s)
    • Processes (sqw-processes) — uses default_refresh_interval
    • History (sqw-history-table) — uses default_refresh_interval
  • Adds three new config attributes: dashboard_refresh_interval, default_refresh_interval, search_results_limit (reserved for a future search feature)

Configuration

SolidStackWeb.configure do |config|
  config.dashboard_refresh_interval = 5_000   # ms (default: 5000)
  config.default_refresh_interval   = 10_000  # ms (default: 10000)
  config.search_results_limit       = 25      # (default: 25)
end

Test plan

  • Dashboard stats update automatically without full page reload
  • Jobs table refreshes; refresh pauses when a checkbox is checked
  • Processes list refreshes
  • History table refreshes
  • Switching browser tabs pauses refresh; returning resumes it
  • Full suite: bundle exec rake

🤖 Generated with Claude Code

eclectic-coding and others added 2 commits May 26, 2026 08:20
Adds a RefreshController that polls on a configurable interval using
fetch + DOMParser to swap turbo-frame content without a full page reload.
Pauses when the tab is hidden or any checkbox is checked (preserves
selection state). Resumes immediately on tab focus.

Frames added:
- sqw-dashboard (dashboard_refresh_interval, default 5s)
- sqw-jobs-filter (default_refresh_interval, default 10s)
- sqw-processes (default_refresh_interval)
- sqw-history-table (default_refresh_interval)

Configuration additions: dashboard_refresh_interval, default_refresh_interval,
search_results_limit (for future search feature, default 25).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@eclectic-coding eclectic-coding merged commit 805d2f9 into main May 26, 2026
1 of 5 checks passed
@eclectic-coding eclectic-coding deleted the feat/auto-refresh branch May 26, 2026 12:23
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