This release delivers a substantial architectural overhaul and introduces critical new features. The core JointJS ownership diagram component has been modularized into a suite of dedicated React hooks and a context provider, significantly improving code organization and testability. Concurrently, a robust optimistic locking mechanism has been integrated to safeguard diagram layout saves against concurrent modification conflicts. Additionally, new administrative capabilities enable manual overrides for tenancy subscription tiers, offering flexible "coupon" management. These changes are complemented by the complete removal of legacy Cytoscape diagramming components and extensive updates to project documentation.
Highlights
- Diagram Refactoring (Epic 47): The monolithic JointJS ownership diagram component (
JointOwnershipView.tsx) has begun a major refactoring effort, breaking it down into modular, testable React hooks (useLayoutManager,useDiagramServices,useDiagramState,useDiagramMutations,useDialogManager) and aDiagramContextprovider. This enhances maintainability, testability, and reduces complexity. - Optimistic Locking for Diagram Layouts: Implemented optimistic locking for diagram layout saves, allowing clients to send an
updatedAttimestamp to prevent overwriting newer versions during concurrent edits. This is supported by new API test changes and ensures data integrity. - Admin Subscription Overrides: New administrative API endpoints and database fields have been introduced to allow system administrators to manually override tenancy subscription tiers. This provides "coupon" functionality, where manual overrides take precedence over Stripe subscriptions and can be set with an expiry and reason.
- Cytoscape Removal: All remaining Cytoscape-related diagramming logic and tests have been removed from the codebase, signifying a complete transition to JointJS for all diagramming functionalities.
- Enhanced Diagram Layout Dirty State Tracking: New utilities (
computeIsLayoutDirty,detectStructuralDirty,extractCanvasEntityIds) have been added and integrated into theuseLayoutManagerhook to provide more robust and granular tracking of manual layout edits and structural changes, ensuring accurate "dirty" state detection.