This release significantly advances the modularization and robustness of the application's diagramming and tenancy management features. It introduces a comprehensive suite of integration and unit tests for core hooks, ensuring predictable behavior and data consistency across complex user interactions. The refactoring efforts centralize state management and mutation logic, reducing technical debt and paving the way for future enhancements.
Highlights
-
Diagram Hooks Integration Tests: Added comprehensive integration tests for
useDiagramMutationscovering determinism in entity/relationship deletion and hiding, as well as lifecycle, layout persistence, and selection workflows. This ensures robust interaction between core diagram hooks. -
Modular Inspector Forms: Refactored the
CustomInspectorinto dedicated, reusable form components for Asset, Company, Individual, Partnership, SMSF, and Trust entities. This improves modularity and maintainability of the inspector panel. -
Centralized Tenancy Actions: Introduced a new
useTenancyActionshook to centralize logic for switching and deleting tenancies. This hook is now used across login, organization creation, selection, and deletion dialogs, ensuring consistent behavior and error handling. -
Diagram Context and Connected Components: Implemented a
DiagramContextBridgeand selector hooks to enable child components likeCustomInspectorConnected,CustomStencilConnected,DiagramToolbarConnected, and various dialogs to consume diagram state and actions without prop drilling. -
Enhanced Account and Organization Deletion: The account deletion dialog now intelligently handles scenarios where a user is the last admin of an organization, guiding them to resolve this before proceeding. Organization deletion now uses a database transaction for improved data consistency.
-
Refined Diagram Data Loading and Filtering: Updated
getDiagramViewDatato include 'director' as an ownership relationship type and improved entity fetching for family trees. ThefilterIndividualsWithOwnershipRelationshipsutility now considers relationship display modes. -
Improved Layout Persistence and View Settings: The
DiagramLayoutRepositorynow supports clearing view settings and includes more precise optimistic locking forupdated_attimestamps. TheOwnershipDiagramServicebetter handles null label positions. -
Determinism and State Management Utilities: Added a
useRefBackedStatehook to ensure synchronous updates to imperative read models, crucial for same-tick diagram rebuilds. This addresses potential race conditions in complex mutation workflows. -
Updated Documentation and Workflows: New workflow documentation for custom regression and family tree tests has been added. The Epic 47 refactoring overview, determinism playbook, and
useDiagramServicesintegration plan have been significantly updated.