Bug
Two IConfigurationValue property accesses introduced in bb18007 use the IInspectValue<T> object property instead of the scalar value property, causing incorrect scope detection.
1. themeConfiguration.ts - findAutoConfigurationTarget()
Line 380 checks settings.userRemote instead of settings.userRemoteValue:
public findAutoConfigurationTarget(key: string) {
const settings = this.configurationService.inspect(key);
if (!types.isUndefined(settings.workspaceFolderValue)) { // ✓ scalar
return ConfigurationTarget.WORKSPACE_FOLDER;
} else if (!types.isUndefined(settings.workspaceValue)) { // ✓ scalar
return ConfigurationTarget.WORKSPACE;
} else if (!types.isUndefined(settings.userRemote)) { // ✗ IInspectValue object
return ConfigurationTarget.USER_REMOTE;
}
return ConfigurationTarget.USER;
}
settings.userRemote is an IInspectValue<T> object ({value?, override?, overrides?}). It can be defined when only language-specific overrides exist in the remote config, even if no actual remote value is set. This causes theme settings to incorrectly target USER_REMOTE scope.
2. commandLineAutoApprover.ts - source target detection
Line 282 checks configInspectValue.workspaceFolder instead of configInspectValue.workspaceFolderValue:
const sourceTarget = (
checkTarget(configInspectValue.workspaceFolder) ? ConfigurationTarget.WORKSPACE_FOLDER
: checkTarget(configInspectValue.workspaceValue) ? ConfigurationTarget.WORKSPACE
: checkTarget(configInspectValue.userRemoteValue) ? ConfigurationTarget.USER_REMOTE
...
);
configInspectValue.workspaceFolder is an IInspectValue<T> whose keys are {value, override, overrides}. The checkTarget function looks for tool-pattern keys (e.g., "git*") via hasOwnProperty, which never matches on IInspectValue. This means workspace-folder-scoped auto-approve rules are never detected as such and fall through to a lower-priority scope.
Root Cause
Both are from the same commit (bb18007) and follow the same pattern: the IConfigurationValue<T> interface exposes both scalar values (e.g., userRemoteValue: T) and inspect objects (e.g., userRemote: IInspectValue<T>). The similar naming makes it easy to pick the wrong one.
Fix
settings.userRemote -> settings.userRemoteValue
configInspectValue.workspaceFolder -> configInspectValue.workspaceFolderValue
Bug
Two
IConfigurationValueproperty accesses introduced in bb18007 use theIInspectValue<T>object property instead of the scalar value property, causing incorrect scope detection.1.
themeConfiguration.ts-findAutoConfigurationTarget()Line 380 checks
settings.userRemoteinstead ofsettings.userRemoteValue:settings.userRemoteis anIInspectValue<T>object ({value?, override?, overrides?}). It can be defined when only language-specific overrides exist in the remote config, even if no actual remote value is set. This causes theme settings to incorrectly targetUSER_REMOTEscope.2.
commandLineAutoApprover.ts- source target detectionLine 282 checks
configInspectValue.workspaceFolderinstead ofconfigInspectValue.workspaceFolderValue:configInspectValue.workspaceFolderis anIInspectValue<T>whose keys are{value, override, overrides}. ThecheckTargetfunction looks for tool-pattern keys (e.g.,"git*") viahasOwnProperty, which never matches onIInspectValue. This means workspace-folder-scoped auto-approve rules are never detected as such and fall through to a lower-priority scope.Root Cause
Both are from the same commit (bb18007) and follow the same pattern: the
IConfigurationValue<T>interface exposes both scalar values (e.g.,userRemoteValue: T) and inspect objects (e.g.,userRemote: IInspectValue<T>). The similar naming makes it easy to pick the wrong one.Fix
settings.userRemote->settings.userRemoteValueconfigInspectValue.workspaceFolder->configInspectValue.workspaceFolderValue