Skip to content

WIP feature analysis tools#1732

Draft
paustint wants to merge 6 commits into
mainfrom
feat/feature-analysis-tools
Draft

WIP feature analysis tools#1732
paustint wants to merge 6 commits into
mainfrom
feat/feature-analysis-tools

Conversation

@paustint

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings May 16, 2026 22:32
@paustint paustint marked this pull request as draft May 16, 2026 22:32
Comment thread libs/features/manage-permissions/src/PermissionAnalysisView.tsx Fixed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds browser-side Permission Analysis and Data Analysis/Field Usage tooling, backed by local Dexie history, background jobs, compressed result storage, new analysis routes, and UI surfaces for viewing/exporting findings.

Changes:

  • Adds analysis job schemas, Dexie local history, gzip helpers, background job handling, routes, nav/home entries, and job popover “View” support.
  • Adds permission export analysis runners, finding aggregation, result parsing/view helpers, history modal integration, and UI highlighting/filtering.
  • Adds Field Usage analysis runner, where-used lookup, destructive-delete helpers, result views/tests, and supporting shared utilities.

Reviewed changes

Copilot reviewed 121 out of 122 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
tsconfig.base.json Adds path alias for data-analysis feature.
libs/ui/src/lib/widgets/ProfileOrPermSetPopover.tsx Adds Salesforce setup URL helpers.
libs/ui/src/lib/widgets/ItemSelectionSummary.tsx Honors disabled state for item clearing.
libs/ui/src/lib/sobject-list/SobjectListMultiSelect.tsx Propagates disabled state through object selection UI.
libs/ui/src/lib/sobject-list/ConnectedSobjectListMultiSelect.tsx Adds disabled support to connected object list.
libs/ui/src/lib/sobject-field-list/useWhereIsThisUsed.tsx Uses shared custom-field tooling-name parser.
libs/ui/src/lib/popover/Popover.tsx Merges trigger styles from button props.
libs/ui/src/lib/data-table/useDataTable.tsx Lazily builds quick-filter row text.
libs/ui/src/lib/data-table/DataTree.tsx Enables virtualization on tree grids.
libs/ui/src/lib/data-table/DataTable.tsx Formatting-only interface change.
libs/ui/src/lib/data-table/data-table-styles.scss Adds permission analysis finding highlight styles.
libs/ui/src/lib/card/Card.tsx Adjusts card header min-width behavior.
libs/types/src/lib/ui/types.ts Adds analysis async job types and metadata.
libs/types/src/lib/analysis-job-types.ts Adds Zod schemas/types for analysis history/results.
libs/types/src/index.ts Exports analysis job types.
libs/shared/utils/src/lib/sobject-api-name-utils.ts Adds Salesforce ID and object-name sanitizers.
libs/shared/utils/src/lib/regex.ts Corrects Salesforce ID length regex.
libs/shared/utils/src/lib/dedupe-field-usage-where-used.ts Adds where-used dedupe/sort helpers.
libs/shared/utils/src/lib/custom-field-tooling-names.ts Adds custom-field API-name parsing helpers.
libs/shared/utils/src/lib/compression.ts Adds gzip encode/decode helpers.
libs/shared/utils/src/lib/__tests__/sobject-api-name-utils.spec.ts Tests object-name/ID utilities.
libs/shared/utils/src/lib/__tests__/dedupe-field-usage-where-used.spec.ts Tests where-used dedupe/sort helpers.
libs/shared/utils/src/lib/__tests__/custom-field-tooling-names.spec.ts Tests custom-field parsing helpers.
libs/shared/utils/src/index.ts Exports new shared utilities.
libs/shared/ui-utils/src/lib/shared-ui-utils.ts Updates field type display formatting.
libs/shared/ui-router/src/lib/ui-router.ts Adds analysis app routes.
libs/shared/ui-db/src/lib/ui-db.ts Adds local analysis history Dexie table.
libs/shared/ui-db/src/lib/analysis-job-history-retention.ts Adds analysis history pruning.
libs/shared/ui-db/src/index.ts Exports retention helper.
libs/shared/ui-core/src/jobs/JobWorker.ts Runs analysis jobs and writes compressed history rows.
libs/shared/ui-core/src/jobs/Jobs.tsx Handles analysis job progress/results.
libs/shared/ui-core/src/jobs/Job.tsx Adds cancel/view support for analysis jobs.
libs/shared/ui-core/src/index.ts Exports jobs state.
libs/shared/ui-core/src/create-fields/create-fields-load-utils.ts Uses shared field namespace parser.
libs/shared/ui-core/src/app/HeaderNavbarItems.tsx Adds Analysis Tools navbar menu.
libs/shared/ui-core/src/app/AppHome/AppHome.tsx Adds Analysis home card.
libs/shared/data/src/lib/data-utils.ts Adds paginated query-with-budget helper.
libs/shared/data/src/lib/client-data.ts Formatting-only change.
libs/shared/data/src/index.ts Exports data utilities.
libs/shared/constants/src/lib/shared-constants.ts Adds analysis page titles.
libs/shared/constants/src/lib/permission-export-finding-codes.ts Adds permission finding code catalog.
libs/shared/constants/src/index.ts Exports finding constants.
libs/icon-factory/src/lib/icon-factory.tsx Registers additional icons.
libs/features/query/src/QueryResults/QueryResults.tsx Adds localStorage query handoff fallback.
libs/features/manage-permissions/src/PermissionAnalysisSelection.tsx Adds permission analysis selection entry.
libs/features/manage-permissions/src/PermissionAnalysisFindingsModal.tsx Adds finding detail modal.
libs/features/manage-permissions/src/PermissionAnalysisFindingsFiltersBar.tsx Adds issue filter toolbar.
libs/features/manage-permissions/src/PermissionAnalysis.tsx Adds permission analysis route shell.
libs/features/manage-permissions/src/PermissionAnalysisView.tsx Adds permission analysis result view.
libs/features/manage-permissions/src/permission-export/substitute-soql-placeholders.ts Adds SOQL placeholder substitution.
libs/features/manage-permissions/src/permission-export/substitute-soql-placeholders.spec.ts Tests placeholder substitution.
libs/features/manage-permissions/src/permission-export/soql/*.soql Adds reviewer/reference SOQL templates.
libs/features/manage-permissions/src/permission-export/soql-templates.ts Adds composed permission export SOQL builders.
libs/features/manage-permissions/src/permission-export/permission-export-query-runner.ts Adds template query runner wrapper.
libs/features/manage-permissions/src/permission-export/index.ts Exports permission export modules.
libs/features/manage-permissions/src/permission-export/build-permission-export-findings.ts Builds permission analysis findings and summaries.
libs/features/manage-permissions/src/permission-export/__tests__/soql-templates.spec.ts Tests SOQL builders.
libs/features/manage-permissions/src/permission-export/__tests__/run-permission-export.spec.ts Tests export runner.
libs/features/manage-permissions/src/permission-export/__tests__/build-permission-export-findings.spec.ts Tests finding generation.
libs/features/manage-permissions/src/permission-export-result-view.ts Re-exports result-view modules.
libs/features/manage-permissions/src/permission-export-result-view-modules/* Adds permission export parsing/sorting/column helpers.
libs/features/manage-permissions/src/permission-analysis-viewer-badge.styles.ts Adds analysis badge styles.
libs/features/manage-permissions/src/permission-analysis-tree-group-title.ts Adds group-title helper.
libs/features/manage-permissions/src/permission-analysis-issues-filters.ts Adds URL-backed issue filters.
libs/features/manage-permissions/src/permission-analysis-export-metadata-context.tsx Adds export metadata context.
libs/features/manage-permissions/src/ManagePermissionsSelection.tsx Adds permission-analysis mode and job start flow.
libs/features/manage-permissions/src/ManagePermissionsEditor.tsx Splits object permission columns into profile/permission-set tabs.
libs/features/manage-permissions/src/index.ts Exports analysis modules.
libs/features/manage-permissions/src/analysis-job-status-display.ts Adds status label formatter.
libs/features/manage-permissions/src/__tests__/export-grid-finding-cells.spec.ts Tests finding cell helpers.
libs/features/manage-permissions/src/__tests__/aggregate-permission-findings.spec.ts Tests finding aggregation.
libs/features/manage-permissions/eslint.config.js Adds lint suppression comment.
libs/features/deploy/src/index.ts Exports delete metadata modal.
libs/features/data-analysis/* Adds new data-analysis project config.
libs/features/data-analysis/src/DataAnalysis.tsx Adds data analysis route shell.
libs/features/data-analysis/src/DataAnalysisSelection.tsx Adds field usage selection/job launcher.
libs/features/data-analysis/src/FieldUsageAnalysisView.tsx Adds field usage result view.
libs/features/data-analysis/src/field-usage/run-field-usage.ts Adds field usage scan runner.
libs/features/data-analysis/src/field-usage/compute-field-usage-where-used.ts Adds Tooling where-used lookup.
libs/features/data-analysis/src/field-usage-destructive-delete.ts Adds destructive delete eligibility/metadata helpers.
libs/features/data-analysis/src/where-used-open-in-salesforce.ts Adds Salesforce deep-link fallback helpers.
libs/features/data-analysis/src/shared/analysis-job-runtime-state.ts Adds analysis job runtime helpers.
libs/features/data-analysis/src/field-usage-result-parse.ts Adds field usage parsing helpers.
libs/features/data-analysis/src/**/*.spec.ts Adds data-analysis tests.
apps/jetstream/src/app/components/core/AppInitializer.tsx Prunes analysis history after DB init.
apps/jetstream/src/app/AppRoutes.tsx Adds web analysis routes.
apps/jetstream-e2e/src/tests/app/routing.spec.ts Adds routing coverage for analysis links.
apps/jetstream-desktop-client/src/app/components/core/AppInitializer.tsx Prunes analysis history after DB init.
apps/jetstream-desktop-client/src/app/AppRoutes.tsx Adds desktop analysis routes.
apps/jetstream-canvas/src/app/AppRoutes.tsx Adds canvas analysis routes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread libs/features/data-analysis/src/DataAnalysisSelection.tsx Outdated
Comment thread libs/features/data-analysis/src/DataAnalysisSelection.tsx
Comment thread libs/features/data-analysis/src/where-used-open-in-salesforce.ts Outdated
Comment thread libs/shared/ui-core/src/jobs/JobWorker.ts Outdated
Comment thread libs/features/data-analysis/src/field-usage/compute-field-usage-where-used.ts Outdated
Comment thread libs/features/manage-permissions/src/PermissionAnalysisView.tsx Outdated
Comment thread libs/features/data-analysis/src/FieldUsageAnalysisView.tsx Outdated
Comment thread libs/features/manage-permissions/src/PermissionAnalysisSelection.tsx Outdated
Comment thread libs/features/manage-permissions/src/PermissionAnalysisView.tsx Fixed
@paustint paustint force-pushed the feat/feature-analysis-tools branch 5 times, most recently from c91823b to 65b4f24 Compare June 23, 2026 01:14
@paustint paustint force-pushed the feat/feature-analysis-tools branch 2 times, most recently from 5db76fb to 812f253 Compare June 30, 2026 00:49
@paustint paustint force-pushed the feat/feature-analysis-tools branch from 812f253 to e13913d Compare June 30, 2026 14:55
paustint added a commit that referenced this pull request Jul 1, 2026
… feature

Precursor to the analysis-tools feature PR (#1732). Splits out the shared,
unflagged UI-library changes that ship to ALL users regardless of the
`analysis-tools` feature flag, so they can be reviewed/shipped independently
and the flag becomes a true safety boundary for the feature itself.

Included (all render/run for every user, not behind the flag):
- Navbar: responsive overflow "More" menu + config-driven items API
  (Navbar, NavbarMenuItems, HeaderNavbar, useHeaderNavbarItems hook,
  headerNavbarBillingUserItems) — the analysis-tools nav menu is omitted
  here and re-added flag-gated in the feature PR.
- DataTable: opt-in `autoRowHeight` prop (default render path unchanged).
- Card, Popover, ItemSelectionSummary, sobject-list `disabled` prop,
  ProfileOrPermSetPopover setup-url helpers.
- useWhereIsThisUsed + create-fields: shared custom-field tooling-name
  parsing (custom-field-tooling-names util + tests).
- regex SFDC_ID 15/18-char fix; polyfillFieldDefinition label tweaks;
  additive icon registrations.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Added `truncated` flag to `FieldUsageStat` and `ScanFieldUsageResult` to indicate incomplete field data.
- Updated `runFieldUsageQueryForObjects` to handle per-field truncation and reflect it in the UI.
- Introduced tests for permission export findings to suppress warnings when permissions are truncated.
- Enhanced `runPermissionExport` to dynamically select available system permission fields based on the org's capabilities.
- Modified SOQL query generation to prevent invalid field errors by only including existing permission fields.
- Improved field usage analysis view to display truncated status and provide user feedback on scanned percentages.
- Refactored destructive delete eligibility checks to consider field scan truncation.
- Added unit tests for `queryWithRecordBudget` to ensure correct handling of record limits and pagination.
paustint added a commit that referenced this pull request Jul 2, 2026
… feature

Precursor to the analysis-tools feature PR (#1732). Splits out the shared,
unflagged UI-library changes that ship to ALL users regardless of the
`analysis-tools` feature flag, so they can be reviewed/shipped independently
and the flag becomes a true safety boundary for the feature itself.

Included (all render/run for every user, not behind the flag):
- Navbar: responsive overflow "More" menu + config-driven items API
  (Navbar, NavbarMenuItems, HeaderNavbar, useHeaderNavbarItems hook,
  headerNavbarBillingUserItems) — the analysis-tools nav menu is omitted
  here and re-added flag-gated in the feature PR.
- DataTable: opt-in `autoRowHeight` prop (default render path unchanged).
- Card, Popover, ItemSelectionSummary, sobject-list `disabled` prop,
  ProfileOrPermSetPopover setup-url helpers.
- useWhereIsThisUsed + create-fields: shared custom-field tooling-name
  parsing (custom-field-tooling-names util + tests).
- regex SFDC_ID 15/18-char fix; polyfillFieldDefinition label tweaks;
  additive icon registrations.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants