Skip to content

fix: auto-refresh only polls the active view's resources#65

Merged
larkly merged 2 commits intomainfrom
worktree-validated-snacking-koala
Mar 28, 2026
Merged

fix: auto-refresh only polls the active view's resources#65
larkly merged 2 commits intomainfrom
worktree-validated-snacking-koala

Conversation

@larkly
Copy link
Copy Markdown
Owner

@larkly larkly commented Mar 28, 2026

Summary

Closes #54

  • Route tick messages only to the active tab's list view instead of all initialized tabs, reducing API calls from up to 9x to 1x per tick interval
  • Restart ticker chain and fetch fresh data when switching tabs (via Init())
  • Fix networklist missing its own tickCmd() — was parasitically relying on shared.TickMsg from serverlist
  • Fix keypairlist double-fetching by removing duplicate shared.TickMsg handler

Test plan

  • go build ./... passes
  • go test ./... passes
  • Connect to a cloud, verify active tab polls normally
  • Switch tabs and confirm data refreshes immediately on the new tab
  • Confirm inactive tabs stop making API calls
  • Ctrl+R force-refresh still works

larkly added 2 commits March 28, 2026 17:09
Update both files to reflect features added since last doc update:
server rename/rebuild/snapshot/rescue, image management tab, network
and router CRUD, security group full CRUD, confirmation dialogs for
all state-change actions, self-update, and new CLI flags.
Previously updateAllViews() routed tick messages to every initialized
tab, causing all resource types to poll the API every 5 seconds
regardless of which tab was visible. Now only the active tab receives
ticks; inactive views' ticker chains stop and restart on tab switch.

Also fixes networklist missing its own ticker (was parasitically using
shared.TickMsg from serverlist) and keypairlist double-fetching by
handling both its own tickMsg and shared.TickMsg.
@larkly larkly merged commit fdde3fd into main Mar 28, 2026
@larkly larkly deleted the worktree-validated-snacking-koala branch March 28, 2026 17:56
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.

Auto-refresh should only poll the active view's resources

1 participant