Skip to content

[mono]UPDATE: Alter to CommonPage and Restored content_diff for debug…#1335

Merged
benjamin-747 merged 4 commits into
gitmono-dev:mainfrom
AidCheng:dev
Aug 14, 2025
Merged

[mono]UPDATE: Alter to CommonPage and Restored content_diff for debug…#1335
benjamin-747 merged 4 commits into
gitmono-dev:mainfrom
AidCheng:dev

Conversation

@AidCheng

Copy link
Copy Markdown
Contributor

Update #1298

API and Model

  • Restored the old files_changed API for debugging
  • Changed page_id/page_size path parameters to pagination request body
  • Now uses a new DiffItem model to store all the file diff data

Services Change

  • mono service content_diff and paged_content_diff now return a list of DiffItem instead of String
  • removed extract_files_service due to improved content_diff function

…ging

Signed-off-by: AidCheng <cn.aiden.cheng@gmail.com>
@vercel

vercel Bot commented Aug 13, 2025

Copy link
Copy Markdown

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

Project Deployment Preview Comments Updated (UTC)
mega Ready Preview Comment Aug 14, 2025 8:19am

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 refactors the diff functionality to use a new DiffItem model instead of returning raw string data. The main purpose is to improve API design by providing structured diff data and implementing pagination properly for merge request file changes.

Key changes:

  • Introduced DiffItem model to structure diff output with file paths and data
  • Changed API endpoints to use request body pagination instead of path parameters
  • Restored the old files_changed API for debugging purposes

Reviewed Changes

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

Show a summary per file
File Description
neptune/src/model/diff_model.rs Introduces new DiffItem struct with path and data fields
neptune/src/neptune_engine.rs Updates diff function to return Vec<DiffItem> instead of concatenated string
mono/src/api/mr/mr_router.rs Adds new paginated endpoint and keeps old endpoint for debugging
ceres/src/api_service/mono_api_service.rs Refactors diff services to return structured data and implement proper pagination
mono/src/api/mr/mod.rs Updates response models to use DiffItem and adds FilesChangedPage

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

Comment thread neptune/src/neptune_engine.rs Outdated
Comment thread neptune/src/neptune_engine.rs Outdated
Comment thread mono/src/api/mr/mod.rs Outdated
Comment thread mono/src/api/mr/mod.rs Outdated
Comment thread libra/src/command/diff.rs Outdated
Comment thread libra/src/command/diff.rs Outdated
@benjamin-747
benjamin-747 disabled auto-merge August 14, 2025 02:57
Comment thread ceres/src/model/mr.rs Outdated
Comment thread mono/src/api/mr/mr_router.rs Outdated
Comment thread mono/src/api/mr/mr_router.rs

@benjamin-747 benjamin-747 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

提交需要签名

Signed-off-by: AidCheng <cn.aiden.cheng@gmail.com>
Signed-off-by: AidCheng <cn.aiden.cheng@gmail.com>
Signed-off-by: AidCheng <cn.aiden.cheng@gmail.com>
@benjamin-747
benjamin-747 added this pull request to the merge queue Aug 14, 2025
Merged via the queue into gitmono-dev:main with commit 6bfd2f0 Aug 14, 2025
10 of 12 checks passed
@AidCheng
AidCheng removed the request for review from Copilot March 23, 2026 22:21
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