Skip to content

feat(mono): added reactions API#1228

Merged
genedna merged 1 commit into
gitmono-dev:mainfrom
benjamin-747:main
Jul 14, 2025
Merged

feat(mono): added reactions API#1228
genedna merged 1 commit into
gitmono-dev:mainfrom
benjamin-747:main

Conversation

@benjamin-747

Copy link
Copy Markdown
Collaborator

No description provided.

@benjamin-747 benjamin-747 added this to the Web UI milestone Jul 14, 2025
@benjamin-747 benjamin-747 self-assigned this Jul 14, 2025
@benjamin-747
benjamin-747 requested a review from genedna July 14, 2025 09:24
@vercel

vercel Bot commented Jul 14, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
mega ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 14, 2025 10:36am

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 reactions API functionality to the mono codebase, implementing emoji reactions for conversations and comments. The changes include new API endpoints for adding and deleting reactions, refactoring conversation handling to include grouped reactions, and adding proper type definitions for the reactions feature.

  • Adds POST and DELETE endpoints for conversation reactions with emoji support
  • Refactors conversation and MR/issue detail responses to include grouped reactions data
  • Creates new service layer for MR operations and updates issue service to support reactions

Reviewed Changes

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

Show a summary per file
File Description
moon/packages/types/generated.ts Updates TypeScript type definitions to include reactions and conversation items
moon/Dockerfile.disabled Removes entire Docker configuration file
mono/src/api/mr/mr_router.rs Updates MR detail endpoint to use new service layer and include reactions
mono/src/api/mr/mod.rs Refactors MR detail types to support conversations with reactions
mono/src/api/issue/mod.rs Adds ToSchema derive and updates conversation mapping
mono/src/api/issue/issue_router.rs Updates issue detail endpoint to use new service pattern
mono/src/api/conversation/mod.rs Implements reaction grouping logic and conversation item handling
mono/src/api/conversation/conv_router.rs Adds new reaction endpoints for POST and DELETE operations
jupiter/src/tests.rs Updates test setup to include MR service
jupiter/src/storage/mr_storage.rs Adds methods to fetch MR labels and assignees
jupiter/src/storage/mod.rs Integrates new MR service into storage layer
jupiter/src/storage/issue_storage.rs Removes conversation methods moved to conversation storage
jupiter/src/storage/conversation_storage.rs Adds reaction management and refactors conversation queries
jupiter/src/service/mr_service.rs Creates new MR service for handling MR details with reactions
jupiter/src/service/mod.rs Removes old service struct and updates module structure
jupiter/src/service/issue_service.rs Moves service struct here and adds username parameter
jupiter/src/model/mr_dto.rs Creates MR details data transfer object
jupiter/src/model/mod.rs Adds new model modules for conversations and MRs
jupiter/src/model/issue_dto.rs Refactors to use shared conversation DTO and adds username
jupiter/src/model/conv_dto.rs Creates shared conversation with reactions DTO
jupiter/callisto/src/entity_ext/reactions.rs Adds database relations for reactions entity
jupiter/callisto/src/entity_ext/mega_conversation.rs Adds reactions relation to conversation entity

post,
params(
("comment_id", description = "comment conversation id"),
("comment_id", description = "comment or conversation id"),

Copilot AI Jul 14, 2025

Copy link

Choose a reason for hiding this comment

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

The parameter description is ambiguous. Specify whether this accepts comment IDs, conversation IDs, or both, and clarify the expected format.

Suggested change
("comment_id", description = "comment or conversation id"),
("comment_id", description = "A numeric ID representing either a comment or a conversation. Specify the type in the request body."),

Copilot uses AI. Check for mistakes.
Comment thread jupiter/src/service/mr_service.rs
Comment thread mono/src/api/conversation/mod.rs
impl RelationTrait for Relation {
fn def(&self) -> RelationDef {
match self {
Self::Conversation => Entity::has_many(crate::mega_conversation::Entity).into(),

Copilot AI Jul 14, 2025

Copy link

Choose a reason for hiding this comment

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

The relationship direction appears incorrect. Reactions should belong to conversations, not have many conversations. This should likely be belongs_to.

Suggested change
Self::Conversation => Entity::has_many(crate::mega_conversation::Entity).into(),
Self::Conversation => Entity::belongs_to(crate::mega_conversation::Entity).into(),

Copilot uses AI. Check for mistakes.
@genedna
genedna added this pull request to the merge queue Jul 14, 2025
Merged via the queue into gitmono-dev:main with commit 97182bb Jul 14, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants