From 20324bbba7963105d3876656087c501adca91b2c Mon Sep 17 00:00:00 2001 From: "coderabbitai[bot]" <136622811+coderabbitai[bot]@users.noreply.github.com> Date: Tue, 1 Jul 2025 05:05:15 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Add=20docstrings=20to=20`11-proj?= =?UTF-8?q?ect-header`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Docstrings generation was requested by @devdezzies. * https://github.com/devdezzies/neocode/pull/10#issuecomment-3021754114 The following files were modified: * `src/app/layout.tsx` * `src/modules/projects/ui/components/message-card.tsx` * `src/modules/projects/ui/components/message-loading.tsx` * `src/modules/projects/ui/components/messages-container.tsx` * `src/modules/projects/ui/components/project-header.tsx` * `src/modules/projects/ui/views/project-view.tsx` --- src/app/layout.tsx | 7 +++++++ src/modules/projects/ui/components/message-card.tsx | 5 +++++ src/modules/projects/ui/components/message-loading.tsx | 5 +++++ .../projects/ui/components/messages-container.tsx | 9 +++++++++ src/modules/projects/ui/components/project-header.tsx | 7 +++++++ src/modules/projects/ui/views/project-view.tsx | 7 +++++++ 6 files changed, 40 insertions(+) diff --git a/src/app/layout.tsx b/src/app/layout.tsx index f751c78..febd1f5 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -20,6 +20,13 @@ export const metadata: Metadata = { description: "Generated by create next app", }; +/** + * Root layout component that sets up global providers, fonts, theming, and notification support for the application. + * + * Wraps all pages with tRPC client context, applies Geist fonts, manages theme switching based on system preferences, and includes toast notification support. + * + * @param children - The content to be rendered within the layout + */ export default function RootLayout({ children, }: Readonly<{ diff --git a/src/modules/projects/ui/components/message-card.tsx b/src/modules/projects/ui/components/message-card.tsx index a0a4c12..1ff0265 100644 --- a/src/modules/projects/ui/components/message-card.tsx +++ b/src/modules/projects/ui/components/message-card.tsx @@ -114,6 +114,11 @@ const UserMessage = ({ content }: UserMessageProps) => { ) } +/** + * Renders a chat message card, displaying either an assistant or user message based on the role. + * + * Selects the appropriate message component and passes relevant props for rendering, including content, optional fragment, timestamp, and interaction handlers. + */ export default function MessageCard({ content, role, fragment, createdAt, isActiveFragment, onFragmentClick, type }: MessageProps) { diff --git a/src/modules/projects/ui/components/message-loading.tsx b/src/modules/projects/ui/components/message-loading.tsx index cd5a00f..0b36488 100644 --- a/src/modules/projects/ui/components/message-loading.tsx +++ b/src/modules/projects/ui/components/message-loading.tsx @@ -33,6 +33,11 @@ const ShimmerMessages = () => { ); } +/** + * Displays a loading UI with a logo, label, and animated cycling status messages. + * + * Renders a vertically stacked container featuring a small logo and the label "Neo" at the top, followed by a dynamic message area that cycles through loading messages to indicate ongoing processing. + */ export default function MessageLoading() { return (