Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This pull request introduces a new “Code Lab” experience (in-browser code execution + tracing/visualization + AI tutor), adds a Peer Interviews feature (rooms, matching, feedback, video + collaborative editor), and adds optional server-side code execution via Judge0, along with supporting server APIs and persistence.
Changes:
- Add Code Lab UI/pages, a small curated DSA problem set, an engine adapter around a vendored
@tracecode/harness, and client-side judging utilities. - Add Peer Interviews backend (rooms/stats/feedback) and client pages (lobby/room) including collaborative editing and Jitsi video embedding.
- Add server-side submission tracking + optional Judge0 integration (service, routes, docs, compose file).
Reviewed changes
Copilot reviewed 30 out of 131 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| server/services/peerRelay.js | Adds a WebSocket upgrade handler intended to relay Yjs collaboration traffic per room |
| server/services/judge0.js | Adds a Judge0 client wrapper for optional server-side execution |
| server/routes/submissionsRoutes.js | Adds authenticated routes for creating/listing submission history |
| server/routes/peerRoutes.js | Adds authenticated routes for peer interview rooms, matching, stats, feedback |
| server/routes/judgeRoutes.js | Adds /status and authenticated, rate-limited /run endpoints for Judge0 |
| server/routes/aiRoutes.js | Adds /api/ai/tutor endpoint supporting multiple tutoring modes |
| server/package.json | Adds ws dependency |
| server/package-lock.json | Locks ws dependency |
| server/judge0/docker-compose.yml | Adds a self-hosted Judge0 CE compose setup |
| server/JUDGE0.md | Documents enabling and using the optional Judge0 service |
| server/index.js | Wires new routes and attaches the peer collaboration relay on server start |
| server/controllers/submissionsController.js | Implements create/list/summary submission handlers backed by DB |
| server/controllers/peerController.js | Implements room lifecycle, quick-match, feedback, leaderboard, stats |
| server/config/db.js | Extends runtime schema with code_submissions, peer_rooms, peer_feedback, peer_stats tables |
| client/vite.config.js | Dedupe CodeMirror/Yjs deps to avoid multiple-instance instanceof issues |
| client/vendor/tracecode-harness/THIRD_PARTY_NOTICES.md | Adds vendored harness third-party notices |
| client/vendor/tracecode-harness/README.md | Documents vendoring approach + licensing implications |
| client/vendor/tracecode-harness/package.json | Declares vendored @tracecode/harness as a file: dependency target |
| client/vendor/tracecode-harness/dist/runtime-types-2qM0MukN.d.ts | Vendored harness type declarations |
| client/vendor/tracecode-harness/dist/runtime-types-2qM0MukN.d.cts | Vendored harness CJS type declarations |
| client/vendor/tracecode-harness/dist/runtime-language-info-Bxza1cI2.d.cts | Vendored harness runtime language info types (CJS) |
| client/vendor/tracecode-harness/dist/runtime-language-info-BFUSti3-.d.ts | Vendored harness runtime language info types (ESM) |
| client/vendor/tracecode-harness/dist/pyodide-worker-client-Cn0a8Uv3.d.cts | Vendored harness Pyodide worker client types (CJS) |
| client/vendor/tracecode-harness/dist/pyodide-worker-client-C-2rfHj9.d.ts | Vendored harness Pyodide worker client types (ESM) |
| client/vendor/tracecode-harness/dist/javascript.d.ts | Vendored harness JS/TS runtime client types (ESM) |
| client/vendor/tracecode-harness/dist/javascript.d.cts | Vendored harness JS/TS runtime client types (CJS) |
| client/vendor/tracecode-harness/dist/javascript-worker-client-DIX1Mp21.d.ts | Vendored harness JS worker client types (ESM) |
| client/vendor/tracecode-harness/dist/javascript-worker-client-CYBGEEvc.d.cts | Vendored harness JS worker client types (CJS) |
| client/vendor/tracecode-harness/dist/java.d.ts | Vendored harness Java runtime client types (ESM) |
| client/vendor/tracecode-harness/dist/java.d.cts | Vendored harness Java runtime client types (CJS) |
| client/vendor/tracecode-harness/dist/java-worker-client-C97DDnCp.d.ts | Vendored harness Java worker client types (ESM) |
| client/vendor/tracecode-harness/dist/java-worker-client-BOwKW-11.d.cts | Vendored harness Java worker client types (CJS) |
| client/vendor/tracecode-harness/dist/internal/browser.d.ts | Vendored harness internal browser exports types (ESM) |
| client/vendor/tracecode-harness/dist/internal/browser.d.cts | Vendored harness internal browser exports types (CJS) |
| client/vendor/tracecode-harness/dist/index.d.ts | Vendored harness package entrypoint types (ESM) |
| client/vendor/tracecode-harness/dist/index.d.cts | Vendored harness package entrypoint types (CJS) |
| client/vendor/tracecode-harness/dist/csharp.d.ts | Vendored harness C# runtime client types (ESM) |
| client/vendor/tracecode-harness/dist/csharp.d.cts | Vendored harness C# runtime client types (CJS) |
| client/vendor/tracecode-harness/dist/csharp-worker-client-JwqS6LiX.d.ts | Vendored harness C# worker client types (ESM) |
| client/vendor/tracecode-harness/dist/csharp-worker-client-DMHIa2YG.d.cts | Vendored harness C# worker client types (CJS) |
| client/vendor/tracecode-harness/dist/cpp.d.ts | Vendored harness C++ runtime client types (ESM) |
| client/vendor/tracecode-harness/dist/cpp.d.cts | Vendored harness C++ runtime client types (CJS) |
| client/vendor/tracecode-harness/dist/cpp-worker-client-BzdJLuZa.d.cts | Vendored harness C++ worker client types (CJS) |
| client/vendor/tracecode-harness/dist/cpp-worker-client-Bn7kC0_L.d.ts | Vendored harness C++ worker client types (ESM) |
| client/vendor/tracecode-harness/dist/core.d.ts | Vendored harness core utilities types (ESM) |
| client/vendor/tracecode-harness/dist/core.d.cts | Vendored harness core utilities types (CJS) |
| client/vendor/tracecode-harness/dist/cli.js | Vendored harness CLI (ESM build) |
| client/vendor/tracecode-harness/dist/cli.d.ts | Vendored harness CLI types (ESM) |
| client/vendor/tracecode-harness/dist/cli.d.cts | Vendored harness CLI types (CJS) |
| client/vendor/tracecode-harness/dist/cli.cjs | Vendored harness CLI (CJS build) |
| client/vendor/tracecode-harness/dist/browser.d.ts | Vendored harness browser harness types (ESM) |
| client/vendor/tracecode-harness/dist/browser.d.cts | Vendored harness browser harness types (CJS) |
| client/src/pages/ProblemList.jsx | Adds a Code Lab problem list UI with solved/attempted summary |
| client/src/pages/PeerLobby.jsx | Adds a Peer Interviews lobby (create/join/match + leaderboard) |
| client/src/pages/LandingPage.jsx | Updates landing page to showcase Code Lab and adjusts feature-row layout |
| client/src/pages/CodeLab.jsx | Adds the Code Lab playground page (editor, run, trace/visualize, inputs) |
| client/src/lib/exec/value.js | Adds shared value formatting and comparators for judging/visualizer |
| client/src/lib/exec/languages.js | Adds language registry and playground starters for the engine |
| client/src/lib/exec/judge.js | Adds client-side run-against-tests judging utility |
| client/src/lib/exec/index.js | Defines the public engine surface (@/lib/exec) |
| client/src/lib/exec/engine.js | Adds the engine adapter around @tracecode/harness (single import boundary) |
| client/src/lib/api.js | Adds submissions, peer, judge, and tutor API wrappers |
| client/src/data/problems/index.js | Adds curated problems + tests for Code Lab “Solve” flow |
| client/src/components/Sidebar.jsx | Adds nav entries for Problems, Code Lab, and Peer Interviews |
| client/src/components/lab/traceModel.js | Adds trace folding/timeline model for the visualizer UI |
| client/src/components/lab/TestResultsPanel.jsx | Adds UI to render per-test pass/fail results (incl. hidden cases) |
| client/src/components/lab/Markdownish.jsx | Adds minimal markdown subset renderer for tutor + statements |
| client/src/components/lab/JitsiVideo.jsx | Adds embedded Jitsi video for peer interview rooms |
| client/src/components/lab/editorTheme.js | Adds CodeMirror theme + line decoration plumbing |
| client/src/components/lab/ConsolePanel.jsx | Adds run/trace console output panel |
| client/src/components/lab/CollabCodeEditor.jsx | Adds Yjs + CodeMirror collaborative editor via WebSocketProvider |
| client/src/components/lab/CodeEditor.jsx | Adds standard CodeMirror editor wrapper for the Code Lab |
| client/src/components/lab/AITutorPanel.jsx | Adds in-editor tutor UI that calls /api/ai/tutor |
| client/src/components/AppTopbar.jsx | Improves route label/group resolution for dynamic route prefixes |
| client/src/App.jsx | Wires new routes for Code Lab, Problems, and Peer Interviews |
| client/public/workers/THIRD_PARTY_NOTICES.md | Adds worker asset notices for redistributed runtime components |
| client/package.json | Adds CodeMirror/Yjs deps and vendored @tracecode/harness dependency |
| client/.gitignore | Re-includes vendored harness dist/ despite repo-wide dist ignore |
| .gitignore | Adds env/credential ignores (currently with accidental duplicate/-e lines) |
Files not reviewed (2)
- client/package-lock.json: Language not supported
- client/public/workers/generated-python-harness-snippets.js: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+7
to
+11
| * Yjs is a CRDT, so a dumb relay that forwards every binary message to the other | ||
| * peers in the same room is sufficient for the y-websocket client protocol with a | ||
| * small number of participants (here: 2). We do NOT persist document state on the | ||
| * server — peers converge directly. This keeps the surface tiny and avoids any | ||
| * server-side document storage contract. |
Comment on lines
+33
to
+37
| const roomId = decodeURIComponent(pathname.slice(COLLAB_PREFIX.length).split('/')[0] || '').trim(); | ||
| if (!roomId) { | ||
| socket.destroy(); | ||
| return; | ||
| } |
Comment on lines
+22
to
+32
| httpServer.on('upgrade', (req, socket, head) => { | ||
| let pathname = '/'; | ||
| try { | ||
| pathname = new URL(req.url, 'http://localhost').pathname; | ||
| } catch { | ||
| pathname = req.url || '/'; | ||
| } | ||
| if (!pathname.startsWith(COLLAB_PREFIX)) { | ||
| // Not ours — let other handlers deal with it; if none, close. | ||
| return; | ||
| } |
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.
Description
Type of Change
Module Affected
How to Test
Screenshots / Recordings
Checklist
npm run checkpasses (lint + build + smoke)Related Issues