The orginal setup was appending history to the wrong element causing
chat to appear out of order.
</div>
<section id="chat">
- <div id="chat-messages" hx-trigger="load delay:1s" hx-get="/chat/history" hx-swap="afterend"></div>
+ <div id="chat-messages" hx-trigger="load delay:1s" hx-get="/chat/history" hx-swap="innerHTML"></div>
<form id="chat-form" hx-post="/chat">
<input type="text" id="message" name="message" autocomplete="off"><button type="submit">Send</button>
</form>