feat(web): implement side-by-side Monaco interactive code diff viewer - #1247
Merged
ayomideadeniran merged 1 commit intoSep 3, 2026
Merged
Conversation
|
@codexhange Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
|
@codexhange is attempting to deploy a commit to the Ayomide Adeniran's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@codexhange PR under review — I will get back to you if I find any wrong implementations. |
Add a complete diff comparison component that lets students compare their working contract code against model solutions and compiler fixes. Features: - Monaco DiffEditor with inline and side-by-side split view toggles - Character-level diff highlighting for Rust syntax and Soroban macros - 1-click "Apply Diff Chunk" controls merging selected solution blocks into the student buffer - Diff computation offloaded to a Web Worker to prevent UI thread stutter - Dark, light, and OLED theme support via custom Monaco theme - Hunk-level apply with context preservation and stale-hunk detection - Full keyboard accessibility with ARIA labels Closes StellarDevHub#1145 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
ayomideadeniran
force-pushed
the
feat/monaco-diff-viewer-1145
branch
from
September 3, 2026 12:42
9a358d2 to
0cb04a7
Compare
| message: err instanceof Error ? err.message : 'Diff computation failed.', | ||
| }); | ||
| // Handle both InteractiveDiffViewer (type: 'diff') and DiffViewer (id, original, modified) | ||
| self.onmessage = (event: MessageEvent<any>) => { |
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.
Summary
Implement a complete Monaco-based diff comparison component that lets students compare their working contract code against model solutions and compiler fixes.
Features
Files Added
frontend/src/lib/diff/diffUtils.ts— Pure diff utilities (computeDiffHunks, applyHunk, applyHunks) using diff-match-patchfrontend/src/lib/diff/diff.worker.ts— Web Worker for off-thread diff computationfrontend/src/components/diff/DiffViewer.tsx— Main React component with Monaco DiffEditor, hunk list, and apply controlsfrontend/src/components/diff/index.ts— Barrel exportAcceptance Criteria
Closes #1145
🤖 Generated with Codebuff
Co-Authored-By: Codebuff noreply@codebuff.com