Repository navigation
Description
Found during the 0.10.0-bug-bash-1 bug bash.
Summary
The Import and Export controls in Collection View are not working. The toolbar exposes import from JSON, export of the entire collection, and export of the current query results, but the requested operation does not complete from the Collection View.
This appears to be a regression in the Collection View action path. The equivalent tree context-menu commands are separate entry points and should be compared during investigation.
Steps to reproduce
- Open a collection in Collection View.
- Select Import and choose Import From JSON....
- Choose a valid JSON document file and complete the import flow.
- Select Export and try both Export Entire Collection... and Export Current Query Results....
- Choose an output file when prompted.
Expected
- Import opens the file picker and imports valid JSON documents into the open collection.
- Export opens the save dialog and writes either the complete collection or the active query results to the selected JSON file.
- Progress, completion, and errors are visible to the user.
Actual
The Collection View import/export actions do not work.
Verified code path
- The Collection View toolbar invokes
mongoClusters.collectionView.importDocumentsandmongoClusters.collectionView.exportDocuments. - Those router procedures resolve the collection tree node and invoke the existing host commands:
vscode-documentdb.command.importDocumentsvscode-documentdb.command.internal.exportDocuments
- The host commands remain registered in
ClustersExtension.tsand are also used by the tree context menu. - No Collection View tests cover the import/export router procedures or toolbar handlers.
The Collection View routing was recently refactored in commit 9459f46b (refactor(collectionView): contextualize query actions), so this change area should be checked as a potential regression point. The exact root cause is not yet confirmed.
Suggested investigation
- Reproduce in a packaged VSIX and compare with the tree context-menu Import and Export commands.
- Verify the webview router receives the current Collection View context and resolves the matching
CollectionItem. - Verify command invocation and error propagation from the router to the UI.
- Add focused tests for the three toolbar actions, including the selected collection and query parameters passed to export.
Activity
tnaum-ms commentedon Aug 4, 2026
Duplicate check: searched today’s issues and historical reports for Collection View import/export failures. No matching open issue was found. Closed #368 concerns importing into a newly created Azure Cosmos DB for MongoDB RU container from the tree flow, not the Collection View toolbar regression. Existing import/export feature discussions are also separate from this failure.