Since we delay chat history loading for 1s, when it does load there is
the possibility that the history messages wipe out any existing
messages. This ensures that they get prepended to the chat and appear
before any new messages.
</div>
<section id="chat">
- <div id="chat-messages" hx-trigger="load delay:1s" hx-get="/chat/history" hx-swap="innerHTML"></div>
+ <div id="chat-messages" hx-trigger="load delay:1s" hx-get="/chat/history" hx-swap="afterbegin"></div>
<form id="chat-form" hx-post="/chat">
<input type="text" id="message" name="message" autocomplete="off"><button type="submit">Send</button>
</form>