Repository navigation
Conversation
"Clear URL" removes calm.hub.url, but HubStatusBar kept the old URL because setState only changes hubUrl when it gets a value. The tooltip said "Disconnected from <old URL> / Click to reconnect" while the click opened an empty URL box. Add HubStatusBar.clearHubUrl() and call it from disconnectFromHub() next to the line that clears the setting, so the status bar and the setting agree. A plain disconnect still keeps the URL (finos#3494). Closes finos#3523
|
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
"Clear URL" removes
calm.hub.url, butHubStatusBarkept the old URL becausesetStateonly changeshubUrlwhen it gets a value. The tooltip said "Disconnected from / Click to reconnect" while the click opened an empty URL box.HubStatusBar.clearHubUrl()forgets the URL and redraws the item.disconnectFromHub()calls it next to the line that clears the setting, so the status bar and the setting agree.This sits beside #3516. On
main,disconnectFromHub()clears the setting on every path, so the call is unconditional here. After #3516 merges, the call belongs inside itsif (options.clearUrl)block; the merge is a one-line move.Closes #3523
Type of Change
Affected Components
cli/)calm/)calm-ai/)calm-hub/)calm-hub-ui/)calm-lab/)calm-models/)calm-server/)calm-studio/)calm-widgets/)calm-guard/)docs/)shared/)calm-plugins/vscode/)Commit Message Format ✅
fix(vscode): forget the Hub URL in the status bar when it is clearedTesting
hub-status-bar.test.ts: a plain disconnect still offers to reconnect (VS Code plugin: Disconnect from CALM Hub also forgets the Hub URL #3494);clearHubUrl()makes the tooltip offer to connect; the URL does not come back on the next state change.extension.clear-url.test.ts: activates the extension with a saved URL, fails a connection without network access (secret storage throws), runscalm.disconnectFromHub, and checks that the setting update and the tooltip agree. Without the one-line call indisconnectFromHub()it fails with "Disconnected from https://calmhub.example.com / Click to reconnect".I have tested my changes locally
I have added/updated unit tests
All existing tests pass
Checklist