diff --git a/package.json b/package.json index d4bc41e..31d630a 100644 --- a/package.json +++ b/package.json @@ -49,6 +49,7 @@ "@types/react-dom": "^19.3.0", "@types/styled-components": "^5.1.36", "@vitejs/plugin-react": "^6.1.2", + "oxc-transform-react": "^0.157.0", "typescript": "^5.9.3", "vite": "^8.3.5" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 680a732..5815405 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -85,7 +85,10 @@ importers: version: 5.1.36 "@vitejs/plugin-react": specifier: ^6.1.2 - version: 6.1.2(vite@8.3.5(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.6.1)) + version: 6.1.2(oxc-transform-react@0.157.0)(vite@8.3.5(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.6.1)) + oxc-transform-react: + specifier: ^0.157.0 + version: 0.157.0 typescript: specifier: ^5.9.3 version: 5.9.3 @@ -889,6 +892,185 @@ packages: integrity: sha512-1Duyg48TdJNdyhEB8Xn1L36bT9Pv6GUtlKjHxOys8xkaF/rQq3XJE+bAurSK/AgIz5mGFsb77cn9Pb20+WCScw==, } + "@oxc-transform-react/binding-android-arm-eabi@0.157.0": + resolution: + { + integrity: sha512-i0ov2cjqDFKhHKlEuOtWKmjTDHb0xkKOdeFfs1tUxkuFTLwZfS/nGyuHfoYMnwQD8sYiZhLoBvZVo2IkeobXGw==, + } + engines: { node: ^20.19.0 || >=22.12.0 } + cpu: [arm] + os: [android] + + "@oxc-transform-react/binding-android-arm64@0.157.0": + resolution: + { + integrity: sha512-UeEysRj06reHlm6C9l29mFpcOMA2gJEdsprFniRyM2T8QOLB+vZzNbKea59ozFyZsa/pvrDB+s2k3fo+YQnTXw==, + } + engines: { node: ^20.19.0 || >=22.12.0 } + cpu: [arm64] + os: [android] + + "@oxc-transform-react/binding-darwin-arm64@0.157.0": + resolution: + { + integrity: sha512-iw33CdgV3rdv15MEkvgPDZwkZdvBkEJvmWERmfENguUINIZLOC4w+Wx0UJpRHQyRoSXb+1Cug6JYepKVqG9VSg==, + } + engines: { node: ^20.19.0 || >=22.12.0 } + cpu: [arm64] + os: [darwin] + + "@oxc-transform-react/binding-darwin-x64@0.157.0": + resolution: + { + integrity: sha512-71cwTqLG0mH90jKL2Z4hn5j7d7VpuVwhBODNA/rZpdsfBN/3KYghPHW01S0o7UMAg39mZ0MJWemzX7jMBR940A==, + } + engines: { node: ^20.19.0 || >=22.12.0 } + cpu: [x64] + os: [darwin] + + "@oxc-transform-react/binding-freebsd-x64@0.157.0": + resolution: + { + integrity: sha512-bGLoinizopVyOVXG4YvLXcUGn3ieXDgX5p3XmvA4AWXFXIu+8HwFRbtURpnjdTEvXe52tyyGdSeN8/JHXYEhNQ==, + } + engines: { node: ^20.19.0 || >=22.12.0 } + cpu: [x64] + os: [freebsd] + + "@oxc-transform-react/binding-linux-arm-gnueabihf@0.157.0": + resolution: + { + integrity: sha512-gn06VYEbRCuKx1V4XZXBqmLlF/eWc+HzGFhu1KOfobFHkSsFzp7QfeICefcdUZMqFj5eW0CLaWLjeBHsa9kPvQ==, + } + engines: { node: ^20.19.0 || >=22.12.0 } + cpu: [arm] + os: [linux] + + "@oxc-transform-react/binding-linux-arm-musleabihf@0.157.0": + resolution: + { + integrity: sha512-D09fdr6RIybelLGrSYy7zx7sDOgUExAp8KnUE5+NAir0k3YpzMhWG2Z7yIpOCFqkduqX8+UMqUZxVH4sd8Dh6Q==, + } + engines: { node: ^20.19.0 || >=22.12.0 } + cpu: [arm] + os: [linux] + + "@oxc-transform-react/binding-linux-arm64-gnu@0.157.0": + resolution: + { + integrity: sha512-RIliJqfKKtK1LkGLnNwKOUYx4CI5by5eDU3wUVbqlTb45/OHql7wmZGgxilImCR585JKQOSvfTFmYdofjUGp2Q==, + } + engines: { node: ^20.19.0 || >=22.12.0 } + cpu: [arm64] + os: [linux] + libc: [glibc] + + "@oxc-transform-react/binding-linux-arm64-musl@0.157.0": + resolution: + { + integrity: sha512-ERtqqhmjvE587bRCptCy3aZ0udHAramEjMf6u0txTJ3UPFc17PQysy4knjAKgzEax5dBvU42O5RbjNbeoRluqQ==, + } + engines: { node: ^20.19.0 || >=22.12.0 } + cpu: [arm64] + os: [linux] + libc: [musl] + + "@oxc-transform-react/binding-linux-ppc64-gnu@0.157.0": + resolution: + { + integrity: sha512-gCdZMnJdvADqIB8AGpb3BLPekwZwFn6TkJIRkRcGZ8ptIVEq/EWbROzRHYeydy6qc4xgHhGANLFWNbxZSzg2zw==, + } + engines: { node: ^20.19.0 || >=22.12.0 } + cpu: [ppc64] + os: [linux] + libc: [glibc] + + "@oxc-transform-react/binding-linux-riscv64-gnu@0.157.0": + resolution: + { + integrity: sha512-vtnCgX0pK81cphWLYX24IwD3IdAh393oJYT3o81pixS8VtelkEzODOACEzpr6m/mHQpyazTXRtltr67gjnk7FQ==, + } + engines: { node: ^20.19.0 || >=22.12.0 } + cpu: [riscv64] + os: [linux] + libc: [glibc] + + "@oxc-transform-react/binding-linux-riscv64-musl@0.157.0": + resolution: + { + integrity: sha512-whULUROhU+Fd0BCOsipC7HuwPJ4J3u3n7Qu91YrZQkn1JiUKerbwXwmvCaBR2FNIwGPTpYQ/Sl30L5AQoP5oXQ==, + } + engines: { node: ^20.19.0 || >=22.12.0 } + cpu: [riscv64] + os: [linux] + libc: [musl] + + "@oxc-transform-react/binding-linux-s390x-gnu@0.157.0": + resolution: + { + integrity: sha512-qfVAGwKsaddPwW7oYnIxKUhbtkZF3JZVBbBViLjmMlRmc7ugEYfvnbHf1CAx8XZH0XDSx84TdNAYNXreMhb9sQ==, + } + engines: { node: ^20.19.0 || >=22.12.0 } + cpu: [s390x] + os: [linux] + libc: [glibc] + + "@oxc-transform-react/binding-linux-x64-gnu@0.157.0": + resolution: + { + integrity: sha512-Ww+MnTOre6WzMrQhO4Q2OgsqKHi0ba3UciU3133Rgw1cycyc9cDvtqGSoeHXlbPQu0Od59C8emGhLxI2HDcBfw==, + } + engines: { node: ^20.19.0 || >=22.12.0 } + cpu: [x64] + os: [linux] + libc: [glibc] + + "@oxc-transform-react/binding-linux-x64-musl@0.157.0": + resolution: + { + integrity: sha512-ZkJMOIuYJqxNoPd/NuldHTqI/QbYLriB8ieflHg9oAisQTelJvgGiRbnjrXOIzXgmTAqfWF3W4dCQU79tHw9ww==, + } + engines: { node: ^20.19.0 || >=22.12.0 } + cpu: [x64] + os: [linux] + libc: [musl] + + "@oxc-transform-react/binding-openharmony-arm64@0.157.0": + resolution: + { + integrity: sha512-IJ0i3izuQ6eIMJyBsj9OB3WFiOjaRrzPAtTIN5MzfyE6fgmLKK818dg3VjR3wdpnU8bBz8RyAS5Vu2h77sy2dA==, + } + engines: { node: ^20.19.0 || >=22.12.0 } + cpu: [arm64] + os: [openharmony] + + "@oxc-transform-react/binding-win32-arm64-msvc@0.157.0": + resolution: + { + integrity: sha512-XGyGgHkWFYH5QljRMueZYlwpqZlormMiUOtWvGNr6zTC8nbqFekV87E2fPP364WO2Wz1F4l1CRoC3kK/FyUAKQ==, + } + engines: { node: ^20.19.0 || >=22.12.0 } + cpu: [arm64] + os: [win32] + + "@oxc-transform-react/binding-win32-ia32-msvc@0.157.0": + resolution: + { + integrity: sha512-wcwt8zwHo+BP1BbWeYJOecUP2LYWFipKxSmTGwCu4snpVZg4L87+3tUwS1VOISHUb6CxlN1ubtBwr6YznuoVJw==, + } + engines: { node: ^20.19.0 || >=22.12.0 } + cpu: [ia32] + os: [win32] + + "@oxc-transform-react/binding-win32-x64-msvc@0.157.0": + resolution: + { + integrity: sha512-+WYxeZqvkx2RMPrvXAgqBK2kQUQI/USRTBf/97GdaWk+DLa06Z8JOdGUBLPP+PYKFOz0M3lu8oOU7PJPaCp2Lg==, + } + engines: { node: ^20.19.0 || >=22.12.0 } + cpu: [x64] + os: [win32] + "@popperjs/core@2.11.8": resolution: { @@ -2056,6 +2238,13 @@ packages: } engines: { node: ">=0.10.0" } + oxc-transform-react@0.157.0: + resolution: + { + integrity: sha512-aHpj4nDakAfw8d7JjaxjJYP8Y/LiOcGMkEj6PgzKibzwie9/xYOUMqBNwGbcOsrMK8xLwC2S01JWJdoygZZ3hA==, + } + engines: { node: ^20.19.0 || >=22.12.0 } + parent-module@1.0.1: resolution: { @@ -3042,6 +3231,63 @@ snapshots: "@oxc-project/types@0.156.0": {} + "@oxc-transform-react/binding-android-arm-eabi@0.157.0": + optional: true + + "@oxc-transform-react/binding-android-arm64@0.157.0": + optional: true + + "@oxc-transform-react/binding-darwin-arm64@0.157.0": + optional: true + + "@oxc-transform-react/binding-darwin-x64@0.157.0": + optional: true + + "@oxc-transform-react/binding-freebsd-x64@0.157.0": + optional: true + + "@oxc-transform-react/binding-linux-arm-gnueabihf@0.157.0": + optional: true + + "@oxc-transform-react/binding-linux-arm-musleabihf@0.157.0": + optional: true + + "@oxc-transform-react/binding-linux-arm64-gnu@0.157.0": + optional: true + + "@oxc-transform-react/binding-linux-arm64-musl@0.157.0": + optional: true + + "@oxc-transform-react/binding-linux-ppc64-gnu@0.157.0": + optional: true + + "@oxc-transform-react/binding-linux-riscv64-gnu@0.157.0": + optional: true + + "@oxc-transform-react/binding-linux-riscv64-musl@0.157.0": + optional: true + + "@oxc-transform-react/binding-linux-s390x-gnu@0.157.0": + optional: true + + "@oxc-transform-react/binding-linux-x64-gnu@0.157.0": + optional: true + + "@oxc-transform-react/binding-linux-x64-musl@0.157.0": + optional: true + + "@oxc-transform-react/binding-openharmony-arm64@0.157.0": + optional: true + + "@oxc-transform-react/binding-win32-arm64-msvc@0.157.0": + optional: true + + "@oxc-transform-react/binding-win32-ia32-msvc@0.157.0": + optional: true + + "@oxc-transform-react/binding-win32-x64-msvc@0.157.0": + optional: true + "@popperjs/core@2.11.8": {} "@react-email/render@2.2.0(react-dom@19.3.1(react@19.3.1))(react@19.3.1)": @@ -3192,10 +3438,12 @@ snapshots: dependencies: "@types/node": 26.6.6 - "@vitejs/plugin-react@6.1.2(vite@8.3.5(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.6.1))": + "@vitejs/plugin-react@6.1.2(oxc-transform-react@0.157.0)(vite@8.3.5(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.6.1))": dependencies: "@rolldown/pluginutils": 1.0.1 vite: 8.3.5(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.6.1) + optionalDependencies: + oxc-transform-react: 0.157.0 accepts@1.3.8: dependencies: @@ -3613,6 +3861,28 @@ snapshots: object-assign@4.1.1: {} + oxc-transform-react@0.157.0: + optionalDependencies: + "@oxc-transform-react/binding-android-arm-eabi": 0.157.0 + "@oxc-transform-react/binding-android-arm64": 0.157.0 + "@oxc-transform-react/binding-darwin-arm64": 0.157.0 + "@oxc-transform-react/binding-darwin-x64": 0.157.0 + "@oxc-transform-react/binding-freebsd-x64": 0.157.0 + "@oxc-transform-react/binding-linux-arm-gnueabihf": 0.157.0 + "@oxc-transform-react/binding-linux-arm-musleabihf": 0.157.0 + "@oxc-transform-react/binding-linux-arm64-gnu": 0.157.0 + "@oxc-transform-react/binding-linux-arm64-musl": 0.157.0 + "@oxc-transform-react/binding-linux-ppc64-gnu": 0.157.0 + "@oxc-transform-react/binding-linux-riscv64-gnu": 0.157.0 + "@oxc-transform-react/binding-linux-riscv64-musl": 0.157.0 + "@oxc-transform-react/binding-linux-s390x-gnu": 0.157.0 + "@oxc-transform-react/binding-linux-x64-gnu": 0.157.0 + "@oxc-transform-react/binding-linux-x64-musl": 0.157.0 + "@oxc-transform-react/binding-openharmony-arm64": 0.157.0 + "@oxc-transform-react/binding-win32-arm64-msvc": 0.157.0 + "@oxc-transform-react/binding-win32-ia32-msvc": 0.157.0 + "@oxc-transform-react/binding-win32-x64-msvc": 0.157.0 + parent-module@1.0.1: dependencies: callsites: 3.1.0 diff --git a/src/view/atoms/MessageContent.tsx b/src/view/atoms/MessageContent.tsx index 2f6ed45..35c3325 100644 --- a/src/view/atoms/MessageContent.tsx +++ b/src/view/atoms/MessageContent.tsx @@ -152,7 +152,9 @@ const IsolatedHTML: React.FC<{ html: string }> = ({ html }) => { // resize() runs in listeners/timeouts that close over the initial render, so // read the latest height from a ref to avoid a stale-closure comparison. const heightRef = useRef(height); - heightRef.current = height; + useEffect(() => { + heightRef.current = height; + }, [height]); useEffect(() => { const iframe = ref.current; diff --git a/src/view/moles/AddAccountForm.tsx b/src/view/moles/AddAccountForm.tsx index 6cabe4c..d55bcac 100644 --- a/src/view/moles/AddAccountForm.tsx +++ b/src/view/moles/AddAccountForm.tsx @@ -164,6 +164,7 @@ const AddAccountForm = ({ (error as Error).message || "Registration failed. Please try again.", ); } + setSubmitting(false); }; const isBusy = loading || isSubmitting; diff --git a/src/view/moles/ComposeDialog.tsx b/src/view/moles/ComposeDialog.tsx index d6a5910..1aa7138 100644 --- a/src/view/moles/ComposeDialog.tsx +++ b/src/view/moles/ComposeDialog.tsx @@ -44,11 +44,13 @@ const ComposeDialog = ({ // Keep the panel unmounted when closed so each open starts fresh with the // latest reply context (recipients, subject, threading headers). keepMounted={false} - PaperProps={{ - sx: { - height: fullScreen ? "100%" : "90vh", - display: "flex", - flexDirection: "column", + slotProps={{ + paper: { + sx: { + height: fullScreen ? "100%" : "90vh", + display: "flex", + flexDirection: "column", + }, }, }} > diff --git a/src/view/moles/Header.tsx b/src/view/moles/Header.tsx index ae27158..52a5100 100644 --- a/src/view/moles/Header.tsx +++ b/src/view/moles/Header.tsx @@ -12,7 +12,7 @@ import { useTheme, } from "@mui/material"; import { useColorScheme } from "@mui/material/styles"; -import React from "react"; +import React, { startTransition } from "react"; import { useNavigate } from "react-router-dom"; import { useAccount } from "../../nonview/core/AccountContext"; import { getInitials } from "../_constants/avatarUtils"; @@ -149,7 +149,7 @@ const Header = ({ navigate("/profile")} + onClick={() => startTransition(() => navigate("/profile"))} aria-label="profile" sx={{ ml: isMobile ? 0.5 : 1 }} > diff --git a/src/view/moles/MessageBubble.tsx b/src/view/moles/MessageBubble.tsx index 8efc016..465f7f3 100644 --- a/src/view/moles/MessageBubble.tsx +++ b/src/view/moles/MessageBubble.tsx @@ -93,9 +93,8 @@ const MessageBubble = ({ urlRef.current = url; setPreview((p) => (p ? { ...p, url, loading: false } : p)); } catch (e) { - setPreview((p) => - p ? { ...p, loading: false, error: e?.message || "Preview failed" } : p, - ); + const errorMsg = e?.message || "Preview failed"; + setPreview((p) => (p ? { ...p, loading: false, error: errorMsg } : p)); } }; diff --git a/src/view/moles/MessageGroup.tsx b/src/view/moles/MessageGroup.tsx index 511b70f..8741508 100644 --- a/src/view/moles/MessageGroup.tsx +++ b/src/view/moles/MessageGroup.tsx @@ -98,7 +98,7 @@ const MessageGroup = ({ )} {messages.map((message, index) => ( { const apiTarget = env.VITE_API_PROXY_TARGET || "http://localhost:8080"; return { - plugins: [react()], + plugins: [ + react({ + compiler: true, + }), + ], base: "/quicksilver/", server: { port: 3000,