Commit Graph
723 Commits
Author SHA1 Message Date
Timothy Jaeryang Baek 916c03829d chore: format 2026-11-17 22:37:26 +09:00
Timothy Jaeryang Baek 0181885a24 refac 2026-11-17 22:15:11 +09:00
Timothy Jaeryang Baek ae35197cee refac 2026-11-17 22:03:13 +09:00
Timothy Jaeryang Baek c68b8a632e refac 2026-11-17 17:02:34 +09:00
Timothy Jaeryang Baek f14dca0eec refac 2026-11-17 00:14:38 +09:00
Timothy Jaeryang Baek 6a0223a882 refac 2026-11-16 22:16:34 +09:00
Classic298 7611074e2a fix: adding the same new tag to several chats at once fails all but one (#34144)
When several requests from one account added the same new tag at the same moment, for example an API client tagging a batch of chats in parallel or two chat imports bringing the same tag, only one of them went through. The others failed with a server error, and a chat whose tag request failed stayed without the tag. A tag that another request created in the meantime now counts as already there, so every request succeeds and the tag is stored once.

Fixes #34143
2026-11-16 21:59:40 +09:00
Classic298 956ee485f9 fix: concurrent requests stall for 30 seconds and fail with database session sharing on (#34185)
With DATABASE_ENABLE_SESSION_SHARING on (off by default), the chat lists and the inbox held the request's database connection while they opened a second one for a small extra read. A burst of page loads then took every pooled connection, each request waited for a second connection, and they failed after the 30 second pool timeout with "QueuePool limit ... reached". Those extra reads now run on the request's own connection. In a burst of 80 page loads with a pool of 5, 11 failed on SQLite and 58 on PostgreSQL before this change, and none fail now.

Fixes #34184
2026-11-16 19:15:17 +09:00
Timothy Jaeryang Baek aa394849d8 refac 2026-11-16 17:52:06 +09:00
Timothy Jaeryang Baek a199370769 refac 2026-11-16 15:16:21 +09:00
Timothy Jaeryang Baek 31ef2064da refac 2026-11-15 16:56:45 +09:00
Timothy Jaeryang Baek d7b3d08b4f refac 2026-11-14 14:16:19 +09:00
G30 0cce86d535 fix: a tag's chosen color shows in a folder's filter menu, group headers and board columns (#34390) 2026-11-14 06:41:02 +09:00
Timothy Jaeryang Baek 6378f94a65 refac 2026-11-14 00:45:43 +09:00
Timothy Jaeryang Baek 121bc0ec50 refac 2026-11-14 00:14:28 +09:00
Timothy Jaeryang Baek f1d735d807 refac 2026-11-13 23:50:28 +09:00
Timothy Jaeryang Baek 06491f0132 refac 2026-11-13 22:40:53 +09:00
G30 44d2dd3d52 feat: deleting an account removes the access grants that name it (#34223) 2026-11-13 19:03:00 +09:00
Classic298 3d36b436c6 fix: chat reopens on an older turn after an out-of-date window saves an edit (#34160)
A window that had missed a turn, for example a laptop that just woke up and has not reconnected yet, saved its own, older idea of where the chat was when it saved an edited message. The chat then reopened on that older turn, and the next message started a new branch there, so the newest reply moved behind the branch switch and the model no longer saw it. A save now keeps the chat on the newest turn of the branch it is on, the same turn the chat already shows once it has caught up.

Fixes #34126
2026-11-12 21:42:21 +09:00
Timothy Jaeryang Baek 28c5fba889 refac 2026-11-11 13:49:51 +09:00
Timothy Jaeryang Baek b01fe7fae2 refac 2026-11-10 17:22:51 +09:00
Timothy Jaeryang Baek da850248d1 refac 2026-11-10 15:56:52 +09:00
Timothy Jaeryang Baek 98f94057bb refac 2026-11-10 13:05:45 +09:00
Timothy Jaeryang Baek 537e223ede refac 2026-11-09 15:35:53 +09:00
Timothy Jaeryang Baek 6d3123b5b4 refac 2026-11-08 21:15:39 +09:00
Timothy Jaeryang Baek 9b9bea514d refac 2026-11-08 19:06:43 +09:00
Timothy Jaeryang Baek f0f4a24afa refac 2026-11-08 11:52:13 +09:00
Classic298 639766f7f9 refac: limit the number of search words used for chat search (#33844)
Chat search now uses at most the first 12 distinct words of the query.
2026-11-08 10:43:19 +09:00
Timothy Jaeryang Baek 834c47ee02 refac 2026-11-08 01:28:41 +09:00
Classic298 77959080e3 refac: limit size of version history diffs (#33865)
Diffing two versions of a skill, tool, function or prompt now refuses inputs above 5000 lines per version. All four history diff views share the same check.
2026-11-07 23:06:56 +09:00
Timothy Jaeryang Baek d4e8493cc5 refac 2026-11-07 20:31:42 +09:00
G30 def1d048bc chore: remove the Show Files on Terminal Select setting (#33855) 2026-11-07 16:47:42 +09:00
Timothy Jaeryang Baek 18f7633afa refac 2026-11-06 13:40:53 +09:00
Classic298 c165ee14f0 perf: opening a chat no longer loads the whole conversation to mark it read (#33666)
Every time a chat is opened, the server marks it as read, and to do so it loaded and parsed the full chat, images included, just to save the last-read time. Marking a chat as unread and removing a tag from a chat did the same. These now touch only the few chat fields they change, which makes them 4 to 6 times faster on large chats.

Measured on SQLite, best of 7 runs, sizes are the chat as stored in the database:

| Chat | Action | Before | After |
| --- | --- | --- | --- |
| 7 MB, text only | open (mark read) | 19.8 ms | 3.5 ms |
| 7 MB, text only | mark as unread | 20.7 ms | 3.5 ms |
| 7 MB, text only | remove tag | 21.2 ms | 3.4 ms |
| 49 MB, with images | open (mark read) | 122.2 ms | 30.0 ms |
| 49 MB, with images | mark as unread | 124.2 ms | 29.1 ms |
| 49 MB, with images | remove tag | 120.5 ms | 28.6 ms |
2026-11-05 22:38:25 +09:00
Timothy Jaeryang Baek 7efb494a2b refac 2026-11-05 22:38:02 +09:00
Timothy Jaeryang Baek 69189cbaad refac 2026-11-05 12:01:25 +09:00
Timothy Jaeryang Baek 99f4541e3b refac 2026-11-05 12:00:17 +09:00
Timothy Jaeryang Baek 404d27a36e refac 2026-11-05 11:41:25 +09:00
Classic298 051c357f98 refac: limit nesting depth of model settings (#33759)
Model meta and params are now rejected when they are nested too deeply.
2026-11-05 07:19:09 +09:00
Classic298 9f748cb5c9 perf: channel message pages load much faster when many messages are replies (#33691)
Opening a channel looked up every replied-to message one by one, so a page of 50 mostly-reply messages ran well over a hundred database queries. The replied-to messages and their authors are now fetched together, and the response is unchanged. Measured on a local SQLite database with a 50-message page where 46 messages are replies:

| | before | after |
|---|---|---|
| queries | 147 | 3 |
| time (median) | 46 ms | 1.9 ms |
2026-11-05 06:43:43 +09:00
Classic298 332f6a2586 perf: channel list loads much faster with many channels (#33690)
Opening the channel list ran several database queries for every channel, so the load time grew with the number of channels. The last message time, unread count, mute state and direct message participants are now fetched for all channels at once, so the number of queries stays the same no matter how many channels a user has. The response is unchanged.

Measured on SQLite with an admin user in 23 visible channels (50 seeded), 2000 messages per channel:

| | before | after |
|---|---|---|
| database queries | 93 | 9 |
| response time | 255 ms | 47 ms |
2026-11-05 06:43:25 +09:00
Classic298 323f7353bf perf: chat access checks no longer load the whole conversation (#33667)
Typing indicators, sending a message, shared links, comments and file access all check whether the user may access the chat, and each check loaded the full chat, images included, only to look at who owns it and which folder it is in. On large chats that delayed every other request on the same server process by up to a few hundred milliseconds per check. The check now reads just those few fields, and who gets access is unchanged.

Measured on SQLite, best of 5 runs, sizes are the chat as stored in the database:

| Chat | Checked for | Before | After |
| --- | --- | --- | --- |
| 7 MB, text only | the chat owner | 34.6 ms | 0.36 ms |
| 7 MB, text only | a user with access through a shared folder | 35.1 ms | 2.58 ms |
| 57 MB, with images | the chat owner | 249.8 ms | 0.72 ms |
| 57 MB, with images | a user with access through a shared folder | 249.0 ms | 2.80 ms |
2026-11-04 05:33:17 +09:00
Timothy Jaeryang Baek 0c64e5d596 chore: format 2026-11-03 17:36:03 +09:00
Timothy Jaeryang Baek 2840f0e07b refac 2026-11-02 12:47:34 +09:00
Timothy Jaeryang Baek ddb43c83ba refac 2026-11-02 12:45:15 +09:00
Timothy Jaeryang Baek 789a0f402a refac 2026-11-02 11:37:00 +09:00
Timothy Jaeryang Baek d99ec1c02c refac 2026-11-02 08:48:51 +09:00
Timothy Jaeryang Baek 3814b7b2f1 refac 2026-10-31 16:50:01 +09:00
Timothy Jaeryang Baek 9d1b4ef362 refac 2026-10-30 16:01:47 +09:00
Timothy Jaeryang Baek 7618df3f53 refac 2026-10-30 07:08:28 +09:00