-
Notifications
You must be signed in to change notification settings - Fork 29
Refactor ComposeUI Desktop Agent project to be independent of the IMessagingService implementation #1041
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
aa2c89e
to
996ca23
Compare
2be7409
to
55b7276
Compare
ZKRobi
previously approved these changes
Jul 10, 2025
...anley.ComposeUI.DesktopAgent/Infrastructure/Internal/Fdc3DesktopAgentMessageRouterService.cs
Outdated
Show resolved
Hide resolved
...tanley.ComposeUI.DesktopAgent/Infrastructure/Internal/ResolverUIMessageRouterCommunicator.cs
Show resolved
Hide resolved
...agingadapter/dotnet/MorganStanley.ComposeUI.MessagingAdapter.Abstractions/src/JsonFactory.cs
Show resolved
Hide resolved
lilla28
reviewed
Jul 10, 2025
...fdc3/dotnet/DesktopAgent/src/MorganStanley.ComposeUI.DesktopAgent/Channels/PrivateChannel.cs
Outdated
Show resolved
Hide resolved
...fdc3/dotnet/DesktopAgent/src/MorganStanley.ComposeUI.DesktopAgent/Channels/PrivateChannel.cs
Outdated
Show resolved
Hide resolved
src/fdc3/dotnet/DesktopAgent/src/MorganStanley.ComposeUI.DesktopAgent/Fdc3DesktopAgent.cs
Show resolved
Hide resolved
src/fdc3/dotnet/DesktopAgent/src/MorganStanley.ComposeUI.DesktopAgent/Fdc3DesktopAgent.cs
Outdated
Show resolved
Hide resolved
src/fdc3/dotnet/DesktopAgent/src/MorganStanley.ComposeUI.DesktopAgent/Fdc3DesktopAgent.cs
Outdated
Show resolved
Hide resolved
src/messagingadapter/dotnet/MorganStanley.ComposeUI.MessagingAdapter/src/ComposeUIMessaging.cs
Outdated
Show resolved
Hide resolved
...module-loader/dotnet/src/MorganStanley.ComposeUI.ModuleLoader.Abstractions/IsExternalInit.cs
Show resolved
Hide resolved
...odule-loader/dotnet/src/MorganStanley.ComposeUI.ModuleLoader.Abstractions/ShutdownContext.cs
Show resolved
Hide resolved
...module-loader/dotnet/src/MorganStanley.ComposeUI.ModuleLoader.Abstractions/StartupContext.cs
Show resolved
Hide resolved
src/shared/dotnet/src/MorganStanley.ComposeUI.Utilities/CommandLineParser.cs
Show resolved
Hide resolved
lilla28
reviewed
Jul 10, 2025
src/messagingadapter/dotnet/MorganStanley.ComposeUI.MessagingAdapter/src/ComposeUIMessaging.cs
Outdated
Show resolved
Hide resolved
Refactor code for readability and consistency: add braces to all control blocks, use collection initializers, modernize byte array creation, and standardize variable declarations. Update formatting, comments, and remove unnecessary IAsyncDisposable from IMessageRouter. No functional changes.
Refactor the FDC3 DesktopAgent and related test projects to use the new MorganStanley.ComposeUI.MessagingAdapter.Abstractions interfaces (IComposeUIMessaging, MessageAdapterContext, etc.) in place of the legacy messaging abstractions. Update all message handling to use string payloads instead of MessageBuffer, and replace exception and utility types with their MessagingAdapter equivalents. Refactor logging to use structured templates, modernize test method signatures and collection initializations, and update all mocks and verifications to match the new API. Add new projects for the messaging adapter abstraction and implementation, update solution and project references, and introduce DI registration via AddComposeUIMessagingAdapter. These changes improve modularity, testability, and future extensibility of the messaging infrastructure.
55b7276
to
3ea78ba
Compare
lilla28
reviewed
Jul 11, 2025
...tanley.ComposeUI.DesktopAgent/Infrastructure/Internal/ResolverUIMessageRouterCommunicator.cs
Outdated
Show resolved
Hide resolved
src/fdc3/dotnet/DesktopAgent/test/MorganStanley.ComposeUI.DesktopAgent.Tests/EndToEndTests.cs
Outdated
Show resolved
Hide resolved
...sagingadapter/dotnet/src/MorganStanley.ComposeUI.MessagingAdapter.Abstractions/IMessaging.cs
Show resolved
Hide resolved
...ssagingadapter/dotnet/src/MorganStanley.ComposeUI.MessagingAdapter/MessageRouterMessaging.cs
Outdated
Show resolved
Hide resolved
lilla28
reviewed
Jul 11, 2025
...dotnet/DesktopAgent/test/MorganStanley.ComposeUI.DesktopAgent.Tests/Fdc3DesktopAgentTests.cs
Show resolved
Hide resolved
...seUI.DesktopAgent.Tests/Infrastructure/Internal/ResolverUIMessageRouterCommunicator.Tests.cs
Show resolved
Hide resolved
...sagingadapter/dotnet/src/MorganStanley.ComposeUI.MessagingAdapter.Abstractions/IMessaging.cs
Show resolved
Hide resolved
...omposeUI.MessagingAdapter/DependencyInjection/ServiceCollectionMessagingadapterExtensions.cs
Outdated
Show resolved
Hide resolved
ZKRobi
approved these changes
Jul 14, 2025
lilla28
approved these changes
Jul 14, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests are missing. but I am okay to go forward without that.
- Replaced IComposeUIMessaging with IMessaging across solution, updating all references and DI registrations to use MessageRouterMessagingAdapter. - Added new messaging adapter abstractions and MessageRouter implementation projects targeting .NET Standard 2.0 and .NET 8.0. - Updated solution and project files to reference new source locations and include solution items for build/package props. - Modernized code: adopted C# 12 collection expressions, standardized ValueTask usage, improved async/await patterns, and made methods static where appropriate. - Refactored channel and messaging service classes for improved disposal logic, logging, and error handling. - Updated tests to use new messaging abstractions and renamed test classes for consistency. - Removed obsolete MessagingAdapter.Abstractions project and related files; added new abstractions and polyfills for .NET Standard compatibility. - Improved documentation, code style, and null-handling throughout. - Added new Fdc3DesktopAgentMessagingService and ResolverUICommunicator classes for FDC3-compliant messaging and intent resolution. - Updated dependencies: added Microsoft.Bcl.AsyncInterfaces, System.Collections.Immutable, and System.ComponentModel.Annotations. - Improved cross-platform compatibility by targeting .NET Standard 2.0 in key projects and adding IsExternalInit polyfill.
dfbb18d
to
af99700
Compare
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.
Adopt C# 12 collection expressions for array and list initialization, update async test methods to return Task, add braces to single-line if statements, and apply minor style improvements (e.g., var usage, u8 string literals, concise record/class definitions). No changes to business logic or test coverage.