Replace WebDAV Browser webview with native TreeView#174
Closed
Replace WebDAV Browser webview with native TreeView#174
Conversation
Replace the 561-line HTML webview (webdav.html) with a VS Code native TreeDataProvider sidebar. This gives the extension its first Activity Bar presence and provides collapsible tree browsing, context menus, keyboard navigation, theming, and accessibility for free. - Add Activity Bar container "B2C-DX WebDAV" with sidebar tree view - Lazy-load directory contents via PROPFIND with caching - Context menu commands: New Folder, Upload, Delete, Download, Open File - Open files via temp storage with native VS Code editors (syntax highlighting, image viewer, etc.) - Welcome view when no B2C instance is configured - Replace "*" activation event with targeted onView activation - Remove webdav.html and all inline webview message handling (~240 lines)
- Add WebDavFileSystemProvider with caching, stat/readDirectory/readFile/ writeFile/createDirectory/delete operations against WebDAV - Root path handling returns synthetic directory listing of the 9 well-known B2C Commerce roots (avoids PROPFIND on "/") - Tree provider delegates to FS provider instead of calling WebDAV directly; root nodes use standard folder icons via resourceUri - New File command: prompts for filename, creates empty file, opens in editor - Mount/Unmount Workspace commands: add/remove b2c-webdav:/ as a VS Code workspace folder for native Explorer integration - Context key b2c-dx.webdav.mounted tracks mount state for menu visibility - Download command available in native Explorer context menu for b2c-webdav files
Change "Open as Workspace Folder" to operate on the right-clicked node (root or directory) rather than mounting b2c-webdav:/ globally. The workspace folder is named "WebDAV: <path>" for clarity. Move mount command from view title bar to context menu. Remove unmountWorkspace command and mounted context key tracking — VS Code's native "Remove Folder from Workspace" handles unmounting.
This was referenced Feb 21, 2026
Collaborator
Author
|
Superseded by #186 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
webdav.html) with a native VS CodeTreeDataProvidersidebar, giving the extension its first Activity Bar presenceWebDavFileSystemProviderbacked by the SDK's WebDAV client — enables opening, editing, and saving files directly via VS Code's native editorCartridges,Cartridges/my-cartridge) into the native Explorer for full file-management UX; unmount via VS Code's built-in "Remove Folder from Workspace""*"activation event with targetedonView:b2cWebdavExplorerandonFileSystem:b2c-webdavactivationextension.tsNew files
src/webdav-tree/webdav-config.tsWebDavConfigProvider— lazy config resolution + B2CInstance cachingsrc/webdav-tree/webdav-fs-provider.tsWebDavFileSystemProvider— stat, readDirectory, readFile, writeFile, createDirectory, delete with cachingsrc/webdav-tree/webdav-tree-provider.tsWebDavTreeDataProvider+WebDavTreeItem(root/directory/file nodes)src/webdav-tree/webdav-commands.tssrc/webdav-tree/index.tsregisterWebDavTree()wiring functionmedia/b2c-icon.svgCommands & menus
WebDAV: Cartridges/my-cartridge) into the native Explorerb2c-webdavfilesvscode.openusing the FileSystemProviderFileSystemProvider
The
WebDavFileSystemProviderenables VS Code's native file operations:b2c-webdav:/) returns a synthetic listing of the 9 well-known B2C Commerce directories (Impex, Temp, Cartridges, etc.) without hitting the serverWelcome view
When no B2C instance is configured (i.e. no
dw.jsonorSFCC_*env vars), the tree shows a welcome message with a Refresh link.