Skip to content

bug: component browser: Set as Default Version and Always Use Latest fail with a configuration error #312

Open

Description

@X-Guardian

Bug summary

Right-clicking a component's version dropdown in the Component Browser offers Set as Default Version and Always Use Latest. Both fail immediately with an error notification, and neither preference is saved.

The completion provider reads the same two preferences when choosing which version to offer for a component, so that behaviour is unreachable as well: nothing can ever write them.

Steps to reproduce

  1. Configure a component source under gitlabComponentHelper.componentSources and let discovery populate the cache.
  2. Run GitLab CI: Browse Components.
  3. Expand a source and a project, and click Load Versions on a component that has more than one version.
  4. Right-click the version dropdown that appears.
  5. Click Set as Default Version. Repeat from step 4 with Always Use Latest.

Expected behavior

The chosen preference is saved, and completion offers that version for the component thereafter — the pinned version for Set as Default Version, or the highest semantic version for Always Use Latest.

Actual behavior

An error notification appears and nothing is saved. Each action names the setting it tried to write:

Error setting default version: CodeExpectedError: Unable to write to User Settings because
gitlabComponentHelper.defaultVersions is not a registered configuration.
Error setting always use latest: CodeExpectedError: Unable to write to User Settings because
gitlabComponentHelper.alwaysUseLatest is not a registered configuration.

Component context (if applicable)

No response

Minimal .gitlab-ci.yml snippet

Not applicable — the failure is in the Component Browser, reached from the command palette. No particular file content is needed.

Extension logs

[ComponentBrowser] Error setting default version: CodeExpectedError: Unable to write to User Settings because gitlabComponentHelper.defaultVersions is not a registered configuration.
[ComponentBrowser] Error setting always use latest: CodeExpectedError: Unable to write to User Settings because gitlabComponentHelper.alwaysUseLatest is not a registered configuration.

Affected area

Component Browser

Extension version

0.17.15

VS Code version

1.139.0

Node.js version

24.x

Operating system

macOS

Pre-submit checks

  • I searched existing issues and did not find a duplicate.
  • I can reproduce this on the latest version from main/beta.
  • I included a minimal YAML snippet and relevant logs.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions