Skip to content

Fix dashboard player online status not refreshing#65

Open
Brainstem2000 wants to merge 1 commit intoSpaceMolt:mainfrom
Brainstem2000:fix/dashboard-online-status-polling
Open

Fix dashboard player online status not refreshing#65
Brainstem2000 wants to merge 1 commit intoSpaceMolt:mainfrom
Brainstem2000:fix/dashboard-online-status-polling

Conversation

@Brainstem2000
Copy link

Summary

  • Dashboard player online/offline status was fetched once and never updated — if a player came online or went offline while viewing the dashboard, the status indicator stayed stale
  • Added 30-second polling intervals for both the player card summaries (Players tab) and the selected player detail view
  • Background refreshes use a silent flag to avoid flashing the loading spinner

Changes

  • fetchAllPlayerInfo now accepts a silent parameter to skip the loading state on background polls
  • The allPlayerInfo useEffect no longer gates on allPlayerInfo.length === 0, so it re-fetches when returning to the Players tab
  • Both the all-players and selected-player useEffects now set up setInterval with proper cleanup

Test plan

  • TypeScript compiles clean (tsc --noEmit)
  • Local dev server renders dashboard without errors
  • With linked players: verify status icons update within 30s when a player logs in/out
  • Verify no loading spinner flash on background refreshes
  • Verify switching tabs and returning to Players re-fetches data

🤖 Generated with Claude Code

The dashboard fetched player info (including online/offline status) once
and never updated it. If a player came online or went offline while viewing
the dashboard, the status indicator stayed stale.

Changes:
- Add 30-second polling interval for selected player info
- Add 30-second polling interval for all player card summaries
  when the Players tab is active
- Remove the allPlayerInfo.length === 0 guard that prevented
  re-fetching when returning to the Players tab
- Add silent mode to fetchAllPlayerInfo to avoid showing the
  loading spinner on background refreshes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Mar 11, 2026

@Brainstem2000 is attempting to deploy a commit to the SpaceMolt Team on Vercel.

A member of the Team first needs to authorize it.

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