feat: add raw diff actions - #3159
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe diff API now returns unified ChangesUnified diff feature
Sequence Diagram(s)sequenceDiagram
participant Browser
participant ViewerPanel
participant CompareFileAPI
participant ClipboardAPI
Browser->>ViewerPanel: Activate view or copy control
ViewerPanel->>CompareFileAPI: Request encoded format=diff URL
CompareFileAPI-->>ViewerPanel: Return raw diff text
ViewerPanel->>ClipboardAPI: Write diff text
ClipboardAPI-->>ViewerPanel: Resolve or reject write
ViewerPanel-->>Browser: Update copy state and announcement
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (3 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Hello! Thank you for opening your first PR to npmx, @ColumbusLabs! 🚀 Here’s what will happen next:
|
45e8511 to
7ede24c
Compare
Lunaria Status Overview🌕 This pull request will trigger status changes. Learn moreBy default, every PR changing files present in the Lunaria configuration's You can change this by adding one of the keywords present in the Tracked Files
Warnings reference
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@i18n/schema.json`:
- Around line 4807-4809: Update the Arabic locale’s compare translations by
removing the stale compare.view_file key and adding or retaining
compare.view_diff instead, matching the property declared in i18n/schema.json so
no additional property is introduced.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 24585e1e-3fd9-45f7-8f92-8cf0616809da
📒 Files selected for processing (7)
app/components/Diff/ViewerPanel.vuei18n/locales/en.jsoni18n/schema.jsonserver/api/registry/compare-file/[...pkg].get.tsshared/utils/diff.tstest/nuxt/components/diff/ViewerPanel.spec.tstest/unit/shared/utils/diff.spec.ts
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@i18n/locales/ar-EG.json`:
- Line 330: Update the Arabic `compare.view_diff` translation from the file-view
label to a diff-specific label meaning “View diff,” such as `عرض الاختلافات`.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: a3dc546d-5747-4bc8-bc23-f03ce05b9dbf
📒 Files selected for processing (1)
i18n/locales/ar-EG.json
🔗 Linked issue
Fixes #3032
🧭 Context
The diff viewer parses each selected file for display, but it did not expose a valid unified diff that could be opened or copied for use elsewhere.
📚 Description
format=diffresponse for the existing compare-file endpoint/dev/nullheaders for added and deleted filesScreenshots
Before:
After:
Verification
pnpm test:unitpnpm test:typespnpm vp lintpnpm vp run i18n:reportpnpm buildtinyclip0.1.14...0.1.15