Commit Graph

61 Commits

Author SHA1 Message Date
Loretta 711c3c8ec0 Framework-first doctrine, DI logger factory, config refactor
Introduced framework-first design rules and updated documentation to clarify framework vs. consumer boundaries. Added AcLoggerOptions and DI-based logger factory extensions to AyCode.Core, enabling per-category logger instantiation from appsettings.json. Standardized SignalR connection setup with AddAcDefaults, replacing project-specific code. Enhanced protocol configuration for DI scope isolation. Refactored appsettings.json structure and added MSBuild targets for config propagation. Removed obsolete code and updated comments to match new patterns.
2026-04-23 16:11:22 +02:00
Loretta 33d84a8257 [LOADED_DOCS: .github\copilot-instructions.md, C:\Users\Fullepi\copilot-instructions.md]
Refactor SignalR client DI and config, add test factory

Refactored FruitBankSignalRClient construction to use DI and centralized configuration from appsettings.json across all platforms. Introduced TestSignalRClientFactory for consistent test setup. Added FruitBankHubConnectionExtensions for reusable SignalR connection and logging configuration. Updated Program.cs and MauiProgram.cs to register logger factories, log writers, and IHubConnectionBuilder via DI. Embedded appsettings.json in MAUI and updated .csproj references for build flexibility. No business logic changes; all updates are infrastructure and test setup.
2026-04-22 22:45:32 +02:00
Loretta 90419001ab Add structured metadata and update doc references
- Introduce @repo and @project metadata blocks in copilot-instructions.md and README.md for all projects, declaring type, dependencies, and layer.
- Update all documentation links to reference canonical AyCode.Core and AyCode.Blazor repo locations, removing hardcoded paths.
- Move MgGridBase and related doc references to AyCode.Blazor.Components/docs/ to reflect repo reorg.
- Expand project READMEs with purpose, key files, and dependency tables for clearer architecture.
- Update glossary, conventions, and architecture docs to match new doc structure and reference locations.
- Apply minor corrections to terminology and file references for consistency and accuracy.
- Standardize documentation and make project relationships explicit.
2026-03-30 08:54:33 +02:00
Loretta e2c49940c6 Update docs: enforce .md sync, clarify structure & TFMs
Expanded and clarified solution/project documentation:
- Added all top-level docs and docs/ folder as solution items in .sln files
- Inserted maintenance notices in all project and subfolder READMEs: require .md sync with code
- Main READMEs now include project tables with TFM, purpose, and README links
- ARCHITECTURE.md now details dependency graph and TFM rationale
- CONVENTIONS.md and copilot-instructions.md require code reuse, no redundancy
- Glossary and conventions updated to require terminology/rule updates with code changes
- Emphasized DLL-only AyCode.Core refs and nopCommerce .NET 9.0 requirement
- Clarified domain terms and intentional typos
- No code logic changes; documentation and guidance only
2026-03-29 09:26:16 +02:00
Loretta 45195b9cdf Add LLM onboarding docs and standardize project READMEs
- Introduced `.github/copilot-instructions.md` as the single source of truth for domain rules, conventions, and pitfalls in each solution.
- Added `CLAUDE.md` to guide Claude to read domain rules, glossary, and README before code generation.
- Updated all solution and project `README.md` files to document project purpose, structure, key files, and LLM context (Copilot/Claude/Cursor).
- Added or revised `docs/ARCHITECTURE.md`, `docs/CONVENTIONS.md`, and `docs/GLOSSARY.md` to clarify dependency graphs, naming, patterns, and terminology.
- For FruitBankHybridApp, added `docs/SCHEMA.md` (Toon format) and expanded the glossary with business/measurement terms and common traps.
- Updated all subfolder READMEs to list key files, conventions, and LLM maintenance notes.
- Ensured all documentation is cross-referenced, up-to-date, and includes explicit instructions for LLMs to keep docs in sync with code and avoid suggesting removal/rollback as a solution.
- Standardized documentation and onboarding for maintainability and LLM/code quality across all solutions.
2026-03-28 22:38:23 +01:00
Loretta ecd7275cee Update test to serialize type metadata instead of instance
Commented out serialization of FullProcessModel instance and replaced it with serialization of type metadata using SerializeTypeMetadata<FullProcessModel>. This change focuses the test on type metadata serialization rather than instance data.
2026-03-28 17:25:51 +01:00
Loretta c5e841f207 Update ToonTests to serialize type metadata only
Replaced AcToonSerializer.Serialize with SerializeTypeMetadata<FullProcessModel> in ToonTests. The test now serializes only the type metadata for FullProcessModel using the domain description, rather than serializing the actual data instance. Assertions and comments remain unchanged.
2026-03-28 17:25:12 +01:00
Loretta 623a01e3e3 Add StockTakings to FullProcessModel and new meta test
Added List<StockTaking> StockTakings to FullProcessModel. Introduced GetMetaInfos test in ToonTests to serialize and output FullProcessModel type metadata for inspection.
2026-02-23 16:10:28 +01:00
Loretta 22bda45ade Add string interning analysis and recent data filtering
- Add using directives for binary and JSON serializers.
- Reformat and clarify Hungarian documentation comments.
- Add GetAnalyzeStringInternCandidatesLog test (DEBUG only) to analyze string interning opportunities in recent orders.
- Filter OrderDtoToToon test data to only include orders and shippings from the last 70 days.
- Improves test relevance and adds diagnostics for serialization efficiency.
2026-01-26 10:23:43 +01:00
Loretta f369491a1d temp 2026-01-20 09:54:28 +01:00
Loretta 9a3817dff0 Improve docs, naming, and reference handling for Toon/DTOs
- Use nameof(Product) for key group consistency and refactor safety
- Expand ToonDescription attributes with business context and legacy notes
- Add and update property-level documentation for measurement logic
- Add tests for AcToonSerializer reference handling (@ref markers)
- Introduce FullProcessModel and TestContainerWithSharedRefs for tests
- Add DomainDescription constant for plugin documentation
- Refine test output and assertions for metadata and navigation completeness
- Minor property description and naming improvements throughout
2026-01-16 09:28:17 +01:00
Loretta dd3c1c58c0 Add ToonDescription metadata to entities and DTOs
Expanded use of the ToonDescription attribute across core entities and DTOs to provide rich metadata, including business rules, purposes, and status flags. Added class-level and property-level annotations to improve self-documentation and support automated tooling. Introduced new computed properties with ToonDescription in ProductDto, StockQuantityHistoryDto, and StockTakingItem. Updated ToonTypeRelation with an Entity constant. Enhanced test coverage for Toon metadata. Cleaned up imports and removed obsolete test_debug.ps1 script. Updated settings.local.json to support additional Bash commands for tooling. These changes improve introspectability and support for serialization, UI, and API documentation.
2026-01-15 11:33:34 +01:00
Loretta ca186c9e90 Refactor Toon serializer: modularize metadata & relations
Major refactor: split AcToonSerializer.MetaSection.cs into focused modules for meta writing, type/enum definitions, navigation, foreign key, validation, descriptions, placeholders, topological sort, and attribute detection. Extend ToonDescriptionAttribute with BusinessRule, TypeRelation, and RelatedTypes for richer metadata. Add ToonTypeRelation constants. Annotate all DTOs with ToonDescription for type relationships. Refactor TypeMetadataBase for customizable ignore filters. Update tests and settings. Improves maintainability, extensibility, and metadata accuracy.
2026-01-14 15:39:03 +01:00
Loretta 0bb0b06af4 Refactor Toon serializer: robust navigation/type metadata
- Introduce AcNavigationPropertyInfo for unified, cached relationship metadata per property (primary key, navigation type, FK, other key, inverse, target type)
- Refactor relationship detection to use AcNavigationPropertyInfo, replacing ad-hoc logic and old RelationshipMetadata
- Add AcSerializerCommon.GetCSharpTypeName for consistent, C#-style type name formatting (handles primitives, generics, nullables, enums, collections)
- Use topological sort for @types output to ensure dependency order
- Improve enum handling: avoid redundant constraints, use new type name formatter for underlying types
- Output navigation, foreign-key, other-key, and inverse-property metadata consistently in meta section
- Enhance convention-based detection for inverse properties and "other key", including unidirectional/polymorphic support
- Add comprehensive test for navigation metadata completeness and demo test entities
- Add "source-code-language: C#" to meta section
- Misc: code cleanup, remove unused cache, improve property filtering
2026-01-14 08:00:32 +01:00
Loretta 18b119c7a8 Refactor AcToonSerializer metadata extraction & DTO tables
- Remove redundant constraints (nullable, numeric, boolean) from metadata; only explicit [Required] is documented.
- Exclude enum values from constraints; add "readonly" for readonly/init-only properties.
- Filter out primitives from documented types; only complex types and enums are included.
- Detect and document enum backing fields with "enum-type" constraint.
- Only output descriptions if explicitly provided; no fallback/inferred text.
- Add "not-mapped" constraint for [NotMapped]/[NotColumn] properties.
- Switch FruitBankHybrid.Shared.Tests.csproj to direct AyCode.Core project reference.
- Add both LinqToDB and DataAnnotations [Table] attributes to DTOs for ORM compatibility.
2026-01-13 08:25:28 +01:00
Loretta 6d689d3632 Improve AcToonSerializer type metadata handling & tests
- Refined type metadata serialization: collections and dictionaries are now detected and described more accurately, avoiding generic type names (e.g., List`1) and redundant "object" element types.
- Added circular reference protection to type name generation to prevent stack overflows and duplicate type names.
- Updated AcToonSerializerOptions.Compact to use indentation for better readability.
- Introduced ToonTests with unit tests to ensure type metadata correctness, uniqueness, and clarity.
- Added AyCode.Core project to the solution and adjusted namespaces/usings for consistency.
2026-01-12 08:36:23 +01:00
Loretta 10eea9e70c Add LINQ Expression JSON serialization & SignalR grid source
- Introduce AcExpressionHelper and related classes for serializing/deserializing LINQ Expression trees and IQueryable queries to/from JSON, enabling remote transport and execution.
- Add MgGridSignalRDataSource<TDataItem, TId> for instant local filtering and background refresh in DevExpress grids using SignalR.
- Update bunit NuGet package to v2.4.2 in test projects.
- Minor: update FruitBank base URL comment, add new test in OrderClientTests.
2025-12-30 19:29:50 +01:00
Loretta d27f53453f Refactor fullscreen grid UI; add serializer diagnostics/tests
- Replaced DxWindow with custom Bootstrap 5 fullscreen overlay for grid components, improving fullscreen UX and styling.
- Added new CSS for fullscreen overlay, header, and body; retained legacy DxWindow styles for compatibility.
- Introduced SignalRSerializerDiagnosticLog flag to control binary serializer diagnostics at runtime.
- Enabled diagnostics in DevAdminSignalRHub, FruitBankSignalRClient, and Program.cs based on the new flag.
- Updated OrderClientTests to use GetStockTakings(false).
- Added StockTakingSerializerTests for binary serialization/deserialization validation and debugging.
2025-12-20 08:40:03 +01:00
Loretta fbe09be307 Refactor grid editing, info panel, and toolbar system
- Introduce MgEditState enum and expose EditState on IMgGridBase
- Replace event-based syncing state with property-based state
- Redesign MgGridInfoPanel to support both view and edit modes with dynamic DevExpress editors and two-way binding
- Add visual distinction for edit/view modes in info panel
- Replace FruitBankToolbarTemplate with generic MgGridToolbarTemplate; toolbar adapts to grid edit/sync state
- Update all grid usages to use new toolbar
- Improve robustness, error handling, and maintainability throughout grid, info panel, and toolbar code
2025-12-17 06:21:21 +01:00
Loretta ba05b5f37e Add bunit & Newtonsoft.Json refs, add (commented) test stubs
Added bunit and Newtonsoft.Json package references to the test project for Blazor component and JSON testing support. Introduced two new test files, GridPartnerBaseTests.cs and GridPartnerRazorTests.cs, containing commented-out MSTest and bUnit test stubs for GridPartnerBase and GridPartner components. No active tests are enabled yet.
2025-12-13 12:31:46 +01:00
Loretta 056a69ecc8 Update local HTTPS, layout auth, deps, and add SignalR tests
- Switch FruitBankConstClient.BaseUrl to HTTPS for localhost.
- Pin DevExpress.Blazor to 25.1.3 in client project.
- Add Microsoft.Extensions.ObjectPool v9 to test project for SignalR.
- Reformat App.razor markup; comment out ResourcePreloader.
- Render @Body only if logged in or on login page in MainLayout.
- Redirect to /Login if not authenticated after auto-login.
- Add SandboxEndpointSimpleTests.cs for HTTP/SignalR endpoint tests against local sandbox.
2025-12-11 23:46:20 +01:00
Loretta 346d433196 Refactor, enhance, and improve test coverage
Refactored `OnDataSourceLoaded` to be asynchronous for better state handling. Downgraded `Newtonsoft.Json` to version `13.0.3` across multiple projects for compatibility. Enhanced `MeasuringItemPalletBase` with `SetParentPropToNull` and `SetForeignKey` methods. Refactored `OrderItemPallet`, `ShippingItemPallet`, and `StockTakingItemPallet` to simplify table attributes and improve parent-child relationship handling.

Added `IsReadyForClose` to `StockTaking` for better closure validation. Updated SignalR tag constants to reflect new functionality. Improved Razor components (`PalletItemComponent`, `StockTakingTemplate`, `MeasuringIn`, `MeasuringOut`) to streamline logic and maintain proper references.

Introduced `JsonExtensionTests` for comprehensive validation of JSON serialization/deserialization, including deep hierarchies, circular references, and hybrid references. Added `test_debug.ps1` for streamlined test debugging. Performed general code cleanup and improved test coverage.
2025-12-08 15:50:57 +01:00
Loretta e13e32dc57 .Net10, VS2026; StockTaking in progress... 2025-12-01 16:18:47 +01:00
Loretta 7e4d0a85e8 Upgrade to .net10 and Visual Studio 2026; StockTaking in progress... 2025-11-28 08:15:58 +01:00
Loretta e6306c5205 test fix 2025-11-12 19:11:49 +01:00
Loretta c1f8dcbf5d Improvements, fixes, etc... 2025-11-05 14:56:07 +01:00
Loretta f9cb10556a improvements, fixes 2025-11-01 00:42:54 +01:00
Loretta d53c44d2db SignalR improvements; etc... 2025-10-30 14:54:47 +01:00
Loretta 81edcfff07 Login hack fix; improvements 2025-10-24 08:11:50 +02:00
Loretta 88c0fbec54 refactoring, cleanup, etc... 2025-10-22 15:16:04 +02:00
Loretta f7bec766c7 tests improvements 2025-10-21 15:30:15 +02:00
Loretta 2d03a6d60b fixes, improvements, etc... 2025-10-20 22:42:13 +02:00
Loretta 35e71cb75c Add MeasurementOwnerId; RevisorId generic attributes to Order; improvements, fixes, etc.. 2025-10-20 16:46:40 +02:00
Loretta aa8f9e21d2 fix 2025-10-19 13:58:38 +02:00
Loretta ebd3acd060 fixes 2025-10-19 13:50:02 +02:00
Loretta 0938422103 nuget packages update; improvements, fixes 2025-10-18 18:46:00 +02:00
Loretta 94cc71513c improvements, fixes, etc... 2025-10-18 08:43:26 +02:00
Loretta f145dfcd70 improvements, fixes, etc... 2025-10-16 11:43:46 +02:00
Loretta 51aef27828 ... 2025-10-15 07:56:56 +02:00
Loretta 581c4ee0a5 ... 2025-10-13 18:03:15 +02:00
Loretta e1f28f7fe8 improvements, fixes, etc... 2025-10-13 14:18:08 +02:00
Loretta 294b1e0970 fixes 2025-10-12 18:07:48 +02:00
Loretta 9d6cc0abed improvements, fixes, etc... 2025-10-12 07:47:57 +02:00
Loretta 0f1ed24631 Implement Tare; Implement OrderItemPallet;, improvements, fixes, etc... 2025-10-10 08:00:02 +02:00
Loretta a74b356e70 improvements, fixes, etc... 2025-10-09 07:29:33 +02:00
Loretta dc249b8ef4 imrpovements, fixes, etc... 2025-10-07 07:23:26 +02:00
Loretta 8845385477 improvements, fixes, etc... 2025-10-06 07:44:49 +02:00
Loretta 3ce49ab578 improvements, fixes, etc... 2025-10-04 07:17:14 +02:00
Loretta e918a77db3 improvements, fixes, etc... 2025-10-03 07:19:27 +02:00
Loretta 158713a869 rename: QuantityOnDocument, NetWeightOnDocument, GrossWeightOnDocument; improvements, fixes, etc... 2025-10-02 07:23:13 +02:00