Commit Graph
21146 Commits
Author SHA1 Message Date
Timothy Jaeryang Baek 10af571e71 refac 2026-11-25 02:35:59 +04:00
Classic298 414340682e perf: long chats no longer rewrite the whole conversation on every message (#34689)
Every sent message, finished reply, regenerate, edit and saved follow-up rewrote the whole stored conversation, so long chats got slower with each turn, most of all on PostgreSQL. Messages now live only in the message table the app already keeps, and a change writes only the messages it touches. Chats open, share, export and import as before. API responses no longer carry the flat message list older clients saved next to the conversation, and the answers to pinning, archiving, sharing or moving a chat no longer repeat its messages. Existing chats are converted once during the upgrade, in batches that continue where they stopped if the upgrade is interrupted.

| 130 MB chat, instant test model | SQLite before | SQLite after | PostgreSQL before | PostgreSQL after |
| --- | --- | --- | --- | --- |
| Message accepted | 2.4 s | 0.20 s | 10.9 s | 0.32 s |
| Reply done | 4.9 s | 0.9 s | 22.5 s | 1.4 s |
| Regenerate done | 4.6 s | 0.9 s | 19.6 s | 1.4 s |
| Saving an edit | 3.7 s | 1.8 s | 5.8 s | 1.7 s |
| Opening the chat | 2.3 s | 0.9 s | 1.6 s | 1.2 s |
| Written to the database per message | 533 MB | 2 KB | 533 MB | 2 KB |

Fixes #34688
2026-11-25 02:34:37 +04:00
Timothy Jaeryang Baek b6aac5dee5 refac 2026-11-25 02:33:34 +04:00
Timothy Jaeryang Baek 3226163dec refac 2026-11-25 02:31:48 +04:00
Timothy Jaeryang Baek 96c12237a8 refac 2026-11-25 02:31:09 +04:00
Timothy Jaeryang Baek bd7d9fbd88 refac 2026-11-25 02:28:35 +04:00
Timothy Jaeryang Baek 0f3865187b refac 2026-11-25 02:22:43 +04:00
Classic298 5c02632c59 fix: message sent while a reply runs is answered without the chat's attachments (#34935)
A message sent while the previous reply was still running was answered without the files attached earlier in the chat. With Preload files on, the model never got the file's text and the answer showed no citation. With it off, the model was not offered the tools to read the attachments. Answering it also replaced the chat's file list with that message's own files, usually none, so after a reload later messages lost the earlier files too. Such a message now gets the same attachments as a normal follow-up: the chat's files on that branch, minus any the user removed in the meantime, plus its own.

Fixes #34933
2026-11-25 02:18:55 +04:00
Timothy Jaeryang Baek a17581475a refac 2026-11-25 02:15:42 +04:00
Classic298 708e6642a2 perf: page load waits on model providers for users with group default models (#34842)
Members of a group with default models had every page load wait for all model providers to answer before the page was drawn. With an unreachable provider they saw the splash screen for about 11 seconds on each load. The default models are now checked against the model list the server already holds, so the page draws right away and the same default model is selected. The first page load after a server start or a change to the connection settings still waits on the providers once, until the model list has loaded again. A group default that a member can only reach through their own Tether connection no longer counts and they get the global default instead.

<table>
<tr><th>Group member, provider answering in 150 ms unless noted</th><th>before</th><th>after</th></tr>
<tr><td>first request of each page load</td><td>172 ms</td><td>11 ms</td></tr>
<tr><td>provider calls made by it</td><td>1</td><td>0</td></tr>
<tr><td>splash screen gone</td><td>864 ms</td><td>719 ms</td></tr>
<tr><td>splash screen gone, provider not answering</td><td>11.5 s</td><td>0.7 s</td></tr>
</table>

Fixes #34841
2026-11-25 02:04:03 +04:00
Timothy Jaeryang Baek 9b626e4e5b refac 2026-11-25 02:02:37 +04:00
Classic298 3904bd6043 fix: OIDC sign-in fails when the provider signs its ID token with the client secret (#34930)
Signing in through an OIDC provider that signs the ID token with HS256 failed with "Algorithm 'HS256' requires 'oct' key", and the user landed back on the sign-in page with an error. OpenID Connect allows this signing method when the app has a client secret, and the key is that secret, which never appears among the provider's published keys. Open WebUI now checks these ID tokens against the client secret, so the sign-in goes through, while a token signed with any other secret is still refused. Providers that sign with their published keys are unchanged.

Fixes #34922
2026-11-25 01:59:02 +04:00
Timothy Jaeryang Baek 352c63be19 refac 2026-11-25 01:53:55 +04:00
Timothy Jaeryang Baek d5553c53e7 refac 2026-11-25 01:48:55 +04:00
Timothy Jaeryang Baek e85500e773 refac 2026-11-25 01:48:46 +04:00
Timothy Jaeryang Baek 8522af2d61 refac 2026-11-25 01:46:31 +04:00
Timothy Jaeryang Baek 8ecc777ee6 refac 2026-11-25 01:35:06 +04:00
Timothy Jaeryang Baek afd5ba59eb refac 2026-11-25 01:27:02 +04:00
Timothy Jaeryang Baek 46ac49fe09 refac 2026-11-25 01:20:55 +04:00
Timothy Jaeryang Baek 22500ecc24 refac 2026-11-25 01:16:55 +04:00
Timothy Jaeryang Baek c37725b7a3 refac 2026-11-25 01:07:47 +04:00
G30 0c336e072b fix: dismiss note formatting toolbar when focus leaves the editor (#34966) 2026-11-25 00:21:32 +04:00
Timothy Jaeryang Baek 8d99689836 refac 2026-11-25 00:18:55 +04:00
Timothy Jaeryang Baek a7896c9140 refac 2026-11-25 00:14:16 +04:00
Timothy Jaeryang Baek a0cc08f1f3 refac 2026-11-24 23:35:52 +04:00
Classic298 90116cd36f fix: large chats with no machine selected open slowly (#34963)
Opening a chat with no machine selected read through the whole conversation on every open, looking for a machine to restore. That is the normal case for a chat, so large chats opened about 45% slower. A chat that already saved its selection, with no machine or with a machine saved under its former terminal name, now opens without that extra pass. Agent chats with nothing saved still get their machine and folder back.

Fastest of seven opens of a 130 MB chat on SQLite:

<table>
<tr><th></th><th>Context Compaction off</th><th>Context Compaction on</th></tr>
<tr><td>dev before Terminals were renamed to Machines</td><td>0.316 s</td><td>0.429 s</td></tr>
<tr><td>dev</td><td>0.469 s</td><td>0.608 s</td></tr>
<tr><td>this fix</td><td>0.325 s</td><td>0.437 s</td></tr>
</table>

Fixes #34962
2026-11-24 23:11:30 +04:00
G30 c56ba4e759 fix: reject future birth dates in account settings (#34961) 2026-11-24 23:11:24 +04:00
Classic298 4a065a5c99 fix: saving a router model with an invalid pattern only shows "[object Object]" (#34956)
Saving a router model whose pattern is not a valid regular expression showed only "[object Object]" in the error toast, so the admin could not tell what was wrong. The toast now shows the server's message, such as "Value error, Invalid pattern: missing ), unterminated subpattern at position 0". Any other rule the server refuses when a router model is saved reads the same way.

Fixes #34897
2026-11-24 22:52:10 +04:00
Classic298 179991fc1a fix: saving a router model strips the trailing space from a pattern (#34957)
A pattern like "```|def |function " (the example in the docs) lost its trailing space when the router model was saved, from the dialog or through the API. "function" without a space after it then matched as well, so a message about "functionality" went to the model meant for code. Patterns are now saved exactly as typed, and a pattern saved before this needs its space typed again. Conditions saved through the API now keep their spaces as sent too.

Fixes #34898
2026-11-24 22:51:49 +04:00
G30 bb98273f9e fix(ui): dismiss dropdowns when dragging outside (#34959) 2026-11-24 22:51:38 +04:00
Timothy Jaeryang Baek 31c3377051 refac 2026-11-24 22:46:50 +04:00
Timothy Jaeryang Baek 20c4133713 refac 2026-11-24 22:44:12 +04:00
Timothy Jaeryang Baek 680cd3a0f3 refac 2026-11-24 22:37:32 +04:00
Timothy Jaeryang Baek 53fc70aea7 refac 2026-11-24 22:34:25 +04:00
Timothy Jaeryang Baek e0a4ee0a9d refac 2026-11-24 22:33:49 +04:00
Timothy Jaeryang Baek 98dc1e5460 refac 2026-11-24 22:30:13 +04:00
Timothy Jaeryang Baek f10d244d05 refac 2026-11-24 22:26:11 +04:00
Timothy Jaeryang Baek 1fbb42be97 refac 2026-11-24 22:11:32 +04:00
Timothy Jaeryang Baek 26f85aa220 refac 2026-11-24 21:50:41 +04:00
Classic298 8b185d8d2c feat: render Markdown in chat error messages (#34955)
Providers and the proxies in front of them often write errors for people, with bold text, a list of things to try, a link to a status page or an id to quote, but the error box under a reply showed the Markdown marks as typed and the links as plain text. The error box now renders its message the way replies are rendered, so links open like links in replies, and single line breaks still show as line breaks, as they have since #34954. HTML and images in an error are shown as text and never rendered, and a plain one-line error looks exactly as before.

Fixes #34951
2026-11-24 21:41:02 +04:00
Timothy Jaeryang Baek acdb7b5038 refac 2026-11-24 21:30:58 +04:00
Timothy Jaeryang Baek 451174d700 refac 2026-11-24 21:26:11 +04:00
Timothy Jaeryang Baek b1d3f90760 refac 2026-11-24 21:21:33 +04:00
Classic298 cf100751ec fix: image preview on phones gets stuck after pinch zoom (#34953)
On a phone, a quick pinch in the image preview could shrink the image to nothing, a quick spread could throw it off screen and stop zooming, and after zooming in and back out slowly the image ended up smaller than it opened. The previews made every pinch three and a half times stronger than the fingers moved, so a quick pinch reached a size of zero that the image could not recover from, and all other pinches overshot. Pinch now follows the fingers at normal speed in the image, file, diagram and slide previews.

Fixes #34939
2026-11-24 21:20:01 +04:00
Classic298 e2ae064770 fix: line breaks in a provider's error message are lost in the chat (#34954)
When a model connection answered with an error message spread over several lines, the error box under the reply ran all lines together into one paragraph. The box now keeps the message's line breaks, so each line shows on its own line, and long unbroken text still wraps inside the box. Spaces at the start or end of a line are still dropped, so the box shows no odd gaps.

Fixes #34950
2026-11-24 21:17:37 +04:00
Classic298 9aafbf4f5c fix: buttons over a zoomable preview do nothing on touch screens (#34952)
On a phone or tablet, tapping Download in the full-screen image view did nothing, and the same went for the other buttons over a zoomable view, such as Download as SVG and Copy to clipboard on a diagram. The zoomable view under those buttons captured every touch, so a tap on a button never became a click. Taps on these buttons now reach them and no longer zoom or pan the view. The image view's buttons also sit on a dark bar now: on a zoomed light image their white icons were invisible, which left an iPhone user with no visible way to close the preview.

Fixes #34942
2026-11-24 21:17:11 +04:00
Timothy Jaeryang Baek c6ef4a523f refac 2026-11-24 21:02:00 +04:00
Timothy Jaeryang Baek 2c1e50a463 refac 2026-11-24 21:01:50 +04:00
Timothy Jaeryang Baek 0f71ee15a1 refac 2026-11-24 20:58:02 +04:00
Timothy Jaeryang Baek 59c8184bf1 refac 2026-11-24 20:53:38 +04:00