Skip to content

fix(vscode): forget the Hub URL in the status bar when it is cleared - #3530

Open
deven1003 wants to merge 1 commit into
finos:mainfrom
deven1003:fix/3523-status-bar-forgets-cleared-url
Open

deven1003 wants to merge 1 commit into
finos:mainfrom
deven1003:fix/3523-status-bar-forgets-cleared-url

Conversation

@deven1003

Copy link
Copy Markdown

Description

"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 / 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 its if (options.clearUrl) block; the merge is a one-line move.

Closes #3523

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📚 Documentation update
  • 🎨 Code style/formatting changes
  • ♻️ Refactoring (no functional changes)
  • ⚡ Performance improvements
  • ✅ Test additions or updates
  • 🔧 Chore (maintenance, dependencies, CI, etc.)

Affected Components

  • CLI (cli/)
  • Schema (calm/)
  • CALM AI (calm-ai/)
  • CALM Hub (calm-hub/)
  • CALM Hub UI (calm-hub-ui/)
  • CALM Lab (calm-lab/)
  • CALM Models (calm-models/)
  • CALM Server (calm-server/)
  • CALM Studio (calm-studio/)
  • CALM Widgets (calm-widgets/)
  • CALMGuard (calm-guard/)
  • Documentation (docs/)
  • Shared (shared/)
  • VS Code Extension (calm-plugins/vscode/)
  • Dependencies
  • CI/CD

Commit Message Format ✅

fix(vscode): forget the Hub URL in the status bar when it is cleared

Testing

  • 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), runs calm.disconnectFromHub, and checks that the setting update and the tooltip agree. Without the one-line call in disconnectFromHub() 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

  • My commits follow the conventional commit format
  • I have updated documentation if necessary
  • I have added tests for my changes (if applicable)
  • My changes follow the project's coding standards

"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
@deven1003
deven1003 requested a review from a team as a code owner October 27, 2026 09:23
@linux-foundation-easycla

linux-foundation-easycla Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: deven1003 / name: deven (d9728bf)

This branch has not been deployed

No deployments
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.

VS Code plugin: after "Clear URL", the Hub status bar still says "Click to reconnect"

1 participant