From 821b1af3a4841eb56fffc09671e5bd4b2ec2a63c Mon Sep 17 00:00:00 2001 From: sriram veeraghanta Date: Tue, 14 Jul 2026 01:20:26 +0530 Subject: [PATCH 1/2] chore: clean up React Doctor warnings in admin app Raises the admin app's React Doctor score from 61 to 89 by resolving 49 of 53 diagnostics (3 errors + 46 warnings). Errors (render purity): - authentication/page.tsx: move ref write out of render into useEffect - workspace/create/form.tsx: guard window.location.origin read - sign-in-form.tsx: drop redundant setState-forwarding arrow Accessibility: - aria-labels on icon-only buttons (password toggles, sidebar, header) - destination-naming aria-labels on ambiguous "learn more"/"here" links - positive tabIndex -> 0; auth-banner dismiss div -> native {sendEmailStep === ESendEmailSteps.SEND_EMAIL && ( - )} diff --git a/apps/admin/app/(all)/(dashboard)/image/form.tsx b/apps/admin/app/(all)/(dashboard)/image/form.tsx index 72ab513398e..7a2b165fd04 100644 --- a/apps/admin/app/(all)/(dashboard)/image/form.tsx +++ b/apps/admin/app/(all)/(dashboard)/image/form.tsx @@ -64,6 +64,7 @@ export function InstanceImageConfigForm(props: IInstanceImageConfigForm) { target="_blank" className="text-accent-primary hover:underline" rel="noreferrer" + aria-label="Unsplash developer account documentation" > Learn more. diff --git a/apps/admin/app/(all)/(dashboard)/sidebar-help-section.tsx b/apps/admin/app/(all)/(dashboard)/sidebar-help-section.tsx index 51401f312ca..482ba5246a2 100644 --- a/apps/admin/app/(all)/(dashboard)/sidebar-help-section.tsx +++ b/apps/admin/app/(all)/(dashboard)/sidebar-help-section.tsx @@ -69,6 +69,7 @@ export const AdminSidebarHelpSection = observer(function AdminSidebarHelpSection ); } diff --git a/apps/admin/app/(all)/(home)/sign-in-form.tsx b/apps/admin/app/(all)/(home)/sign-in-form.tsx index 4e0afb8ea13..7b03b8c1cd8 100644 --- a/apps/admin/app/(all)/(home)/sign-in-form.tsx +++ b/apps/admin/app/(all)/(home)/sign-in-form.tsx @@ -127,9 +127,7 @@ export function InstanceSignInForm() { {errorData.type && errorData?.message ? ( ) : ( - <> - {errorInfo && setErrorInfo(value)} />} - + <>{errorInfo && } )} @@ -170,6 +168,7 @@ export function InstanceSignInForm() { {showPassword ? ( ) : ( - )} - {secondaryButton} - - - - ); -} diff --git a/apps/admin/components/common/header/index.tsx b/apps/admin/components/common/header/index.tsx index 48b9ca78e9c..bbd3e03f76f 100644 --- a/apps/admin/components/common/header/index.tsx +++ b/apps/admin/components/common/header/index.tsx @@ -21,6 +21,8 @@ export const HamburgerToggle = observer(function HamburgerToggle() { const { isSidebarCollapsed, toggleSidebar } = useTheme(); return ( - - - - - ); -} diff --git a/apps/admin/components/instance/loading.tsx b/apps/admin/components/instance/loading.tsx deleted file mode 100644 index 293b44bdcc8..00000000000 --- a/apps/admin/components/instance/loading.tsx +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Copyright (c) 2023-present Plane Software, Inc. and contributors - * SPDX-License-Identifier: AGPL-3.0-only - * See the LICENSE file for details. - */ - -import { useTheme } from "next-themes"; -// assets -import LogoSpinnerDark from "@/app/assets/images/logo-spinner-dark.gif?url"; -import LogoSpinnerLight from "@/app/assets/images/logo-spinner-light.gif?url"; - -export function InstanceLoading() { - const { resolvedTheme } = useTheme(); - - const logoSrc = resolvedTheme === "dark" ? LogoSpinnerLight : LogoSpinnerDark; - - return ( -
- logo -
- ); -} diff --git a/apps/admin/components/instance/setup-form.tsx b/apps/admin/components/instance/setup-form.tsx index 74e80db45b6..158d57f918d 100644 --- a/apps/admin/components/instance/setup-form.tsx +++ b/apps/admin/components/instance/setup-form.tsx @@ -274,6 +274,7 @@ export function InstanceSetupForm() {