Skip to content

Conversation

sjf
Copy link
Contributor

@sjf sjf commented Aug 3, 2025

  • Simplified WebMessage Types (src/shared/WebviewMessage.ts):

    • Removed all legacy message types, keeping only two: grpc_request and grpc_request_cancel
    • Removed numerous unused properties from the WebviewMessage interface
    • Extracted GrpcRequest and GrpcCancel into separate type definitions for reusability
  • Cleaned Up Message Handling (src/core/controller/index.ts):

    • Removed the fetchMcpMarketplace case from the message handler
    • Added a default case to log unhandled message types
    • Removed the entire fetchMcpMarketplace private method which is now dead code.
  • Improved Type Definitions (src/shared/ExtensionMessage.ts):

    • Extracted GrpcResponse as a separate type definition (previously inline)
    • Made these types available for use elsewhere in the codebase

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • ♻️ Refactor Changes
  • 💅 Cosmetic Changes
  • 📚 Documentation update
  • 🏃 Workflow Changes

Pre-flight Checklist

  • Changes are limited to a single feature, bugfix or chore (split larger changes into separate PRs)
  • Tests are passing (npm test) and code is formatted and linted (npm run format && npm run lint)
  • I have created a changeset using npm run changeset (required for user-facing changes)
  • I have reviewed contributor guidelines

Screenshots

Additional Notes

Copy link

changeset-bot bot commented Aug 3, 2025

⚠️ No Changeset found

Latest commit: 2947685

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

There's only two types of WebMessage: `grpc_request` and `grpc_cancel`. Remove the others from the WebMessage.
In the handleWebMessage case statement, remove the type "fetchMcpMarketplace", it in use anymore. Log an invalid messages that are received.

Make the `GrpcRequest` and `GrpcResponse` into types so they can be used elsewhere in the codebase.
Copy link
Contributor

github-actions bot commented Aug 3, 2025

Coverage Report

Extension Coverage

Base branch: 47%

PR branch: 48%

✅ Coverage increased or remained the same

Webview Coverage

Base branch: 17%

PR branch: 17%

✅ Coverage increased or remained the same

Overall Assessment

Test coverage has been maintained or improved

Last updated: 2025-08-03T23:52:12.108271

@sjf sjf merged commit 16f7353 into main Aug 4, 2025
13 checks passed
@sjf sjf deleted the sjf-a3-bbbb branch August 14, 2025 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants