From c52c389f0c2ffd8459139d62865fc0085262f7e7 Mon Sep 17 00:00:00 2001 From: Ryan Hamamura <58859899+ryanhamamura@users.noreply.github.com> Date: Tue, 3 Mar 2026 09:15:46 -1000 Subject: [PATCH] Reapply "fix: append chat messages instead of re-rendering entire game" This reverts commit 513467470c90cb13c9b152c832b50e738dbdb0eb. --- chat/components/chat.templ | 19 ++++++++++++------- features/c4game/handlers.go | 9 +++++++-- features/snakegame/handlers.go | 9 +++++++-- 3 files changed, 26 insertions(+), 11 deletions(-) diff --git a/chat/components/chat.templ b/chat/components/chat.templ index f2d02fe..326bd3e 100644 --- a/chat/components/chat.templ +++ b/chat/components/chat.templ @@ -23,16 +23,21 @@ type Config struct { StopKeyPropagation bool } +// ChatMessage renders a single chat message. Used for appending new messages via SSE. +templ ChatMessage(m chat.Message, cfg Config) { +