From 885621c7d0382f468d1a11a6408860afba37c6ef Mon Sep 17 00:00:00 2001 From: Kyriakos Akriotis Date: Fri, 16 Oct 2026 23:35:07 +0200 Subject: [PATCH 1/2] moved genid and pause toggle in seterror #157 --- internal/ui/app.go | 8 -------- internal/ui/helpers.go | 4 ++++ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/internal/ui/app.go b/internal/ui/app.go index e3c35f0..23ffbe2 100644 --- a/internal/ui/app.go +++ b/internal/ui/app.go @@ -218,10 +218,6 @@ func (m *Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { return m, nil } - m.autoRefreshPaused = true - m.autoRefreshGeneration++ - m.autoRefreshScheduled = false - m.loading = false m.showLoading = false m.loadingLabel = "" @@ -232,10 +228,6 @@ func (m *Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { return m, nil case resource.ErrorMsg: - m.autoRefreshPaused = true - m.autoRefreshGeneration++ - m.autoRefreshScheduled = false - m.loading = false m.showLoading = false m.loadingLabel = "" diff --git a/internal/ui/helpers.go b/internal/ui/helpers.go index f591aea..d9622ec 100644 --- a/internal/ui/helpers.go +++ b/internal/ui/helpers.go @@ -132,6 +132,10 @@ func (m *Model) setError(err error) { return } + m.autoRefreshPaused = true + m.autoRefreshGeneration++ + m.autoRefreshScheduled = false + m.resizeErrorViewport() } From 6e3dc2e872e6b68d60abd4b42fe3345f48707ac0 Mon Sep 17 00:00:00 2001 From: Kyriakos Akriotis Date: Sat, 17 Oct 2026 00:11:20 +0200 Subject: [PATCH 2/2] reenable autorefresh if tableviewport or previous view had rows #157 --- internal/ui/app.go | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/internal/ui/app.go b/internal/ui/app.go index 23ffbe2..cb59350 100644 --- a/internal/ui/app.go +++ b/internal/ui/app.go @@ -184,15 +184,18 @@ func (m *Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { switch msg.String() { case "esc", "enter": m.setError(nil) - m.autoRefreshPaused = false - - cmd := m.scheduleAutoRefresh() if len(m.navigation) > 0 { - return m, tea.Batch(m.navigateBack(), cmd) + m.autoRefreshPaused = false + return m, tea.Batch(m.navigateBack(), m.scheduleAutoRefresh()) + } + + if m.loaded { + m.autoRefreshPaused = false + return m, m.scheduleAutoRefresh() } - return m, cmd + return m, nil case "ctrl+x": return m, tea.Quit