Skip to content

Conversation

@Tom-ne
Copy link

@Tom-ne Tom-ne commented Oct 31, 2025

Description

Added code that runs when the user hits enter in the static IP field after entering a valid IP address ,the user will be redirected to the new IP.

Closes #903

Meta

Merge checklist:

  • Pull Request title is short, imperative summary of proposed changes
  • The description documents the what and why
  • If this PR changes behavior or adds a feature, user documentation is updated
  • If this PR touches photon-serde, all messages have been regenerated and hashes have not changed unexpectedly
  • If this PR touches configuration, this is backwards compatible with settings back to v2025.3.2
  • If this PR touches pipeline settings or anything related to data exchange, the frontend typing is updated
  • If this PR addresses a bug, a regression test for it is added

@Tom-ne Tom-ne requested a review from a team as a code owner October 31, 2025 19:38
@github-actions github-actions bot added the frontend Having to do with PhotonClient and its related items label Oct 31, 2025
@samfreund
Copy link
Member

Lint please.

Also note, PRs from main is an anti-pattern

@samfreund

This comment was marked as off-topic.

Copy link
Member

@samfreund samfreund left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The behavior for opening a new IP should be triggered by clicking the save button, not by pressing enter. Users don't press enter anywhere else -- it's always via clicking a button -- so they won't expect it here.

// Keep current hash route (e.g., #/settings)
const hash = window.location.hash || "";
const url = `http://${newIp}:5800/${hash}`;
setTimeout(() => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would it be better here to find out when the backend is actually ready for the redirect, instead of picking an arbitrary delay and hoping it's both enough and not excessively long? maybe we can trigger the redirect on a response from the backend?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It depends on how the backend handles a new static IP. If it delete the old one, all you'll see is the HTTP connection drop, but if it doesn't, you might be able to wait for the HTTP response?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might just be better to launch a fetch request and wait for a response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend Having to do with PhotonClient and its related items

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Open new IP in new tab when changing in UI

5 participants