Skip to content

Changes to the pages related to pull request#1161

Merged
benjamin-747 merged 5 commits into
gitmono-dev:mainfrom
Ceron-CSS:fix-diff-show
Jun 25, 2025
Merged

Changes to the pages related to pull request#1161
benjamin-747 merged 5 commits into
gitmono-dev:mainfrom
Ceron-CSS:fix-diff-show

Conversation

@Ceron-CSS

Copy link
Copy Markdown
Contributor
  1. Fix the diff data anomaly error report
  2. Fix the issue where the PR Name is not displayed
  3. The file-changed page can copy the code
  4. Remove diff2html and lexical related dependencies and files

@vercel

vercel Bot commented Jun 25, 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 Jun 25, 2025 8:50am

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 enhances the pull request pages by cleaning up obsolete diff and editor dependencies, fixing diff parsing anomalies, ensuring PR titles display properly, and enabling code copying on the file-changed view.

  • Removed diff2html and Lexical packages/imports across workspace and app configs
  • Added a reusable .select style and wrapped diff output to support code copying
  • Updated diff parsing and rendering to handle binary and empty diffs without errors
  • Modified MR item links to include the PR title in the query for display

Reviewed Changes

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

Show a summary per file
File Description
moon/pnpm-workspace.yaml Removed diff2html and Lexical dependencies
moon/apps/web/package.json Removed diff2html and Lexical dependencies
moon/apps/web/styles/global.css Added .select class to enable text selection for code copying
moon/apps/web/pages/[org]/mr/[id].tsx Dropped diff2html CSS import; updated MR link logic
moon/apps/web/components/MrView/index.tsx Extended Next Link to pass PR title via query
moon/apps/web/components/DiffView/parsedDiffs.ts Added handling for empty diffs
moon/apps/web/components/DiffView/FileDiff.tsx Handled binary and empty diffs and wrapped diff view in .select
Files not reviewed (1)
  • moon/pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)

moon/apps/web/components/DiffView/FileDiff.tsx:32

  • New branches for handling binary and empty diffs were introduced here; consider adding unit or integration tests to verify both code paths.
    if (file.lang === 'binary') {

Comment thread moon/apps/web/styles/global.css Outdated
Comment thread moon/apps/web/components/MrView/index.tsx
@@ -7,7 +7,6 @@ import { ChevronRightCircleIcon, ChevronSelectIcon,AlarmIcon,ClockIcon, PictureP
import { formatDistance, fromUnixTime } from 'date-fns';
import MRComment from '@/components/MrView/MRComment';
import { useRouter } from 'next/router';

Copilot AI Jun 25, 2025

Copy link

Choose a reason for hiding this comment

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

The useRouter import is no longer used after removing diff2html. Either use it to read router.query.title for displaying the PR name or remove the unused import.

Copilot uses AI. Check for mistakes.
Comment thread moon/apps/web/components/DiffView/parsedDiffs.ts Outdated
@benjamin-747
benjamin-747 added this pull request to the merge queue Jun 25, 2025
Merged via the queue into gitmono-dev:main with commit c9cb46f Jun 25, 2025
5 checks passed
@github-project-automation github-project-automation Bot moved this from In review to Done in Mega UI 重构 Jun 25, 2025
@Ceron-CSS
Ceron-CSS deleted the fix-diff-show branch July 1, 2025 11:41
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