Design-Mode Locking (Check-out/Check-in) to Prevent Silent Regressions
The Problem: The "Last-Save-Wins" Conflict
Currently, Zenphi uses an optimistic concurrency model in the Flow Designer. While this allows for flexibility, it creates a significant risk of Silent Regressions when multiple team members have the same flow open.
The Scenario:
Version 11 is the current state.
User A and User B both open the designer at the same time.
User A saves a change (creating Version 12).
User B (still working on the original Version 11 state) saves their change. This creates Version 13.
The Result: Version 13 is based on Version 11. All of User A's work in Version 12 has been "silently" overwritten because the system does not merge logic.
In an enterprise environment, this leads to lost productivity, frustrated developers, and—most dangerously—unintended logic changes in mission-critical automations.
The Proposed Solution: Pessimistic Design Locking
To position Zenphi as a truly enterprise-ready tool, I suggest a Soft Check-out/Check-in mechanism. When a user opens a flow in edit mode, the system should "lock" the write/save-access for that flow.
Key Features of the Lock:
Exclusive Edit Rights: The first person to open the flow gets the "Write Token."
Visual Presence Banner: Any subsequent users opening the flow see a notification: "User [Name] is currently editing this flow. You are in Read-Only mode."
Read-Only Observer Mode: Secondary users can still view the logic and configuration but cannot save changes or move actions.
Session Heartbeat & Auto-Release: To prevent "Ghost Locks" (e.g., if a user closes their laptop without exiting), the lock should automatically release after 10 minutes of inactivity.
Admin Override: Workspace Admins should have the ability to manually break a lock if a flow needs urgent maintenance while the "owner" is unavailable.
Why This Matters for Enterprise Readiness
Governance & Compliance: Large organizations require a clear audit trail and protection against accidental data/logic loss.
Scalability: As teams grow from 1 builder to 2 or more (geographically dispersed) developers, manual coordination (Chat messages saying "don't open the flow") is not a realistic safeguard.
Stability: It ensures that the "Published" version of a flow is always a linear progression of intended changes, not a fragmented result of simultaneous edits.