fix: address architectural issues across framework and CLI#143
Closed
antosubash wants to merge 2 commits intomainfrom
Closed
fix: address architectural issues across framework and CLI#143antosubash wants to merge 2 commits intomainfrom
antosubash wants to merge 2 commits intomainfrom
Conversation
- DoctorCommand: correct project-reference path to include src\ segment so --fix produces buildable csproj entries - SlnxManipulator: remove dead FindFolderClosingTag helper - AnthropicExtensions: resolve options via IOptions<T> in factory instead of re-reading IConfiguration, restoring PostConfigure parity with the other AI providers - VectorKnowledgeStore: build a runtime VectorStoreCollectionDefinition from RagOptions.EmbeddingDimension so callers can use models with non-1536 vectors (Ollama 768, etc.) without a silent dimension mismatch - IModule lifecycle: remove the redundant IModuleLifecycle interface; modules use the IModule default-method overrides directly, simplifying ModuleLifecycleHostedService - Generator: drop the hardcoded ModuleName == "Localization" check in HostingExtensionsEmitter and remove LocalizationExtensionsEmitter; LocalizationModule now initializes its TranslationLoader via ConfigureHost(IHost), discovering module assemblies from DI - sm new module: scaffold Views/IndexEndpoint.cs, Views/Index.tsx, Pages/index.ts, and vite.config.ts so a freshly generated module renders a working Inertia page out of the box
Deploying simplemodule-website with
|
| Latest commit: |
76dafc8
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://8aa557bc.simplemodule-website.pages.dev |
| Branch Preview URL: | https://claude-close-fixed-issues-cz.simplemodule-website.pages.dev |
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
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.
Summary
Addresses concrete issues surfaced during the high-level architectural review of the framework and CLI.
CLI
sm doctor --fixwas emitting broken project references. The path it wrote (..\modules\{name}\{name}\{name}.csproj) was missing thesrc\segment used bysm new module, so any auto-fix produced a csproj entry thatdotnet buildrejected.sm new moduleno longer leaves a module that compiles but silently 404s in the browser. It now scaffoldsViews/IndexEndpoint.cs,Views/Index.tsx,Pages/index.ts, andvite.config.tsso a freshly generated module renders an Inertia page out of the box.SlnxManipulator: removed deadFindFolderClosingTaghelper that was never called.Framework
AnthropicExtensionsnow resolvesIOptions<AnthropicOptions>inside the singleton factory instead of re-readingIConfiguration. This restores parity with the OpenAI / Azure / Ollama providers and meansservices.PostConfigure<AnthropicOptions>(...)and test overrides actually take effect.VectorKnowledgeStorebuilds a runtimeVectorStoreCollectionDefinitionfromRagOptions.EmbeddingDimension. Previously the dimension was baked intoKnowledgeRecordvia[VectorStoreVector(1536)]andRagOptions.EmbeddingDimensionwas dead config — switching to a model with non-1536 vectors (Ollamanomic-embed-textat 768,text-embedding-3-largeat 3072) silently mismatched. The attribute remains as a default for callers that bypass the store.IModuleLifecycleremoved.IModulealready exposesOnStartAsync/OnStopAsync/CheckHealthAsyncas default-interface methods; the parallel interface had no production implementors and forcedModuleLifecycleHostedServiceto branch on type. The hosted service now calls theIModulemethods directly.ModuleName == "Localization".HostingExtensionsEmitter's string match and the entireLocalizationExtensionsEmitterare gone.LocalizationModuleinitializes itsTranslationLoaderviaConfigureHost(IHost), discovering module assemblies through DI — a renamed Localization module no longer silently breaks startup.Not in this PR
CompilationProvider.Select→ForAttributeWithMetadataName): real IDE-perf win but a substantial rewrite that needs separate test coverage.cli/SimpleModule.Cliproject has no test coverage today — needs a newSimpleModule.Cli.Testsproject, out of scope here.DeleteAsyncpre-flight: kept. The pre-flight is necessary to preserve theboolreturn semantic thatLocalandAzureproviders honor; S3'sDeleteObjectreturns 204 either way, so removing it would break parity.Test plan
dotnet buildclean across the entire solutiondotnet testpasses forSimpleModule.Generator.Tests(195),SimpleModule.Core.Tests(209),SimpleModule.Localization.Tests(26), and the AI/Rag/Storage test projectssm new module Fooagainst a clean project and verify the generated module renders/fooin the browsersm doctor --fixafter deleting a project reference and verify the rewritten csproj buildsRag:EmbeddingDimension = 768with Ollamanomic-embed-textand verify collection creation succeeds against Postgres pgvectorGenerated by Claude Code