feat: React-based Profile/PermissionSet Editor UI for VSCode#438
feat: React-based Profile/PermissionSet Editor UI for VSCode#438Copilot wants to merge 10 commits into
Conversation
- Add reusable WebviewPanel base class for VSCode webview panels - Add ProfileEditorWebview backend with profile data loading and save - Add ProfileEditorCommand to open the editor from context menu or palette - Add React-based UI with virtualized object/field permission tables - Add filter bar with match highlighting for 500+ objects / 800+ fields - Add floating ActionBar for save/reset operations - Add AddPermissionDialog for adding new object/field permissions - Add setObjectPermissions() and setFieldPermissions() public API to SalesforceUserPermissions - Add license and description public getters to SalesforceUserPermissions - Add esbuild script for bundling React webview - Register editProfilePermissions command in constants.ts and commands.yaml - Add React, react-dom, react-window, esbuild as devDependencies" Co-authored-by: Codeneos <[email protected]>
- Fix Salesforce field type comparison to be case-insensitive (id vs ID) - Fix modifyAllRecords to unconditionally set all object permissions - Remove duplicate config.vlocity.salesforce.enabled from menu when conditions - Remove unnecessary type cast in App.tsx reducer - Add 'saving' to AppAction union type for proper type safety - Fix handleSave to dispatch 'saving' action instead of 'loading'" Co-authored-by: Codeneos <[email protected]>
|
@copilot Update the profile header to be more inline with the VScode standards. |
- Install @vscode/codicons devDependency - Generate codicons.scss with base64-embedded font for reliable webview delivery - ProfileHeader: replace 👤/🔑 with codicon-account/codicon-shield - ProfileHeader: replace bold labels with codicon-tag/symbol-class/symbol-field/info - FilterBar: replace 🔍 search emoji with codicon-search - FilterBar: replace ✕ clear button text with codicon-close - AddPermissionDialog: replace ✕ close button text with codicon-close - App.tsx: replace ⚠/⏳ banner emojis with codicon-error/codicon-loading - Update styles.scss to use symbolIcon color tokens for codicons - Profile icon uses --vscode-symbolIcon-classForeground (orange) - PermissionSet icon uses --vscode-symbolIcon-keywordForeground (blue)" Co-authored-by: Codeneos <[email protected]>
Done in commit
The codicon font is embedded as a base64 data URI in |
…d legal comments handling
|
|
@copilot update the UI to support changing fields permissions in bulk by allowing selecting multiple rows using shift-click or ctrl-click. Allow removing permissions from the profile by adding a remove action for each row. Add support for refreshing the profile/permissionsset from the org and saving changes both as source file and to the org. Add a new command in the command pallet to open a profile or permissionset from the org instead of loading it from the file. Add a new tab in which problems and profile errors would be shown. When possible allow individuap errors to be fixed through a fix button behind the error. Errors are also displayed in a table. Possible errors are none existing fields, objects and classes or inconsistencues such as having permissions for a requir de field. Include a explanation of the error and when possible a link to a Salesforce documentation page. The prermission problem scanner must use a config table in the from of an Ja object that stores and evaluator that accepts the profile, the profile irem being scanned (FieldAccess, etc) and the type (FieldAccess, ApexClassAccess) as well as rule metadata. When a profile cannot be saved to the org because of errors add these errors to the same tab but catorgeize as deployment error. |
…n progress) Co-authored-by: Codeneos <[email protected]>
Co-authored-by: Codeneos <[email protected]>
Done in commit Permission Validator (new requirement) —
Extension backend —
React UI — Problem tab
Other features (also in this PR)
|
…gement and UI updates
…ation and fix actions




Adds a table-driven webview editor for Salesforce Profiles and Permission Sets, focused on FLS and object access management at scale (500+ objects, 800+ fields per object).
Webview Infrastructure
WebviewPanel<TIn, TOut>— reusable base class for VSCode webview panels; handles CSP nonces, HTML scaffolding, and typed bidirectionalpostMessagecommunicationsrc/lib/webview/types.ts— shared message/data contracts used by both the extension host and the React bundleExtension Backend
ProfileEditorWebview— loads profile/permset metadata, saves changes as source file or to the org, exposes object/field describe for "Add Permission" flow, runs structural validation automatically on load and org-level validation on requestProfileEditorCommand(vlocode.editProfilePermissions) — opens on.profile-meta.xml/.permissionset-meta.xml; registered in command palette and explorer/editor context menusOpenProfileFromOrgCommand(vlocode.openProfileFromOrg) — new command to open a Profile or PermissionSet directly from the org via a Quick Pick selectorReact UI (
src/webviews/profileEditor/)codicon-search/codicon-closecodicon-accountfor Profile,codicon-shieldfor PermissionSet), user license, object/field counts, and description usingcodicon-tag,codicon-symbol-class,codicon-symbol-field, andcodicon-infoActionBar— save/reset only visible when changes exist; save targets both source file and org; shows unsaved change count; refresh button to reload from orgAddPermissionDialog— fetches available objects/fields viadescribeSObjects/describeSObjecton demand; usescodicon-closecodicon-errorandcodicon-loading(with spin modifier) instead of emojiSalesforceProfileValidator (
@vlocode/salesforce)A reusable, config-table-driven validator living in the
salesforcepackage — the profile editor consumes it rather than implementing its own rules.Structural rules:
obj-editable-not-readable,obj-viewall-not-readable,obj-modifyall-incomplete,obj-no-permissions,field-editable-not-readable,field-no-object-read,field-no-permissions,class-disabled.Org-level rules:
org-unknown-object,org-unknown-field.Each problem carries
severity,category,itemType,itemName,message, optionaldocsUrl, andfixable/fixActionmetadata.A
ProfileValidationContext(pre-builtMap<string, ObjectPermission>) is passed to every evaluator for O(1) lookups instead of O(n) linear scans.SalesforceUserPermissions API additions
Build
dist/webviews/profile-editor.mjs)codicons.scss—@vscode/codiconsfont embedded as a base64data:font/truetypeURI for reliable delivery inside VSCode webviewsreact,react-dom,react-window,@vscode/codiconsas devDependenciesScreenshot
Original prompt
📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.