onlook icon indicating copy to clipboard operation
onlook copied to clipboard

feat: Improve port conflict handling

Open Nithishvb opened this issue 9 months ago • 1 comments

Description

Closes: #1365

This PR introduces a warning modal that appears when the application detects that port 3000 is already in use.

Related Issues

Type of Change

  • [ ] Bug fix
  • [ ] New feature
  • [ ] Documentation update
  • [ ] Release
  • [ ] Other (please describe):

Testing

Screenshots (if applicable)

Additional Notes

Nithishvb avatar Feb 16 '25 17:02 Nithishvb

@Kitenite –

  • Added styling to the modal
  • Added a refresh button for people to check to see if the port is occupied still
  • Added styling / functionality for the run button to change to "Port is in Use". The user also has to click that modal.

One thing is the CTA of the open modal is to "change port" but I almost feel like we shouldn't do that because we don't automatically redirect the window to the new "changed" port. I'd prefer if we were the ones to own that port, but I'll leave it up to your recommendation on what we want to do with that.

Ideally, we force people to stick with localhost:3000 but we'll need to handle if they change the port via the current CTA in the modal. If they do that, then we need to add functioanlity in that updates both the window and the project port number.

drfarrell avatar Feb 16 '25 23:02 drfarrell