Skip to content
This repository was archived by the owner on Oct 11, 2026. It is now read-only.

Add in-process widget message bus, DI composition helpers, and registry safeguards - #1

Merged
oniemiddle merged 2 commits into
mainfrom
codex
Oct 2, 2026
Merged

oniemiddle merged 2 commits into
mainfrom
codex

Conversation

@oniemiddle

Copy link
Copy Markdown
Owner

Motivation

  • Provide a typed, in-process message bus so independently developed widgets can exchange immutable data contracts without holding direct references to each other.
  • Move platform capability and built-in widget composition into explicit DI extension points so the shell depends only on abstractions and composition is deterministic.
  • Make widget registration fail fast on duplicate or invalid IDs to surface configuration/plugin conflicts at startup.
  • Document architecture and the widget extension model for contributors and future plugin work.

Description

  • Introduced IWidgetMessage and IWidgetMessageBus in DeskKit.Core.Abstractions and implemented a process-wide WidgetMessageBus in DeskKit.Core.Services, then exposed the bus via IWidgetHost.Messages and wired it into WidgetShell and the DI container.
  • Refactored platform registrations into AddDeskKitPlatform(this IServiceCollection) in DeskKit.Platform and moved built-in widget registrations into AddBuiltInWidgets(this IServiceCollection) in the widgets project, updating App to use both and to build WidgetRegistry from IWidgetProvider services.
  • Reworked WidgetRegistry to accept IEnumerable<IWidgetProvider> in its constructor, preserve registration order, reject duplicate or empty IDs in Register, and add TryRegister for optional/lenient registration.
  • Added unit tests for the new components (WidgetMessageBusTests and expanded WidgetRegistryTests), added docs/architecture.md, updated README.md with the widget extension model, and bumped package references for Microsoft.Extensions.DependencyInjection.Abstractions in package props and relevant projects.

Testing

  • Ran unit tests for core services with dotnet test tests/DeskKit.Core.Tests, which executed WidgetMessageBusTests and WidgetRegistryTests and succeeded.
  • Ran solution tests with dotnet test DeskKit.slnx to verify the changes compile and the core tests pass, and the test run succeeded.

Codex Task

@oniemiddle
oniemiddle merged commit 2a5c4d3 into main Oct 2, 2026
1 check passed
@oniemiddle
oniemiddle deleted the codex branch October 11, 2026 11:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant