Skip to content

Copilot/cleanup plugin relay sln#5

Merged
Stiggimy merged 3 commits intoms-store-fixfrom
copilot/cleanup-plugin-relay-sln
Feb 18, 2026
Merged

Copilot/cleanup plugin relay sln#5
Stiggimy merged 3 commits intoms-store-fixfrom
copilot/cleanup-plugin-relay-sln

Conversation

@Stiggimy
Copy link
Contributor

ffs im cooked

ai can't save me

Copilot AI review requested due to automatic review settings February 18, 2026 00:12
@Stiggimy Stiggimy merged commit 75aed7b into ms-store-fix Feb 18, 2026
9 checks passed
@Stiggimy Stiggimy deleted the copilot/cleanup-plugin-relay-sln branch February 18, 2026 00:12
Copy link

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 updates the Relay plugin’s RPC stack and related project housekeeping, primarily migrating from Stl.* RPC packages/namespaces to ActualLab.*, and adjusting repo ignore patterns for generated/publish outputs.

Changes:

  • Replace Stl.Rpc*/Stl.Generators dependencies with ActualLab.Rpc*/ActualLab.Generators (and add Microsoft.Extensions.Logging).
  • Update RPC-related using directives and service/device RPC setup to use ActualLab.Rpc.
  • Extend .gitignore to exclude additional local test/publish artifacts.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
plugin_Relay/plugin_Relay.csproj Swaps RPC/generator NuGet dependencies from Stl.* to ActualLab.* and adds logging package reference.
plugin_Relay/RelayService.cs Updates RPC namespaces and removes the previous RpcCallRouter registration block.
plugin_Relay/RelayDevice.cs Updates RPC namespace; changes client RPC wiring and removes initialization try/catch.
plugin_Relay/Models/Contract.cs Updates RPC namespace import to ActualLab.Rpc.
.gitignore Adds ignores for test server and publish output artifacts.
Comments suppressed due to low confidence (1)

plugin_Relay/RelayDevice.cs:198

  • RelayDevice.Initialize no longer catches initialization exceptions and no longer sets Status/InitException to a failure state. Any DI/RPC setup failure (including Host being null at the final Host.Log call) will now bubble out and can crash the plugin instead of reporting RelayDeviceStatus.ServiceError.
    public void Initialize()
    {
        // Mark as initialized
        IsInitialized = true;

        MemoryPackFormatterProvider.Register(new TrackingDeviceFormatter());
        MemoryPackFormatterProvider.Register(new TrackedJointFormatter());

        if (RelayService.Instance?.IsBackfeed ?? false)
        {
            Status = RelayDeviceStatus.BackFeedDetected;
            SettingsPage.DeviceStatusAppendix = string.Empty;
            InitException = null;
            return; // Don't proceed further
        }

        var services = new ServiceCollection()
            .AddLogging();

        services.AddRpc()
            .AddWebSocketClient($"http://{ServerIp}:{ServerPort}/")
            .AddClient<IRelayService>();

        ServiceChannel = services.BuildServiceProvider();
        Service = ServiceChannel.GetRequiredService<IRelayService>();

        SettingsPage.DeviceStatusAppendix = string.Empty;
        SettingsPage.StartConnectionTest();

        Host.Log($"Tried to initialize with status: {DeviceStatusString}");
        InitException = null;
    }

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

.AddServer<IRelayClient, DataClient>();
services.AddRpc()
.AddWebSocketClient($"http://{ServerIp}:{ServerPort}/")
.AddClient<IRelayService>();
Copy link

Copilot AI Feb 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The client RPC registration no longer exposes an implementation for IRelayClient (DataClient). Since RelayService.DataService injects IRelayClient and uses it to push OnRequestShutdown/OnRefreshInterface to the client, the client needs to register an RPC server for IRelayClient (or DataService needs to be refactored to not rely on callbacks).

Suggested change
.AddClient<IRelayService>();
.AddClient<IRelayService>()
.AddServer<IRelayClient, DataClient>();

Copilot uses AI. Check for mistakes.
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.

3 participants