Skip to content

feat: moon add note sync services#1282

Merged
genedna merged 8 commits into
gitmono-dev:mainfrom
Donnow:main
Jul 31, 2025
Merged

feat: moon add note sync services#1282
genedna merged 8 commits into
gitmono-dev:mainfrom
Donnow:main

Conversation

@Donnow

@Donnow Donnow commented Jul 29, 2025

Copy link
Copy Markdown
Contributor
  • add note sync services in mono
  • add note storage in jupiter
  • generate generated.ts and move it to moon

Copilot AI review requested due to automatic review settings July 29, 2025 07:52
@vercel

vercel Bot commented Jul 29, 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 31, 2025 0:57am

This comment was marked as outdated.

@genedna
genedna requested a review from Copilot July 29, 2025 08:52

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 note sync services to the mono application by implementing note storage functionality in Jupiter and creating REST API endpoints for note synchronization. The changes also include database migration for notes table and regenerated entity files from SeaORM codegen.

  • Adds note storage layer in Jupiter with CRUD operations for notes
  • Implements REST API endpoints for retrieving and updating note sync state
  • Creates database migration to add the notes table with proper indexing

Reviewed Changes

Copilot reviewed 52 out of 53 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
mono/src/server/https_server.rs Adds SYNC_NOTES_STATE_TAG constant for API documentation
mono/src/api/notes/note_router.rs Implements REST endpoints for note sync state (show/update)
mono/src/api/notes/model.rs Defines request/response models for note API
mono/src/api/mod.rs Integrates note storage into the main API service state
mono/src/api/api_router.rs Registers note router with the main API router
jupiter/src/storage/note_storage.rs Implements note storage layer with database operations
jupiter/src/storage/mod.rs Integrates note storage into the storage service
jupiter/src/migration/m20250725_103004_add_note.rs Database migration to create notes table with indexes
jupiter/callisto/src/notes.rs Generated SeaORM entity for notes table
jupiter/callisto/* Updated generated files from SeaORM codegen 1.1.14

}

#[utoipa::path(
get,

Copilot AI Jul 29, 2025

Copy link

Choose a reason for hiding this comment

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

The API path includes {org_slug} parameter but the function doesn't extract or validate it. This could lead to confusion about which organization the note belongs to.

Copilot uses AI. Check for mistakes.
) -> Result<Json<ShowResponse>, ApiError> {
let note = state.note_stg().get_note_by_id(id.into()).await?;
if note.is_none() {
return Err(ApiError::from(anyhow::anyhow!("Note not found")));

Copilot AI Jul 29, 2025

Copy link

Choose a reason for hiding this comment

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

The error message "Note not found" should be more specific and include the note ID for better debugging.

Suggested change
return Err(ApiError::from(anyhow::anyhow!("Note not found")));
return Err(ApiError::from(anyhow::anyhow!(format!("Note not found with ID: {}", id))));

Copilot uses AI. Check for mistakes.
Comment thread mono/src/api/notes/note_router.rs Outdated
Comment thread mono/src/api/notes/note_router.rs Outdated
Comment thread jupiter/src/storage/note_storage.rs Outdated
Comment thread jupiter/src/storage/note_storage.rs Outdated
Comment thread jupiter/src/storage/note_storage.rs Outdated
Comment thread jupiter/src/migration/m20250725_103004_add_note.rs Outdated
Comment thread jupiter/src/migration/m20250725_103004_add_note.rs Outdated
Comment thread jupiter/src/migration/m20250725_103004_add_note.rs Outdated
Comment thread mono/src/api/notes/model.rs Outdated
Comment thread moon/packages/types/generated.ts
Comment thread mono/src/api/notes/note_router.rs Outdated
@genedna genedna added this to the Web UI milestone Jul 30, 2025
Comment thread moon/packages/types/generated.ts
@benjamin-747

Copy link
Copy Markdown
Collaborator

link #1184

@benjamin-747
benjamin-747 enabled auto-merge July 31, 2025 11:05
@genedna
genedna merged commit 9a3dd04 into gitmono-dev:main Jul 31, 2025
9 of 10 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.

4 participants