VS Code extension: native TreeView, content libraries, plugin support, CI#186
Open
VS Code extension: native TreeView, content libraries, plugin support, CI#186
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.
- Native tree view for browsing B2C Commerce content libraries (pages, content assets, components, static assets) in the sidebar - FileSystemProvider (b2c-content: scheme) for viewing/editing content XML with round-trip import via site archive jobs - Export commands: Export, Export without Assets, Export Assets Only - Import site archive from command palette or explorer context menu (B2C-DX submenu) - Filter/search within library tree with toggle in title bar - Click static assets to preview images via WebDAV filesystem - Show job log in editor on import failure - Sort content-link children by position element instead of XML document order
- Create separate CI workflow for extension tests using xvfb-run (path-filtered to packages/b2c-vs-extension/**) - Add tsconfig.test.json and pretest script to compile test files - Fix self-referencing step condition bug in ci.yml - Add typecheck to main CI for the extension (catches SDK breakage) - Add VSIX build, git tagging, and release upload to publish workflow
Replace 7 independent resolveConfigWithPlugins() call sites with a single B2CExtensionConfig singleton that caches resolved config and exposes getInstance()/getConfig()/getConfigError()/reset(). - Add dw.json file watcher (RelativePattern + onDidSaveTextDocument) that auto-resets config and fires onDidReset event - WebDAV tree subscribes to onDidReset for automatic refresh on config changes - Silently handle FileNotFound in tree re-expansion after server switch - Delete WebDavConfigProvider (fully replaced by B2CExtensionConfig)
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.
…to feature/vsc-ext-native-improvements # Conflicts: # packages/b2c-vs-extension/package.json # packages/b2c-vs-extension/src/extension.ts
…nto feature/vsc-ext-native-improvements # Conflicts: # packages/b2c-vs-extension/src/extension.ts
This was referenced Feb 22, 2026
3 tasks
…, plugin opts - Refresh content tree on config reset (matching webdav-tree pattern) - Honour create/overwrite flags in WebDAV writeFile per VS Code contract - Strip single existing top-level root in ensureArchiveStructure to avoid double-nesting when re-wrapping site archives - Add accountManagerHost to PluginHookOptions and resolveOptions - Use Uri.from instead of Uri.parse for correct special-char handling - Guard applyMiddleware against duplicate registration
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
Unified PR combining feature branches into a single PR targeting main. Supersedes #174, #179, #182, and #185.
Native WebDAV TreeView (from #174)
Content Library Explorer (from #179)
Plugin Support & Centralized Config (from #185)
@salesforce/b2c-tooling-sdk/plugins)B2CExtensionConfigproviderresolveConfig()callB2CExtensionConfig— eliminates duplicate config resolution, adds plugin support and dw.json file-watching to the content treeVS Code Extension CI & Publish (from #182)
ci-vs-extension.yml) for extension tests usingxvfb-run, path-filtered topackages/b2c-vs-extension/**tsconfig.test.jsonandpretestscriptci.yml; add typecheck + lint for extension.vsixupload to GitHub releasesTest plan
pnpm run typecheck:agentpassespnpm run lint:agentpassespnpm --filter @salesforce/b2c-tooling-sdk run test:agentpassespnpm --filter b2c-vs-extension run buildsucceedsxvfb-run