Commit Graph
62 Commits
Author SHA1 Message Date
Timothy Jaeryang Baek 36e1748c9c refac 2026-11-07 21:35:36 +09:00
Timothy Jaeryang Baek c31cdb4e86 refac 2026-11-07 21:32:04 +09:00
Timothy Jaeryang Baek d99ec1c02c refac 2026-11-02 08:48:51 +09:00
Timothy Jaeryang Baek 3361943104 refac 2026-11-01 09:15:14 +09:00
G30 c4daef0c94 fix(a11y): icon buttons named only by a tooltip have names (#33454) 2026-10-31 17:37:16 +09:00
Timothy Jaeryang Baek 3bb962f2bb refac 2026-10-31 17:16:19 +09:00
Timothy Jaeryang Baek 9d1b4ef362 refac 2026-10-30 16:01:47 +09:00
Timothy Jaeryang Baek 948432b432 refac 2026-10-29 07:17:12 +09:00
Timothy Jaeryang Baek 7f03b6e778 refac 2026-10-28 10:25:04 +09:00
Timothy Jaeryang Baek e3ad014fb2 refac 2026-10-28 10:14:11 +09:00
Timothy Jaeryang Baek b34885efc6 refac 2026-10-28 10:02:45 +09:00
Timothy Jaeryang Baek 1407f83cfc refac 2026-10-25 07:39:02 +09:00
Timothy Jaeryang Baek 8594b2f421 refac 2026-10-10 22:05:25 +04:00
Classic298 d09ab78fce fix: typing with an input method breaks in the empty chat input while a follow-up suggestion is shown (#31393)
After a reply, the first suggested follow-up question sits as grey ghost text in the empty chat input. Typing into it with an input method (Chinese, Japanese or Korean) broke the word being composed: on iOS the input lost focus after the first character, and in Chromium the first letter was left behind, so typing "ni" and picking "你" gave "n你". Clearing the ghost text rebuilt the input's line of text while the keyboard was still composing the word. The ghost text is now drawn over the empty input without being written into it, so input methods work again, and Tab to accept it and the follow-up buttons under the reply behave as before.

Fixes #31372
2026-09-30 19:49:49 +04:00
G30 e276d33352 fix: keep a note's pasted images when the note is rebuilt from HTML (#31513) 2026-09-30 19:47:05 +04:00
Classic298 488b3c571c perf: stop note co-editing echoing every remote update back to the server (#28185)
Every client in a note re-broadcasts each update it receives, with a full content snapshot attached, and the server appends each echo to the document log and writes the note again. Traffic and note writes therefore scale with the number of people who have the note open: every extra participant adds one more full echo of every keystroke.

Remote updates are now applied with the `'server'` origin the state path already uses, which the local listener ignores, so the echo stops. The echo did carry one thing worth keeping: the receiving client holds the merged document, which the sender had not seen yet, so each receiver now sends a content-only message once the edits settle, debounced 500ms, and flushes a pending one when the editor is torn down. The backend accepts an update message with no `update` field for that case, where it previously raised and dropped the save.

Replaying keystrokes at 120ms with a real Yjs document, socket messages fall 48.8% with two clients, 65.6% with three and 79.2% with five, with byte counts tracking the same on notes up to 50KB. Server-side update appends drop by a factor of the client count. The cost is one snapshot upload per receiving client per typing pause, which the server's own debounce then collapses into a single extra note write however many people are watching. A snapshot has to come from a client because the server cannot rebuild the markdown, HTML and JSON shape the note record stores. It also moves the merge 500ms later than the echo delivered it, so if two edits cross on the wire and every editor then loses its connection and closes inside that window, the note keeps what it was last sent and one of the two edits is lost. A client still connected at teardown flushes its pending snapshot, and any other editor left in the note closes the gap.
2026-09-21 08:53:27 -04:00
Timothy Jaeryang BaekandG30 7aaa4a692e refac
Co-Authored-By: G30 <50341825+silentoplayz@users.noreply.github.com>
2026-09-10 19:05:36 -04:00
Timothy Jaeryang Baek d8f27e745b refac 2026-09-08 13:25:16 -04:00
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
Timothy Jaeryang Baek 5078d987f8 refac 2026-08-24 21:15:54 -04:00
G30 302ffc8b7e fix: skip the autocompletion debounce when the document shrank past the captured position (#28824) 2026-08-22 08:12:40 -04:00
Timothy Jaeryang Baek 29eeda9f9a refac 2026-08-05 07:12:28 -05:00
Timothy Jaeryang Baek 2b8ef9340e refac 2026-07-15 23:51:37 -04:00
G30 eba1540a95 feat(ui): add emoji picker to rich text formatting toolbar (#24704) 2026-05-15 09:32:56 +09:00
Classic298 cfd2888545 fix:image url validation and signout post (#24420)
* refac(routers): reject external URLs in profile/model image handlers

* refac(ui): centralize image URL validation in safeImageUrl helper

* refac(auths): make signout POST-only

* refac: gate external profile image redirect behind ENABLE_PROFILE_IMAGE_URL_FORWARDING

Restore the 302 redirect for external http(s) profile image URLs in
the user and model profile-image endpoints, but gate it behind a new
ENABLE_PROFILE_IMAGE_URL_FORWARDING env flag (default: True).

Existing deployments that rely on external profile image forwarding
continue to work unchanged.  Operators who want to suppress the
redirect (to prevent client-side IP/UA/Referer leaks) can set the
flag to False.
2026-05-09 07:33:31 +09:00
Timothy Jaeryang Baek 6c2b2f2c3e refac 2026-03-29 19:01:53 -05:00
G30 6089a55da6 fix(ui): chat input triggers correctly re-trigger on backspace (#22899) 2026-03-20 15:48:25 -05:00
Timothy Jaeryang Baek 700349064d chore: format 2026-01-08 01:55:56 +04:00
Timothy Jaeryang Baek e27fb3e291 refac 2026-01-05 17:44:44 +04:00
Timothy Jaeryang Baek b0d8372d31 refac 2025-12-20 17:41:57 +04:00
Timothy Jaeryang Baek d1c9555a0b refac 2025-10-28 01:46:36 -07:00
Timothy Jaeryang Baek b72443004d refac/chore: svelte 5 migration 2025-10-27 15:06:53 -07:00
Timothy Jaeryang Baek aeb5288a3c refac 2025-09-22 23:28:19 -04:00
Timothy Jaeryang Baek e4e97e727e enh: note drag handle 2025-09-22 20:02:37 -04:00
Shirasawa 7f6b260c35 feat: refactor editor's collaboration to reduce package size and minimize errors 2025-09-19 17:28:16 +08:00
Timothy Jaeryang Baek 1d0881e283 refac 2025-09-17 01:28:04 -05:00
Timothy Jaeryang Baek 22e11760a1 refac 2025-09-14 18:08:31 -04:00
Timothy Jaeryang Baek 56a8973fa0 refac 2025-09-13 00:30:00 +04:00
Timothy Jaeryang Baek d6094c2881 refac 2025-09-13 00:24:42 +04:00
Timothy Jaeryang Baek 06c1426e14 refac: channel input 2025-09-12 21:43:05 +04:00
Timothy Jaeryang Baek 6b69c4da0f refac/enh: commands ui 2025-09-12 20:31:57 +04:00
Timothy Jaeryang Baek 58a6f5df98 fix: sink list icon missing 2025-08-10 16:07:52 +04:00
silentoplayz 84e568f902 remove: ArrowRightTag.svelte and used a transform 2025-07-27 20:43:17 -04:00
Timothy Jaeryang Baek a01e5126a3 refac 2025-07-19 21:34:38 +04:00
Timothy Jaeryang Baek c1c589d609 refac/enh: rich text input 2025-07-18 15:58:06 +04:00
Timothy Jaeryang Baek d4ece7384c enh/refac: note image upload 2025-07-17 17:36:06 +04:00
Timothy Jaeryang Baek fce27202d9 refac 2025-07-17 02:37:18 +04:00
Timothy Jaeryang Baek 8b8ce2592d refac: styling 2025-07-14 19:34:40 +04:00
Timothy Jaeryang Baek 6d31fc7875 refac: styling 2025-07-09 13:50:45 +04:00
Timothy Jaeryang Baek c2ac797650 feat: formatting buttons 2025-07-09 03:11:51 +04:00