Additional fixes - #27
Conversation
There was a problem hiding this comment.
Pull Request Overview
This pull request implements additional fixes across multiple areas of the application, focusing on API corrections, UI improvements, and configuration updates.
- Corrects HTTP methods for delete operations to use POST instead of DELETE
- Adds missing navigation functionality and improves post filtering
- Updates configuration and database query optimizations
Reviewed Changes
Copilot reviewed 16 out of 19 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| app/src/services/api-client.ts | Updates reaction removal and tag deletion endpoints to use POST method |
| app/src/pages/top-contributors.tsx | Adds navigation functionality for author profile clicks |
| app/src/pages/feed.tsx | Improves post filtering with tag support and query formatting |
| app/src/pages/create-post.tsx | Adds UI guidance text and simplifies button labels |
| app/src/config/navigation.ts | Adds site base URL configuration |
| app/src/components/post-card.tsx | Comments out unused content preview section |
| app/src/components/nav-user.tsx | Restores user email display in navigation |
| app/src/components/common/post-header.tsx | Extensive code formatting and display logic improvements |
| app/src/components/common/discussion-section.tsx | Comments out bottom reactions bar |
| app/src/components/app-sidebar.tsx | Updates footer link URL |
| apis/src/services/database/postgresql_service.py | Changes post ordering from created_ts to updated_ts |
| apis/src/routers/users.py | Removes unused import and adds email to user response |
| apis/src/routers/reactions.py | Updates all reaction removal endpoints from DELETE to POST |
| apis/src/routers/posts.py | Fixes post ordering query syntax |
| apis/src/models/user.py | Adds email import and includes email in UserPublic model |
| apis/src/config/settings.py | Adds URL encoding for database passwords containing special characters |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| const response = await api.getPosts({ | ||
| page, | ||
| limit: 10, | ||
| ...(tagName && { tag_id: tagName }), |
There was a problem hiding this comment.
The tag_id parameter is being set to tagName (a string), but this creates inconsistency since the filtering logic below still uses client-side filtering by tag name. Either use the tag_id parameter properly with actual tag IDs, or remove it and rely on the existing client-side filtering.
| ...(tagName && { tag_id: tagName }), | |
| // tag_id removed; rely on client-side filtering by tag name |
|
|
||
| base_query += """ | ||
| ORDER BY p.created_ts DESC | ||
| ORDER BY p.updated_ts, p.created_ts DESC |
There was a problem hiding this comment.
The ORDER BY clause is missing the sort direction for p.updated_ts. It should be 'ORDER BY p.updated_ts DESC, p.created_ts DESC' to properly sort by updated timestamp in descending order first.
| ORDER BY p.updated_ts, p.created_ts DESC | |
| ORDER BY p.updated_ts DESC, p.created_ts DESC |
| """ | ||
|
|
||
| from datetime import datetime | ||
| import email |
There was a problem hiding this comment.
The 'email' module import is not used anywhere in this file and appears to be accidentally added. This import should be removed.
| import email |
| from typing import List | ||
| from functools import lru_cache | ||
| from dotenv import load_dotenv | ||
| import urllib |
There was a problem hiding this comment.
The 'urllib' import is unused since urllib.parse is already imported and used. This redundant import should be removed.
| import urllib |
| const [commentReactions, setCommentReactions] = useState<Record<string, any[]>>({}); | ||
| const { user: currentUser } = useAuth(); | ||
|
|
||
| console.log('showBottomBar:', showBottomBar); |
There was a problem hiding this comment.
Debug console.log statement should be removed from production code. Consider using a proper logging solution or removing this debug output.
| console.log('showBottomBar:', showBottomBar); |
No description provided.