From e074c4ea32dcab46ccc7b468dc63490cd177b8a8 Mon Sep 17 00:00:00 2001 From: "coderabbitai[bot]" <136622811+coderabbitai[bot]@users.noreply.github.com> Date: Mon, 29 Sep 2025 18:18:57 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Add=20docstrings=20to=20`login-r?= =?UTF-8?q?egister-paths`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Docstrings generation was requested by @narthur. * https://github.com/TaskRatchet/taskratchet-web/pull/180#issuecomment-3348344439 The following files were modified: * `__mocks__/@clerk/clerk-react.tsx` * `src/App.tsx` --- __mocks__/@clerk/clerk-react.tsx | 15 +++++++++++++++ src/App.tsx | 9 +++++++++ 2 files changed, 24 insertions(+) diff --git a/__mocks__/@clerk/clerk-react.tsx b/__mocks__/@clerk/clerk-react.tsx index 52f00b83..c9dc06b0 100644 --- a/__mocks__/@clerk/clerk-react.tsx +++ b/__mocks__/@clerk/clerk-react.tsx @@ -8,14 +8,29 @@ export function Protect({ children }: React.PropsWithChildren) { return children; } +/** + * Render a placeholder UI indicating a redirect to the sign-in page. + * + * @returns A JSX element that displays "Redirecting...". + */ export function RedirectToSignIn(): JSX.Element { return
Redirecting...
; } +/** + * Displays a simple redirecting indicator for the sign-up flow. + * + * @returns A JSX element that renders the text "Redirecting...". + */ export function RedirectToSignUp(): JSX.Element { return
Redirecting...
; } +/** + * Displays content intended for authenticated users. + * + * @returns A JSX element that renders the text "Signed In". + */ export function SignedIn(): JSX.Element { return
Signed In
; } diff --git a/src/App.tsx b/src/App.tsx index d43b6bea..953fb68b 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -34,6 +34,15 @@ if (!PUBLISHABLE_KEY) { throw new Error('Missing Publishable Key'); } +/** + * Root application component that configures providers, global layout, and routes. + * + * Renders authentication and data providers, the theme wrapper, navigation bar, and the app's route tree + * (including payment result pages, settings, auth redirects, and the main tasks view). Tracks the last + * "today" selection and scrolls the main content to top when the route changes. + * + * @returns The root JSX element containing auth and query providers, theme wrapper, navigation, and routes. + */ export function App(): JSX.Element { const [lastToday, setLastToday] = useState(); const ref = useRef();