Skip to content

Review feedback to user projects page#164

Open
bbarni2020 wants to merge 1 commit intohackclub:stagingfrom
bbarni2020:review-feedbacks
Open

Review feedback to user projects page#164
bbarni2020 wants to merge 1 commit intohackclub:stagingfrom
bbarni2020:review-feedbacks

Conversation

@bbarni2020
Copy link
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings February 19, 2026 18:05
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds the ability for users to view their project review history directly on the project page. Users can now see reviews and print history that were previously only visible to admins, improving transparency and providing users with feedback on their projects.

Changes:

  • Added a "Show reviews" button on the project page for project owners when reviews exist
  • Implemented a modal dialog to display review and print history
  • Modified the review fetching logic to optionally exclude reviewer information for privacy

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
src/routes/dashboard/projects/[id]/+page.svelte Added modal dialog with ReviewHistory component, state management for showing/hiding the dialog, and a button to trigger it
src/routes/dashboard/projects/[id]/+page.server.ts Fetches review history for project owners using getReviewHistory(id, false)
src/routes/dashboard/admin/getReviewHistory.server.ts Added includeUser parameter to optionally filter out reviewer information
src/routes/dashboard/admin/ReviewHistory.svelte Added showReviewer prop to conditionally display reviewer information
Comments suppressed due to low confidence (1)

src/routes/dashboard/admin/getReviewHistory.server.ts:20

  • When includeUser is false, the function still performs an innerJoin with the user table on lines 18, 35, and 52, then filters it out later. This is inefficient. Consider conditionally building the query to avoid joining the user table when includeUser is false, which will improve performance by reducing unnecessary database operations.
	const t1Reviews = await db
		.select({
			user: {
				id: user.id,
				name: user.name
			},
			action: t1Review.action,
			notes: t1Review.notes,
			feedback: t1Review.feedback,
			timestamp: t1Review.timestamp
		})
		.from(t1Review)
		.innerJoin(user, eq(user.id, t1Review.userId))
		.where(eq(t1Review.projectId, id))
		.orderBy(asc(t1Review.timestamp));

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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