diff --git a/app/src/main/java/io/xpipe/app/ext/HostAddressChoice.java b/app/src/main/java/io/xpipe/app/ext/HostAddressChoice.java index b76868db0..6be3fa99d 100644 --- a/app/src/main/java/io/xpipe/app/ext/HostAddressChoice.java +++ b/app/src/main/java/io/xpipe/app/ext/HostAddressChoice.java @@ -25,9 +25,6 @@ public class HostAddressChoice { var existing = value.getValue(); var val = new SimpleObjectProperty<>(existing != null ? existing.get() : null); var list = FXCollections.observableArrayList(existing != null ? existing.getAvailable() : new ArrayList<>()); - if (existing != null) { - list.remove(existing.get()); - } // For updating the options builder binding on list change, it doesn't support observable lists var listHashProp = new SimpleIntegerProperty(0); list.addListener((ListChangeListener) c -> { diff --git a/app/src/main/java/io/xpipe/app/ext/HostAddressChoiceComp.java b/app/src/main/java/io/xpipe/app/ext/HostAddressChoiceComp.java index 569322e40..32ebfef22 100644 --- a/app/src/main/java/io/xpipe/app/ext/HostAddressChoiceComp.java +++ b/app/src/main/java/io/xpipe/app/ext/HostAddressChoiceComp.java @@ -89,8 +89,6 @@ public class HostAddressChoiceComp extends Comp> { if (newValue != null) { if (!allAddresses.contains(newValue)) { allAddresses.set(index, newValue); - } else { - allAddresses.remove(index); } } else { allAddresses.remove(index); @@ -139,9 +137,16 @@ public class HostAddressChoiceComp extends Comp> { var skin = new ComboBoxListViewSkin<>(struc.get()); struc.get().setSkin(skin); skin.setHideOnClick(false); - struc.get().setVisibleRowCount(10); + + // The focus seems to break on selection from the popup + struc.get().selectionModelProperty().get().selectedIndexProperty().addListener((observable, oldValue, newValue) -> { + Platform.runLater(() -> { + struc.get().getParent().requestFocus(); + }); + }); allAddresses.addListener((ListChangeListener) change -> { + struc.get().setVisibleRowCount(10); if (!change.next()) { return; } diff --git a/app/src/main/java/io/xpipe/app/ext/NetworkTunnelStore.java b/app/src/main/java/io/xpipe/app/ext/NetworkTunnelStore.java index 8ba0b0eb8..a652c425b 100644 --- a/app/src/main/java/io/xpipe/app/ext/NetworkTunnelStore.java +++ b/app/src/main/java/io/xpipe/app/ext/NetworkTunnelStore.java @@ -1,14 +1,13 @@ package io.xpipe.app.ext; import io.xpipe.app.core.AppI18n; -import io.xpipe.app.storage.DataStorage; import io.xpipe.app.storage.DataStoreEntryRef; import java.util.Optional; public interface NetworkTunnelStore extends DataStore, SelfReferentialStore { - static void checkTunneable(DataStoreEntryRef ref) throws ValidationException { + static void checkTunnelable(DataStoreEntryRef ref) throws ValidationException { if (!(ref.getStore() instanceof NetworkTunnelStore t)) { throw new ValidationException(AppI18n.get("parentHostDoesNotSupportTunneling", ref.get().getName())); } diff --git a/app/src/main/java/io/xpipe/app/process/SudoCache.java b/app/src/main/java/io/xpipe/app/process/SudoCache.java index 56d1ef796..6647c6901 100644 --- a/app/src/main/java/io/xpipe/app/process/SudoCache.java +++ b/app/src/main/java/io/xpipe/app/process/SudoCache.java @@ -2,11 +2,13 @@ package io.xpipe.app.process; import io.xpipe.core.FilePath; +import java.util.Optional; + public interface SudoCache { void setRequiresPassword(); boolean requiresPassword() throws Exception; - FilePath getSudoExecutable() throws Exception; + Optional getSudoExecutable() throws Exception; } diff --git a/dist/changelog/18.7_incremental.md b/dist/changelog/18.7_incremental.md index 95019fae1..0ed368173 100644 --- a/dist/changelog/18.7_incremental.md +++ b/dist/changelog/18.7_incremental.md @@ -1,6 +1,6 @@ - Fix sudo elevation requiring a different approach on the newly released Ubuntu 25.10 due to sudo being replaced by a rust sudo variant -- Fix hostname text field sometimes entering invalid state and not applying hostname changes +- Fix host address text field sometimes entering invalid state and not applying hostname changes +- Fix exception when changing synced key scope to per-user - Fix macOS Tahoe display name containing version twice - Fix inaccurate error message when a parent of a service did not support tunneling -- Fix exception when changing synced key scope to per-user - Add setting to customize markdown notes template for connections diff --git a/ext/base/src/main/java/io/xpipe/ext/base/identity/ssh/SshIdentityStateManager.java b/ext/base/src/main/java/io/xpipe/ext/base/identity/ssh/SshIdentityStateManager.java index 2b9e79906..2f606028a 100644 --- a/ext/base/src/main/java/io/xpipe/ext/base/identity/ssh/SshIdentityStateManager.java +++ b/ext/base/src/main/java/io/xpipe/ext/base/identity/ssh/SshIdentityStateManager.java @@ -20,7 +20,7 @@ public class SshIdentityStateManager { private static RunningAgent runningAgent; - public static boolean checkNamedPipeExists(Path path) { + private static boolean checkNamedPipeExists(Path path) { Memory p = new Memory(WinBase.WIN32_FIND_DATA.sizeOf()); // This will not break the named pipe compared to using a normal exists check var r = Kernel32.INSTANCE.FindFirstFile(path.toString(), p); diff --git a/ext/base/src/main/java/io/xpipe/ext/base/service/AbstractServiceStore.java b/ext/base/src/main/java/io/xpipe/ext/base/service/AbstractServiceStore.java index 4324ebd44..84ffa621a 100644 --- a/ext/base/src/main/java/io/xpipe/ext/base/service/AbstractServiceStore.java +++ b/ext/base/src/main/java/io/xpipe/ext/base/service/AbstractServiceStore.java @@ -34,7 +34,7 @@ public abstract class AbstractServiceStore implements SingletonSessionStore