In the desktop app, every finished reply popped up a toast even when that chat was open and the window was focused. Open WebUI asks the desktop app whether its window is focused, and current desktop versions do not support that request and answer with an error, which was read as "not focused". Only a real answer now counts, and otherwise the page's own visibility decides as in a normal browser.
Fixes#35622
Typing in a folder chat gets sluggish once a dozen chats are open as tabs. Every key press searched the whole page for an open dialog before checking whether the key was a tab shortcut at all, and that search gets slower with every open tab. Now only the tab shortcut keys trigger the search, so normal typing skips it and the shortcuts behave as before.
The table shows typing 40 characters with 12 folder chat tabs open, as the median of 8 interleaved runs per side (Chromium with 6x CPU slowdown, WebKit unthrottled).
<table>
<tr><th>action</th><th>browser</th><th>before</th><th>after</th></tr>
<tr><td>time the page is blocked while typing</td><td>Chromium</td><td>1012 ms</td><td>79 ms</td></tr>
<tr><td>time the page is blocked while typing</td><td>WebKit</td><td>2870 ms</td><td>864 ms</td></tr>
<tr><td>delay from key press to screen update</td><td>Chromium</td><td>58 ms</td><td>43 ms</td></tr>
<tr><td>delay from key press to screen update</td><td>WebKit</td><td>63 ms</td><td>35 ms</td></tr>
</table>
Fixes#35688
Attaching a damaged HEIC photo failed badly: the chat input did nothing, a channel showed "[object Object]" and a note showed an upload that never finished. Now each of them shows an error and attaches nothing. Photos that convert fine upload as before.
Fixes#35580
After a burst of file uploads and long chats, the process kept most of the memory it needed at the peak, and every further burst added more. On Linux with glibc, blocks of 1 MB and larger now go back to the system as soon as they are freed, which stops the growth, and every 30 seconds the freed memory glibc still holds is returned too, which brings the level down further. `MALLOC_RELEASE_THRESHOLD` sets that size in bytes and `MALLOC_TRIM_INTERVAL` that interval in seconds, and `0` turns either one off. While the threshold is on, it overrides glibc's own `MALLOC_MMAP_THRESHOLD_` and `MALLOC_TRIM_THRESHOLD_`. The median request took about 9% longer on this upload-heavy load (9.8 s to 10.7 s) with both on.
900 chats with a file upload each, in six bursts of 150. The process sat at 1.18 GB before the load in every run.
<table>
<tr><th></th><th>Memory after the load</th></tr>
<tr><td>Without the change</td><td>4.47 GB, still climbing</td></tr>
<tr><td>Immediate release only</td><td>1.95 GB</td></tr>
<tr><td>Periodic release only</td><td>4.26 GB, still climbing</td></tr>
<tr><td>Both</td><td>1.52 GB, flat</td></tr>
</table>
Fixes#35590