cheogram-www
created pr with
cheogram-www/react-compiler-fixes.1
commented
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 -3checkout specific patchset revision:
ssh pr.pico.sh pull cheogram-www:react-compiler-fixes [rev] | git am -3add changes to patch request:
git format-patch main --stdout | ssh pr.pico.sh cheogram-www:react-compiler-fixesadd comment to patch request:
ssh pr.pico.sh comment cheogram-www:react-compiler-fixes "lgtm!"
Patchset
cheogram-www/react-compiler-fixes.1
Test each file for compilability
Eric Roberts
Fix Account.tsx for react-compiler
2026-11-10T17:11:18ZEric Roberts
Fix Accounts.tsx for react-compiler
2026-11-10T17:23:58ZEric Roberts
Fix Chat.tsx for react-compiler
2026-11-10T17:26:31ZEric Roberts
→ Fix Chats.tsx for react-compiler
2026-11-10T17:29:12ZEric Roberts
Fix Login.tsx for react-compiler
2026-11-10T17:32:03ZEric Roberts
Fix MessageDebugger.tsx for react-compiler
2026-11-10T17:33:10ZEric Roberts
Fix MessageMenuInChat.tsx for react-compiler
2026-11-10T17:33:57ZEric Roberts
Fix Quill.tsx for react-compiler
2026-11-10T17:34:29ZEric Roberts
Fix Register.tsx for react-compiler
2026-11-10T17:35:10ZEric Roberts
2026-11-10T17:36:03Z
Fix Chats.tsx for react-compiler
Eric Roberts
2026-11-10T17:32:03ZThe available-chat search hits this compiler error:
(BuildHIR::lowerStatement) Handle for-await loops
Moved the loop into a function outside the component
Semantic diff summary
1 added,
2 modified,
0 signature changed,
0 removed
across 2 analyzed files
+0
-1
scripts/compiler.test.mjs
#
+12
-3
src/components/Chats.tsx
#
| ... | ... | @@ -70,6 +70,16 @@ import { href, useEffectEvent, useChatExtras, useChats, Chat } from "../util"; | |
| 70 | 70 | ||
| 71 | 71 | borogove.Config.relativeHashUri = true; | |
| 72 | 72 | ||
| 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 | + | ||
| 73 | 83 | export const Chats = () => { | |
| 74 | 84 | const params = useParams(); | |
| 75 | 85 | const navigate = useNavigate(); |
| ... | ... | @@ -286,14 +296,13 @@ export const Chats = () => { | |
| 286 | 296 | const search = searchQ; | |
| 287 | 297 | if (search) { | |
| 288 | 298 | setAvailableChats({ q: search, chats: [] }); | |
| 289 | - | const iterator = client.findAvailableChats(search); | |
| 290 | - | for await (const availableChat of iterator) { | |
| 299 | + | await findAvailableChats(client, search, (availableChat) => { | |
| 291 | 300 | setAvailableChats((existing) => | |
| 292 | 301 | availableChat && existing.q === search | |
| 293 | 302 | ? { q: search, chats: [...existing.chats, availableChat] } | |
| 294 | 303 | : existing, | |
| 295 | 304 | ); | |
| 296 | - | } | |
| 305 | + | }); | |
| 297 | 306 | } | |
| 298 | 307 | }); | |
| 299 | 308 | useEffect(() => { |