Open t1m0thyj opened 1 week ago
Thank you for creating a bug report. We will investigate the bug and evaluate its impact on the product. If you haven't already, please ensure you have provided steps to reproduce the bug and as much context as possible.
In vNext the
getSessionNode
method is implemented inconsistently across the 3 tree node classes.In v2 this was replaced with a common implementation: https://github.com/zowe/zowe-explorer-vscode/blob/f56fa8d765b08fa0901523390b5c10267fba7782/packages/zowe-explorer/src/uss/ZoweUSSNode.ts#L123-L126
This works most of the time but could have undesired behavior when the
session
property is defined outside of profile nodes.Discussed with @traeok and the following may be a better implementation:
return SharedContext.isSession(this) ? this : (this.getParent()?.getSessionNode() as IZoweUSSTreeNode);
This would ensure that the
session
property is defined on a node whose context value matches a profile node.However this change would break lots of unit tests (~200) which expect the
session
property to be defined on orphan nodes.