Commit graph

7133 commits

Author SHA1 Message Date
Classic298
89716ea880
perf: stop scanning every socket.io payload for binary data (#28180)
* perf: stop scanning every socket.io payload for binary data

Every socket.io event the backend sends was first walked recursively to check whether any value was a bytes object needing binary attachment framing. Open WebUI never emits binary, so the walk always came back empty and the work was thrown away. It has no early exit and allocates at every level, so it scaled with the full size of the message, and the messages are the big ones: chat streaming re-emits the whole assistant message on every update, note collaboration sends document state as a JSON array with one entry per byte. With the Redis manager it ran once per instance per emit on top of that, since every instance builds its own copy of the packet.

The server now installs a Packet subclass with binary events off, through python-socketio's own serializer hook, the same mechanism its msgpack serializer uses. Inbound binary attachments are decoded to int lists rather than refused, so the one frontend path that sends a raw Uint8Array keeps working and handlers can still echo client data straight back out. One scan remains in multi-instance setups: python-socketio's Redis manager calls it on the base Packet class directly, where the serializer hook cannot reach.

Measured per encode:

| payload | before | after |
|---|---|---|
| chat completion re-emit (7.5 KB JSON) | 30 us | 13 us |
| collaborative document state (292 KB JSON) | 9.0 ms | 1.7 ms |

With ENABLE_ORJSON=true, where the scan is nearly the whole encode cost: 20 us to 2.3 us, and 7.8 ms to 0.14 ms.

Closes #28164

* fix: match the other Yjs emits and send the full state as an array

Collaboration.ts sent the initial full-document state as a raw Uint8Array while the other two Yjs emit sites convert with Array.from first. socket.io framed that one as a binary attachment, so with the JSON-only packet class the server turns it into a list of ints and re-broadcasts it as JSON: a 10240-byte state update becomes 36561 JSON characters. Converting at the emit site keeps the wire form uniform across all three sites.

Also trims the JSONOnlyPacket docstring, which claimed attachments already arrive as int lists when the override is what converts them, and annotates the new reconstruct_binary parameters.
2026-08-31 01:22:06 -04:00
Classic298
b75e2670b7
fix: keep a custom recurrence rule when the editor reopens it (#29260)
Loading an automation whose rule the visual controls cannot represent switched the schedule to Custom but left the bookkeeping the seeding block reads on the previous value, so that block immediately replaced the rule with a freshly built default. The rule was lost when the editor opened, before anything was saved, and cloning carried the default across as well. Recording the switch alongside it leaves the stored rule in place.

Verified in a browser against the same build without this line: a minutely rule and a yearly rule now survive reopen and save byte for byte, cloning keeps the original, and every schedule the editor itself produces, along with switching to Custom by hand, behaves exactly as before.
2026-08-31 00:08:28 -05:00
Classic298
188fc83a79
fix: surface files the browser cannot read during a knowledge base directory sync (#29135)
* fix: surface files the browser cannot read during a knowledge base directory sync

Syncing a local folder into a knowledge base could fail with nothing but "Error accessing directory": no failing file name, no network request, no server log, and no console output either, because production builds strip console.error. On Windows this happens once the absolute path of a file passes the platform limit, at which point the browser refuses to open a file it just listed.

The directory scan now handles that per file. It names the first failing path and how many files are affected, and stops before anything is uploaded. Stopping is the point: a file missing from the manifest is treated as deleted by the sync, so continuing would remove the knowledge base copy of a file that still exists on disk.

Dragging a folder in hit the same failure and reported nothing at all, and the Firefox picker path returned its promise without awaiting it, so a rejection escaped the error handler and surfaced only as an unhandled rejection. Both report through the existing handler now, and production builds keep console.error so the underlying exception stays visible.

* fix: narrow the change to the silent drag-and-drop folder failure

Dropping a folder onto a knowledge base did nothing at all when the browser refused to open one of the files inside it: the rejection escaped the async drop listener, so the user got no toast, no upload and no clue why. The listener now routes that failure through the same error handler the directory picker already uses, so one path and one message cover both ways of adding a folder.

The rest of the branch is reverted. Dropping `console.error` from the esbuild `pure` list un-stripped 597 call sites across 103 files from every production bundle, which is a repo-wide logging policy change that needs its own argument. The picker-side collect-and-count machinery only reworded a toast the existing catch already showed, and the Firefox `return await` fix is a different bug in a different path.
2026-08-31 00:45:26 -04:00
Timothy Jaeryang Baek
e8bdbd716b refac 2026-08-31 00:33:43 -04:00
Timothy Jaeryang Baek
7a11154182 refac 2026-08-31 00:32:46 -04:00
G30
95032b6c61
fix: let the model defaults capability and prompt suggestion sections scroll (#29235) 2026-08-31 00:11:34 -04:00
Timothy Jaeryang Baek
84d0940da1 refac 2026-08-31 00:11:04 -04:00
G30
9a669197c8
fix: let setting row controls shrink so long values do not squeeze the label (#29229) 2026-08-31 00:06:37 -04:00
Timothy Jaeryang Baek
09163ccc73 refac 2026-08-31 00:06:05 -04:00
Timothy Jaeryang Baek
64e6c9f010 refac 2026-08-30 23:56:01 -04:00
Timothy Jaeryang Baek
e4dbfb1276 refac 2026-08-30 23:50:30 -04:00
Timothy Jaeryang Baek
df495a7945 refac 2026-08-30 23:42:35 -04:00
G30
039976ef24
fix: unregister a sidebar folder from the registry when it unmounts (#29121) 2026-08-30 23:35:34 -04:00
Timothy Jaeryang Baek
b3ba6823a9 refac
Co-Authored-By: G30 <50341825+silentoplayz@users.noreply.github.com>
2026-08-30 21:41:03 -04:00
Timothy Jaeryang Baek
ddc886fdc1 refac 2026-08-30 21:39:13 -04:00
Timothy Jaeryang Baek
120409ef01 refac 2026-08-30 17:45:50 -04:00
Timothy Jaeryang Baek
e4694f82eb refac 2026-08-30 17:45:18 -04:00
Timothy Jaeryang Baek
b356b80f8c refac 2026-08-30 17:44:39 -04:00
Timothy Jaeryang Baek
492ccf3ac0 refac 2026-08-30 17:39:56 -04:00
Timothy Jaeryang Baek
78d8c9166f refac 2026-08-30 17:38:45 -04:00
Timothy Jaeryang Baek
e250be48ee refac 2026-08-30 17:30:11 -04:00
Timothy Jaeryang Baek
f0ffa7508e refac 2026-08-30 17:26:03 -04:00
Classic298
0e65c65cc7
fix: stop counted schedules being rewritten as one-offs on save (#29263)
* fix: stop labelling a counted schedule as a one-off

The schedule label treated any rule whose text contained COUNT=1 as a single run, so counts such as 10, 12 and 14 were shown as "Once" together with the date of the first run, on the automations list and on the automation page alike. The label now matches a count of exactly one.

This covers the two places that render the label. The schedule editor reads the count the same way and changes separately. Rules that carry a start date still fall through to the raw rule text, exactly as they already did without a count; that parsing gap changes separately too.

Verified in a browser against the same build without these lines: ten ordinary schedules render identically in both places, and a genuine single-run schedule is still labelled as one.

* fix: stop counted schedules being rewritten as one-offs on save

The schedule editor decides that a rule is a one-off by looking for the text COUNT=1 anywhere in it. A rule that runs ten times carries COUNT=10, which contains that text, so opening such an automation shows it as a single run and saving writes a genuine one-off rule back. One open and save is enough to silently turn a ten run schedule into a one run schedule, with whatever date happened to sit in the rule. The check now requires that no further digit follows, the same test the two schedule labels already use.

The same screens also failed to read counted rules at all. Both label helpers and the editor parser split the stored rule on semicolons after stripping the RRULE prefix, so when the rule carries a DTSTART line the first piece is that whole line and the frequency is never found. The automations list then printed the raw rule text where a human label belongs, and the editor fell back to a plain daily schedule, quietly discarding the weekly or monthly settings on the next save. All three sites now drop the DTSTART part before splitting. They split on whitespace, so the newline form and the space separated form are both handled, matching how the backend already strips it.
2026-08-30 16:12:43 -04:00
Timothy Jaeryang Baek
cfa2d25317 refac 2026-08-30 12:42:13 -04:00
Timothy Jaeryang Baek
b9765fe979 refac 2026-08-30 12:36:16 -04:00
Timothy Jaeryang Baek
22379ded1a refac 2026-08-30 12:22:32 -04:00
G30
6fa50a6558
fix: keep select dropdowns inside the viewport (#29226) 2026-08-30 12:06:27 -04:00
Classic298
1f529c4eb3
fix: structured output renderer crashing on an empty output slot (#29250)
A chat could hard-fail in the browser with "TypeError: can't access property content" and stop rendering the assistant message until a reload.

Streamed response items and content parts were placed at the index the provider reports. That index is not bounded by the length of the array the client has built up, so an entry could land past the end and leave a gap behind. Spreading the array on the next event turned that gap into a real empty entry, and the renderer then dereferenced it while looking for message text.

Output items that would land past the end are now appended, since later events locate them by id anyway. Content and summary parts are padded up to the index instead, because a part carries no id and the text streamed for it is addressed by that same index. The renderer and the structured editor now skip an empty entry as well, so chats already saved in the broken state still display and edit.

Fixes #29244
2026-08-30 11:56:41 -04:00
G30
fe947f7e68
fix: prevent valve inputs from overflowing the valves modal (#29203) 2026-08-29 14:52:29 -04:00
Classic298
83556188f5
fix: hide file preview zoom buttons on touch devices (#29176)
On a phone the file preview zoom bar shows plus and minus buttons that duplicate pinch-to-zoom and sit on top of an already small preview. They are hidden on coarse pointers now, so touch users get the preview area back and still zoom the way they expect.

The check is the pointer type rather than the viewport width, because what matters is whether the person can pinch, not how narrow their window is. A narrow desktop window keeps the buttons, a tablet does not.

The zoom percentage doubles as the reset control and has no gesture equivalent, so it stays visible, along with all page and slide navigation. Keyboard zoom is unaffected. Word document previews are left alone: they have no pinch support at all, so hiding their buttons would remove zooming entirely.

Fixes #29152
2026-08-28 18:46:53 -04:00
spoofy
afb9f3c2d1
fix: name the Folder modal close button (WCAG 4.1.2) (#29160) 2026-08-28 17:49:22 -04:00
Timothy Jaeryang Baek
797b4c51d1 refac 2026-08-28 13:40:45 -04:00
Timothy Jaeryang Baek
99cb8257f7 refac 2026-08-28 13:34:10 -04:00
Timothy Jaeryang Baek
e6031ea6da refac 2026-08-28 12:18:37 -04:00
Classic298
b3591e60b1
fix: apply the selected model's tools and skills when starting a chat from the sidebar (#29058)
Some checks failed
Python CI / Ruff Format (3.11) (push) Has been cancelled
Python CI / Ruff Format (3.12) (push) Has been cancelled
Create and publish Docker images with specific build args / build (map[arch:linux/amd64 runner:ubuntu-latest], map[build_args: free_disk:false name:main suffix:]) (push) Has been cancelled
Create and publish Docker images with specific build args / build (map[arch:linux/amd64 runner:ubuntu-latest], map[build_args:USE_CUDA=true USE_CUDA_VER=cu126 free_disk:true name:cuda126 suffix:-cuda126]) (push) Has been cancelled
Create and publish Docker images with specific build args / build (map[arch:linux/amd64 runner:ubuntu-latest], map[build_args:USE_CUDA=true free_disk:true name:cuda suffix:-cuda]) (push) Has been cancelled
Create and publish Docker images with specific build args / build (map[arch:linux/amd64 runner:ubuntu-latest], map[build_args:USE_OLLAMA=true free_disk:false name:ollama suffix:-ollama]) (push) Has been cancelled
Create and publish Docker images with specific build args / build (map[arch:linux/amd64 runner:ubuntu-latest], map[build_args:USE_SLIM=true free_disk:false name:slim suffix:-slim]) (push) Has been cancelled
Create and publish Docker images with specific build args / build (map[arch:linux/arm64 runner:ubuntu-24.04-arm], map[build_args: free_disk:false name:main suffix:]) (push) Has been cancelled
Create and publish Docker images with specific build args / build (map[arch:linux/arm64 runner:ubuntu-24.04-arm], map[build_args:USE_CUDA=true USE_CUDA_VER=cu126 free_disk:true name:cuda126 suffix:-cuda126]) (push) Has been cancelled
Create and publish Docker images with specific build args / build (map[arch:linux/arm64 runner:ubuntu-24.04-arm], map[build_args:USE_CUDA=true free_disk:true name:cuda suffix:-cuda]) (push) Has been cancelled
Create and publish Docker images with specific build args / build (map[arch:linux/arm64 runner:ubuntu-24.04-arm], map[build_args:USE_OLLAMA=true free_disk:false name:ollama suffix:-ollama]) (push) Has been cancelled
Create and publish Docker images with specific build args / build (map[arch:linux/arm64 runner:ubuntu-24.04-arm], map[build_args:USE_SLIM=true free_disk:false name:slim suffix:-slim]) (push) Has been cancelled
Frontend Build / Format & Build (push) Has been cancelled
Frontend Build / Unit Tests (push) Has been cancelled
Create and publish Docker images with specific build args / notify-helm-charts (push) Has been cancelled
Create and publish Docker images with specific build args / merge (map[name:cuda suffix:-cuda]) (push) Has been cancelled
Create and publish Docker images with specific build args / merge (map[name:cuda126 suffix:-cuda126]) (push) Has been cancelled
Create and publish Docker images with specific build args / merge (map[name:main suffix:]) (push) Has been cancelled
Create and publish Docker images with specific build args / merge (map[name:ollama suffix:-ollama]) (push) Has been cancelled
Create and publish Docker images with specific build args / merge (map[name:slim suffix:-slim]) (push) Has been cancelled
Create and publish Docker images with specific build args / copy-to-dockerhub (, main) (push) Has been cancelled
Create and publish Docker images with specific build args / copy-to-dockerhub (-cuda, cuda) (push) Has been cancelled
Create and publish Docker images with specific build args / copy-to-dockerhub (-cuda126, cuda126) (push) Has been cancelled
Create and publish Docker images with specific build args / copy-to-dockerhub (-ollama, ollama) (push) Has been cancelled
Create and publish Docker images with specific build args / copy-to-dockerhub (-slim, slim) (push) Has been cancelled
Clicking a pinned model in the sidebar started a new chat with that model but sent the previous model's tool_ids and skill_ids, and they stayed until the page was reloaded. The model dropdown was unaffected, and so was temporary chat.

A pinned entry links to /?model=<id>, which runs the new-chat path. That path applied the model's defaults and then restored the composer draft over the top, and the draft still held the selection from whichever model was active when it was written. The draft save is debounced, so the stale value was reliably the one read back.

The draft is now restored before the defaults are applied, so the model always decides which tools and skills are active while the unsent prompt, files and approval mode are still kept. Starting a new chat with several models selected now clears the selection instead of carrying the draft's over, since there are no per-model defaults to apply in that case.

Co-authored-by: Claude <noreply@anthropic.com>
2026-08-27 19:24:19 -04:00
Classic298
3749e7dc74
fix: stop streaming responses breaking on a duplicate output key (#29053)
* fix: stop streaming responses breaking on a duplicate output key

With reasoning-capable models the chat froze mid-stream: the first chunk of the answer appeared, nothing followed, and the whole message only showed up once generation finished. The browser console showed a Svelte each_key_duplicate error.

When a stream event addresses an output slot past the end of the array, the missing slots were filled with the event's own item, id included, so a gap of two left two entries claiming the same id. The next chunk for that item was matched by id, landed in the first of the two, and the rendered list ended up with two items sharing a key, which Svelte refuses to update.

Only the addressed slot now takes the event's item, and the slots before it are anonymous placeholders. Replayed the reported event sequence against the real code: keys are unique again and the chunks stay in order instead of being split across the copies.

* fix: stream reasoning deltas when the provider also sends reasoning_details

Providers such as OpenRouter emit reasoning_details alongside the reasoning
text on the same delta. Merging those details cleared the pending event
unconditionally, discarding the response.reasoning_text.delta that had just
been built, so the client received no reasoning until the response completed
and the thinking block only appeared after generation finished.

The event is now only dropped when the details were all there was to report.
Details persistence is unchanged.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014uuEg4AXPs9zE3vVUfN1Fj

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-08-27 18:25:49 -04:00
G30
fa7de50c60
refac: align the admin Users tab counts with the workspace tab count behavior (#29080) 2026-08-27 16:45:34 -04:00
G30
1c5128c4aa
fix: keep a calendar event visible after its date is moved (#29085) 2026-08-27 16:44:58 -04:00
G30
98c0ac9355
fix: stop the workspace model id and timestamp overlaying the model name on narrow screens (#29084) 2026-08-27 16:43:36 -04:00
G30
aad1072874
refac: reset the shared chats modal search when the modal closes (#29082) 2026-08-27 16:43:23 -04:00
Timothy Jaeryang Baek
ae549d3e4a refac 2026-08-27 16:41:43 -04:00
Timothy Jaeryang Baek
9d95a0148b refac 2026-08-27 16:06:25 -04:00
Timothy Jaeryang Baek
061fb43432 refac 2026-08-27 15:34:20 -04:00
G30
673938fd49
Merge pull request #29037 from silentoplayz/fix/admin-models-disabled-hidden
fix: restore visibility of disabled models visible in the admin Models list
2026-08-25 21:43:51 -04:00
Timothy Jaeryang Baek
5c62cc0517 chore: format 2026-08-25 16:53:53 -04:00
Timothy Jaeryang Baek
f71e9570c0 refac 2026-08-25 16:52:31 -04:00
Timothy Jaeryang Baek
54d7a22370 refac 2026-08-25 16:34:49 -04:00
Timothy Jaeryang Baek
02400c7a50 refac 2026-08-25 15:15:18 -04:00
Timothy Jaeryang Baek
f158f892f4 refac 2026-08-25 15:14:11 -04:00
Timothy Jaeryang Baek
bc4c91e6d6 refac 2026-08-25 15:11:06 -04:00