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 Chat.tsx for react-compiler
Eric Roberts
2026-11-10T17:29:12ZThe compiler doesn't support try/finally:
(BuildHIR::lowerStatement) Handle TryStatement with a finalizer
('finally') clause
Use .catch() and .finally() on the upload promise instead
Semantic diff summary
0 added,
2 modified,
0 signature changed,
0 removed
across 2 analyzed files
+0
-1
scripts/compiler.test.mjs
#
+19
-19
src/components/Chat.tsx
#
| ... | ... | @@ -852,25 +852,25 @@ export const ChatInner = () => { | |
| 852 | 852 | activeChat instanceof borogove.Channel && !activeChat.isPrivate(); | |
| 853 | 853 | setAttachmentError(null); | |
| 854 | 854 | setAttachmentProgress(true); | |
| 855 | - | try { | |
| 856 | - | await Promise.all( | |
| 857 | - | files.map((file) => | |
| 858 | - | client.prepareAttachment(file, !isPublicChat).then((attachment) => { | |
| 859 | - | if (attachment === null) throw new Error("Attachment failed"); | |
| 860 | - | ||
| 861 | - | setAttachments((existing) => [ | |
| 862 | - | ...existing, | |
| 863 | - | { attachment, uri: URL.createObjectURL(file) }, | |
| 864 | - | ]); | |
| 865 | - | }), | |
| 866 | - | ), | |
| 867 | - | ); | |
| 868 | - | } catch (error) { | |
| 869 | - | console.error("Attachment upload failed", error); | |
| 870 | - | setAttachmentError(attachmentErrorMessage(error)); | |
| 871 | - | } finally { | |
| 872 | - | setAttachmentProgress(false); | |
| 873 | - | } | |
| 855 | + | await Promise.all( | |
| 856 | + | files.map((file) => | |
| 857 | + | client.prepareAttachment(file, !isPublicChat).then((attachment) => { | |
| 858 | + | if (attachment === null) throw new Error("Attachment failed"); | |
| 859 | + | ||
| 860 | + | setAttachments((existing) => [ | |
| 861 | + | ...existing, | |
| 862 | + | { attachment, uri: URL.createObjectURL(file) }, | |
| 863 | + | ]); | |
| 864 | + | }), | |
| 865 | + | ), | |
| 866 | + | ) | |
| 867 | + | .catch((error) => { | |
| 868 | + | console.error("Attachment upload failed", error); | |
| 869 | + | setAttachmentError(attachmentErrorMessage(error)); | |
| 870 | + | }) | |
| 871 | + | .finally(() => { | |
| 872 | + | setAttachmentProgress(false); | |
| 873 | + | }); | |
| 874 | 874 | }; | |
| 875 | 875 | ||
| 876 | 876 | const handleAttach = () => { |