From 9917f5d1c8f91f9f315a4587dfb354e17df7b95e Mon Sep 17 00:00:00 2001 From: Sanjaiyan Parthipan Date: Fri, 6 Nov 2026 21:22:15 +0530 Subject: [PATCH 1/6] Enhance Vite configuration to enable React compiler options in plugins --- package.json | 1 + pnpm-lock.yaml | 274 ++++++++++++++++++++++++++++++++++++++++++++++++- vite.config.ts | 6 +- 3 files changed, 278 insertions(+), 3 deletions(-) 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/vite.config.ts b/vite.config.ts index 362a0eb..fce699b 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -9,7 +9,11 @@ export default defineConfig(({ mode }) => { const apiTarget = env.VITE_API_PROXY_TARGET || "http://localhost:8080"; return { - plugins: [react()], + plugins: [ + react({ + compiler: true, + }), + ], base: "/quicksilver/", server: { port: 3000, From 449a96cc34b2350a0476a275c5dffb40b293cd64 Mon Sep 17 00:00:00 2001 From: Sanjaiyan Parthipan Date: Sun, 8 Nov 2026 03:58:54 +0530 Subject: [PATCH 2/6] refactor: streamline loading state management in forms and message bubble --- src/view/moles/AddAccountForm.tsx | 1 + src/view/moles/MessageBubble.tsx | 5 ++--- src/view/moles/ProfileForm.tsx | 1 + src/view/pages/ThreadPage.tsx | 3 +-- 4 files changed, 5 insertions(+), 5 deletions(-) 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/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/ProfileForm.tsx b/src/view/moles/ProfileForm.tsx index 44bb058..41f07f6 100644 --- a/src/view/moles/ProfileForm.tsx +++ b/src/view/moles/ProfileForm.tsx @@ -196,6 +196,7 @@ function ProfileForm({ user, onSubmit }) { } catch (err: any) { setError(err.message || "Failed to update profile"); } + setLoading(false); }; return ( diff --git a/src/view/pages/ThreadPage.tsx b/src/view/pages/ThreadPage.tsx index 96610e0..905953d 100644 --- a/src/view/pages/ThreadPage.tsx +++ b/src/view/pages/ThreadPage.tsx @@ -139,9 +139,8 @@ function ThreadPage() { setToast("Message sent"); } catch (e) { setSendError(e?.message || "Failed to send reply"); - } finally { - setSending(false); } + setSending(false); }; // Fetch the message body once per thread. `getMessages` is memoized in From 63089651298e511ea6c891f7054ed92e57c23853 Mon Sep 17 00:00:00 2001 From: Sanjaiyan Parthipan Date: Sun, 8 Nov 2026 04:02:07 +0530 Subject: [PATCH 3/6] fix: ensure unique keys for MessageBubble components in MessageGroup --- src/view/moles/MessageGroup.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) => ( Date: Sun, 8 Nov 2026 20:30:35 +0530 Subject: [PATCH 4/6] fix: update loading state management in RegisterPage to ensure proper state handling --- src/view/atoms/MessageContent.tsx | 4 +++- src/view/pages/RegisterPage.tsx | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) 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/pages/RegisterPage.tsx b/src/view/pages/RegisterPage.tsx index 48e757c..3041151 100644 --- a/src/view/pages/RegisterPage.tsx +++ b/src/view/pages/RegisterPage.tsx @@ -18,9 +18,8 @@ function RegisterPage() { navigate("/"); } catch (error) { throw error; - } finally { - setLoading(false); } + setLoading(false); }; return ( From f53f3e91edebd98f1d447c9b724542a49aa61dba Mon Sep 17 00:00:00 2001 From: Sanjaiyan Parthipan Date: Sun, 8 Nov 2026 22:41:38 +0530 Subject: [PATCH 5/6] fix: move loading state reset to ensure it executes after error handling in LoginPage --- src/view/pages/LoginPage.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/view/pages/LoginPage.tsx b/src/view/pages/LoginPage.tsx index c0603a3..a625767 100644 --- a/src/view/pages/LoginPage.tsx +++ b/src/view/pages/LoginPage.tsx @@ -26,9 +26,8 @@ function LoginPage() { navigate("/"); } catch (error) { throw error; - } finally { - setLoading(false); } + setLoading(false); }; return ( From 3570c532c4c446599efdb69da3779102dfc0501a Mon Sep 17 00:00:00 2001 From: Sanjaiyan Parthipan Date: Sun, 8 Nov 2026 22:52:51 +0530 Subject: [PATCH 6/6] fix: update navigation in Header to use startTransition for smoother profile routing --- src/view/moles/ComposeDialog.tsx | 12 +++++++----- src/view/moles/Header.tsx | 4 ++-- 2 files changed, 9 insertions(+), 7 deletions(-) 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 }} >