Commit Graph

240 Commits

Author SHA1 Message Date
Loretta 10f325cc26 Refactor SignalR binary protocol for extensibility
- Move SignalParams-aware deserialization logic from AcBinaryHubProtocol to new AyCodeBinaryHubProtocol, enabling project-specific customization.
- Make key deserialization and helper methods in AcBinaryHubProtocol protected and virtual for easier extension.
- Improve byte[] handling to distinguish between AcBinary-serialized and raw data.
- Remove diagnostic serialization verification from the base protocol.
- Update DI registration to use AyCodeBinaryHubProtocol with configurable options.
- Adjust client code to support object-based response data and raw byte handling.
- Comment out SignalResponseDataMessage diagnostic logger in Program.cs.
2026-04-09 08:12:50 +02:00
Loretta 26b40cf7a1 Refactor MessageReceived to use new SignalR param types
Updated the MessageReceived method signature to accept SignalParams and SignalData instead of SignalReceiveParams and byte[]. Adjusted internal usage to reflect these new types, improving consistency with updated SignalR client structures.
2026-04-06 22:45:26 +02:00
Loretta 27ac2d1843 Refactor SignalR message handling in FruitBankSignalRClient
Update MessageReceived to use SignalReceiveParams and construct
SignalResponseDataMessage with more context. Add AyCode.Core.Serializers
using directive for serializer type support.
2026-04-05 09:31:06 +02:00
Loretta 8f48838ded Clarify and enforce doc-first, no-redundant-read policy
Correct rule references for no re-reading of loaded `.md` files. Add explicit "STRICT NO-RE-READ POLICY" section defining context and re-read conditions. Expand context recovery rules with auto-detection triggers and specify directories for recovery. These changes make doc-first and anti-loop policies clearer and more robust, ensuring efficient and up-to-date documentation usage.
2026-04-04 20:50:51 +02:00
Loretta 322f38f1fa Strengthen doc-first, multi-repo protocol and clarify tools
Expanded copilot-instructions.md to enforce strict doc-first and cross-repo hard-gate rules, including per-question doc checks and a no re-read policy with explicit penalties. Broadened consent requirements for all file modifications. Updated context recovery paths. In CLAUDE.md, added sequential execution override and mapped Copilot tool names to Claude Code equivalents, ensuring protocol consistency across tools.
2026-04-04 09:27:49 +02:00
Loretta dbccbf487d Enforce strict AI agent protocol, doc sync, and glossary
- Added "AI AGENT CORE PROTOCOL" to all copilot-instructions.md files: mandates [LOADED_DOCS] prefix, hard-gates tool usage, enforces no-re-read of .md files, and requires user consent for doc/code changes.
- Updated CLAUDE.md to require reading copilot-instructions.md first.
- Added topic-based doc separation and folder navigation rules.
- Changed doc sync: agent now passively detects discrepancies and asks before updating docs.
- Every code-modifying response must end with a [DOCUMENTATION CHECK] section.
- Centralized measurement system and domain traps in new FruitBank.Common/docs/GLOSSARY.md; updated references in FruitBankHybridApp GLOSSARY.md.
- Clarified schema and doc locations in FruitBankHybridApp README.md.
- Added hybrid execution model section to AyCode.Core BINARY_FEATURES.md.
- Removed unnecessary BeginUpdate/EndUpdate calls in MgGridBase.cs for layout persistence.
- Removed full Toon schema from plugin SCHEMA.md to avoid duplication.
2026-04-02 09:02:55 +02:00
Loretta 3f49945bfb Update LLM instruction files for token efficiency and cross-repo navigation
- CLAUDE.md: reduced to single-line pointer to copilot-instructions.md (eliminates redundant auto-loaded content)
- copilot-instructions.md: added @repo name field, relative paths in own-dep-repos, SCHEMA.md first-use read, "do not re-read .md files" rule, and explicit permission to navigate external repos

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-31 16:15:04 +02:00
Loretta 5e4bb4c8e0 Clarify and update copilot instructions and domain docs
- Clarified location of nopCommerce library rules (Mango.Nop Libraries repo)
- Improved FruitBank domain description to specify server-side plugin context
- Refined redundancy guidance to check for similar methods in context
- Updated .md sync instructions: clarify when/how to update docs, code as source of truth, and reviewer guidance
- Simplified descriptions of code locations for core, UI, library, and plugin layers
- Minor formatting and wording improvements for clarity
2026-03-30 10:16:31 +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 e393718c20 Document FruitBankGridBase and update grid conventions
Expanded and clarified grid documentation:
- Grids/README.md now details FruitBankGridBase<TEntity> usage, default settings, and legacy MgGridBase.
- Main README.md and ARCHITECTURE.md reference Grids/README.md for grid details.
- Subfolder table in Grids/README.md includes descriptive notes.
- CONVENTIONS.md: removed outdated layout key section, streamlined code reuse guidance.
- GLOSSARY.md links to canonical MgGrid docs and new grid base docs.
- copilot-instructions.md: clarified .md sync rules and documentation layering.
These changes ensure clear, layered, and non-redundant grid documentation.
2026-03-29 18:30:33 +02:00
Loretta 8c90a6ba51 Document SignalR architecture, grid, and ext deps
Added comprehensive docs for SignalR tag-based dispatch (docs/SIGNALR_ARCHITECTURE.md), including message flow, tag system, dynamic method registry, and tech debt (JSON-in-Binary). Updated all related READMEs, glossaries, and conventions to reference this architecture and clarify grid infrastructure (MgGridBase, FruitBankGridBase) and external dependency locations (AyCode.Core, AyCode.Blazor, Mango.Nop Libraries, FruitBank Plugin). Synchronized solution items and copilot-instructions. Improves discoverability, enforces conventions, and clarifies tech debt for all developers.
2026-03-29 10:43:07 +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 d1c254d5d1 Merge branch 'main' into FruitBank_v0.0.8.0 2026-03-28 16:23:29 +01:00
Loretta aab628b329 Refactor MgGridDataColumn URL templating & update csproj refs
Refactored MgGridDataColumn to efficiently parse and cache URL templates and property accessors, improving cell rendering performance. Replaced Regex.Replace with a compiled, cached approach using [GeneratedRegex]. Updated all project files to use $(Configuration) in DLL HintPaths for correct build output. Added Microsoft.AspNetCore.App framework reference and removed unused references. No breaking API changes.
2026-03-24 18:38:44 +01:00
Loretta fcd7866d09 Refactor measuring UI, centralize status logic
- Reworked MeasuringIn to use tabbed interface with card view and improved form layout
- Unified status badge/text/color logic via new MeasurementService helpers
- Updated MeasuringOut to use centralized status display and improved order note handling
- Added shipping date column to GridShippingDocument
- Improved link styling in MgGridDataColumn
- Removed redundant code and applied minor UI/layout tweaks for consistency and maintainability
2026-03-23 17:43:06 +01:00
Loretta e22b6f304e Add scroll-to-item support to MgCardView component
- Introduced `Height`, `ScrollToItem`, and `ItemKeySelector` parameters to MgCardView for scroll targeting and internal scroll area.
- Cards now have stable DOM ids for precise JS-based scrolling.
- Added mgCardView.js with smooth scroll logic; included script in app.
- Updated CSS for scrollable card area.
- Updated MeasuringOut.razor to use new scroll features and fixed time format.
2026-03-23 05:32:15 +01:00
Loretta 84f4990ff4 Add MgCardView component & refactor MeasuringOut to tabs
Introduced a reusable, responsive MgCardView<TItem> component for displaying data as cards with optional filtering and paging. Refactored the MeasuringOut page to use a tabbed interface: daily tasks are now shown as filterable cards, and measuring details are separated into a dedicated tab. Improved UI clarity, code organization, and maintainability.
2026-03-22 20:01:49 +01:00
Loretta ff1a5b63c1 Allow info panel collapse, improve grids, update SignalR
- Enable collapsing of info panel in MgGridWithInfoPanel for better UX
- Refactor GridStockTakingItem columns to use nameof(), clarify bindings, and improve maintainability
- Enhance MeasuringOut order selector with advanced search and clear button
- Update SignalR.Core reference to 9.0.14 in project file
- Minor cleanup of commented group display logic in grid
2026-03-22 16:04:17 +01:00
Loretta 5bd5e14953 Enable source-generated binary serialization & AOT
Added AcBinarySerializable and ToonDescription to DTOs/entities for source-generated serialization. Enabled AOT compilation for Blazor/WebAssembly projects. Integrated AyCode.Core.Serializers.SourceGenerator as analyzer. Updated solution and project files, improved entity metadata, and adjusted imports. Commented out InitializeComponent in WinUI App for startup handling.
2026-03-07 14:05:39 +01:00
Loretta 1b68599acc Enhance file, shipping, stock, and Android deployment
- Added new file metadata fields and improved shipping entities
- Refined weight validation logic in OrderItemDto
- Extended SignalR for stock taking refresh/close operations
- Improved SignalR error handling and UI feedback
- Enhanced grid UI: links, audit info, date formatting, loading panels
- Disabled AOT for WebAssembly/Android; updated Android signing config
- Updated app versioning and SQL schema comparison
- NavMenu: "Leltározás" now admin-only
2026-03-06 14:57:01 +01:00
Loretta a73b72f831 Refactor SignalR, pallet editing, and error handling
- Refactored SignalRMessageToClientWithText<T> to use explicit constructors and properties.
- Added Shipping.Comment column to GridShippingDocument.razor.
- Updated PalletItemComponent: renamed audit callback, added pre-save/audit callback, improved UI refresh logic.
- MeasuringOut now uses new callbacks and _enablePalletItems flag to control editability during save/audit.
- Wrapped SignalR message handling and logout logic in try/catch for better error logging.
- MainLayout and MeasuringOut now implement IDisposable to unsubscribe SignalR events.
- UI editability and state updates improved for thread safety and responsiveness.
2026-03-06 14:27:22 +01:00
Loretta f5915f7f72 Add RefreshStockTakingItem support and UI error handling
Updated SignalR interface and tags to support refreshing
individual StockTakingItems. Improved StockTakingTemplate.razor
to show error messages and allow item refresh when invalid.
Removed unused method and updated project reference to
SignalR.Core 9.0.13.
2026-03-04 15:22:51 +01:00
Adam 288b81f8f5 shipping updates 2026-03-02 12:14:20 +01:00
Loretta 73ee9fade1 Enhance grids: add links, format dates, show modifiers
- Made ID columns clickable links to related edit pages
- Added ModifierId and Modified columns to item/pallet grids
- Applied consistent date formatting ("yyyy.MM.dd hh:mm")
- Updated usings for required namespaces
- Cleaned up lazy loading code and added null checks for safety
2026-02-23 18:04:43 +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
Adam a7387f88cf baseurl 2026-02-11 01:19:08 +01:00
Loretta 5604f1e338 Improve toolbar controls and async UX in stock taking
- Added EnableNew and EnableEdit parameters to MgGridToolbarTemplate for finer control of toolbar button states.
- Disabled "New", "Edit", and "Delete" actions in history and item grids by passing explicit parameters.
- Introduced DxLoadingPanel in StockTakingTemplate for better async feedback.
- Disabled "New" and "Close" buttons during async operations to prevent duplicates.
- Enhanced combo boxes with search/filter and usability features.
- Updated new/close stock taking logic to show loading, handle errors, and prevent duplicate actions.
- Set focus to item combo box after saving a StockTakingItemPallet.
- Removed global loading panel from StockTaking.razor; loading is now handled locally.
- Performed minor code cleanups and removed obsolete code.
2026-02-07 08:55:00 +01:00
Loretta 0343f7b677 Update schema compare: add tmp tables, set MARS to False
Updated connection strings to explicitly set Multiple Active Result Sets (MARS) to False for both DEV and PROD databases. Added dbo.tmp_guestsAddressesToDelete and dbo.tmp_guestsToDelete tables to the schema comparison selection.
2026-02-06 22:27:04 +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 328f906a30 Add FileSubPath to Files; improve PDF rendering logic
Added FileSubPath property to Files entity and IFiles interface for sub-path storage. Updated IFiles to include FileHash and IsCompressed. Refactored GridShippingDocumentInfoPanel.razor to select and render PDFs only when associated files exist, with improved type checks and null handling. Performed minor code cleanup.
2026-01-24 10:19:36 +01:00
Loretta d918ffaae4 Merge branch 'main' of https://git.aycode.com/Adam/FruitBankHybridApp 2026-01-20 14:50:17 +01:00
Loretta f369491a1d temp 2026-01-20 09:54:28 +01:00
Adam 677a33c706 File hash, isCompressed, set current date as default 2026-01-16 13:54:49 +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 3700bfdb29 Add business-logic metadata to DTO serialization
Introduce "business-logic" field in AcToonSerializer type metadata output, sourced from ToonDescription attributes on DTO properties. Annotate relevant OrderDto and OrderItemDto properties with business rules and constraints. Expand allowed Bash commands in settings.local.json. Add test script to verify business-logic metadata presence. Temporarily disable HasToonIgnoreAttribute logic in JsonUtilities.
2026-01-14 22:16:49 +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 650a6f3773 Update PalletItemComponent to use 'Editable' parameter
Replaced 'IsEditable' with 'Editable' in PalletItemComponent usage within StockTakingTemplate.razor and MeasuringOut.razor to align with updated component API. Editability logic remains unchanged.
2026-01-12 07:20:50 +01:00
Loretta 0368f0809a Add stock taking close functionality and UI improvements
- Added CloseStockTaking method to IStockSignalREndpointCommon and implemented it in FruitBankSignalRClient.
- Renamed IsEditable to Editable in PalletItemComponent.razor and updated all usages.
- Updated StockTakingTemplate.razor: "Módosít" button is now always disabled, "Lezárás" button is enabled only when appropriate, and form layouts are disabled when stock taking is closed.
- Improved async UI updates by using InvokeAsync(StateHasChanged).
- Enhanced order note display and added warning state for invalid average weight in MeasuringOut.razor.
2026-01-09 11:10:15 +01:00
Loretta bba26c42da Merge branch 'main' of https://git.aycode.com/Adam/FruitBankHybridApp 2026-01-06 15:13:47 +01:00
Loretta eaa104659d Set default ShippingDate, refactor data reload logic
Set default ShippingDate to DateTime.Now in Shipping and ShippingDocument entities. Refactored data reload logic in GridDetailOrderDto.razor to use semaphore only for master grid and moved grid reload accordingly. Updated GridProductDtoTemplate.razor to load order data on tab change instead of detail row expansion.
2026-01-06 10:41:27 +01:00
Loretta 38f268ec1d Refactor SignalR hub registration and background tasks
- Use Forget() extension for fire-and-forget tasks in MgGridSignalRDataSource
- Remove legacy commented DevAdminSignalRHub code
- Switch to DynamicMethodRegistry for hub method registration, improving startup performance by deferring reflection
- Add clarifying comment for remaining legacy message handling code
2026-01-06 08:55:38 +01:00
Adam b45830eda3 dev url 2026-01-05 21:33:07 +01:00
Adam a2b22e8bf2 small fixes and android build changes 2026-01-05 09:13:37 +01:00