fix: fix a missing feature state icon issue
Description
This MR fixes a bug that we see on every extension startup [VS Code] Bug: 'authentication-required' state ... (#1900 - closed)
Related Issues
Fixes #1900 (closed)
How has this been tested?
Start the extension from main branch
See the TypeError: Cannot read properties of undefined (reading 'iconName') error in the Extension Host output panel
Full error and screenshot
2025-04-09 13:41:33.243 [error] TypeError: Cannot read properties of undefined (reading 'iconName')
at CodeSuggestionsStatusBarItem.updateCodeSuggestionsItem (/Users/tomas/workspace/gl/gitlab-vscode-extension/src/common/code_suggestions/code_suggestions_status_bar_item.ts:69:62)
at Th.value (/Users/tomas/workspace/gl/gitlab-vscode-extension/src/common/code_suggestions/code_suggestions_status_bar_item.ts:91:12)
at D.B (file:///Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:27:2375)
at D.C (file:///Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:27:2445)
at D.fire (file:///Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:27:2662)
at Object.fire (/Users/tomas/workspace/gl/gitlab-vscode-extension/src/common/utils/diff_emitter.ts:26:17)
at CodeSuggestionsStateManager.#fireChange (/Users/tomas/workspace/gl/gitlab-vscode-extension/src/common/code_suggestions/code_suggestions_state_manager.ts:190:37)
at Th.value (/Users/tomas/workspace/gl/gitlab-vscode-extension/src/common/code_suggestions/code_suggestions_state_manager.ts:147:63)
at D.B (file:///Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:27:2375)
at D.fire (file:///Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:27:2593)
at Th.value (/Users/tomas/workspace/gl/gitlab-vscode-extension/src/common/code_suggestions/state_policy/language_server_policy.ts:59:30)
at D.B (file:///Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:27:2375)
at D.fire (file:///Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:27:2593)
at Object.fire (/Users/tomas/workspace/gl/gitlab-vscode-extension/src/common/utils/diff_emitter.ts:26:17)
at LanguageServerFeatureStateProvider.setStates (/Users/tomas/workspace/gl/gitlab-vscode-extension/src/common/language_server/language_server_feature_state_provider.ts:40:24)
at /Users/tomas/workspace/gl/gitlab-vscode-extension/src/common/language_server/language_client_wrapper.ts:127:48
at handleNotification (/Users/tomas/workspace/gl/gitlab-vscode-extension/node_modules/vscode-jsonrpc/lib/common/connection.js:633:29)
at handleMessage (/Users/tomas/workspace/gl/gitlab-vscode-extension/node_modules/vscode-jsonrpc/lib/common/connection.js:342:13)
at processMessageQueue (/Users/tomas/workspace/gl/gitlab-vscode-extension/node_modules/vscode-jsonrpc/lib/common/connection.js:362:17)
at Immediate._onImmediate (/Users/tomas/workspace/gl/gitlab-vscode-extension/node_modules/vscode-jsonrpc/lib/common/connection.js:334:13)
at processImmediate (node:internal/timers:483:21)
at process.callbackTrampoline (node:internal/async_hooks:130:17)
Then checkout this MR's branch
Start the extension and see that the error is not logged.
Screenshots (if appropriate)
What CHANGELOG entry will this MR create?
-
fix:Bug fix fixes - a user-facing issue in production - included in changelog -
feature:New feature - a user-facing change which adds functionality - included in changelog -
BREAKING CHANGE:(fix or feature that would cause existing functionality to change) - should bump major version, mentioned in the changelog -
None - other non-user-facing changes
