37 KiB
37 KiB
Doghouse 0.5.0
Message search, custom server emoji and threads, on top of 0.4.1, plus the 0.5 fixes (drafts kept
across a reload and between a server and Home, the build number, and the items listed under
Fixes). One additive database migration, 010_search_emoji_threads.sql, applied automatically on
start. No new settings and no new ports.
New: message search (M23)
- A search field in the chat header searches the server you're in (every text channel you can see) or the DM or group DM you're in, never anywhere else. On a phone it's a magnifier icon that opens a full-width bar over the header.
- Results open in the right-hand panel (full screen on a phone), newest first: who wrote it, where (#channel or the DM), when, and a short extract with the words you searched for highlighted. Jump takes you to the message, even if it's far back or in another channel. "Show older results" loads 25 more at a time.
- Every word you type must appear (in any order), and the last word also matches longer words
that start with it (
partfinds "party"). Accents don't matter (cafefinds "café"). Punctuation-only input finds nothing and says so; quotes and words like AND, OR or NEAR are just searched as words. - Filters: type
from:orin:and pick a person or channel from the list, or typehas:file,has:link,before:2026-11-01orafter:2026-11-01(dates are days in your own time zone;after:starts the day after). Filters show as chips; click a chip to remove it. You can search with only filters. - You never see messages from people you've blocked, from channels or DMs you can't see, or messages that were deleted. An edited message is found by its new text, not its old text.
- Limit: 30 searches a minute per person (off when
RATE_LIMIT=false). - Known limit: Chinese, Japanese and Korean text is matched by whole runs of characters between spaces or punctuation, so searching for part of a run may not find it.
- On a 320 px wide screen, a DM's header puts Add people and Pinned messages in one "More options" menu, so the search icon fits (Add people starts a group from a 1:1 there too, QA-113).
- On phones 361 to 400 px wide (375 and 390 px), a group's header no longer runs off the screen and cuts off Notifications: the Group settings button stands in for the group picture there, as it already did at 320 px (QA-112).
- Picking a person or channel from the
from:/in:suggestions no longer throws an error in the background; the caret now goes back to where the filter was (QA-114). - Search has its own index inside the database. Some database tools (a hand-run
VACUUM, a.dumpand restore,.recover) can renumber the rows it points at; Doghouse checks for that every time it starts and rebuilds the index by itself if needed (one line in the log), so a restart puts search right. You can also rebuild it by hand withnode apps/server/dist/scripts/rebuild-search.js(in Docker:docker compose exec -u node app node apps/server/dist/scripts/rebuild-search.js). See the README. - Deleting a big channel no longer stalls the server (QA-116, there since 0.1): a 7,500-message channel in a 100,000-message database now goes in well under a second (before, every deleted message scanned the whole table: 1,500 messages among 11,500 already took close to a second).
New: custom server emoji (M24)
- Every server can have up to 50 of its own emoji. Anyone in the server can add one in Server
settings > Emoji: give it a name (2 to 32 letters, numbers or underscores;
partyandPartycount as the same name), pick a PNG, JPEG, GIF or WebP image of up to 256 KB and crop it square. Animated GIFs stay animated. The page shows each emoji, its name, who added it and how many of the 50 are used. The person who added an emoji, the owner and admins can rename or delete it. - Use them anywhere: type
:name:or pick one in the emoji picker, which now has a tab for each of your servers (with the server's icon) before the standard emoji, and searches both. You can use an emoji from any server you're in, in any server, DM or group. - People who aren't in that emoji's server, and messages whose emoji was deleted, show
:name:as text instead of the picture, never a broken image. Insidecodeit's always plain text. - React with them too. A message can still have at most 20 different reactions, custom and
standard together. Deleting an emoji removes its reactions everywhere; old messages show
:name:. - Limit: 10 emoji uploads a minute per person (off when
RATE_LIMIT=false).
New: threads (M25)
- Start a thread on any message in a server text channel: hover it (tap it on a phone) and pick Start thread, or press T with the message focused. The thread is named after the first 60 characters of the message. It opens beside the channel on a wide screen and full screen on a phone or tablet, with a Back button to the channel. Esc closes it on a wide screen; focus goes back to where you were.
- Replies stay in the thread. The channel shows the message that started it with a badge ("Picnic plans, 3 replies"); the badge opens the thread. The channel header has a Threads button that lists the channel's threads, newest activity first (in More options when the chat is under 360 px wide).
- Starting or replying follows a thread; the Following button unfollows it, and replying again follows it again. Being mentioned doesn't follow you. Only threads you follow count as unread: the channel gets a small dot, and mentions in a thread count toward the server's mention badge as channel mentions do. Notifications: a reply notifies the people following the thread whose notification level for the channel or server is All; a mention notifies the person mentioned unless their level is None. The title says "#channel › Thread name" and opens the thread. Blocks, quiet hours and Do not disturb work as for channel messages.
- If you block someone, a thread they started, or one started on their message, is still listed but its name shows as "Thread" to you, in the list, the thread's title, search and notifications (QA-128). Replies from other people show as normal. If a thread on their message is open when you block them, its parent switches to "Blocked message" at once (QA-133).
- Inside a thread everything works as in a channel: edit, delete, reactions, custom emoji, files, pins (up to 50 per thread), drafts (kept per thread) and blocking. Search finds replies in threads too and Jump opens the thread first.
- Not in DMs or group DMs, not on system messages, and no threads inside threads. Deleting the message that started a thread leaves the thread ("Original message was deleted"); server admins and the owner can delete a whole thread, with all its replies, from its menu; deleting the channel deletes its threads.
- On a wide screen an open thread takes the member list's place; Show member list closes the thread and brings the list back.
- Limit: 10 new threads a minute per person (off when
RATE_LIMIT=false). Replies count as ordinary messages.
Fixes
- Drafts are kept everywhere: what you type in a channel, DM or group DM is still there after you move between a server and Home and back, and after a reload of the page (D23). Drafts belong to the tab: a new tab or a tab you closed and reopened starts empty, and a second tab doesn't share them (a duplicated tab starts with a copy). Logging out clears every draft in that tab, so the next person to log in there never sees what you were typing, and so does the session ending without a Log out (it expired, or was signed out elsewhere): the app then goes back to the login screen and says "Your session has ended" (QA-108), also when the session ran out while the page was closed or in the background and you then reload it (QA-115). Only the server saying the session is missing or expired, and confirming it when asked again, does that: a wrong password, or any other refused request, is shown as an error and you stay logged in with your drafts. Only the text is kept: a reply you had started or a file you had attached is not. A draft longer than the message limit is kept in full too; it can't be sent until it's shortened (QA-106).
- Security (QA-105):
npm audit --omit=devis clean again. The three moderate reports published after 0.4.0 shipped (glob GHSA-3g3m-2fjr-6pw4, reached through@fastify/static, and minimatch GHSA-g3hv-75wg-m249) are gone:@fastify/staticgoes from 10.1.5 to 10.1.10, a patch release that asks for glob 14.0.5, which brings minimatch 11.0.8. No override was needed. - Themes (QA-88): if another device changes the theme while this device's own change is still being saved, this device now switches to the other device's newer choice as soon as its own save is confirmed, instead of staying on its older choice until a reload. Nothing flickers in between, and a change you make on this device after the other one still wins, as before.
RATE_LIMIT=falsenow also switches off the call-start limit (10 new calls per 10 minutes per person), like every other limit; it is listed in the README settings table, and a refusal now says when to try again (Retry-After) (QA-101).- Calls: joining a call always names the call it means (D10, planned in 0.4). 0.4.x pages already do, so they join as before; only a 0.3 page still open after the upgrade gets "Reload the page to join this call" until it is reloaded (QA-107).
- Readability (QA-80, QA-90): links, mentions and muted text on a hovered or selected row (a message under the pointer, the open channel or DM, a picked theme card) and the mention in the Settings preview now read at 4.5:1 or better in every theme, 7:1 in High contrast. Before, they could drop to about 3.2-4.4:1, and Auto's "Follows your device" line was 3.87:1 when Auto was picked on a dark device.
- High contrast with your own accent colour: accent-filled buttons, pills and highlights keep your colour's hue but are lightened when needed, so their labels read at 7:1 and they stand out on the black background (a black accent used to give black buttons on black). In High contrast a custom accent is lightened until its label reaches 7:1, and Settings > Appearance then shows "Adjusted for readability" with the colour used. The keyboard focus ring in High contrast also reaches 7:1 with any accent (QA-110).
- Docs (QA-96, QA-98): the backup command now names each file with the date and time
(
doghouse-backup-$(date +%F-%H%M%S).tgz), so a second backup on the same day no longer replaces the first, and the restore-rollback renames the old data todata-before-rollback-$(date +%F-%H%M%S), so a second rollback no longer puts the newer data inside the older folder. - Docs (QA-97, QA-99, QA-100): the 0.3.1 -> 0.4.0 notes in the README now say that 0.3.0 can go
straight to 0.4.0 (reading
doghouse-0.3.0fordoghouse-0.3.1), that a 0.3.0 user rolls back to 0.3.1 rather than 0.3.0 (unzip 0.3.1 into a fresh folder and copy.envfromdoghouse-0.4.0/deploy), and the last rollback step no longer says the 0.4.0 messages are kept after you restored the backup. - Build number (story 26): Settings > About now shows which build the server runs, e.g.
0.5.0 (build 1a2b3c4d5e, 2026-11-20), with a Copy version button for bug reports (it copies the same name as the screen, e.g.Doghouse 0.5.0 build 1a2b3c4d5e (2026-11-20T03:14:00Z), using yourAPP_NAME). The samebuildobject (version,commit,commitDate) is on/api/healthand/api/instance. - QA-94: the package is now the same, byte for byte, whatever time zone it is built in (the zip's file times are the commit time in UTC).
- Rolling back to 0.4.1 no longer deletes custom emoji pictures (QA-120). They are now stored in
their own
emojifolder inside the media folder, which 0.4.1's clean-up of unused pictures leaves alone, so upgrading again shows them. - A chat whose messages fail to load (the server or a proxy answers with an error) now says so with a Retry button, instead of asking again hundreds of times a second in every open tab (QA-121, at least since 0.4.1).
- Chat headers fit at every width (QA-112): on a group DM at 401-427 px (common Android phones) and in a 640-663 px window, Notifications was cut off. The header now arranges its buttons by the chat's own width, so the search field becomes an icon and the group picture button steps aside whenever space is short.
- The emoji picker lists the server you're in first, and search results say which server each
custom emoji is from ("
:party:from Gaming"), so Enter picks this server's emoji when two servers have one with the same name (QA-119). - The search rebuild command refuses to run when it can't find the database (a wrong
DATA_DIRorDB_PATH) instead of creating an empty one and reporting success, and waits for the server to finish a write instead of failing with "database is locked" (QA-122, QA-123).
Upgrading to 0.5.0 and rolling back
- From 0.4.1 or 0.4.0: follow "Upgrading 0.4.1 -> 0.5.0" in the README (back up the data folder
and
.env, unzip into a fresh folder, copydeploy/.envacross, movedeploy/dataacross,docker compose up -d --build). Settings and/api/healththen show0.5.0. - From 0.3.0 or 0.3.1: the same steps, reading your folder name for
doghouse-0.4.1. 0.5.0 includes every earlier fix, and the migrations in between run on start, in order. - Rollback: to 0.4.1 (not straight to 0.3.x), by moving
databack into the 0.4.1 folder. If you no longer have it, unzipdoghouse-0.4.1.zipinto a fresh folder and copy.envinto itsdeployfolder fromdoghouse-0.5.0/deploy. If you restore the pre-upgrade backup instead, rename the 0.5 data todata-before-rollback-$(date +%F-%H%M%S)first, and note that messages sent on 0.5.0 are then not kept. - The database (migration
010_search_emoji_threads.sql, the only one in 0.5): it only adds things (a search index, tables for custom emoji and threads, and one empty column on messages); no table is rebuilt. The first start builds the search index from your existing messages inside the migration: about 0.5 s for 118,000 messages on a test machine, and the server is healthy about a second after start. The database file grows by about a third more in that test (+37%). After that, a start-up check confirms the search index is in step (a few tens of milliseconds per 100,000 messages) and, if needed, moves custom emoji pictures intomedia/emojiand moves any thread-reply pins made under 0.4.1 into their thread. - Rolling back to 0.4.1 on the same data works: 0.4.1 doesn't use the new tables. The search index keeps itself up to date under 0.4.1 too, so upgrading again needs no rebuild.
- Custom emoji under 0.4.1 after a rollback (Q20): messages show the raw
<:name:...>text and custom reactions show as ac:<id>pill, which 0.4.1 can't remove (its reaction check refuses that value; adding the samec:<id>is refused too). Nothing else breaks, and upgrading again shows the pictures and makes them removable. The emoji pictures are kept through the rollback: 0.5 stores them in their ownmedia/emojifolder inside the data folder (QA-120, D34), which 0.4.1's hourly clean-up of unused pictures doesn't touch, and they are in your backups as before. - Threads under 0.4.1 after a rollback (D25): replies keep their channel, so 0.4.1 shows them inline in the channel as normal messages, in time order, without the thread around them. Pins made inside a thread aren't listed, and the channel's unread count includes the replies. Upgrading again puts them back in their threads; replies posted in that channel under 0.4.1 stay in the channel. A thread reply pinned under 0.4.1 moves to its thread's pins on the next start (QA-127); nothing is unpinned, even if that takes the thread past 50 pins.
Real-device checklist
The 0.3.0 and 0.4.0 checklists still apply. New in 0.5:
- Docker build on the server (M21-22): unzip the 0.5.0 package, run
docker compose up -d --buildin itsdeployfolder and wait untildocker compose pssays healthy. The build must finish with no error aboutbuild.json. Then Settings > App and notifications > About and/api/healthboth show0.5.0 (build <10 characters>, <date>)with the same build as thebuild.jsonin the zip, and Copy version copies it. - Drafts on a phone: type something in a channel, switch to another app (or lock the phone) for a minute, come back and reload. The draft is still there. Log out and in as someone else in that tab: no drafts.
- Duplicate tab: duplicate a tab that has a draft. The new tab starts with it; after that, typing in one tab doesn't change the other.
- Custom emoji on a phone: in Server settings > Emoji, add one from the photo library (crop it square) and one animated GIF; both show in the picker's server tab, in a message and as a reaction, and the GIF moves.
- Threads on a phone: start one from a message, reply, go Back to the channel and see the badge and the count; tap a thread notification and it opens that thread.
- High contrast with your own accent (try black): buttons are a lighter shade of it with readable labels, and Settings > Appearance says "Adjusted for readability".
Developers
REQUIRE_LIVEKIT=1 npm run checkruns typecheck, lint and all unit tests with nothing skipped: shared 49, server 690, web 1701, 0 failed.- A full e2e run (
REQUIRE_LIVEKIT=1 npm run e2e) is 114 passed, 100 skipped, 0 failed. All skips follow the skip policy inCHANGES-0.3.0.md: desktop-only tests skipped in the phone project and phone-only layout checks skipped in the desktop project. - The release zip carries the notes of every release (
CHANGES-0.1.1.mdto this file andCHANGES-M6.md) andTHIRD-PARTY-NOTICES.md. - M25 threads UI (DESIGN-0.5 section 4e):
ThreadPanel.svelte(the thread conv inMessageList/Composer, title, Following, menu, Back/Close),ThreadsPanel.svelte(the channel's list), routes/channels/:server/:channel/threads/:thread(the app's existing/channels/...scheme; the design text says/servers/...).AppShelldocks the panel on desktop (clamp(20rem, 40%, 26rem), in the member list's slot) and puts it full screen with the channelinertbelow 1024 px.MessageItemhas the badge, the Start/Open thread tool and the T key;MessageListtakes anintro(the thread's parent) andonThread;ComposertakesinputId(thread-composer-input);ChannelListshows the followed-thread dot. E2E:e2e/tests/threads.spec.ts(M25-01..06, including the M25-05 seeded-thread regression across every channel endpoint, the 0.4.1 history query on the e2e data, and the start limit on the RATE_LIMIT andRATE_LIMIT=falseinstances) and an M25-02 case inpush.spec.ts. QA-133: the open thread's parent uses the sameblocks.hascheck as a channel quote, so it reads "Blocked message" as soon as you block its author (after a reload the server omits the parent, so it reads as deleted). QA-134: M25-02 waits forpush-devicesto show "(this device)" after the checkbox, the same wait M12 already uses, so the subscription is saved before the test triggers a push. - M24 custom emoji (D27, D28):
packages/shared/src/custom-emoji.ts(limits, name rule, token andc:<id>helpers), media kindemoji(aspect 1, sizes 64 and 128,maxMb 0.25; a size under 1 MB is reported in KB). Server:services/emoji.tsandroutes/emoji.ts(GET/POST /api/servers/:id/emoji,PATCH/DELETE /api/emoji/:id); the upload is the shared multipart pipeline with one extranamefield (receiveCroppedImage(..., ['name'])), checked for membership, the rate limit and the cap before the body is read and again in the insert transaction. Reactions:emojiSchematakesc:<ULID>;MessageService.reactchecks the emoji exists and the reactor is a member of its server (400 unknown_emoji);ReactionDtocarries the emoji'snamewhile it exists;dropReactionsIndeletes and announces. Deleting a server removes its emoji images and the reactions that used them. Push notifications show:name:. Uses migration 010'scustom_emojitable as it is. Client:stores/emoji.svelte.ts,lib/custom-emoji.ts(:name:<-> token outside code),Inlinetypeemojiinmarkdown.ts,EmojiPicker.svelte(category bar,onPick(emoji, custom?)),ServerEmojiSettings.svelte. Tests:apps/server/test/emoji.routes.test.ts,packages/shared/src/custom-emoji.test.ts,apps/web/src/lib/custom-emoji.test.ts; e2eemoji.spec.ts(M24-01 to M24-07). - Drafts live in the module-level
apps/web/src/lib/stores/drafts.ts(aMapkeyed by conversation id, withget,setandclear()), not inComposer.svelte. It is backed bysessionStorageunder one key per user,doghouse:drafts:<userId>: loaded once at login, written at most every 500 ms while typing and whenever the page is hidden (visibilitychangeto hidden, which phones send when an app is backgrounded, andpagehide), never synced between tabs (nothing listens forstorageevents), every draft stored in full, never cut down, even one over the message limit (MAX_MESSAGE_LENGTH, 4,000; QA-106: the composer still blocks sending it). An unreadable value is dropped and a write over the quota is skipped (the draft stays in memory). The composer reads its draft when it mounts and whenconv.idchanges (the 0.4.1swapDraftguard, QA-102, stays) and writes it back as you type, when the id changes and when it is destroyed.auth.logout()callsdrafts.clear(), which removes everydoghouse:drafts:*key and ends the composer's session, so a composer torn down after the logout can't write its text back. QA-108: the session ending on the server does the same:api()reports a 401 whose body code isSESSION_REQUIRED('unauthorized', from@chat/shared; the only coderequireAuthsends) from any call except login, register and logout (onSessionLostinlib/api.ts), and the socket reports a refused connection (connect_errorwith that message). D31: either report then makes oneGET /api/auth/me, and only{ user: null }ends the session and wipes the drafts; a network error, a 5xx, a user, or any other answer leaves both alone, and 401s that arrive together share one pending check (reportSessionLostinlib/api.ts). Every other 401 has its own code and is an ordinary error: a wrong password at login is now401 invalid_credentials(it wasunauthorized; a 0.4.1 page only shows the message, which is unchanged), and the LiveKit webhook's401 bad_signatureonly ever goes to LiveKit. Tests:api.test.ts(each non-session 401 keeps the session; each/meanswer; one shared check),apps/server/test/session-401.test.ts(every protected route's 401 code, the login and webhook codes), and e2edrafts.spec.ts"QA-108 follow-up" (a 401invalid_credentialsfrom Settings keeps you logged in with your drafts; the same call with the session code keeps you logged in while/mestill returns you, with one check, and logs out once/meanswers{ user: null }). There is no change-password form in 0.5, so that e2e answers the account Save with the wrong-password 401. - Search rebuild and the start-up check (D30, D32, QA-111):
apps/server/src/db/search-index.ts.messages.idis a TEXT primary key (ULIDs), so the FTS index joins on the implicit rowid, which a dump and restore,.recover, a table rebuild or VACUUM on another SQLite build can renumber. Migration 010 addssearch_rowids(rowid INTEGER PRIMARY KEY, message_id), kept in step by the same three triggers asmessages_ftsand filled by the same backfill. At every start (buildApp, after migrations)checkSearchIndexlooks for anysearch_rowidsrow whosemessagesrow (by rowid) is missing, has another id or is no longer searchable, then compares the counts of searchable messages,search_rowidsandmessages_fts_docsize; on any differencerebuildSearchIndex(the samedelete-allplusINSERT ... SELECTas the backfill, for both tables, one transaction) runs and one warning line is logged. The check is about 20 ms for 100,000 messages. The scriptapps/server/src/scripts/rebuild-search.ts, built todist/scripts/rebuild-search.js(in the image and the zip), runs the rebuild by hand; it opensDB_PATH, orDATA_DIR/chat.db, like the server. Every search filter (scope, membership, blocks, type, deleted) still reads the joinedmessagesrow. Tests:apps/server/test/search-startup-check.test.ts(a channel deleted and the rows renumbered as a dump and restore would; a rowid swap plus a reordered rebuild that keep count, sum and max; a missing pair; the triggers through edit, delete and cascades; the 100,000-row timing),search-index-check.test.ts(the same through a real restart on a database file: words only in a DM the reader isn't in give 0 results, real results are exact; the 0.4.1 upgrade fillssearch_rowids; the timings below),search-rebuild.test.ts(the command, and the worst-case shift without a restart), andsearch.test.ts(snippets are text, the<mark>s come only from the markers). - 0.5-dev databases (QA-126): delete any database made by a 0.5 development build before this
release (for example before commit 1211228 it has no
search_rowidsand won't start); only databases from released versions are upgraded. - D36 (QA-127, QA-128):
apps/server/src/db/thread-pins.tsrelocateThreadPins()runs at every start (buildApp, next torelocateEmoji()): oneUPDATE pinsmoves pins whose message is a thread reply to the thread'sconv_idand logs one line when it moved any; moved pins don't count against the 50 (the cap only applies to new pins).threadNameFor()inpackages/sharedgivesTHREAD_NAME_HIDDEN("Thread") for a reader who blocked the thread's starter or its parent's author; the server applies it inThreadService(list, get, follow), the parent badge (threadSummaries), searchthreadNameand push titles, and the web applies it to room events (createdBy,parentAuthorId) and on a live block. Tests:thread-pins.test.ts,threads.blocked-names.test.ts,threads.push.test.ts, threads.spec M25-03. - D34 fix pass (QA-119 to QA-123):
- QA-120:
MediaServicewrites kindemojitoMEDIA_DIR/emoji/<mediaId>/<size>.webp;filePath()looks inMEDIA_DIR/<id>thenMEDIA_DIR/emoji/<id>,remove()andexists()cover both, andsweep()sweeps top-level media ids andemoji/<id>(theemojifolder itself is not a media id, so neither 0.5's nor 0.4.1's sweep removes it).relocateEmoji()moves emoji folders a pre-release 0.5 build left at the top level, once, at start. Tests:media.test.ts(layout, lookup order, remove, sweep, a copy of 0.4.1's sweep on 2-hour-old emoji, relocation) andemoji.routes.test.ts(served from the new place, emoji and server delete remove the folder, 0.4.1's sweep then re-upgrade serves the same bytes). - QA-121:
MessageList's load effect tracks onlyconv.id(untrack()around the loads); a failed first page shows "Couldn't load messages" with a Retry button (44 px). Tests:stores/messages-load-retry.test.ts, e2ehistory-retry.spec.ts(500 and 401, desktop and phone: one request in 2.5 s, Retry once more, then loads). - QA-112:
ChatPane's.chatis a size container (chathead); the header tiers (under 600 px: search icon, no gaps, no topic; under 480 px: no group avatar button; under 360 px: DM menu) and SearchBar's icon mode follow the chat's width instead of the window's. The search field keeps at least 8rem. e2eheader-fit.spec.tschecks 21 widths from 320 to 1024 px. - QA-119:
lib/emoji-picker.ts(currentServerFirst,matchCustom,customResultLabel);EmojiPickertakesserverId. Tests:emoji-picker.test.ts, e2eemoji.spec.ts"QA-119". - QA-122/123:
openExistingDb()(fileMustExist, needs amessagestable, nomkdir) andrebuildSearchCommand()indb/rebuild-command.ts;rebuildSearchIndexuses.immediate(). Tests:search-rebuild-command.test.ts(missing file, foreign file, another writer holding the lock in a worker thread) andsearch-rebuild.test.ts(the built script with a wrongDATA_DIR: exit 1, nothing created).
- QA-120:
- QA-116: migration 010 also adds
idx_messages_reply_to(partial,reply_to_id IS NOT NULL). Deleting a message nullsreply_to_idon its replies (ON DELETE SET NULL), which was a full scan ofmessagesper deleted message; deleting a 7,500-message channel among 100,000 messages now takes about 80 to 150 ms (search-startup-check.test.ts,search-index-check.test.ts; the same delete without the index is shown for comparison). - QA-108 (continued): after the
/mecheck confirms it, the auth store runs the same teardown as Log out (endSession()) and shows a notice on the login screen. A page load with no session also clears the stored drafts. Unit testsstores/drafts.test.ts,draft.test.tsandapi.test.ts; e2edrafts.spec.ts(the two "0.5 drafts" tests: server and Home at desktop and phone size, several chats, reload, new tab, logout and the next account; and QA-106/QA-108: an over-long draft after a reload, and an expired session both while the page is open and across a reload). - QA-105:
apps/server/test/deps-floors.test.tschecks the@fastify/staticfloor and that the lockfile installs no production glob or minimatch inside the advisory ranges. The bump also moves glob 13 -> 14, minimatch 10 -> 11, path-scurry 2 -> 3 and @fastify/send 4.1 -> 4.2 inside@fastify/static's own tree, and adds@isaacs/nonrecursive-glob-match(BlueOak-1.0.0, the same licence as glob); all of them need Node 20 or 22+, which the Docker image (node:22) andengines(>=20.19) already meet. - QA-88 (D24):
themeStore.applyRemotekeeps the newesttheme:updateit skips while the tab holds an unconfirmed change, andsaved()shows it when itsthemeUpdatedAtis later than the reply's (both server-stamped;isLater). That is the only theme-saving change in 0.5. Unit tests intheme-store.test.ts; e2ethemes.spec.ts"QA-88 (D24)" (5 rounds with the reply held, checking every painted theme; it fails on the 0.4.1 store). - QA-101:
CallServicetakes the limit flag fromconfig.rateLimit.enabled(startsis null when off), and the 429 carriesRetry-After. Unit tests incalls.test.ts; e2ecall-limits.spec.ts. The e2e's second instance (NOVIDEO_URL) now runs withRATE_LIMIT=false(E2E_RATE_LIMITine2e/server.mjs) for that check. - D10:
POST /api/dms/:dmId/call/tokenwithoutcallIdis400 call_id_required(after the membership check, so a non-member still gets 404); the current-call fallback and its debug line are gone. Unit tests incalls.test.tsandblocks.test.ts; e2ecall-limits.spec.ts. - QA-80, QA-90: two new per-user CSS variables from
themeVariables(lib/theme/theme.ts):--selected-text(the accent as text, moved only as far as needed to reach the target on the surfaces, on--hoverand--selectedover them, and on the 22% accent mention chip) and--selected-muted(muted text on those rows). Every rule that paints--hoveror--selectedsets--accent-text: var(--selected-text)and--text-muted: var(--selected-muted)for its contents, and the preview mention uses--selected-text. HelperscompositeOver,rowBackgroundsandreadableOnincontrast.ts. Unit tests incontrast.test.ts(every preset, 16 accents) andtheme.test.ts; e2ethemes.spec.ts"QA-80 and QA-90 in Chrome" measures the rendered colours. - High contrast buttons:
--accent(the fill) is lightened in OKLCH until black text on it reaches 7:1 (palette.buttonAdjusted),--on-accentfollows; accent text stays the preset's yellow. QA-110:--focus-ringin High contrast is lightened the same way to 7:1 against black, the surfaces and hovered or selected rows (other presets keep 3:1, QA-3);theme.test.tsand the QA-80/QA-90 test inthemes.spec.tscheck it. - QA-96, QA-98:
apps/server/test/docs-commands.test.tsruns the README's backup and rename commands as written, twice on the same day (a stand-indate), and checks that both backups and both rollback folders exist, nothing is nested anddatais cleared. It also checks the QA-97, QA-99 and QA-100 wording. - D22:
npm run packagewritesbuild.jsonat the zip root from git only:commitis the first 10 characters ofgit rev-parse HEAD(fixed, never--short),commitDateis%ctas UTC with a Z. It is built in memory after the dirty-tree check, so a refused run leaves nothing behind. The server reads it once at start (apps/server/src/lib/build-info.ts), else asks git with the same rules, else reportscommit: "dev".deploy/Dockerfilecopies it into the image (optional, so a checkout still builds). Tests:build-info.test.ts(both copies of the rules agree, TZ makes no difference, DOS times are UTC, fallbacks),build-info.test.tsin the web app, and the M21-11 e2e inpwa.spec.ts. - D22: development zip names use the same 10-character build hash as
build.json(doghouse-<version>.<hash>.zip), notgit rev-parse --short=7, which can grow;scripts/package-name.mjstakes it fromscripts/build-info.mjsandpackage-name.test.tschecks it matchesbuild.json'scommit. - Migration
010_search_emoji_threads.sql(DESIGN-0.5 sections 0, 2a, 3a, 4a; D25, D26, D27):threads(+idx_threads_channel, not in the design text, for "a channel's threads" and the cascade),thread_follows,messages.thread_idwithidx_messages_threadandidx_messages_channel_main,custom_emoji, and the external-content FTS5 tablemessages_fts(unicode61 remove_diacritics 2) with insert, update-of-content-or-deleted_at and delete triggers that share one condition (type = 'default' AND deleted_at IS NULL). The backfill is anINSERT ... SELECTwith that condition, after a'delete-all'so a re-applied migration doesn't index twice. Tests:upgrade.test.ts(010 on the 0.1.2 fixture: no old row changes, backfill exact, re-apply harmless, the 0.4.1 migration set has nothing to do and 0.4.1-style inserts, edits and soft deletes keep the index in step) andsearch-backfill.test.ts(M23-08: 100,000 mixed rows, timed, deleted and system rows left out). Note: FTS5'sintegrity-checkmust be run with rank 0 here, because a partial external-content index never matches the wholemessagestable. - Search API (M23, DESIGN-0.5 2b, D26):
GET /api/searchinroutes/search.tsandservices/search.ts. The scope is checked first (server: member and not banned; DM: a current member;in: a text channel of that server); every failure is one neutral 404Nothing to search here, so the body never says what exists. The FTS5 query comes fromlib/search-query.ts(ftsQuery): each word with a letter or digit becomes one quoted string (quotes doubled), ANDed,*on the last; words with no letter or digit are dropped, and nothing left is400 empty_query. Filtersfrom,in,before/after(instants viaulidFloor;afterinclusive),has=file(EXISTSon attachments),has=link(LIKE '%://%'); emptyqneeds a filter.notBlockedAuthor()before the LIMIT; newest first, 25 a page, cursor = last id. Each result is{ message, convId, convName, snippet, threadId?, threadName? };snippetissnippet(…, U+0002, U+0003, '…', 12)text, null without search text. 30 a minute per person (429 too_many_searcheswith Retry-After, off withRATE_LIMIT=false); a 400 or 404 doesn't count. Tests:search-query.test.tsandsearch.routes.test.ts(M23-01 to M23-07, M23-09). The markers are C0 controls on purpose:cleanMessageTextstrips them on every write, so a message can't fake a highlight. - Search UI (M23, DESIGN-0.5 2c):
lib/search.ts(pure: filter tokens,from:/in:suggestions,extractFilters,searchParamswith local days as UTC instants, andhighlightSegments, which splits the snippet into text segments, rendered as text with<mark>, never{@html}),lib/stores/search.svelte.ts(scope, text, chips, results, a sequence guard against stale responses; cleared on logout and when the scope changes),SearchBar.svelte(combobox field with a listbox; Enter/Tab pick, Esc closes suggestions then the phone bar, Backspace on an empty field removes the last chip) andSearchPanel.svelte(in theModalslot Pins uses, with the newfullOnPhone). Jump in the same conversation callsMessageList.jumpTo; to another channel it leaves the id inlib/stores/jump.tsand navigates, andMessageListtakes it instead of loading the latest page..chat-headeris nowposition: relative(the phone bar covers it). Tests:search.test.ts(unit) ande2e/tests/search.spec.ts(M23-01 to M23-07, M23-09, M23-10, screenshots inshots/m23).