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
In a channel, typing an emoji shortcode like :swea or a slash command and pressing Enter sent the half-typed text right away. Enter only checked for an open suggestion list inside the message box, but that list is drawn outside it, so it was never found. Enter now picks the highlighted suggestion again, as it does in the main chat input.
Fixes#34616
When someone pressed a button on an app message in a channel and the app answered only for them (a card, a file to download or an error), the answer never appeared. Private answers to a mention of the app were not affected. Button answers now show again under the app's message, marked "Only visible to you" for the presser alone.
Fixes#34205
Opened by an address such as http://192.168.1.20:8080 (no HTTPS, not localhost), the browser gives the page no direct clipboard access, and several things broke. Copy link on a comment and in search, Copy Share Link in Shared Chats, the webhook Copy URL, the Chat ID in the chat status bar, Copy branch name and Copy commit hash in the Git panel and the copy button of spreadsheet previews copied nothing, Copy Formatted Text pasted the ** and # symbols instead of the formatting, copied text lost its last line break, prompts using {{CLIPBOARD}} could not be inserted, and switching on Auto-Copy Response did nothing and was not saved. These copies now work on such addresses with the exact text and formatting, and {{CLIPBOARD}} prompts insert with the "Failed to read clipboard contents" message shown whenever the browser refuses clipboard access. Auto-Copy Response cannot work there, since the browser only lets a page copy right after a click, so the switch now stays off and shows its clipboard permission message.
Fixes#33927Fixes#33934Fixes#33935Fixes#33937Fixes#33938
With a channel open and its Webhooks window open from Edit Channel, every new message in that channel sent the window back to the webhook list, including a post from the webhook itself. The selected webhook closed and a changed name or image that was not saved yet was lost. The window now resets only when it opens, so new messages no longer interrupt an edit.
Fixes#33775
Opening a channel waited for the channel details to arrive before it even asked for the messages, so the wait was the two requests added together. Both requests now start at the same time. A channel that fails to load still sends you back to the home page and shows no messages.
Prompts could use the user's name and email but not their role, so role-aware system prompts needed a custom Filter function. Model system prompts, the user's own system prompt, saved prompts used with a slash command and chat requests through the API now replace {{USER_ROLE}} with the role, such as admin or user. Requested in #4765.