Skip to content

Conversation

@JWaters02
Copy link
Member

@JWaters02 JWaters02 commented Sep 5, 2025

Proposed changes

Adds 5 new commands:

  1. Download member
  2. Download data set
  3. Download all members
  4. Download USS file
  5. Download USS directory

Didn't add command for download all data sets even though its in the API because of #2536 but happy to add it if something thinks it would be useful to have it in ZE...

2025-09-05.11-33-07.mp4
2025-10-22.19-43-53.mp4

Release Notes

Milestone: 3.4.0

Changelog:

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (non-breaking change which adds or improves functionality)
  • Breaking change (a change that would cause existing functionality to not work as expected)
  • Documentation (Markdown, README updates)
  • Other (please specify above in "Proposed changes" section)

Checklist

General

  • I have read the CONTRIBUTOR GUIDANCE wiki
  • All PR dependencies have been merged and published (if applicable)
  • A GIF or screenshot is included in the PR for visual changes
  • The pre-publish command has been executed:
    • v2 and below: yarn workspace vscode-extension-for-zowe vscode:prepublish
    • v3: pnpm --filter vscode-extension-for-zowe vscode:prepublish

Code coverage

  • There is coverage for the code that I have added
  • I have added new test cases and they are passing
  • I have manually tested the changes

Deployment

  • I have tested new functionality with the FTP extension and profile verifying no extender profile type breakages introduced
  • I have added developer documentation (if applicable)
  • Documentation should be added to Zowe Docs
    • If you're an outside contributor, please post in the #zowe-doc Slack channel to coordinate documentation.
    • Otherwise, please check with the rest of the squad about any needed documentation before merging.
  • These changes may need ported to the appropriate branches (list here):

Further comments

Please could someone (ideally someone on zowe cli team who worked on downloads api) have a look at the options I am passing into downloads and if I am missing any/getting some wrong etc. Also pretty sure I am handling encoding/tagging wrong in the USS code if someone could look at that. Thanks

Signed-off-by: JWaters02 <[email protected]>
Signed-off-by: JWaters02 <[email protected]>
Signed-off-by: JWaters02 <[email protected]>
Signed-off-by: JWaters02 <[email protected]>
Signed-off-by: JWaters02 <[email protected]>
@zowe-robot zowe-robot moved this from New Issues to Review/QA in Zowe Explorer for VS Code Sep 5, 2025
@JWaters02 JWaters02 linked an issue Sep 5, 2025 that may be closed by this pull request
@JWaters02 JWaters02 marked this pull request as draft September 5, 2025 10:49
@zowe-robot zowe-robot moved this from Review/QA to In Progress in Zowe Explorer for VS Code Sep 5, 2025
@JWaters02 JWaters02 marked this pull request as ready for review October 19, 2025 15:02
@zowe-robot zowe-robot moved this from In Progress to Review/QA in Zowe Explorer for VS Code Oct 19, 2025
@JWaters02
Copy link
Member Author

JWaters02 commented Oct 19, 2025

I want to get more review feedback now the majority of it is in - note that this PR is still waiting on zowe/zowe-cli#2620 and zowe/zowe-cli#2618 (and maybe zowe/zowe-cli#2619 too but lower priority and could go out without those fixes)

@JWaters02
Copy link
Member Author

JWaters02 commented Oct 20, 2025

Thoughts on placement of the options in their various locations? I've had it down here under the "modification" command group but I feel like it makes way more sense to have it underneath the upload options under the "create" command group - at least for uss bits. Data set bits the groups are more clear cut and thus does make sense in the modifcation group but then it would be inconsistent with uss placements so not sure.

image

@traeok
Copy link
Member

traeok commented Oct 20, 2025

Thoughts on placement of the options in their various locations? I've had it down here under the "modification" command group but I feel like it makes way more sense to have it underneath the upload options under the "create" command group - at least for uss bits. Data set bits the groups are more clear cut and thus does make sense in the modifcation group but then it would be inconsistent with uss placements so not sure.

Looking at this screenshot has made me realize that we have a lot of context menu options 😂 that said, I'm wondering if we would want to place download/upload in its own section? We could move the Upload options below the "Copy Path" options and group them with the download ones.. 🤔

@JWaters02
Copy link
Member Author

image image

Copy link
Contributor

@anaxceron anaxceron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some comments re: minor edits to wording.

"initializeUSSFavorites.error.buttonRemove": "initializeUSSFavorites.error.buttonRemove",
"File does not exist. It may have been deleted.": "File does not exist. It may have been deleted.",
"Pulling from Mainframe...": "Pulling from Mainframe...",
"The 'move' function is not implemented for this USS API.": "The 'move' function is not implemented for this USS API.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"The 'move' function is not implemented for this USS API.": "The 'move' function is not implemented for this USS API.",
"The 'Move' function is not implemented for this USS API.": "The 'move' function is not implemented for this USS API.",

"initializeUSSFavorites.error.buttonRemove": "",
"File does not exist. It may have been deleted.": "",
"Pulling from Mainframe...": "",
"The 'move' function is not implemented for this USS API.": "",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"The 'move' function is not implemented for this USS API.": "",
"The 'Move' function is not implemented for this USS API.": "",

"File path"
]
},
"Profile does not exist for this file.": "Profile does not exist for this file.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we say "A profile ... "?

if (children.length > Constants.MIN_WARN_DOWNLOAD_FILES) {
const proceed = await Gui.showMessage(
vscode.l10n.t(
"This data set has {0} members. Downloading a large number of files may take a long time. Do you want to continue?",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"This data set has {0} members. Downloading a large number of files may take a long time. Do you want to continue?",
"This data set has {0} members. Downloading a large number of files can take a long time. Do you want to continue?",

@davenice
Copy link
Contributor

I haven't tried the UX myself yet, but from the video I wasn't quite sure what I expected to happen about choosing encodings. The wording suggests I can choose the encoding of every file somehow ... but I can't quite envisage the GUI for this!

A couple of suggestions on the notifications....

I feel like when I get a few notifications that are quite generic like "File downloaded" or "New copy completed" and I find myself wondering if that was a notification I got just now, or one I got a while back that should have cleared. My stance for CICS has been to try and be a bit more descriptive with what the notification is e.g. "New copy completed on MYPROG1" or similar. We could be more descriptive in the notifications here, although I'm not set on that.

We could also provide a link in the notification to the file, or the directory we downloaded to. Again I don't think this is a must-have if there is a time pressure.

@JWaters02
Copy link
Member Author

JWaters02 commented Oct 22, 2025

Thanks a lot for the feedback dave, I really appreciate it🙂

The video is actually super out of date now I really should post a new one for better feedback, apologies!

I haven't tried the UX myself yet, but from the video I wasn't quite sure what I expected to happen about choosing encodings. The wording suggests I can choose the encoding of every file somehow ... but I can't quite envisage the GUI for this!

Instead of putting encoding options right into the download options quick pick, I have an option for "Choose Encoding" and if it is checked, it will also enter the existing choose encoding quick pick used for upload/open with encoding.

For downloading members of a PDS, this encoding will be applied to all members, which does make sense given they all follow the same characteristics - but for a USS directory, files in a directory can have all kinds of encodings so this is much tricker. So for downloading USS directories, I have the same "Choose Encoding" option but the resulting encoding selection quick pick is almost the same as the existing one but with an additional "Auto-detect file encoding" option which essentialls selects no encoding and relies on the encoding detection in zowe-cli which uses USS file tags and stuff.

A couple of suggestions on the notifications....

I feel like when I get a few notifications that are quite generic like "File downloaded" or "New copy completed" and I find myself wondering if that was a notification I got just now, or one I got a while back that should have cleared. My stance for CICS has been to try and be a bit more descriptive with what the notification is e.g. "New copy completed on MYPROG1" or similar. We could be more descriptive in the notifications here, although I'm not set on that.

This is a good point, I think I will implement that. Currently, I have it only saying what type of download has occured but I definately should include the path of the thing downloaded and/or resulting file path too.

What I do have now though is when a warning or error occurs, the user can click "View Details" and it will open the Troubleshooting webview with the command response from zowe-cli which contains a lot more details about the download. These types of details can't be shown in notifcations because of being too verbose. A warning can occur, for example, if overwrite is off and a file was skipped because of the overwrite and in the details it prints which files were skipped and not skipped (same as in zowe-cli (whch I have an open PR for to add overwrite support to all commands except USS directories (which it already exists for), so you can currently only test this with those)).

We could also provide a link in the notification to the file, or the directory we downloaded to. Again I don't think this is a must-have if there is a time pressure.

A link is a good idea!

@traeok
Copy link
Member

traeok commented Oct 22, 2025

I added a new test file USSUtils.unit.test.ts but when I run it, I get this error:

Unable to import package.json to get app Options : TypeError [ERR_INVALID_ARG_TYPE]: The "paths[0]" argument must be of type string. Received undefined

Still debugging this, it's a strange error with the Jest JUnit reporting where it fails to locate the package JSON. Plan to read over some of the changes to get a better grasp of why this is happening

@JWaters02
Copy link
Member Author

I added a new test file USSUtils.unit.test.ts but when I run it, I get this error:

Unable to import package.json to get app Options : TypeError [ERR_INVALID_ARG_TYPE]: The "paths[0]" argument must be of
type string. Received undefined

Still debugging this, it's a strange error with the Jest JUnit reporting where it fails to locate the package JSON. Plan to read over some of the changes to get a better grasp of why this is happening

Only vague thought I had is that I tried to use MockedProperty as much as possible instead of Object.defineProperty and maybe that usage has caused some weird side effect?

@traeok
Copy link
Member

traeok commented Oct 22, 2025

Only vague thought I had is that I tried to use MockedProperty as much as possible instead of Object.defineProperty and maybe that usage has caused some weird side effect?

Skimming through the tests, I do see a few new MockedProperty calls that are not calling the Symbol.dispose function, that could have an impact depending on what's being mocked

@JWaters02
Copy link
Member Author

Only vague thought I had is that I tried to use MockedProperty as much as possible instead of Object.defineProperty and maybe that usage has caused some weird side effect?

Skimming through the tests, I do see a few new MockedProperty calls that are not calling the Symbol.dispose function, that could have an impact depending on what's being mocked

Oooh right yeah I kinda only remembered I needed to dispose of it once I am done after I had done most of the testing and then I thought hmmm should I go through all of them to make sure I dispose properly and then I thought nahh I'm sure it's probably fine 😂

@JWaters02
Copy link
Member Author

The video is actually super out of date now I really should post a new one for better feedback, apologies!

Hmm looks like I haven't actually updated the data set download commands to use the prompt for encoding yet, oops... I will do that when I have time 😅

@JWaters02
Copy link
Member Author

USS download commands

2025-10-22.19-43-53.mp4

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

Projects

Status: Review/QA

Development

Successfully merging this pull request may close these issues.

Download a member / USS file or data set content to a local folder

5 participants