zowe/zowe-explorer-vscode

Edge case with USS list of directories with items: undefined/null

Closed

#4,192 opened on Apr 21, 2026

 (1 comment) (0 reactions) (0 assignees)TypeScript (119 forks)auto 404
buggood first issuepriority-mediumseverity-medium

Repository metrics

Stars
 (189 stars)
PR merge metrics
 (PR metrics pending)

Description

Describe the bug

Review of another PR pointed out an edge case with USS list of directories with items: undefined/null and missing test coverage for edge case

  • Issue: The new USS directory-detection heuristic is better than main for child-only extender listings, but still requires at least one returned item to classify as directory.
  • a residual edge case for successful empty-directory responses (items: []) from extenders.
  • Why it matters: Empty folders from some extenders may still fail to be cached/recognized consistently.
  • The unresolved edge case can regress silently in future refactors.
  • Suggested fix: Add an explicit empty-list fallback path for directory context (or a follow-up stat/lookup check) so items: [] can still be treated correctly when appropriate. Add one unit test for successful empty-list directory response from an extender compatibility scenario.

To Reproduce

Expected behavior

Screenshots

Desktop (please complete the following information):

  • OS:
  • Zowe Explorer Version:
  • (Optional) Zowe CLI Version:
  • (Optional) Do you have secure credentials enabled?
  • (Optional) Are you using a custom credential manager?

Additional context

Contributor guide