A channel message stayed greyed out with no actions until a reload whenever the page missed the server's confirmation, for example after switching apps on a phone right after sending, even though the server had saved it. A failed send left the same dead copy behind and the typed text was lost, and a dropped request showed no error at all. Now the message turns normal as soon as the server answers the send, and a failed send goes back to the list of waiting messages above the input, where it can be sent again, edited or deleted. Nothing is resent automatically, because a request that looked failed may still have reached the server. Thread replies get the same treatment, so a reply no longer goes missing from the thread or loses its text.
Fixes#34771
On a wide window the thread side panel keeps one Thread instance while
you open another thread, and initHandler reset the messages and typing
state for the new thread but not replyToMessage. The "Replying to"
banner stayed, and sending saved the new thread's message quoting a
message from the previous thread.
Clear replyToMessage in initHandler, as #31376 does for switching
channels.
* fix: keep sticky code block headers at the top of channel scroll containers
* fix: clip the sticky code block header to the block's rounded corners
* fix: give channel scroll containers their own layer so firefox clips sticky code headers
Thread.svelte: Add null check for messagesContainerElement in scrollToBottom()
to match the existing pattern in Channel.svelte. Prevents potential TypeError
when the DOM element is not yet bound during rapid thread switches.
PinnedMessagesModal.svelte: Move res.length check inside the if (res) block.
Previously, res.length was accessed unconditionally after a guarded block,
causing TypeError when the API call fails and the .catch() returns null.