Changes to the pages related to pull request#1161
Merged
Merged
Conversation
Ceron-CSS
commented
Jun 25, 2025
Contributor
- Fix the diff data anomaly error report
- Fix the issue where the PR Name is not displayed
- The file-changed page can copy the code
- Remove diff2html and lexical related dependencies and files
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Contributor
There was a problem hiding this comment.
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
diff2htmland Lexical packages/imports across workspace and app configs - Added a reusable
.selectstyle 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') {
| @@ -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'; | |||
There was a problem hiding this comment.
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.
benjamin-747
approved these changes
Jun 25, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.