Repository navigation
Feature/admin sidebar layout - #2
Merged
Merged
Conversation
….Tests - Implement tests to verify HostDbContext generation for modules with and without DbContext. - Ensure correct namespace, auto-generated header, and constructor parameters. - Validate DbSet properties for single and multiple modules, including handling of duplicate entities. - Test entity type configurations and schema isolation for different database providers. - Include edge case handling for abstract DbContexts and duplicate table names.
- Created ProductConfiguration class for Entity Framework Core to define the Product entity's schema and seed data. - Added initial migration files for the database, including the creation of user, order, and product schemas and tables. - Seeded initial data for Orders and Products in the migration.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move all record structs and mutable working classes from the nested ModuleDiscovererGenerator partial class into a standalone file. Types are now internal instead of private since they are no longer nested. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move GetModuleFieldName, MapCSharpTypeToTypeScript, and GetModuleNameFromFqn into a dedicated static helper class. Update all call sites in the emitters to use the new qualified names. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move ExtractDiscoveryData (renamed to Extract) and all Find*/helper methods into a dedicated SymbolDiscovery static class. The generator entry point now only contains the Initialize method. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add the IEmitter interface that will be implemented by individual emitter classes in future refactoring steps. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move all 7 DiagnosticDescriptor fields and ReportDiscoveryDiagnostics into dedicated DiagnosticEmitter class implementing IEmitter. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move GenerateModuleExtensions into dedicated emitter class. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move GenerateEndpointExtensions into dedicated emitter class. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move GenerateMenuExtensions into dedicated emitter class. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move GenerateRazorComponentExtensions into dedicated emitter class. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move GenerateViewPages into dedicated emitter class. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move GenerateJsonResolver into dedicated emitter class with early return when no DTO types exist. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move GenerateTypeScriptDefinitions into dedicated emitter class with early return when no DTO types exist. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move EmitHostDbContext into dedicated emitter class with early return when no DbContexts exist. The emitters partial class is now empty. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add 5 new test files covering each emitter's specific logic: - EndpointExtensionsEmitterTests (9 tests) - RazorComponentExtensionsEmitterTests (5 tests) - TypeScriptDefinitionsEmitterTests (11 tests) - ViewPagesEmitterTests (7 tests) - JsonResolverEmitterTests (8 tests) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace orderFaker.Date.Recent(30) with a fixed date range to prevent EF Core PendingModelChangesWarning on every build. Recreated migration. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Annotate DatabaseProvider, MenuSection, and CheckStatus enums with [EnumExtensions] to generate fast ToStringFast(), IsDefined(), and TryParse() methods. Replace Enum.TryParse in DatabaseProviderDetector with the generated extension for better AOT compatibility. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ompile-time safety Introduces Vogen 8.0.5 value objects that prevent mixing up raw int/string IDs across module boundaries. Each ID type generates System.Text.Json converters and EF Core value converters automatically. Key changes: - ProductId/OrderId (int-backed) and UserId (string-backed with validation) - All contracts, services, endpoints, and tests updated to use typed IDs - EF Core ConfigureConventions registers Vogen converters/comparers per DbContext - Source generator emits HostDbContext as partial class for convention overrides - TypeScript type mappings updated for Vogen ID types - Test factory now replaces HostDbContext for proper integration test setup Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… Orders validation Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Extract common CRUD handler patterns (GetAll, GetById, Create, Update, Delete) into reusable static methods in SimpleModule.Core.Endpoints. Simplify all Products and Orders endpoint classes to delegate to these helpers while preserving validation logic. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Detect Vogen value objects generically via [ValueObjectAttribute<T>] instead of hardcoding module-specific type names in TypeMappingHelpers. The generator now stores the underlying primitive type alongside the actual type, using it only for TypeScript mapping while preserving the Vogen type for JSON/EF code. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…alidationBuilder edge cases Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…missionContracts Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ct DbContext) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…rrors Delete stale migrations from before the OpenIddict/Permissions module split and regenerate a fresh InitialCreate migration for HostDbContext. Switch Program.cs from EnsureCreatedAsync to MigrateAsync so tables are properly created when migrations exist. Wrap all seed service StartAsync methods in try-catch so database errors during seeding log a warning instead of crashing the host. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Generator tests: expect .RequireAuthorization() in generated group chains. Orders tests: use authenticated clients with proper permissions. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ent UI Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…le prefixing Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add Clients list, ClientsCreate, and ClientsEdit pages with tabbed editing (Details, URIs, Permissions). Uses @simplemodule/ui components and follows the Admin module patterns. Updated csproj to Razor SDK with JsBuild target for Vite. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…resolution
The page resolver uses /_content/{AssemblyName}/{AssemblyName}.pages.js.
The assembly name "OpenIddict" conflicts with the OpenIddict NuGet package,
so we use "OpenIddictModule" instead. Updated page names, Vite config,
and migration accordingly.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Smoke tests: page loads, seeded client visible, navbar link, auth redirect. CRUD flow: create, verify, edit display name, verify update, delete, verify removal. Tab tests: URIs tab shows redirect URIs, Permissions tab shows permission groups. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Adjusted formatting in AdminRolesEndpoint, AdminUsersEndpoint, and RolesEndpoint for better readability. - Simplified permission logging loops in AdminRolesEndpoint and AdminUsersEndpoint. - Enhanced code clarity in OpenIddict ClientsActionEndpoint by streamlining foreach loops. - Reformatted DbSet properties in OpenIddictAppDbContext for consistency. - Updated IPermissionContracts and PermissionService to improve method signatures and readability. - Refactored migration code in InitialCreate.cs for better formatting and clarity. - Improved test assertions in ConnectEndpointTests for enhanced readability.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add InertiaSharedData scoped service for sharing props across all Inertia responses. AdminSidebarMiddleware populates sidebar menu items for authenticated users. InertiaResult.MergeProps merges shared data with endpoint-specific props. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…AOT safety Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ayout Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…dmin nav Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…minLayout Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…for client package The AdminLayout now renders via createPortal to document.body, escaping the Blazor SSR DOM hierarchy. Combined with z-[60] (above Blazor nav's z-50), the admin sidebar fully covers the shell chrome. Also adds @source for @simplemodule/client to Tailwind CSS scan paths. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace single MainLayout with auth-conditional layouts: - PublicLayout (top navbar) for anonymous visitors - AppLayout (sidebar) for authenticated users Add AppSidebar menu section with items from all modules. Replace teal/emerald palette with forest green/deep evergreen. Remove React AdminLayout portal overlay — sidebar now handled by Blazor SSR. Remove AdminSidebarMiddleware and AOT references. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2 of 5 tasks
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.
Replace single MainLayout with auth-conditional layouts:
Add AppSidebar menu section with items from all modules. Replace teal/emerald palette with forest green/deep evergreen. Remove React AdminLayout portal overlay — sidebar now handled by Blazor SSR. Remove AdminSidebarMiddleware and AOT references.
Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com