sample - #63
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request removes user profile fields (avatar_url and bio) from the application and introduces frontend enhancements including a Date component for displaying policy dates and a WelcomeMessage component for the root page. The PR also adds a PWA manifest and deletes the AI.md specification file.
Changes:
- Removed
avatar_urlandbiofields from user profile schema, database, backend API, and frontend components - Added reusable Date component for displaying dates on Terms and Privacy pages
- Added WelcomeMessage component to greet users on the root page
- Added PWA manifest.json with app metadata and icons
- Removed AI.md specification document
Reviewed changes
Copilot reviewed 19 out of 22 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| products/validator/src/response/userProfile.ts | Removed avatar_url and bio fields from response schema |
| products/validator/src/request/userProfile.ts | Removed avatar_url and bio fields from request schema |
| products/backend/src/db/auth-schema.ts | Removed avatarUrl and bio columns from user table |
| products/backend/src/presentation/routes/userProfile.ts | Updated getUserProfile and updateUserProfile to remove avatar_url and bio handling |
| products/frontend/src/share/Date/index.tsx | Added new Date component (with naming issues) |
| products/frontend/src/share/index.ts | Exported new Date component |
| products/frontend/src/routes/Terms/index.tsx | Updated to use Date component |
| products/frontend/src/routes/Privacy/index.tsx | Updated to use Date component |
| products/frontend/src/routes/Root/index.tsx | Added WelcomeMessage component and session check for username |
| products/frontend/src/routes/Root/components/WelcomeMessgae/index.tsx | Added WelcomeMessage component (directory misspelled) |
| products/frontend/src/routes/Root/components/index.ts | Exported WelcomeMessage with misspelled path |
| products/frontend/src/routes/Profile/index.tsx | Removed avatar_url and bio form fields |
| products/frontend/src/routes/Share/components/Footer/index.tsx | Added title link to footer |
| products/frontend/src/api/openapi.d.ts | Updated API types to reflect schema changes |
| products/frontend/openapi.json | Updated OpenAPI spec to reflect schema changes |
| products/frontend/public/manifest.json | Added PWA manifest |
| assets/er.mmd | Updated ER diagram to remove avatar_url and bio fields |
| assets/er.png | Updated ER diagram image |
| AI.md | Deleted specification document |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const Error: FC<Props> = (props: Props) => { | ||
| return <small className={styles.date}>{props.content}</small>; | ||
| }; | ||
|
|
||
| export default Error; |
There was a problem hiding this comment.
The component name in the export statement doesn't match the actual component name. The file exports 'Error' but should export 'Date' to match the component definition on line 9.
| const Error: FC<Props> = (props: Props) => { | |
| return <small className={styles.date}>{props.content}</small>; | |
| }; | |
| export default Error; | |
| const Date: FC<Props> = (props: Props) => { | |
| return <small className={styles.date}>{props.content}</small>; | |
| }; | |
| export default Date; |
| const Error: FC<Props> = (props: Props) => { | ||
| return <small className={styles.date}>{props.content}</small>; | ||
| }; | ||
|
|
||
| export default Error; |
There was a problem hiding this comment.
The component name 'Error' should be 'Date' to match the intended functionality and the export from the parent index. This component is meant to display dates, not errors.
| const Error: FC<Props> = (props: Props) => { | |
| return <small className={styles.date}>{props.content}</small>; | |
| }; | |
| export default Error; | |
| const Date: FC<Props> = (props: Props) => { | |
| return <small className={styles.date}>{props.content}</small>; | |
| }; | |
| export default Date; |
| export { default as Lent } from './Lent'; | ||
| export { default as Borrow } from './Borrow'; | ||
| export { default as Group } from './Group'; | ||
| export { default as WelcomeMessage } from './WelcomeMessgae'; |
There was a problem hiding this comment.
The directory name is misspelled. It should be 'WelcomeMessage' to match the exported component name, not 'WelcomeMessgae' (missing 'a' in 'Message').
| export { default as WelcomeMessage } from './WelcomeMessgae'; | |
| export { default as WelcomeMessage } from './WelcomeMessage'; |
| }, | ||
| }); | ||
| useEffect(() => { | ||
| sessionCheckMutation.mutate({ credentials: 'include' }); |
There was a problem hiding this comment.
The useEffect hook has a missing dependency. The 'sessionCheckMutation' should be included in the dependency array, or alternatively, you should extract the mutate function. However, since this is a mutation that should only run once on mount, the current implementation with an empty dependency array may be intentional. If so, consider adding an ESLint disable comment to make the intent clear, or restructure to avoid the warning.
| sessionCheckMutation.mutate({ credentials: 'include' }); | |
| sessionCheckMutation.mutate({ credentials: 'include' }); | |
| // eslint-disable-next-line react-hooks/exhaustive-deps |
No description provided.