Skip to content

Conversation

@claneo
Copy link
Contributor

@claneo claneo commented Nov 12, 2025

Summary

  1. Replace websocket with ipc, removed unnessary dependencies
  2. A RPC style api
  3. Reusable logger for both masetr and worker

Related Links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@netlify
Copy link

netlify bot commented Nov 12, 2025

Deploy Preview for rstest-dev ready!

Name Link
🔨 Latest commit 3e0b66e
🔍 Latest deploy log https://app.netlify.com/projects/rstest-dev/deploys/6916ccb32ddee300080c7b95
😎 Deploy Preview https://deploy-preview-691--rstest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@claneo claneo marked this pull request as ready for review November 12, 2025 13:35
Copilot AI review requested due to automatic review settings November 12, 2025 13:35
Copilot finished reviewing on behalf of claneo November 12, 2025 13:36
Copy link
Contributor

Copilot AI left a comment

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 modernizes the VSCode extension's worker communication by replacing WebSocket-based IPC with Node.js native IPC, reducing dependencies and improving architecture. The changes introduce an RPC-style API and a reusable logger infrastructure for both master and worker processes.

  • Removed WebSocket dependencies (ws, get-port, @types/ws) in favor of native Node.js IPC
  • Implemented a custom RPC framework using IPC message passing with typed method proxies
  • Refactored logger architecture with a shared BaseLogger class for both master and worker processes

Reviewed Changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
pnpm-lock.yaml Removed WebSocket-related dependencies (ws, get-port, @types/ws)
packages/vscode/package.json Updated devDependencies to remove WebSocket packages
packages/vscode/src/shared/rpc.ts New RPC implementation using IPC for bidirectional communication
packages/vscode/src/shared/logger.ts New shared base logger class with formatted output
packages/vscode/src/master.ts Refactored to use IPC-based RPC instead of WebSocket connections
packages/vscode/src/worker/index.ts Simplified worker to expose methods via RPC and use Promise.withResolvers
packages/vscode/src/worker/logger.ts Worker logger now proxies log calls to master via RPC
packages/vscode/src/logger.ts Master logger extends BaseLogger and outputs to VSCode channel
packages/vscode/src/types.ts Removed WebSocket-specific type fields (type discriminators and id)
packages/vscode/src/utils.ts Added promiseWithTimeout utility function
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@9aoy 9aoy requested a review from fi3ework November 13, 2025 03:11
@fi3ework
Copy link
Member

thank you for your contribution. 😇

@fi3ework
Copy link
Member

there's a conflict, after resolving, we're good to merge.

@claneo
Copy link
Contributor Author

claneo commented Nov 14, 2025

done

@fi3ework
Copy link
Member

thank you for the work again.

@fi3ework fi3ework merged commit 7c0c112 into web-infra-dev:main Nov 14, 2025
16 checks passed
@claneo claneo deleted the vscode-worker-ipc branch November 14, 2025 08:30
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.

2 participants