Skip to content

Conversation

@pan93412
Copy link
Member

  • feat: implement ranking
  • fix(events): handle PostHog event error
  • style: reformat codebase
  • ci: add Lint and Check Formatting check

@pan93412 pan93412 self-assigned this Oct 13, 2025
@linear
Copy link

linear bot commented Oct 13, 2025

@pan93412 pan93412 requested a review from Copilot October 13, 2025 17:43
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 implements a comprehensive ranking system for the database playground application, allowing users to view rankings based on points earned or questions completed within daily/weekly periods. Additionally, it includes bug fixes for PostHog event error handling, code reformatting, and CI improvements.

  • Implements ranking functionality with filtering by points or completed questions, ordering options, and pagination support
  • Fixes PostHog event error handling by properly capturing return values from Enqueue calls
  • Adds GitHub Actions workflow for linting and formatting checks

Reviewed Changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
models/ranking.go Defines UserScore struct for ranking data
internal/ranking/ Core ranking service implementation with comprehensive test coverage
graph/rank.* GraphQL schema, resolvers, and integration tests for ranking API
internal/events/ Fixes PostHog event error handling
cmd/backend/ Integrates ranking service into dependency injection
.github/workflows/lint.yml Adds CI workflow for code quality checks
Comments suppressed due to low confidence (2)

graph/rank_resolver_test.go:1

  • The comment indicates expected order based on points (User 1: 200, User 0: 150, User 2: 100, User 3: 50), but the assertions expect User 2 first. This appears to be a copy of the same incorrect comment/assertion mismatch from the unit tests.
package graph

graph/rank_resolver_test.go:1

  • Same issue as in the unit tests - the comment indicates ascending order should be User 2 (100), User 0 (150), User 1 (200), but the assertions expect User 3, User 1, User 2.
package graph

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@pan93412 pan93412 force-pushed the pan93412/dbp-90-實作真正的排行榜 branch from 12b437b to 9a89841 Compare October 13, 2025 17:45
@pan93412 pan93412 force-pushed the pan93412/dbp-90-實作真正的排行榜 branch from 9a89841 to af92229 Compare October 13, 2025 17:46
@pan93412 pan93412 requested a review from Copilot October 13, 2025 17:51
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

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


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@pan93412 pan93412 force-pushed the pan93412/dbp-90-實作真正的排行榜 branch from ed276e8 to ffb3812 Compare October 13, 2025 17:59
@pan93412 pan93412 requested a review from Copilot October 13, 2025 17:59
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

Copilot reviewed 18 out of 19 changed files in this pull request and generated 3 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@pan93412 pan93412 merged commit 23be9ac into main Oct 13, 2025
2 checks passed
@pan93412 pan93412 deleted the pan93412/dbp-90-實作真正的排行榜 branch October 13, 2025 18:02
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