cheogram-www

created pr with cheogram-www/react-compiler-fixes.1 on 2026-11-10T18:57:22Z · by 3c31bc8c
commented on 2026-11-10T18:57:22Z · by 3c31bc8c
Changes are available at https://tangled.org/mrry.band/cheogram-www on branch react-compiler-fixes.
cmds
checkout latest patchset:
ssh pr.pico.sh pull cheogram-www:react-compiler-fixes | git am -3
checkout specific patchset revision:
ssh pr.pico.sh pull cheogram-www:react-compiler-fixes [rev] | git am -3
add changes to patch request:
git format-patch main --stdout | ssh pr.pico.sh cheogram-www:react-compiler-fixes
add comment to patch request:
ssh pr.pico.sh comment cheogram-www:react-compiler-fixes "lgtm!"
+0 -1 scripts/compiler.test.mjs #
......@@ -4,7 +4,6 @@ import { test } from "node:test";
44 import { createServer } from "vite";
55
66 const compilerSkips = new Set([
7- "components/Chats.tsx",
87 "components/Login.tsx",
98 "components/MessageDebugger.tsx",
109 "components/MessageMenuInChat.tsx",
+12 -3 src/components/Chats.tsx #
......@@ -70,6 +70,16 @@ import { href, useEffectEvent, useChatExtras, useChats, Chat } from "../util";
7070
7171 borogove.Config.relativeHashUri = true;
7272
73+async function findAvailableChats(
74+ client: borogove.Client,
75+ search: string,
76+ onChat: (chat: borogove.AvailableChat | null | undefined) => void,
77+) {
78+ for await (const chat of client.findAvailableChats(search)) {
79+ onChat(chat);
80+ }
81+}
82+
7383 export const Chats = () => {
7484 const params = useParams();
7585 const navigate = useNavigate();
......@@ -286,14 +296,13 @@ export const Chats = () => {
286296 const search = searchQ;
287297 if (search) {
288298 setAvailableChats({ q: search, chats: [] });
289- const iterator = client.findAvailableChats(search);
290- for await (const availableChat of iterator) {
299+ await findAvailableChats(client, search, (availableChat) => {
291300 setAvailableChats((existing) =>
292301 availableChat && existing.q === search
293302 ? { q: search, chats: [...existing.chats, availableChat] }
294303 : existing,
295304 );
296- }
305+ });
297306 }
298307 });
299308 useEffect(() => {
Back to top