Skip to content

Comments

global settings: remove trailing slash from global address#2352

Merged
ArturoManzoli merged 1 commit intobluerobotics:masterfrom
ArturoManzoli:2201-global-address-remove-trailing-slash
Feb 2, 2026
Merged

global settings: remove trailing slash from global address#2352
ArturoManzoli merged 1 commit intobluerobotics:masterfrom
ArturoManzoli:2201-global-address-remove-trailing-slash

Conversation

@ArturoManzoli
Copy link
Contributor

@ArturoManzoli ArturoManzoli commented Jan 20, 2026

Close #2201

return 'Address should not include protocol (e.g.: "http://", "wss://").'
}

if (value.endsWith('/')) {
Copy link
Member

Choose a reason for hiding this comment

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

This is being added inside a check function (isValidHostAddress), that returns a boolean.

@ArturoManzoli ArturoManzoli force-pushed the 2201-global-address-remove-trailing-slash branch from 0dfc2f8 to eaca57c Compare January 20, 2026 14:41
@ArturoManzoli ArturoManzoli force-pushed the 2201-global-address-remove-trailing-slash branch from eaca57c to 1cf8691 Compare January 20, 2026 14:45
@rafaellehmkuhl
Copy link
Member

Discussed externally to move the check and fix to the mainVehicle.ts, so even when someone altered that through the local-storage/settings, the value is fixed.

@ArturoManzoli ArturoManzoli force-pushed the 2201-global-address-remove-trailing-slash branch from 1cf8691 to 4220a37 Compare January 22, 2026 16:13
Comment on lines 225 to 228
if (newAddress.endsWith('/')) {
newAddress = newAddress.slice(0, -1)
}

Copy link
Member

Choose a reason for hiding this comment

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

The place here is correct, but I don't believe it will work as you're only replacing the value of newAddress, which is a local variable, not the actual Ref. You probably want the following:

if (newAddress.endsWith('/')) {
  globalAddress.value = newAddress.slice(0, -1)
}

@rafaellehmkuhl
Copy link
Member

@ArturoManzoli I intend to release a beta4 tomorrow. Let me know if you want to try getting this one on it.

@ArturoManzoli ArturoManzoli force-pushed the 2201-global-address-remove-trailing-slash branch 3 times, most recently from cb16ec8 to 2255ee1 Compare January 28, 2026 14:49
if (cleanedAddress.endsWith('/')) {
cleanedAddress = cleanedAddress.slice(0, -1)
globalAddress.value = cleanedAddress
return
Copy link
Member

Choose a reason for hiding this comment

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

I believe this early return should be removed, otherwise the setDataLakeVariableData method in the bottom will never be caught.

@ArturoManzoli ArturoManzoli force-pushed the 2201-global-address-remove-trailing-slash branch from 2255ee1 to ece3913 Compare January 29, 2026 14:22
@ArturoManzoli ArturoManzoli merged commit d9f78ae into bluerobotics:master Feb 2, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A slash in the end of the global address breakes the video connection

2 participants