Skip to content

Additional fixes - #27

Merged
prakashm88 merged 2 commits into
mainfrom
additional-fixes
Sep 15, 2025
Merged

Additional fixes#27
prakashm88 merged 2 commits into
mainfrom
additional-fixes

Conversation

@prakashm88

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings September 15, 2025 05:02
@prakashm88
prakashm88 merged commit 8afa664 into main Sep 15, 2025
1 check passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread app/src/pages/feed.tsx
const response = await api.getPosts({
page,
limit: 10,
...(tagName && { tag_id: tagName }),

Copilot AI Sep 15, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
...(tagName && { tag_id: tagName }),
// tag_id removed; rely on client-side filtering by tag name

Copilot uses AI. Check for mistakes.
Comment thread apis/src/routers/posts.py

base_query += """
ORDER BY p.created_ts DESC
ORDER BY p.updated_ts, p.created_ts DESC

Copilot AI Sep 15, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
ORDER BY p.updated_ts, p.created_ts DESC
ORDER BY p.updated_ts DESC, p.created_ts DESC

Copilot uses AI. Check for mistakes.
Comment thread apis/src/models/user.py
"""

from datetime import datetime
import email

Copilot AI Sep 15, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 'email' module import is not used anywhere in this file and appears to be accidentally added. This import should be removed.

Suggested change
import email

Copilot uses AI. Check for mistakes.
from typing import List
from functools import lru_cache
from dotenv import load_dotenv
import urllib

Copilot AI Sep 15, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 'urllib' import is unused since urllib.parse is already imported and used. This redundant import should be removed.

Suggested change
import urllib

Copilot uses AI. Check for mistakes.
const [commentReactions, setCommentReactions] = useState<Record<string, any[]>>({});
const { user: currentUser } = useAuth();

console.log('showBottomBar:', showBottomBar);

Copilot AI Sep 15, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debug console.log statement should be removed from production code. Consider using a proper logging solution or removing this debug output.

Suggested change
console.log('showBottomBar:', showBottomBar);

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants