From 84b5649967f5f5f2f7fc91670d03540517b881bb Mon Sep 17 00:00:00 2001 From: Darshan Gowda T S Date: Tue, 19 May 2026 15:08:32 +0530 Subject: [PATCH 1/5] Improve async error handling and loading states --- src/app/error.tsx | 22 ++++++++++++++++++++++ src/app/loading.tsx | 7 +++++++ src/components/loader.tsx | 7 +++++++ 3 files changed, 36 insertions(+) create mode 100644 src/app/error.tsx create mode 100644 src/app/loading.tsx create mode 100644 src/components/loader.tsx diff --git a/src/app/error.tsx b/src/app/error.tsx new file mode 100644 index 00000000..e66125e3 --- /dev/null +++ b/src/app/error.tsx @@ -0,0 +1,22 @@ +"use client"; + +export default function Error({ + error, + reset, +}: { + error: Error; + reset: () => void; +}) { + return ( +
+

Something went wrong

+ + +
+ ); +} \ No newline at end of file diff --git a/src/app/loading.tsx b/src/app/loading.tsx new file mode 100644 index 00000000..acd5dbb9 --- /dev/null +++ b/src/app/loading.tsx @@ -0,0 +1,7 @@ +export default function Loading() { + return ( +
+
+
+ ); +} \ No newline at end of file diff --git a/src/components/loader.tsx b/src/components/loader.tsx new file mode 100644 index 00000000..5a31482b --- /dev/null +++ b/src/components/loader.tsx @@ -0,0 +1,7 @@ + export default function Loader() { + return ( +
+
+
+ ); +} \ No newline at end of file From 9387c3d59595681e0e9aa8d1f7a172089eb1c39d Mon Sep 17 00:00:00 2001 From: Darshan Gowda T S Date: Sat, 30 May 2026 08:02:00 +0530 Subject: [PATCH 2/5] Update error.tsx --- src/app/error.tsx | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/app/error.tsx b/src/app/error.tsx index e66125e3..f892f1f4 100644 --- a/src/app/error.tsx +++ b/src/app/error.tsx @@ -1,22 +1,31 @@ "use client"; +import { useEffect } from "react"; + export default function Error({ error, reset, }: { - error: Error; + error: Error & { digest?: string }; reset: () => void; }) { + useEffect(() => { + // Log the error to an error reporting service or console to satisfy lint rules + console.error("Application error captured:", error); + }, [error]); + return ( -
+

Something went wrong

- +

+ {error.message || "An unexpected error occurred."} +

); -} \ No newline at end of file +} From 4692041bbb298790b3bb2d1335867e397b29af4d Mon Sep 17 00:00:00 2001 From: Darshan Gowda T S Date: Sat, 30 May 2026 08:02:44 +0530 Subject: [PATCH 3/5] Update loading.tsx --- src/app/loading.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/app/loading.tsx b/src/app/loading.tsx index acd5dbb9..99c38a56 100644 --- a/src/app/loading.tsx +++ b/src/app/loading.tsx @@ -1,7 +1,12 @@ export default function Loading() { return ( -
-
+
+
+ Loading...
); -} \ No newline at end of file +} From da9bd3c9acc3a4dc39ff15ab914b3f65c2a19622 Mon Sep 17 00:00:00 2001 From: Darshan Gowda T S Date: Sat, 30 May 2026 08:03:42 +0530 Subject: [PATCH 4/5] Update loader.tsx --- src/components/loader.tsx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/components/loader.tsx b/src/components/loader.tsx index 5a31482b..359675c1 100644 --- a/src/components/loader.tsx +++ b/src/components/loader.tsx @@ -1,7 +1,12 @@ - export default function Loader() { +export default function Loader() { return ( -
-
+
+
+ Loading...
); -} \ No newline at end of file +} From 393dc0eba102587a038748d6f93c148c9b18b581 Mon Sep 17 00:00:00 2001 From: Darshan Gowda T S Date: Sat, 30 May 2026 08:22:04 +0530 Subject: [PATCH 5/5] fix: resolve CI typecheck, linting, and accessibility errors --- src/app/error.tsx | 8 +++++--- src/app/loading.tsx | 5 +++-- src/components/loader.tsx | 4 +++- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/app/error.tsx b/src/app/error.tsx index f892f1f4..fc71420e 100644 --- a/src/app/error.tsx +++ b/src/app/error.tsx @@ -9,20 +9,22 @@ export default function Error({ error: Error & { digest?: string }; reset: () => void; }) { + + useEffect(() => { // Log the error to an error reporting service or console to satisfy lint rules console.error("Application error captured:", error); }, [error]); - return ( -
+ return ( +

Something went wrong

{error.message || "An unexpected error occurred."}

diff --git a/src/app/loading.tsx b/src/app/loading.tsx index 99c38a56..6daad22c 100644 --- a/src/app/loading.tsx +++ b/src/app/loading.tsx @@ -1,11 +1,12 @@ export default function Loading() { return (
-
+
+ Loading...
); diff --git a/src/components/loader.tsx b/src/components/loader.tsx index 359675c1..101867bb 100644 --- a/src/components/loader.tsx +++ b/src/components/loader.tsx @@ -4,8 +4,10 @@ export default function Loader() { className="flex items-center justify-center p-6" role="status" aria-label="Loading" + + > -
+
Loading...
);