perf(api,frontend): index hot queries, paginate chats, fix realtime

This commit is contained in:
hh committed 2026-08-06 01:52:41 +02:00
1 parent 9d767d2531
commit 525ce024bc
27 files changed
+831 -268

No files matched your search

@@ -9,6 +9,7 @@
import JobList from "$lib/components/jobs/JobList.svelte";
import Button from "$lib/components/ui/Button.svelte";
import Icon from "$lib/components/ui/Icon.svelte";
import { createChatPicker } from "$lib/stores/chat-picker.svelte";
import { chats } from "$lib/stores/chats.svelte";
import { toasts } from "$lib/stores/toasts.svelte";
@@ -23,13 +24,18 @@
let syncing = $state(false);
let syncingContacts = $state(false);
const availableChats = $derived(
chats.list
.filter((c) =>
(c.title ?? "").toLowerCase().includes(filter.trim().toLowerCase())
)
.slice(0, 40)
);
const picker = createChatPicker();
const availableChats = $derived(picker.results);
$effect(() => {
picker.search(filter);
});
$effect(() => {
if (selected !== null) {
chats.ensure(selected);
}
});
function chatTitle(id: number | null): string {
if (id === null) {