Problem Description
The current implementation of /editMode does not handle cases where port 3001 is already occupied. When attempting to open the editor, it should automatically switch to an alternative port (e.g., 3002) if 3001 is in use.
Expected Behavior
- If port 3001 is occupied, the editor should check for the next available port (3002, 3003, etc.) and open there.
- This will prevent conflicts when multiple instances are running.
Steps to Reproduce
- Start a service that occupies port 3001.
- Attempt to launch /editMode.
- Observe that it fails to open due to port conflict.