fix: remove broken connection indicator
All checks were successful
CI / Deploy / test (pull_request) Successful in 15s
CI / Deploy / lint (pull_request) Successful in 25s
CI / Deploy / deploy (pull_request) Has been skipped

The ConnectionIndicator component caused PatchElementsNoTargetsFound
errors due to complex nested IDs. Removing it for now - we can design
a better solution later if needed.
This commit is contained in:
Ryan Hamamura
2026-03-03 12:47:28 -10:00
parent cedcadfe3c
commit 1109dccdd8
4 changed files with 4 additions and 20 deletions

View File

@@ -12,7 +12,6 @@ import (
"github.com/ryanhamamura/games/chat"
chatcomponents "github.com/ryanhamamura/games/chat/components"
sharedcomponents "github.com/ryanhamamura/games/features/common/components"
"github.com/ryanhamamura/games/features/snakegame/pages"
"github.com/ryanhamamura/games/features/snakegame/services"
"github.com/ryanhamamura/games/sessions"
@@ -118,10 +117,7 @@ func HandleSnakeEvents(snakeStore *snake.SnakeStore, svc *services.GameService,
return sse.PatchElementTempl(pages.GameContent(sg, mySlot, chatMessages(), chatCfg, gameID))
}
// Send initial connection indicator and render
if err := sse.PatchElementTempl(sharedcomponents.ConnectionIndicator(time.Now().UnixMilli())); err != nil {
return
}
// Send initial render
if err := patchAll(); err != nil {
return
}
@@ -145,10 +141,7 @@ func HandleSnakeEvents(snakeStore *snake.SnakeStore, svc *services.GameService,
return
case <-heartbeat.C:
// Heartbeat updates connection indicator and refreshes game state
if err := sse.PatchElementTempl(sharedcomponents.ConnectionIndicator(time.Now().UnixMilli())); err != nil {
return
}
// Heartbeat refreshes game state to keep connection alive
if err := patchAll(); err != nil {
return
}