Skip to content

LFS: beta rules toggle + severity filter on the Flows page#723

Open
RubenHalman wants to merge 1 commit into
SalesforceLabs:mainfrom
RubenHalman:lfs-beta-rules-severity-filter
Open

LFS: beta rules toggle + severity filter on the Flows page#723
RubenHalman wants to merge 1 commit into
SalesforceLabs:mainfrom
RubenHalman:lfs-beta-rules-severity-filter

Conversation

@RubenHalman
Copy link
Copy Markdown
Contributor

Hey @VinceFINET 👋

Two small quality-of-life improvements for the Lightning Flow Scanner integration on the Flows page.

What's in here

Beta rules toggle
Added a checkbox in the Flows section to include or exclude LFS beta rules. When you flip it, the flows dataset cache is busted and the scan reruns with the updated ruleset — so you always get results for the right set of rules without having to hit the global refresh button.

Severity filter
Added a dropdown next to the checkbox: All severities / Errors only / Warnings & above / Notes & above. Since the violations are already stored after the scan, changing the filter just re-mixes the cached data — no extra calls to Salesforce.

Under the hood

To make the severity filter work, lfsViolations had to change from string[] to { name, severity }[]. That touched a few places:

  • secretsauce formulas updated from .includes('X') to .some(v => v.name === 'X')
  • table column value updated from '.' to 'name'
  • mapResults() in the LFS scanner now captures severity from each rule result

The betaMode flag flows through the stack via DatasetRunInformation parameters, and both options are part of mixDependencies() so the cache stamp changes correctly when either value changes.

Testing notes

  • Load Flows with beta mode off (default) — should behave exactly as before
  • Enable beta mode — flows should re-scan and new beta violations may appear
  • Set severity to "Errors only" — flows with only warning/note violations should disappear from the table
  • Switch back to "All severities" — all flows should come back (from cache, no extra API call)

Two new options in the Flows section powered by the Lightning Flow Scanner integration.

- Added a checkbox to include/exclude beta rules in the scan. Toggling it busts the dataset cache so flows are re-scanned with the right ruleset.
- Added a severity dropdown (All / Errors only / Warnings & above / Notes & above). Filtering on severity re-mixes already-cached data, so no extra API calls to Salesforce.

On the data side, lfsViolations now stores { name, severity } objects instead of plain strings, which is what makes the severity filter possible. Updated secretsauce formulas and table column definitions accordingly.
@VinceFINET
Copy link
Copy Markdown
Collaborator

I really appreciate the time you put in this PR. Don't you think that this option would complexify the app? I would prefer you to tell me which is the best options we can put by default in the app. By experience the less option i set in the app the better. Users in the end do not get the impact on changing the options, and finally set all options to true and launch the scanning... So it's maybe better to come up with a default setting that would be the same one for everyone. what do you think? and maybe if they want to go deeper in the analysis they can use directly LFS directly?! Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants