Skip to content

Review settings and streamings#127

Merged
albx merged 26 commits into
mainfrom
124-review-settings-and-streamings
Apr 7, 2026
Merged

Review settings and streamings#127
albx merged 26 commits into
mainfrom
124-review-settings-and-streamings

Conversation

@albx

@albx albx commented Apr 4, 2026

Copy link
Copy Markdown
Owner

This pull request introduces Azure Table Storage integration for managing connected channels in the CMS, adds new repository and model classes to support this, and updates the distributed application and hosting configuration to use the latest .NET and Aspire SDKs. Additionally, it refactors streaming and settings endpoint services for improved consistency and maintainability.

Azure Table Storage Integration and Connected Channels Management:

  • Added ConnectedChannelsRepository and IConnectedChannelsRepository to KITT.Cms.Settings, providing CRUD operations for connected channels using Azure Table Storage. Introduced related models: ConnectedChannel and ChannelType. [1] [2] [3] [4] [5]
  • Implemented ChannelsEndpointsServices in KITT.Cms.Web.Api to expose connected channel operations via API, mapping between storage entities and API models.

Distributed Application and Hosting Updates:

  • Upgraded KITT.AppHost to .NET 10.0 and Aspire 13.2.1 SDKs, updated package references, and added Azure Storage support.
  • Added Azure Storage account and table resource configuration to the distributed application builder, including local emulator support. [1] [2]
  • Updated the solution file (LemonBot.slnx) to include new and existing projects in a structured format.

Refactoring and Service Improvements:

  • Refactored StreamingsEndpointsServices to use constructor parameter properties and updated streaming detail mapping to include new fields (e.g., TwitchChannel, YouTubeChannel, SEO data), and to use the new connected channel structure. [1] [2] [3] [4] [5] [6]
  • Removed the obsolete SettingsEndpointsServices class, cleaning up settings management logic.

Distributed Application Builder Extension:

  • Refactored the AddKittDatabase extension method to use the new Aspire APIs, container options, and improved style. [1] [2]

These changes collectively modernize the infrastructure, introduce scalable channel management via Azure Table Storage, and streamline service logic for future extensibility.

@albx albx linked an issue Apr 4, 2026 that may be closed by this pull request
@albx albx requested a review from Copilot April 4, 2026 16:03

Copilot AI left a comment

Copy link
Copy Markdown

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 solution to .NET 10/Aspire 13, refactors CMS streaming/settings flows, and introduces Azure Table Storage–backed “connected channels” management used by the CMS UI/API.

Changes:

  • Added Azure Table Storage repository + API/UI for managing connected channels (Twitch/YouTube) in CMS.
  • Refactored streaming scheduling/import/detail to support separate Twitch/YouTube channel + URL fields, and removed legacy settings endpoints/UI.
  • Upgraded multiple projects/packages to .NET 10 and updated the Aspire/AppHost distributed app to provision Azure Storage/Tables.

Reviewed changes

Copilot reviewed 120 out of 124 changed files in this pull request and generated 14 comments.

Show a summary per file
File Description
tests/KITT.Web.Testing/KITT.Web.Testing.csproj Bumps test target/framework packages to .NET 10-era versions.
tests/KITT.Telegram.Functions.Test/KITT.Telegram.Functions.Test.csproj Updates test SDK packages; removed project reference (causes compile issue).
tests/KITT.Core.Test/Models/StreamingTests.cs Updates streaming domain tests for new channel/url fields.
tests/KITT.Core.Test/KITT.Core.Test.csproj Upgrades test project to net10 and updates test tooling packages.
tests/KITT.Core.Test/Commands/StreamingCommandsTest.cs Updates command tests for new streaming command signatures.
tests/KITT.Cms.Web.Api.Test/SettingsEndpointsTest.cs Removes obsolete settings test case.
tests/KITT.Cms.Web.Api.Test/KITT.Cms.Web.Api.Test.csproj Upgrades CMS API test project to net10 + package updates.
src/LemonBot/LemonBot.csproj Minor package version bumps.
src/LemonBot.Commands/LemonBot.Commands.csproj Package version bumps and reference cleanup.
src/LemonBot.Clients/LemonBot.Clients.csproj Package version bumps.
src/KITT.Web.Shared/Security/ClaimsPrincipalExtensions.cs Refactors extension methods to C# extension members syntax.
src/KITT.Web.Shared/KITT.Web.Shared.csproj Upgrades to net10 + package upgrades (Aspire/Identity.Web/etc.).
src/KITT.Web.Shared/Azure/AzureKeyVaultExtensions.cs Refactors builder extensions and emulator fallback logic.
src/KITT.Web.Models/KITT.Web.Models.csproj Upgrades to net10.
src/KITT.Web.App/KITT.Web.App/KITT.Web.App.csproj Upgrades to net10 and updates web app package references.
src/KITT.Web.App/KITT.Web.App/Endpoints/ReverseProxy/TransformBuilderContextExtensions.cs Adjusts YARP transforms (path handling + token acquisition).
src/KITT.Web.App/KITT.Web.App/Endpoints/ProposalEndpoints.cs Refactors endpoint mapping using extension members syntax.
src/KITT.Web.App/KITT.Web.App/Endpoints/CmsEndpoints.cs Updates CMS proxy routes to new settings/channels endpoints.
src/KITT.Web.App/KITT.Web.App/Endpoints/AuthenticationEndpoints.cs Refactors endpoint mapping using extension members syntax.
src/KITT.Web.App/KITT.Web.App.Client/Resources/Shared/NavMenu.resx Adds nav label for “Connected channels”.
src/KITT.Web.App/KITT.Web.App.Client/Resources/Shared/NavMenu.it.resx Adds Italian nav label for “Connected channels”.
src/KITT.Web.App/KITT.Web.App.Client/Resources/Shared/NavMenu.Designer.cs Regenerates resource designer for new label.
src/KITT.Web.App/KITT.Web.App.Client/Program.cs Removes obsolete general settings client registration.
src/KITT.Web.App/KITT.Web.App.Client/Pages/Settings.razor Deleted legacy settings page.
src/KITT.Web.App/KITT.Web.App.Client/Pages/CreateNewSettings.razor Deleted legacy “create settings” page.
src/KITT.Web.App/KITT.Web.App.Client/Layout/NavMenu.razor Updates nav structure: adds settings group and channels link.
src/KITT.Web.App/KITT.Web.App.Client/KITT.Web.App.Client.csproj Upgrades to net10 and package updates.
src/KITT.Web.App/KITT.Web.App.Client/Clients/ISettingsClient.cs Deleted legacy settings client abstraction.
src/KITT.Web.App/KITT.Web.App.Client/Clients/Http/SettingsHttpClient.cs Deleted legacy settings HTTP client.
src/KITT.Web.App/KITT.Web.App.Client/Clients/ClientsServiceCollectionExtensions.cs Deleted legacy general clients registration.
src/KITT.Web.App/KITT.Web.App.Client/_Imports.razor Removes unused legacy clients namespace.
src/KITT.Web.App.UI/ServiceCollectionExtensions.cs Refactors service registration using extension members syntax.
src/KITT.Web.App.UI/KITT.Web.App.UI.csproj Upgrades UI project to net10 + adds community FluentUI components package.
src/KITT.Telegram.Messages/KITT.Telegram.Messages.csproj Upgrades messages library to net10 (breaks net8 Functions referencing).
src/KITT.Telegram.Functions/KITT.Telegram.Functions.csproj Updates Functions Worker packages; removed messages reference (compile issue).
src/KITT.Support.Seeder/KITT.Support.Seeder.csproj Upgrades seeder to net10 and Aspire package versions.
src/KITT.Services/ServiceNames.cs Adds service names for storage/tables resources.
src/KITT.Services/KITT.Services.csproj Upgrades to net10.
src/KITT.ServiceDefaults/KITT.ServiceDefaults.csproj Upgrades to net10 and updates OpenTelemetry + service discovery/resilience packages.
src/KITT.Proposals.Web.Models/KITT.Proposals.Web.Models.csproj Upgrades to net10.
src/KITT.Proposals.Web.App/KITT.Proposals.Web.App.csproj Upgrades to net10 + package updates.
src/KITT.Proposals.Web.App/Clients/ClientsServiceCollectionExtensions.cs Refactors DI extension using extension members syntax.
src/KITT.Proposals.Web.Api/Program.cs Adds validation registration and upgrades runtime baseline.
src/KITT.Proposals.Web.Api/KITT.Proposals.Web.Api.csproj Upgrades to net10 + Aspire package updates.
src/KITT.Proposals.Web.Api/Endpoints/ProposalsEndpoints.cs Refactors endpoint mapping and removes parameter validation wiring.
src/KITT.Core/Validators/StreamingValidator.cs Removes old rules; needs new rules for updated streaming model invariants.
src/KITT.Core/ReadModels/IDatabase.cs Removes Expenses/StreamingStats read model surfaces.
src/KITT.Core/ReadModels/Extensions/StreamingStatsExtensions.cs Deleted obsolete streaming stats query extension.
src/KITT.Core/ReadModels/Extensions/StreamingsExtensions.cs Refactors query extensions using extension members syntax.
src/KITT.Core/ReadModels/Extensions/SettingsExtensions.cs Refactors query extensions using extension members syntax.
src/KITT.Core/ReadModels/Extensions/ProposalExtensions.cs Refactors query extensions using extension members syntax.
src/KITT.Core/ReadModels/Extensions/ContentExtensions.cs Refactors query extensions using extension members syntax.
src/KITT.Core/ReadModels/Database.cs Removes Expenses/StreamingStats queries.
src/KITT.Core/Persistence/Mapping/StreamingStatsMapper.cs Deleted streaming stats EF mapping.
src/KITT.Core/Persistence/Mapping/StreamingMapper.cs Renames mapped columns to TwitchUrl/YouTubeUrl.
src/KITT.Core/Persistence/Mapping/ExpenseMapper.cs Deleted expenses EF mapping.
src/KITT.Core/Persistence/KittDbContext.cs Removes DbSets for Expenses/StreamingStats.
src/KITT.Core/Models/StreamingStats.cs Deleted streaming stats domain model.
src/KITT.Core/Models/Streaming.cs Refactors streaming domain model to support Twitch/YouTube channel+url fields.
src/KITT.Core/Models/Settings.cs Initializes strings to avoid nulls under nullable annotations.
src/KITT.Core/Models/Rating.cs Initializes strings to avoid nulls under nullable annotations.
src/KITT.Core/Models/Expense.cs Deleted expense domain model.
src/KITT.Core/Models/Content.cs Makes Abstract nullable + makes SEO fields nullable.
src/KITT.Core/Migrations/KittDbContextModelSnapshot.cs Updates EF snapshot for schema changes/removals.
src/KITT.Core/Migrations/20251110054558_Refactor-Streamings.Designer.cs Adds EF migration designer for streaming refactor + dropped tables.
src/KITT.Core/Migrations/20251110054558_Refactor-Streamings.cs Adds EF migration: drops Expenses/StreamingStats tables, renames columns, adds YouTubeChannel.
src/KITT.Core/KITT.Core.csproj Upgrades core to net10 + package updates and enables nullable.
src/KITT.Core/DependencyInjection/ServiceCollectionExtensions.cs Refactors DI extension and removes StreamingStatsCommands registration.
src/KITT.Core/Commands/StreamingStatsCommands.cs Deleted obsolete streaming stats commands.
src/KITT.Core/Commands/StreamingCommands.cs Refactors streaming commands signatures and removes message bus dependency.
src/KITT.Core/Commands/ProposalCommands.cs Proposal scheduling currently broken (NotImplementedException).
src/KITT.Core/Commands/IStreamingStatsCommands.cs Deleted obsolete commands interface.
src/KITT.Core/Commands/IStreamingCommands.cs Updates commands interface to new streaming signature.
src/KITT.Cms.Web.Models/Streamings/StreamingDetailModel.cs Adds Twitch/YouTube channel+url fields to streaming detail API model.
src/KITT.Cms.Web.Models/Streamings/ScheduleStreamingModel.cs Adds channel selection fields + model-level validation hook.
src/KITT.Cms.Web.Models/Streamings/ImportStreamingModel.cs Refactors import model to DateOnly/TimeOnly + adds validation method (but missing interface).
src/KITT.Cms.Web.Models/Settings/SettingsListModel.cs Deleted legacy settings list model.
src/KITT.Cms.Web.Models/Settings/SettingsDetailModel.cs Deleted legacy settings detail model.
src/KITT.Cms.Web.Models/Settings/CreateNewSettingsModel.cs Deleted legacy settings creation model.
src/KITT.Cms.Web.Models/Settings/ChannelModel.cs Adds API model for connected channels.
src/KITT.Cms.Web.Models/KITT.Cms.Web.Models.csproj Upgrades to net10 + adds reference to KITT.Cms.Settings.
src/KITT.Cms.Web.App/Resources/Pages/Settings/Channels.resx Adds CMS UI resources for connected channels page (EN).
src/KITT.Cms.Web.App/Resources/Pages/Settings/Channels.it.resx Adds CMS UI resources for connected channels page (IT).
src/KITT.Cms.Web.App/Resources/Pages/Settings/Channels.Designer.cs Generated resources designer for channels page.
src/KITT.Cms.Web.App/Resources/Components/ChannelFormPanel.resx Adds resources for channel form panel (EN).
src/KITT.Cms.Web.App/Resources/Components/ChannelFormPanel.it.resx Adds resources for channel form panel (IT).
src/KITT.Cms.Web.App/Resources/Components/ChannelFormPanel.Designer.cs Generated resources designer for channel form panel.
src/KITT.Cms.Web.App/Pages/Streamings/StreamingDetail.razor.cs Refactors to use connected channels + constructor injection.
src/KITT.Cms.Web.App/Pages/Streamings/StreamingDetail.razor Adds channel selectors + updates URL fields.
src/KITT.Cms.Web.App/Pages/Streamings/Schedule.razor.cs Refactors to shared StreamingForm view model and new API fields.
src/KITT.Cms.Web.App/Pages/Streamings/Schedule.razor Replaces ScheduleForm with StreamingForm.
src/KITT.Cms.Web.App/Pages/Streamings/Import.razor.cs Refactors import to shared StreamingForm view model and new API fields.
src/KITT.Cms.Web.App/Pages/Streamings/Import.razor Replaces bespoke import form with StreamingForm.
src/KITT.Cms.Web.App/Pages/Settings/Channels.razor.cs Adds connected channels listing and CRUD panel flows.
src/KITT.Cms.Web.App/Pages/Settings/Channels.razor Adds connected channels page UI.
src/KITT.Cms.Web.App/KITT.Cms.Web.App.csproj Upgrades to net10 and wires new embedded resources.
src/KITT.Cms.Web.App/Components/StreamingForm.razor.cs Adds shared streaming form component + loads connected channels.
src/KITT.Cms.Web.App/Components/StreamingForm.razor Adds shared streaming form markup including channel selectors.
src/KITT.Cms.Web.App/Components/ContentForm.razor.cs Marks EditContext as unmodified after save.
src/KITT.Cms.Web.App/Components/ChannelFormPanel.razor.cs Adds dialog panel component for create/edit channel.
src/KITT.Cms.Web.App/Components/ChannelFormPanel.razor Adds channel create/edit panel UI.
src/KITT.Cms.Web.App/Clients/IConnectedChannelsClient.cs Adds client interface for connected channels API.
src/KITT.Cms.Web.App/Clients/Http/StreamingsHttpClient.cs Refactors HTTP client to primary-ctor style.
src/KITT.Cms.Web.App/Clients/Http/ConnectedChannelsHttpClient.cs Adds HTTP client for connected channels endpoints.
src/KITT.Cms.Web.App/Clients/ClientsServiceCollectionExtensions.cs Registers new connected channels client.
src/KITT.Cms.Web.App/_Imports.razor Adds imports for community FluentUI components and channel models.
src/KITT.Cms.Web.Api/Program.cs Adds Azure Tables client + validation and registers connected channels services.
src/KITT.Cms.Web.Api/KITT.Cms.Web.Api.csproj Upgrades to net10 + adds Aspire Tables + settings project reference.
src/KITT.Cms.Web.Api/Endpoints/StreamingsEndpoints.cs Refactors endpoint mapping and removes parameter validation wiring.
src/KITT.Cms.Web.Api/Endpoints/SettingsEndpoints.cs Replaces legacy settings endpoints with /settings/channels CRUD.
src/KITT.Cms.Web.Api/Endpoints/Services/StreamingsEndpointsServices.cs Updates mapping and commands calls for new streaming fields.
src/KITT.Cms.Web.Api/Endpoints/Services/SettingsEndpointsServices.cs Deleted legacy settings endpoints services.
src/KITT.Cms.Web.Api/Endpoints/Services/ChannelsEndpointsServices.cs Adds service layer mapping channel entities to API models.
src/KITT.Cms.Settings/Models/ConnectedChannel.cs Adds Azure Tables entity model.
src/KITT.Cms.Settings/Models/ChannelType.cs Adds channel type enum.
src/KITT.Cms.Settings/KITT.Cms.Settings.csproj Adds new settings storage project targeting net10.
src/KITT.Cms.Settings/IConnectedChannelsRepository.cs Adds repository interface for connected channels storage.
src/KITT.Cms.Settings/ConnectedChannelsRepository.cs Implements Azure Tables CRUD operations for connected channels.
src/KITT.AppHost/Program.cs Adds Azure Storage/Tables resources and wiring in distributed app.
src/KITT.AppHost/KITT.AppHost.csproj Upgrades to net10 + Aspire 13 + adds Azure Storage hosting package.
src/KITT.AppHost/DistributedApplicationBuilderExtensions.cs Refactors SQL resource wiring using new Aspire APIs.
LemonBot.slnx New solution layout including new projects.
aspire.config.json Adds Aspire app host path configuration.
Files not reviewed (4)
  • src/KITT.Cms.Web.App/Resources/Components/ChannelFormPanel.Designer.cs: Language not supported
  • src/KITT.Cms.Web.App/Resources/Pages/Settings/Channels.Designer.cs: Language not supported
  • src/KITT.Core/Migrations/20251110054558_Refactor-Streamings.Designer.cs: Language not supported
  • src/KITT.Web.App/KITT.Web.App.Client/Resources/Shared/NavMenu.Designer.cs: Language not supported
Comments suppressed due to low confidence (1)

src/KITT.Core/Validators/StreamingValidator.cs:36

  • The validator no longer enforces constraints that are still present at the persistence layer (e.g., max lengths / required URL fields) and doesn’t validate the new TwitchUrl/YouTubeUrl/channel combination invariants. Add rules for the new fields (lengths and conditional required URLs) so invalid data fails validation before hitting the database.

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

Comment thread src/KITT.Core/Commands/ProposalCommands.cs
Comment thread src/KITT.Telegram.Functions/KITT.Telegram.Functions.csproj
Comment thread src/KITT.Core/Models/Streaming.cs
Comment thread src/KITT.Cms.Web.Models/Streamings/ImportStreamingModel.cs Outdated
Comment thread src/KITT.Cms.Web.Models/Streamings/ScheduleStreamingModel.cs
Comment thread src/KITT.Cms.Web.Api/Endpoints/SettingsEndpoints.cs Outdated
Comment thread src/KITT.Cms.Settings/ConnectedChannelsRepository.cs
Comment thread tests/KITT.Core.Test/Commands/StreamingCommandsTest.cs
Comment thread src/KITT.Telegram.Messages/KITT.Telegram.Messages.csproj
@albx albx merged commit f5bcd2c into main Apr 7, 2026
3 checks passed
@albx albx deleted the 124-review-settings-and-streamings branch April 7, 2026 05:43
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.

Review settings and streamings

2 participants