diff --git a/rust/connlib/tunnel/src/client.rs b/rust/connlib/tunnel/src/client.rs index 15446e012..a070e8c4b 100644 --- a/rust/connlib/tunnel/src/client.rs +++ b/rust/connlib/tunnel/src/client.rs @@ -1438,8 +1438,16 @@ impl ClientState { }; if let Some(resource) = self.resources_by_id.get(&new_resource.id()) { - if resource.has_different_address(&new_resource) { - self.remove_resource(resource.id()); + let resource_id = resource.id(); + let display_fields_changed = resource.display_fields_changed(&new_resource); + let address_changed = resource.has_different_address(&new_resource); + + if display_fields_changed { + self.emit_resources_changed(); + } + + if address_changed { + self.remove_resource(resource_id); } } diff --git a/rust/connlib/tunnel/src/client/resource.rs b/rust/connlib/tunnel/src/client/resource.rs index ccdf3a60e..140b50cad 100644 --- a/rust/connlib/tunnel/src/client/resource.rs +++ b/rust/connlib/tunnel/src/client/resource.rs @@ -150,6 +150,14 @@ impl Resource { } } + pub fn address_description(&self) -> Option<&str> { + match self { + Resource::Dns(r) => r.address_description.as_deref(), + Resource::Cidr(r) => r.address_description.as_deref(), + Resource::Internet(_) => None, + } + } + pub fn has_different_address(&self, other: &Resource) -> bool { match (self, other) { (Resource::Dns(dns_a), Resource::Dns(dns_b)) => dns_a.address != dns_b.address, @@ -159,6 +167,12 @@ impl Resource { } } + pub fn display_fields_changed(&self, other: &Resource) -> bool { + self.name() != other.name() + || self.address_description() != other.address_description() + || self.sites() != other.sites() + } + pub fn addresses(&self) -> Vec { match self { Resource::Dns(_) => vec![], diff --git a/website/src/components/Changelog/Android.tsx b/website/src/components/Changelog/Android.tsx index 1ae5b1391..48129a4ce 100644 --- a/website/src/components/Changelog/Android.tsx +++ b/website/src/components/Changelog/Android.tsx @@ -19,7 +19,12 @@ export default function Android() { return ( {/* When you cut a release, remove any solved issues from the "known issues" lists over in `client-apps`. This must not be done when the issue's PR merges. */} - + + + Fixes a bug that prevented certain Resource fields from being updated + when they were updated in the admin portal. + + Fixes an upload speed performance regression. diff --git a/website/src/components/Changelog/Apple.tsx b/website/src/components/Changelog/Apple.tsx index 494fd5b1f..4453313fd 100644 --- a/website/src/components/Changelog/Apple.tsx +++ b/website/src/components/Changelog/Apple.tsx @@ -19,7 +19,12 @@ export default function Apple() { return ( {/* When you cut a release, remove any solved issues from the "known issues" lists over in `client-apps`. This must not be done when the issue's PR merges. */} - + + + Fixes a bug that prevented certain Resource fields from being updated + when they were updated in the admin portal. + + Fixes an issue where the update checker would not properly notify the diff --git a/website/src/components/Changelog/GUI.tsx b/website/src/components/Changelog/GUI.tsx index 959c8707c..f1da6183a 100644 --- a/website/src/components/Changelog/GUI.tsx +++ b/website/src/components/Changelog/GUI.tsx @@ -8,7 +8,12 @@ export default function GUI({ os }: { os: OS }) { return ( {/* When you cut a release, remove any solved issues from the "known issues" lists over in `client-apps`. This must not be done when the issue's PR merges. */} - + + + Fixes a bug that prevented certain Resource fields from being updated + when they were updated in the admin portal. + + {os === OS.Linux && (