@W-22653715 adding docs browser in vs extension#487
Draft
charithaT07 wants to merge 21 commits into
Draft
Conversation
* @W-22210602 CIP analytics vs extension dashboard * CIP analytics VS extension UX changes - claude assisted * @W-22210602: Adding Analytics report support in VS Code extension (#402) * @W-22210602: Adding CIP analytics to a new menu * @W-22210602: Adding Analytics report support in VS Code extension * @W-22210602: Adding Analytics report support in VS Code extension * fixing the result exports in csv and json * @W-22210602: Adding Analytics report support in VS Code extension * @W-22210602: Adding Analytics report support in VS Code extension * @W-22210602: Adding Analytics report support in VS Code extension * @W-22210602: Adding Analytics report support in VS Code extension * cip analytics report ux refinements --------- Co-authored-by: CharithaT07 <charitha.tadakanti777@gmail.com> * adding some changes in query builder * added some changes in cip analytics vs extension * initial changes for supporting multi realm in CIP * adding save query and multi realm support * adding save query and multi realm support * fixing lint * refactored to make the ux resuable * refactored to make the ux resuable * Merge remote-tracking branch 'upstream/main' into W-22210602-CIP-Analytics-VS-extension * docs: add page-specific SEO descriptions to SCAPI schemas and CI/CD pages These two pages were falling back to the site-wide default meta description. Add concise page-specific descriptions and a doc-only changeset. * fix: bump qs and picomatch to resolve CVE-2026-2391 and CVE-2026-33671 (#450) - qs: 6.14.1 → 6.15.2 (fixes CWE-770 resource allocation without limits) - picomatch: 2.3.1 → 2.3.2, 4.0.3 → 4.0.4 (fixes ReDoS vulnerability) * addressing the review comments * addressing the review comments * fix: dedupe @salesforce/b2c-tooling-sdk in vs-extension package.json after merge --------- Co-authored-by: amit-kumar8-sf <amit.kumar.sf1408@gmail.com> Co-authored-by: Charles Lavery <clavery@salesforce.com> Co-authored-by: Kevin He <kevin.he@salesforce.com>
* @W-22619604 initial changes for ISML support * @W-22619604 ISML support in vs extension * temporary change in workflows to trigger build on develop * Fixing the lint * minor refactors
* @W-22653726 adding XSD valiation in vs extension * adding XSD valiation in vs extension * adding XSD valiation in vs extension * adding XSD valiation in vs extension * adding XSD valiation in vs extension
* Onboarding walkthrough for B2C VS Code extension @W-22210602 Adds a 5-phase getting-started walkthrough that guides users through CLI install, dw.json setup, OAuth/Basic auth, cartridge deploy, and scaffold generation. Includes a role-based onboarding panel with persona-specific paths (Storefront, API/Integration, DevOps, AI-augmented). Resolved Config inspect panel: - Mask secrets as a lock pill instead of first-4 preview - Stats strip with field/source/secret counts - Source-tinted pills, zebra-striped table, accent-bordered group cards Scaffold: - Always generate cartridges into <workspace>/cartridges so the Cartridges view picks them up without dw.json configuration - Explicit Cartridges-view refresh after .project creation, since the **/.project FileSystemWatcher can race scaffold writes * @W-22799934: Creation of walkthrough on VS Code * @W-22799934: Update eslint.config.mjs * @W-22799934: Update package.json * @W-22799934: Changes for onboarding walkthrough
# Conflicts: # packages/b2c-vs-extension/README.md # packages/b2c-vs-extension/package.json # packages/b2c-vs-extension/scripts/esbuild-bundle.mjs # packages/b2c-vs-extension/src/code-sync/deploy-command.ts # packages/b2c-vs-extension/src/extension.ts # packages/b2c-vs-extension/src/safety.ts # packages/b2c-vs-extension/src/telemetry.ts
…ce behavior (#483) * ci: use RENOVATE_TOKEN for Renovate to enable vulnerability alert access The default GITHUB_TOKEN cannot read Dependabot/vulnerability alerts, causing 'Cannot access vulnerability alerts' on the Dependency Dashboard. Switch to the RENOVATE_TOKEN secret which can be granted alert read access. * fix(vs-extension): make extension resilient offline and when instance unreachable A malformed dw.json could throw out of activateInner() and disable the entire extension, leaving only the two fallback commands — which broke local code browsing (cartridge discovery, Script API IntelliSense, cartridge-path require resolution, CAP detection, scaffolding), none of which need a connection. - extension.ts: guard updateInstanceStatusBar() so a garbled/empty dw.json can never escape the activation path; gate on hasB2CInstanceConfig() instead of mere config truthiness (fixes a "$(cloud) unnamed" mislabel). - SDK DwJsonSource.listInstances(): tolerate a malformed dw.json (log + return []) like the resolver already does — defense in depth for all callers (instance-manager, instance switcher, CLI setup:instance:*). - Connection-down failures on the WebDAV/Content/Sandbox trees now collapse into a single throttled notification (notify.ts) instead of one toast per expand/refresh/poll tick; log tailing de-dups consecutive identical errors. - Sandbox view distinguishes "missing OAuth credentials" from "no realm" via a b2c-dx.sandbox.needsOAuth context key + welcome variant. - Remove leftover debug temp-zip write/console.log from the Content FS provider. - Add SDK unit test + a malformed-dw.json activation regression config.
…ISML scanner (#488) The ISML scanner loaded vscode-html-languageservice via createRequire() + deep-path require() calls. esbuild treated the local `require` binding as user-shadowed and left the calls as runtime requires in the bundle, so the scanner code was never inlined. Because the VSIX is packaged with `vsce --no-dependencies`, the deep submodule paths were unresolvable at runtime and `Module._resolveFilename` threw during activation. The crash fired on the first activation event (onLanguage:isml, which also activates redhat.vscode-xml). With activation cached as failed, every other event was short-circuited — no "B2C DX" output channel, no instance selector, no commands worked. Switch to direct ESM imports so esbuild bundles the scanner code inline. The built dist/extension.cjs now has zero `vscode-html-languageservice` references; the extension activates cleanly under --no-dependencies.
# Conflicts: # pnpm-workspace.yaml
* @W-22961131 fix adding quotes for reserved keywords * adding group by in the query builder * adding better date time filtering * added saved queries to the side view * added the new curated reports aligning sdk * fixing lint * minor changes in reports
Collaborator
|
@charithaT07 Can you look at this in light of the new docs work I did for the CLI and MCP. There is significant changes there and any IDE extension related to docs should be building on top of that. |
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
Brief description of what this PR does.
What this PR does
Adds a new Docs Browser to the B2C DX VS Code extension. It's an
offline-first, in-editor reference for the SFCC Script API (
dw.*) — everyclass, interface, enum, method, property, and constant on the Script API
surface, available without leaving your editor.
Right-click any
dw.*symbol in a JavaScript or TypeScript cartridge file→ View B2C Docs → reader panel opens beside your code with the
signature, parameters, return type, throws, examples, and full description.
Class pages list all members inline so you can navigate without going back
to the sidebar.
Why
B2C developers lose 15–30 minutes a day context-switching between VS Code
and the official documentation site to look up Script API methods. The Docs
Browser eliminates that switch and removes the network dependency: 7,366
entries ship inside the VSIX and work fully offline.
This is also a Prophet-parity feature — Prophet's Script API browser is one
of the most-used parts of that extension, and we needed a first-party
equivalent.
Where the data comes from
JSDoc comments inside
@salesforce/b2c-script-types.d.tsfiles vendoredinto this repo at version 26.7.0. The same data already powers the
extension's IntelliSense — the Docs Browser is its rich reader complement.
Features
B2C-DX → Docs. Browse alldw.*packages and classes.with full signatures. Every row is clickable.
as equivalent (
dw.order.BasketMgranddw/order/BasketMgrmatch the same entry)..js/.tscartridge files. Resolvesvia Go-to-Definition for accuracy (no scraping).
Alt+D→ search docsAlt+Shift+D→ view docs at cursor (cartridge files only)b2c-dx.features.docsBrowserto disable everything.Architecture
scripts/build-docs-index/) parses.d.tsfiles withts-morphinto a normalizedDocEntry[]schema. Output is byte-deterministicand gated by CI to prevent stale committed JSON.
src/docs-browser/) lazy-loads three tiers:Class member tables read straight from the search dictionary, so opening a
class page never blocks the UI thread on the multi-megabyte full source.
unsafe-eval, andHTML built entirely host-side from a tiny allowlist Markdown renderer.
Test plan
pnpm --filter b2c-vs-extension run typecheck:agent— cleanpnpm --filter b2c-vs-extension run lint:agent— cleanpnpm --filter b2c-vs-extension run test— 264 unit + 4 integrationtests passing, 0 failing
pnpm --filter b2c-vs-extension run build:docs-indexdeterministicacross rebuilds (CI gate fails on drift)
What changed
src/docs-browser/(loader, search, tree, webview, recents,symbol resolver, entry renderer, Markdown renderer).
scripts/build-docs-index/plus generated index inresources/docs/.Alt+D,Alt+Shift+D) and four new commands.docs/vscode-extension/docs-browser.md.ts-morph(build-time only, not bundled).Testing
How was this tested?
Dependencies
3pl-approvedis set by a maintainerpnpm test)pnpm run format)